/* Colores de la marca (brand-identity/ignacio-ffrench-davis/kit/D/tokens/tokens.css). */
:root {
  --bg: #f4f5f7;
  --surface: #eaebed;
  --ink: #171c26;
  --muted: #505561;
  --accent: #2847ff;
  --wrap: 760px;
  --wrap-wide: 1360px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --radius: 12px;
  --panel: #171c26;
  --font: "Archivo";
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0f18;
    --surface: #171c26;
    --panel: #1d2330;
    --ink: #f2f3f5;
    --muted: #9ea1aa;
    --accent: #6e94fd;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font), system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap, .wrap-wide {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap { max-width: calc(var(--wrap) + 2 * var(--gutter)); }
.wrap-wide, .header-inner, .footer-inner { max-width: calc(var(--wrap-wide) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.muted { color: var(--muted); }
.meta { margin: 8px 0 0; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Header: barra sólida, sin línea divisoria */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.brand { display: inline-flex; color: var(--ink); text-decoration: none; }
/* El SVG del logo hereda el color del texto (fill="currentColor"), así funciona en modo claro y oscuro. */
/* 24 px es el tamaño mínimo del logo según el manual; por debajo de eso se usa solo el monograma Ff. */
.brand .logo { display: block; height: 24px; width: auto; }
.brand .logo-symbol { display: none; height: 26px; width: auto; }
.nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 28px); font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; color: var(--muted); transition: color 150ms ease; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.nav-icon { display: inline-flex; }

/* Hero */
.hero { padding-block: clamp(40px, 7vw, 88px) clamp(40px, 5vw, 64px); }
.hero h1 { font-size: clamp(40px, 7vw, 84px); font-weight: 800; max-width: 18ch; }
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 58ch; margin: 24px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform 160ms var(--ease-out), background-color 150ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-ghost { background: var(--surface); color: var(--ink); }

/* Proyectos */
.projects { padding-bottom: clamp(72px, 10vw, 128px); scroll-margin-top: 64px; }
.section-title { font-size: clamp(24px, 3vw, 32px); font-weight: 800; margin: 0 0 28px; }

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 5vw, 56px) clamp(20px, 3vw, 36px);
}
@media (max-width: 700px) { .grid { grid-template-columns: 1fr; } }
.card { display: block; text-decoration: none; }
.card-media { aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
.card-body { padding-top: 16px; }
.card h3 { font-size: 22px; margin-bottom: 6px; }
.card p { margin: 0; font-size: 15px; line-height: 1.55; }
.card .meta { margin-top: 8px; }

@media (hover: hover) and (pointer: fine) {
  .card:hover .card-media img { transform: scale(1.03); }
  .card:hover h3 { color: var(--accent); }
  .btn:hover { background: color-mix(in srgb, var(--ink) 85%, var(--bg)); }
  .btn-ghost:hover { background: color-mix(in srgb, var(--surface) 80%, var(--ink)); }
}

/* Página de proyecto */
.project { padding-bottom: clamp(72px, 10vw, 128px); }
.project-header { padding-top: clamp(24px, 4vw, 48px); }
.project-header h1 { font-size: clamp(40px, 7vw, 76px); font-weight: 800; }
/* Volver: botón secundario compacto; el chevron se desplaza hacia atrás al pasar el mouse. */
.back { gap: 6px; margin-bottom: 24px; padding: 9px 16px 9px 12px; font-size: 14px; }
.back svg { transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .back:hover svg { transform: translateX(-3px); }
}

/* Banner: la imagen va de fondo y el título con la ficha encima.
   aspect-ratio deja que el bloque crezca si el título o los chips necesitan más alto. */
.banner {
  position: relative;
  display: flex;
  align-items: flex-end;
  aspect-ratio: 9 / 2;
  margin-bottom: clamp(40px, 6vw, 64px);
  overflow: hidden;
  border-radius: var(--radius);
  background: #1a1f3a;
  color: #fff;
}
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgb(8 10 30 / 0.72) 0%, rgb(8 10 30 / 0.35) 60%, rgb(8 10 30 / 0.15) 100%);
}
.banner-content { position: relative; z-index: 1; padding: clamp(20px, 4vw, 44px); }
.banner h1 { font-size: clamp(34px, 6vw, 72px); font-weight: 800; color: #fff; }

.banner-logos {
  position: absolute;
  z-index: 1;
  right: 14px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.banner .banner-logos img { position: static; width: auto; height: 12px; object-fit: contain; }
/* El logo del banco incluye trazos altos y bajos: a igual alto se ve más chico que el de 2Brains. */
.banner .banner-logos img[alt="Banco de Chile"] { height: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 16px 0 0; padding: 0; }
.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 14px;
  /* Radio fijo (no 999px) para que un chip largo que salta de línea no se vuelva ovalado. */
  border-radius: 17px;
  background: rgb(255 255 255 / 0.16);
  backdrop-filter: blur(6px);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.chip span { font-weight: 500; color: rgb(255 255 255 / 0.72); }

@media (max-width: 600px) {
  .banner { aspect-ratio: auto; min-height: 220px; }
  /* En celular los chips ocupan todo el ancho de abajo: los logos suben a la esquina superior. */
  .banner-logos { top: 12px; bottom: auto; }
  .banner-content { padding-top: 44px; }
}

/* Etapas del proyecto: pasos unidos por una línea; los tramos confidenciales
   van en color de acento con una llave y una etiqueta debajo. */
.process { margin-bottom: clamp(48px, 7vw, 80px); }
.process-grid {
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  row-gap: 14px;
}
.steps { display: contents; list-style: none; }
.step {
  position: relative;
  grid-row: 1;
  grid-column: var(--i);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.step-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.step-label { font-size: 14px; font-weight: 600; line-height: 1.3; text-wrap: balance; padding-inline: 4px; }
/* Línea hacia el paso siguiente: va del borde de este punto al borde del próximo. */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 13px;
  left: calc(50% + 20px);
  width: calc(100% - 40px);
  height: 2px;
  background: color-mix(in srgb, var(--ink) 18%, transparent);
}
.step.is-conf .step-dot { background: var(--accent); color: #fff; }
.step.line-conf::after { background: var(--accent); }

.conf {
  grid-row: 2;
  grid-column: var(--s) / var(--e);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--accent);
}
.conf-bracket {
  position: relative;
  width: calc(100% - 24px);
  height: 12px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 8px 8px;
}
.conf-bracket::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  background: var(--bg);
  transform: translateX(-50%) rotate(45deg);
}
.conf-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 5px 12px;
  border-radius: 17px;
  background: color-mix(in srgb, var(--accent) 10%, var(--bg));
  font-size: 13px;
  font-weight: 700;
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* En celular las etapas van en vertical: no caben seis nombres en una fila.
   La llave confidencial pasa a la derecha y abraza las filas de su tramo. */
@media (max-width: 600px) {
  .process-grid { grid-template-columns: 1fr auto; column-gap: 12px; row-gap: 0; }
  .step { grid-row: var(--i); grid-column: 1; flex-direction: row; min-height: 48px; gap: 14px; text-align: left; }
  .step-label { font-size: 15px; padding: 0; }
  .step:not(:last-child)::after { top: calc(50% + 18px); left: 13px; width: 2px; height: calc(100% - 36px); }
  .conf { grid-column: 2; grid-row: var(--s) / var(--e); flex-direction: row; gap: 8px; }
  .conf-bracket { width: 12px; height: calc(100% - 20px); border: 2px solid currentColor; border-left: 0; border-radius: 0 8px 8px 0; }
  .conf-bracket::after { left: auto; right: -6px; bottom: 50%; transform: translateY(50%) rotate(-45deg); }
  .conf-tag { margin: 0; font-size: 12px; padding: 4px 10px; }
}

.prose { margin-block: 0 clamp(40px, 6vw, 64px); }
/* Líneas de lectura bajo ~70 caracteres. */
.prose > * { max-width: 68ch; }
.prose p { margin: 0 0 1.1em; }
.prose a { color: var(--accent); }
.prose strong { font-weight: 650; }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.25em; }
.prose li { margin-bottom: 0.6em; padding-left: 0.25em; }
.prose li::marker { color: var(--muted); }
.prose ol li::marker { font-weight: 700; color: var(--accent); }
.block-heading { font-size: clamp(24px, 3vw, 32px); font-weight: 800; margin-block: clamp(56px, 8vw, 88px) 24px; scroll-margin-top: 88px; }

/* Etapas con sección propia: el nombre lleva a esa parte del caso. */
a.step-label { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 30%, transparent); text-underline-offset: 0.25em; transition: text-decoration-color 150ms ease; }
@media (hover: hover) and (pointer: fine) {
  a.step-label:hover { text-decoration-color: currentColor; }
}

/* Secciones de un caso: título fijo a la izquierda, contenido a la derecha (editorial). */
.case-section { margin-top: clamp(64px, 9vw, 112px); scroll-margin-top: 88px; }
.case-grid { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 3fr); gap: 24px clamp(32px, 5vw, 72px); align-items: start; margin-bottom: clamp(28px, 4vw, 44px); }
.case-grid.is-title-only { margin-bottom: 24px; }
.case-title { position: sticky; top: 88px; font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; letter-spacing: -0.025em; }
/* La barra corta sobre cada título es la barra compartida del monograma Ff. */
.case-title::before { content: ""; display: block; width: 28px; height: 5px; margin-bottom: 16px; border-radius: 3px; background: var(--accent); }
/* Dentro de la columna derecha los bloques no llevan su propio margen lateral. */
.case-body > .wrap, .case-body > .wrap-mid { max-width: none; margin-inline: 0; padding-inline: 0; }
.case-body > * + * { margin-top: 32px; }
.case-intro { margin-top: clamp(40px, 6vw, 72px); }
.case-intro .case-grid { margin-bottom: 0; }

/* Frase destacada: la idea central, en un bloque tinta como la página de contacto. */
.statement { margin-bottom: clamp(32px, 5vw, 48px); }
.case-body .statement { margin-bottom: 0; padding: clamp(28px, 4vw, 40px); border-radius: 16px; background: var(--panel); color: #fff; }
.statement-label { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--muted); }
.case-body .statement-label { color: #a9aeb8; }
.case-body > .prose { max-width: 72ch; }
@media (min-width: 1000px) { .case-body .points:not(.is-numbered) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.statement-text { margin: 0; max-width: none; font-size: clamp(19px, 1.8vw, 23px); line-height: 1.38; font-weight: 500; letter-spacing: -0.015em; text-wrap: pretty; }

/* Puntos: tarjetas blancas en grilla; la barra azul arriba repite el gesto del Ff. */
.wrap-mid { width: 100%; max-width: calc(960px + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.points-block { margin-bottom: clamp(40px, 6vw, 64px); }
.case-body .points-block { margin-bottom: 0; }
.points-label { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--muted); }
.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.point { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px 22px 24px; border-radius: var(--radius); background: #fff; box-shadow: 0 1px 2px rgb(23 28 38 / 0.05); }
@media (prefers-color-scheme: dark) { .point { background: var(--surface); box-shadow: none; } }
.points:not(.is-numbered) .point::before { content: ""; width: 20px; height: 4px; margin-bottom: 10px; border-radius: 2px; background: var(--accent); }
.point-title { font-size: 16px; font-weight: 650; line-height: 1.35; }
.point-text { font-size: 15px; line-height: 1.5; color: var(--muted); }
.point:not(:has(.point-title)) .point-text { color: var(--ink); font-size: 16px; }

/* Pasos de un flujo: línea de tiempo vertical, sin tarjetas. El número va en un aro azul
   y una línea lo une con el siguiente; título y texto a la derecha. */
.points.is-numbered { display: block; }
.points.is-numbered .point { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 20px; row-gap: 4px; padding: 0 0 32px; border-radius: 0; background: none; box-shadow: none; }
.points.is-numbered .point:last-child { padding-bottom: 0; }
.point-num { grid-row: 1 / span 2; position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border: 2px solid var(--accent); border-radius: 50%; background: var(--bg); color: var(--accent); font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.points.is-numbered .point-title { grid-column: 2; padding-top: 6px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.points.is-numbered .point-text { grid-column: 2; max-width: 52ch; font-size: 16px; }
.points.is-numbered .point:not(:last-child)::after { content: ""; position: absolute; top: 40px; bottom: 4px; left: 17px; width: 2px; border-radius: 1px; background: color-mix(in srgb, var(--accent) 30%, transparent); }
/* En escritorio el flujo va en horizontal: números en fila unidos por una línea, texto debajo. */
.steps-block { margin-bottom: clamp(48px, 6vw, 72px); }
@media (min-width: 900px) {
  .points.is-numbered { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); column-gap: 40px; }
  .points.is-numbered .point { display: flex; flex-direction: column; gap: 4px; padding: 0; }
  .points.is-numbered .point-num { margin-bottom: 12px; }
  .points.is-numbered .point-title { padding-top: 0; font-size: 17px; }
  .points.is-numbered .point-text { font-size: 15px; }
  .points.is-numbered .point:not(:last-child)::after { top: 17px; bottom: auto; left: 46px; right: -30px; width: auto; height: 2px; }
}

@media (max-width: 900px) {
  .case-grid { grid-template-columns: 1fr; }
  .case-title { position: static; }
}
@media (max-width: 700px) {
  .points { grid-template-columns: 1fr; }
}

/* Imágenes seguidas se unen sin espacio: se leen como una sola pieza continua. */
.block-image { margin-block: 0; }
.block-image img, .block-image video { display: block; width: 100%; height: auto; }
.block-image:not(:has(+ .block-image)) { margin-bottom: clamp(16px, 2.5vw, 28px); }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(12px, 2vw, 24px);
  margin-bottom: clamp(16px, 2.5vw, 28px);
}
.gallery img { width: 100%; }

.block-link { display: flex; justify-content: center; margin-bottom: clamp(40px, 6vw, 64px); }

.video { margin-bottom: clamp(16px, 2.5vw, 28px); }
.video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }

.related .section-title { margin-top: clamp(80px, 12vw, 144px); }

/* Contacto · Ficha tinta: un bloque en tinta con el monograma Ff blanco en grande y una acción principal. */
.contact { padding-block: 8px clamp(56px, 8vw, 96px); }
.contact-panel {
  --panel-muted: #a9aeb8;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: clamp(560px, calc(100svh - 120px), 760px);
  padding: clamp(40px, 7vw, 88px);
  border-radius: 16px;
  background: var(--panel);
  color: #fff;
}
.contact-copy { position: relative; z-index: 1; max-width: 520px; }
.contact h1 { font-size: clamp(52px, 8vw, 104px); font-weight: 800; letter-spacing: -0.035em; line-height: 0.95; }
.contact-lede { margin: 28px 0 0; max-width: 30ch; font-size: clamp(18px, 1.8vw, 21px); line-height: 1.5; color: var(--panel-muted); }

.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
.contact-actions .btn { height: 52px; padding: 0 24px; border: 0; font-size: 16px; cursor: pointer; font-family: inherit; }
.btn-light { background: #fff; color: #171c26; border-color: #fff; }
.btn-on-dark { background: rgb(255 255 255 / 0.12); color: #fff; }
/* Copiar va junto al email: botón redondo pequeño, solo ícono. */
.contact-email { display: flex; align-items: center; gap: 10px; }
.copy-btn {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.12);
  color: #fff;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 150ms ease;
}
.copy-btn:active { transform: scale(0.94); }
.copy-btn .icon-check { display: none; }
.copy-btn.is-copied { background: var(--accent); color: #fff; }
.copy-btn.is-copied .icon-copy { display: none; }
.copy-btn.is-copied .icon-check { display: block; }
.copy-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.contact-meta { display: flex; flex-wrap: wrap; gap: 16px 32px; margin: 56px 0 0; }
.contact-meta dt { font-size: 14px; color: var(--panel-muted); }
.contact-meta dd { margin: 4px 0 0; font-size: 16px; font-weight: 500; }
.contact-meta a { color: #fff; text-decoration: none; }

/* El Ff sale por la esquina inferior derecha: la marca es la imagen de la página. */
.contact-mark { position: absolute; right: -9%; bottom: -16%; height: 112%; color: #fff; pointer-events: none; }
.contact-mark svg { display: block; height: 100%; width: auto; }

@media (hover: hover) and (pointer: fine) {
  .btn-light:hover { background: #e9ebf0; }
  .btn-on-dark:hover, .copy-btn:not(.is-copied):hover { background: rgb(255 255 255 / 0.2); }
  .contact-meta a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
}

/* En pantallas medianas el Ff se achica para no tocar el texto. */
@media (max-width: 1240px) {
  .contact-mark { right: -12%; height: 82%; bottom: -12%; }
}
/* Bajo 1000 px el Ff pasa arriba a la derecha, en tamaño medio, y el texto ocupa todo el ancho abajo. */
@media (max-width: 1000px) {
  .contact-panel { align-items: flex-end; min-height: 0; padding-top: 300px; }
  .contact-mark { top: -48px; right: -32px; bottom: auto; height: 340px; }
}
@media (max-width: 700px) {
  .contact-panel { padding: 176px 24px 32px; }
  .contact-mark { top: -32px; right: -20px; height: 200px; }
  .contact h1 { font-size: clamp(38px, 11vw, 52px); }
  /* Los dos botones a todo el ancho, uno debajo del otro. */
  .contact-actions { display: grid; }
  .contact-actions .btn { justify-content: center; }
  .contact-meta { flex-direction: column; margin-top: 36px; }
}

/* Footer: banda de tono en vez de línea */
.site-footer { background: var(--surface); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-block: 40px;
  font-size: 15px;
}
.footer-inner p { margin: 0; }
.footer-name { font-weight: 700; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

@media (max-width: 520px) {
  .hide-sm { display: none; }
  .brand .logo { display: none; }
  .brand .logo-symbol { display: block; }
  .nav { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Comparación antes / después con deslizador. */
.compare { margin-block: 0 clamp(32px, 5vw, 56px); }
.compare-frame { --pos: 50%; position: relative; overflow: hidden; border-radius: 12px; background: var(--surface); user-select: none; }
/* Nunca más alta que la ventana (menos el encabezado): el marco se achica al ancho de la imagen. */
.compare-frame { width: fit-content; max-width: 100%; margin-inline: auto; }
.compare-frame > img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(100svh - 160px); }
.compare-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-before img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.compare-tag { position: absolute; top: 16px; padding: 6px 12px; border-radius: 999px; background: rgb(20 22 28 / 0.78); color: #fff; font-size: 13px; font-weight: 600; pointer-events: none; }
.compare-tag.is-before { left: 16px; }
.compare-tag.is-after { right: 16px; }
.compare-range { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); z-index: 1; width: 3px; translate: -50% 0; background: #fff; box-shadow: 0 0 0 1px rgb(20 22 28 / 0.12); pointer-events: none; }
/* Tirador: círculo blanco con dos flechas, al centro de la línea. */
.compare-handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; translate: -50% -50%; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23171c26' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 7-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E") center / 22px no-repeat; box-shadow: 0 2px 10px rgb(20 22 28 / 0.25); transition: scale 0.15s ease; }
.compare-range:focus-visible + .compare-handle::after { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .compare-frame:hover .compare-handle::after { scale: 1.08; } }
.compare figcaption { margin-top: 12px; text-align: center; font-size: 14px; color: var(--muted); }

/* Imagen con íconos (p. ej. herramientas usadas): a tamaño de ícono, no a todo el ancho. */
.block-image.is-icons { margin-block: clamp(24px, 4vw, 40px); }
.block-image.is-icons img { width: min(100%, 400px); height: auto; margin-inline: auto; }

/* Logos de empresas: fila centrada, misma altura, sobre blanco (se leen igual en modo oscuro). */
.logos-block { margin-block: clamp(24px, 4vw, 40px); }
.logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 28px clamp(32px, 6vw, 72px); margin: 0; padding: clamp(24px, 4vw, 36px); list-style: none; border-radius: 16px; background: #fff; }
.logos img { display: block; width: auto; height: 52px; max-width: 100%; }
@media (max-width: 700px) { .logos img { height: 40px; } }

/* Visor de imágenes: clic en una imagen del caso la abre a pantalla completa. */
.block-image:not(.is-icons) img, .gallery img { cursor: zoom-in; }
.block-image img:focus-visible, .gallery img:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.lightbox-open { overflow: hidden; }
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(10 12 18 / 0.94); color: #fff; }
.lightbox::backdrop { background: transparent; }
.lightbox[open] { animation: lightbox-in 0.18s ease-out; }
@keyframes lightbox-in { from { opacity: 0; } }
.lightbox-stage { display: grid; place-items: center; width: 100%; height: 100%; overflow: auto; overscroll-behavior: contain; }
.lightbox-stage img { display: block; width: auto; height: auto; max-width: calc(100vw - 48px); max-height: calc(100dvh - 96px); border-radius: 8px; cursor: zoom-in; }
/* Acercada: tamaño real, se recorre con scroll (el JS fija el ancho). */
.lightbox.is-zoomed .lightbox-stage { place-items: start; }
.lightbox.is-zoomed .lightbox-stage img { max-width: none; max-height: none; height: auto; border-radius: 0; cursor: zoom-out; }
.lightbox-close { position: fixed; top: 16px; right: 16px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgb(255 255 255 / 0.14); color: #fff; cursor: pointer; transition: background 0.15s ease; }
.lightbox-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .lightbox-close:hover { background: rgb(255 255 255 / 0.26); } }
.lightbox-hint { position: fixed; bottom: 16px; left: 50%; translate: -50% 0; margin: 0; padding: 6px 12px; border-radius: 999px; background: rgb(255 255 255 / 0.1); font-size: 13px; color: rgb(255 255 255 / 0.8); pointer-events: none; white-space: nowrap; }
.lightbox.is-zoomed .lightbox-hint { display: none; }
@media (hover: none) { .lightbox-hint { display: none; } }
@media (prefers-reduced-motion: reduce) { .lightbox[open] { animation: none; } }

/* Resultado: tarjetas por estado y filas de etiquetas. */
.outcome-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.outcome-card { display: flex; flex-direction: column; padding: 24px 24px 8px; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgb(23 28 38 / 0.05); }
@media (prefers-color-scheme: dark) { .outcome-card { background: var(--surface); box-shadow: none; } }
.outcome-status { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin: 0; padding: 5px 12px 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 650; letter-spacing: 0.01em; }
.outcome-dot { width: 8px; height: 8px; border-radius: 50%; }
.is-live .outcome-status { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.is-live .outcome-dot { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.is-ready .outcome-status { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); }
.is-ready .outcome-dot { border: 2px solid var(--muted); }
.outcome-note { margin: 12px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.outcome-list { margin: 12px 0 0; padding: 0; list-style: none; }
.outcome-list li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 0; border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.outcome-list li:first-child { border-top: 0; }
.outcome-icon { margin-top: 3px; }
.is-live .outcome-icon { color: var(--accent); }
.is-ready .outcome-icon { color: var(--muted); }
.outcome-list strong { display: block; font-size: 16px; font-weight: 650; line-height: 1.4; }
.outcome-sub { display: block; margin-top: 2px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.outcome-rows { display: grid; gap: 16px; margin: 28px 0 0; }
.outcome-rows > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: baseline; }
.outcome-rows dt { font-size: 14px; font-weight: 600; color: var(--muted); }
.outcome-rows dd { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tags li { padding: 4px 12px; border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); border-radius: 999px; font-size: 14px; line-height: 1.5; }
@media (max-width: 700px) {
  .outcome-groups { grid-template-columns: 1fr; }
  .outcome-rows > div { grid-template-columns: 1fr; gap: 8px; }
}

/* Reflexión: aprendizajes numerados sobre un bloque tinta, a todo el ancho bajo su título.
   Un solo espaciado (--pad) define el margen interior y la distancia a cada lado del divisor. */
.reflection { margin-bottom: clamp(28px, 4vw, 44px); }
.reflection-list { --pad: clamp(24px, 3.6vw, 48px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: var(--pad); border-radius: 16px; background: var(--panel); color: #fff; list-style: none; }
.reflection-list li { display: flex; flex-direction: column; min-width: 0; }
.reflection-list li + li { margin-left: var(--pad); padding-left: var(--pad); border-left: 1px solid rgb(255 255 255 / 0.12); }
.reflection-num { font-size: 13px; font-weight: 800; line-height: 1; color: #8ea6ff; font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }
.reflection-title { margin-top: 12px; font-size: clamp(19px, 1.7vw, 22px); font-weight: 650; line-height: 1.25; letter-spacing: -0.015em; }
.reflection-body { margin-top: 12px; font-size: 16px; line-height: 1.65; color: #c3c8d2; text-wrap: pretty; }
.reflection-body p { margin: 0; }
.reflection-body p + p { margin-top: 12px; }
.reflection-body strong { color: #fff; font-weight: 600; background: linear-gradient(transparent 62%, rgb(40 71 255 / 0.55) 62%); }
@media (max-width: 700px) {
  .reflection-list { grid-template-columns: 1fr; }
  .reflection-list li + li { margin: var(--pad) 0 0; padding: var(--pad) 0 0; border-left: 0; border-top: 1px solid rgb(255 255 255 / 0.12); }
}

/* Resultado en cifras: número grande, qué mide y de dónde sale. */
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.metric { display: flex; flex-direction: column; padding: 24px 24px 26px; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgb(23 28 38 / 0.05); }
@media (prefers-color-scheme: dark) { .metric { background: var(--surface); box-shadow: none; } }
.metric p { margin: 0; }
.metric-value { font-size: clamp(40px, 4.4vw, 56px); font-weight: 750; line-height: 1; letter-spacing: -0.04em; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.metric-unit { margin-left: 4px; font-size: 0.42em; font-weight: 650; letter-spacing: -0.01em; color: var(--muted); }
.metric-label { margin-top: 14px !important; font-size: 16px; font-weight: 650; line-height: 1.35; }
.metric-text { margin-top: 6px !important; font-size: 14px; line-height: 1.5; color: var(--muted); }
.metrics + .outcome-rows { margin-top: 28px; }
@media (max-width: 520px) { .metrics { grid-template-columns: 1fr; } }

/* Imagen vertical (p. ej. un heatmap de una landing completa): angosta y centrada para no ocupar varias pantallas. */
.block-image.is-tall img { width: min(100%, 460px); margin-inline: auto; border-radius: var(--radius); box-shadow: 0 1px 2px rgb(23 28 38 / 0.06), 0 12px 32px -12px rgb(23 28 38 / 0.18); }

/* Enlaces del resumen: centrados bajo el texto, antes de las etapas.
   El resumen pierde su margen inferior para que el botón quede más cerca del texto que lo presenta
   que del stepper: texto → botón 40px, botón → stepper 56px. */
.case-intro:has(+ .block-link) .case-body > :last-child,
.case-intro:has(+ .block-link) .prose > :last-child { margin-bottom: 0; }
.case-intro + .block-link { margin-block: clamp(28px, 3.5vw, 40px) clamp(40px, 5vw, 56px); }

/* Mientras una imagen carga se ve un fondo suave del tamaño final (Eleventy fija ancho y alto),
   y la imagen aparece con un fundido corto en vez de pintarse por partes. */
.block-image:not(.is-icons) img, .gallery img { background: var(--surface); }
@media (prefers-reduced-motion: no-preference) {
  .block-image:not(.is-icons) img.is-loading, .gallery img.is-loading { opacity: 0; }
  .block-image:not(.is-icons) img, .gallery img { transition: opacity 0.35s var(--ease-out); }
}

/* Resultado como recorrido: piezas en orden unidas por flechas; la destacada en acento,
   con un recuadro que la explica. */
.journey-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 0; margin: 0; padding: 0; list-style: none; counter-reset: paso; }
.journey-steps li { counter-increment: paso; display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgb(23 28 38 / 0.05); font-size: 15px; font-weight: 650; line-height: 1.3; }
@media (prefers-color-scheme: dark) { .journey-steps li { background: var(--surface); box-shadow: none; } }
.journey-steps li::before { content: counter(paso); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.journey-steps li.is-highlight { background: var(--accent); color: #fff; box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.journey-steps li.is-highlight::before { background: #fff; color: var(--accent); }
/* Flecha entre piezas */
.journey-steps li + li { margin-left: 34px; position: relative; }
.journey-steps li + li::after { content: ""; position: absolute; left: -26px; top: 50%; width: 18px; height: 2px; border-radius: 1px; background: color-mix(in srgb, var(--ink) 28%, transparent); }
.journey-callout { margin-top: 16px; padding: 22px 24px; border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; background: color-mix(in srgb, var(--accent) 7%, transparent); }
.journey-callout p { margin: 0; }
.journey-callout-title { font-size: 16px; font-weight: 650; }
.journey-callout-text { margin-top: 6px !important; font-size: 15px; line-height: 1.6; color: var(--muted); max-width: 68ch; }
.journey + .outcome-rows { margin-top: 28px; }
@media (max-width: 700px) {
  .journey-steps { flex-direction: column; align-items: flex-start; gap: 0; }
  .journey-steps li + li { margin: 22px 0 0; }
  .journey-steps li + li::after { left: 22px; top: -18px; width: 2px; height: 14px; }
}
.outcome-row-note { margin: 8px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }

/* Aviso de confidencialidad al final de una imagen: va centrado sobre su franja blanca final
   (la imagen trae puntos suspensivos que anuncian que el flujo sigue). Mismo estilo que la etiqueta del stepper. */
.block-image:has(.image-conf) { position: relative; }
.image-conf { position: absolute; left: 50%; bottom: 2.8%; translate: -50% 50%; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 10%, #fff); color: var(--accent); font-size: 13px; font-weight: 700; white-space: nowrap; pointer-events: none; }
@media (max-width: 600px) { .image-conf { padding: 4px 10px; font-size: 11px; gap: 4px; max-width: calc(100% - 2 * var(--gutter) - 8px); } .image-conf svg { width: 12px; height: 12px; } }
.image-conf span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* Resultado antes → después: el "antes" apagado, el "después" con borde de acento. */
/* Misma grilla que las cifras de abajo, para que los bordes coincidan; la flecha flota sobre el espacio entre tarjetas. */
.shift { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 12px; }
.shift-card { padding: 22px 24px 24px; border-radius: 16px; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.shift-card.is-after { background: #fff; box-shadow: inset 0 0 0 2px var(--accent), 0 8px 24px -14px color-mix(in srgb, var(--accent) 60%, transparent); }
@media (prefers-color-scheme: dark) { .shift-card.is-after { background: var(--surface); } }
.shift-card p { margin: 0; }
.shift-label { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.is-after .shift-label { color: var(--accent); }
.shift-title { margin-top: 6px !important; font-size: 19px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; }
.shift-list { margin: 14px 0 0; padding: 0; list-style: none; }
.shift-list li { position: relative; padding: 8px 0 8px 22px; border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); font-size: 15px; line-height: 1.45; color: var(--muted); }
.shift-list li::before { content: ""; position: absolute; left: 4px; top: 16px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--ink) 30%, transparent); }
.is-after .shift-list li { color: var(--ink); }
.is-after .shift-list li::before { border-color: var(--accent); background: var(--accent); }
.shift-arrow { position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 1; box-shadow: 0 0 0 6px var(--bg); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; }
.shift + .metrics { margin-top: 12px; }
@media (max-width: 700px) {
  .shift { grid-template-columns: 1fr; }
  .shift-arrow { rotate: 90deg; }
}

/* ───────── Componentes adicionales ───────── */
/* Tarjeta base de los componentes nuevos: blanca en modo claro, superficie en oscuro (igual que puntos y cifras). */
.finding, .decision, .persona-card, .note, .accordion details { background: #fff; box-shadow: 0 1px 2px rgb(23 28 38 / 0.05); }
@media (prefers-color-scheme: dark) { .finding, .decision, .persona-card, .accordion details { background: var(--surface); box-shadow: none; } }
.findings-block, .quote, .decisions-block, .note, .accordion-block, .tools-block { margin-top: 0; margin-bottom: clamp(32px, 5vw, 48px); }
.case-body > * + :is(.findings-block, .quote, .decisions-block, .note, .accordion-block, .tools-block) { margin-top: 32px; }
.case-body > .findings-block, .case-body > .quote, .case-body > .decisions-block, .case-body > .note, .case-body > .accordion-block, .case-body > .tools-block { margin-bottom: 0; }
.persona, .table-block, .timeline-block, .imagetext, .phones-block, .figma { margin-top: 0; margin-bottom: clamp(32px, 5vw, 56px); }

/* Hallazgos */
.findings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.finding { display: flex; flex-direction: column; padding: 22px 24px 24px; border-radius: 16px; }
.finding p { margin: 0; }
.finding-num { font-size: 13px; font-weight: 800; line-height: 1; letter-spacing: 0.06em; color: var(--accent); font-variant-numeric: tabular-nums; }
.finding-stat { margin-top: 14px !important; font-size: clamp(28px, 3vw, 36px); font-weight: 750; line-height: 1; letter-spacing: -0.035em; color: var(--accent); }
.finding-title { margin-top: 14px !important; font-size: 17px; font-weight: 650; line-height: 1.35; letter-spacing: -0.01em; }
.finding-text { margin-top: 6px !important; font-size: 15px; line-height: 1.5; color: var(--muted); }
@media (max-width: 700px) { .findings { grid-template-columns: 1fr; } }

/* Cita de usuario: comillas de acento y el texto grande, sin caja. */
.quote blockquote { position: relative; margin: 0; padding-left: clamp(36px, 4vw, 48px); }
.quote blockquote::before { content: "“"; position: absolute; left: 0; top: -0.08em; font-size: clamp(56px, 6vw, 72px); font-weight: 800; line-height: 1; color: var(--accent); }
.quote blockquote p { margin: 0; font-size: clamp(21px, 2.2vw, 27px); font-weight: 500; line-height: 1.38; letter-spacing: -0.015em; text-wrap: pretty; }
.quote figcaption { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 16px; padding-left: clamp(36px, 4vw, 48px); font-size: 15px; }
.quote figcaption strong { font-weight: 650; }
.quote figcaption span { color: var(--muted); }

/* User persona */
.persona-card { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2.2fr); gap: clamp(24px, 4vw, 48px); padding: clamp(24px, 3.6vw, 40px); border-radius: 16px; }
.persona-id p { margin: 0; }
.persona-photo { display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; object-fit: cover; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.persona-photo.is-initial { font-size: 36px; font-weight: 800; color: var(--accent); }
.persona-archetype { margin-top: 20px !important; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.persona-name { margin-top: 6px; font-size: clamp(24px, 2.4vw, 30px); font-weight: 800; }
.persona-detail { margin-top: 6px !important; font-size: 15px; color: var(--muted); }
.persona-quote { margin-top: 20px !important; padding-left: 14px; border-left: 3px solid var(--accent); font-size: 16px; font-style: italic; line-height: 1.5; }
.persona-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 24px clamp(20px, 3vw, 36px); align-content: start; }
.persona-group-label { margin: 0 0 8px; font-size: 14px; font-weight: 650; }
.persona-group ul { margin: 0; padding: 0; list-style: none; }
.persona-group li { position: relative; padding: 7px 0 7px 18px; border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); font-size: 15px; line-height: 1.45; color: var(--muted); }
.persona-group li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
@media (max-width: 800px) { .persona-card { grid-template-columns: 1fr; } }

/* Tabla comparativa */
.table-scroll { overflow-x: auto; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgb(23 28 38 / 0.05); }
@media (prefers-color-scheme: dark) { .table-scroll { background: var(--surface); box-shadow: none; } }
.compare-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; line-height: 1.4; }
.compare-table th, .compare-table td { padding: 14px 18px; text-align: center; vertical-align: middle; border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.compare-table thead th { border-top: 0; font-size: 14px; font-weight: 650; color: var(--muted); }
.compare-table th[scope="row"], .compare-table thead th:first-child { text-align: left; font-weight: 600; color: var(--ink); }
.compare-table thead th:first-child { color: var(--muted); }
.compare-table .is-highlight { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.compare-table thead .is-highlight { color: var(--accent); }
.cell-yes, .cell-no { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; }
.cell-yes { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.cell-no { color: color-mix(in srgb, var(--ink) 35%, transparent); }
.table-block figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }

/* Línea de tiempo: en fila desde 900 px, en columna debajo. */
.timeline { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 32px; margin: 0; padding: 0; list-style: none; }
/* Un tramo por hito, hasta el siguiente: la línea termina en el último. */
.timeline-item:not(:last-child)::after { content: ""; position: absolute; top: 7px; left: 16px; right: -32px; height: 2px; background: color-mix(in srgb, var(--accent) 30%, transparent); }
.timeline-item { position: relative; display: flex; flex-direction: column; }
.timeline-item p { margin: 0; }
.timeline-dot { position: relative; width: 16px; height: 16px; margin-bottom: 16px; border: 2px solid var(--accent); border-radius: 50%; background: var(--bg); }
.timeline-item.is-highlight .timeline-dot { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.timeline-date { font-size: 13px; font-weight: 700; letter-spacing: 0.02em; color: var(--accent); font-variant-numeric: tabular-nums; }
.timeline-title { margin-top: 4px !important; font-size: 17px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.timeline-text { margin-top: 6px !important; font-size: 15px; line-height: 1.5; color: var(--muted); }
@media (max-width: 900px) {
  .timeline { grid-auto-flow: row; gap: 28px; padding-left: 32px; }
  .timeline-item:not(:last-child)::after { top: 18px; bottom: -30px; left: -25px; right: auto; width: 2px; height: auto; }
  .timeline-dot { position: absolute; left: -32px; top: 2px; margin: 0; }
}

/* Decisiones de diseño */
.decisions { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.decision { padding: 22px 24px 24px; border-radius: 16px; }
.decision-title { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 18px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.decision-num { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 800; }
.decision dl { display: grid; gap: 10px; margin: 16px 0 0; }
.decision dl > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.decision dt { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.decision dd { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.decision .is-decision dt { color: var(--accent); }
.decision .is-decision dd { color: var(--ink); font-weight: 550; }
@media (max-width: 600px) { .decision dl > div { grid-template-columns: 1fr; gap: 4px; } }

/* Imagen + texto */
.imagetext { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
/* El texto queda fijo junto a la imagen mientras se recorre (útil con imágenes altas), como los títulos de sección. */
.imagetext-copy { position: sticky; top: 96px; padding-top: 8px; }
.imagetext.is-right { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.imagetext.is-right .imagetext-media { order: 2; }
.imagetext-media { margin: 0; }
.imagetext-media img { width: 100%; border-radius: var(--radius); background: var(--surface); cursor: zoom-in; }
.imagetext-title { font-size: clamp(20px, 2vw, 24px); font-weight: 750; }
.imagetext-body { margin-top: 12px; font-size: 16px; line-height: 1.65; color: var(--muted); }
.imagetext-body p { margin: 0 0 1em; }
.imagetext-body p:last-child { margin-bottom: 0; }
.imagetext-body strong { color: var(--ink); font-weight: 650; }
@media (max-width: 800px) { .imagetext-copy { position: static; } .imagetext, .imagetext.is-right { grid-template-columns: 1fr; } .imagetext.is-right .imagetext-media { order: 0; } }

/* Nota destacada */
.note { display: flex; gap: 14px; padding: 18px 20px; border-radius: var(--radius); box-shadow: none; }
.note.is-info { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.note.is-learning { background: color-mix(in srgb, var(--accent) 7%, transparent); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; }
.note.is-warning { background: color-mix(in srgb, #e8a400 12%, transparent); }
.note-icon { flex: none; display: grid; place-items: center; width: 24px; height: 24px; color: var(--accent); }
.note.is-warning .note-icon { color: #b07c00; }
@media (prefers-color-scheme: dark) { .note.is-warning .note-icon { color: #f0b429; } }
.note-title { margin: 1px 0 4px; font-size: 16px; font-weight: 650; }
.note-body { font-size: 15px; line-height: 1.6; color: var(--muted); }
.note-body p { margin: 0 0 0.6em; }
.note-body p:last-child { margin-bottom: 0; }
.note-body strong { color: var(--ink); }
.case-body > .note { max-width: none; margin-inline: 0; }

/* Marco de celular */
.phones { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(20px, 3vw, 40px); margin: 0; padding: 0; list-style: none; }
.phones > li { width: min(100%, 260px); }
.phone { margin: 0; }
.phone-frame { padding: 8px; border-radius: 40px; background: var(--ink); box-shadow: 0 18px 40px -20px rgb(23 28 38 / 0.45); }
@media (prefers-color-scheme: dark) { .phone-frame { background: #2a3140; } }
.phone-frame img { width: 100%; aspect-ratio: 9 / 19.5; object-fit: cover; object-position: top; border-radius: 32px; background: var(--surface); cursor: zoom-in; }
.phone figcaption { margin-top: 14px; text-align: center; font-size: 14px; line-height: 1.45; color: var(--muted); text-wrap: balance; }

/* Galería con pie */
.gallery figure { margin: 0; }
.gallery figcaption { margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--muted); }

/* Figma embebido */
.figma iframe { display: block; width: 100%; aspect-ratio: 16 / 10; border: 0; border-radius: 16px; background: var(--surface); }
.figma.is-mobile iframe { width: min(100%, 420px); aspect-ratio: 9 / 16; margin-inline: auto; }
.figma figcaption { margin-top: 12px; text-align: center; font-size: 14px; color: var(--muted); }

/* Acordeón */
.accordion { display: grid; gap: 8px; }
.accordion details { border-radius: var(--radius); }
.accordion summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; font-size: 16px; font-weight: 650; line-height: 1.35; cursor: pointer; list-style: none; border-radius: var(--radius); }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary svg { flex: none; color: var(--muted); transition: rotate 200ms var(--ease-out); }
.accordion details[open] summary svg { rotate: 180deg; }
.accordion-body { padding: 0 20px 18px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.accordion-body p { margin: 0 0 0.8em; }
.accordion-body p:last-child { margin-bottom: 0; }
.accordion-body strong { color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .accordion summary:hover svg { color: var(--ink); } }

/* Herramientas */
.tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tools li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgb(23 28 38 / 0.05); font-size: 14px; font-weight: 600; }
@media (prefers-color-scheme: dark) { .tools li { background: var(--surface); box-shadow: none; } }
.tools img { width: 18px; height: 18px; object-fit: contain; }

/* Carga suave también en las imágenes nuevas */
.imagetext-media img, .phone img { transition: opacity 0.35s var(--ease-out); }
@media (prefers-reduced-motion: no-preference) { .imagetext-media img.is-loading, .phone img.is-loading { opacity: 0; } }

/* Página 404 */
.not-found { min-height: 60vh; }
.not-found-code { font-size: clamp(14px, 1.6vw, 16px); font-weight: 700; letter-spacing: .12em; color: var(--accent); margin-bottom: 16px; }
