/* Base compartida de las páginas de caso. Cada proyecto define --c (color), --c2 (fondo de bloques) y --on (texto). */
:root {
  --shell: #111111;
  --ink: #0a0a0a;
  --white: #ffffff;
  --brand: #ff542d;
  --brand-dark: #99321b;
  --brand-deep: #e8451f;
  --brand-grad: linear-gradient(180deg, var(--brand), var(--brand-dark));
  --mist: #e6e6e6;
  --stone: #adadad;
  --ash: #767676;
  --amber: #ffc21a;

  --font-display: 'degular-display', 'Archivo', 'Arial Narrow', sans-serif;
  --font-body: 'degular-text', 'Archivo', 'Arial Narrow', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --gutter: 12px;
  --radius: 24px;
  --bar: 32px;
  --pad: clamp(16px, 2vw, 28px);
  --c: var(--stone);
  --c2: var(--mist);
  --on: var(--ink);
}
* { box-sizing: border-box; margin: 0; }
html { background: var(--shell); scroll-behavior: smooth; scrollbar-gutter: stable; }
/* Paso entre páginas: la nueva sube como una cortina y la imagen del caso crece hasta ser la portada. */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: vt-old .6s cubic-bezier(.65, 0, .35, 1) both; }
  ::view-transition-new(root) { animation: vt-new .6s cubic-bezier(.65, 0, .35, 1) both; }
  ::view-transition-group(case-media) { animation-duration: .6s; animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
}
@keyframes vt-old { to { transform: translateY(-4%); filter: brightness(.6); } }
@keyframes vt-new { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
.cover { view-transition-name: case-media; }
body { background: var(--shell); color: var(--ink); font: 400 18px/1.3 var(--font-body); font-stretch: 90%; -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
main { padding: 0 var(--gutter); }

.js-motion [data-split], .js-motion [data-reveal] { visibility: hidden; }

.display { font-family: var(--font-display); font-stretch: 74%; font-weight: 800; text-transform: uppercase; line-height: .88; letter-spacing: -.005em; }
.statement { font-family: var(--font-display); font-stretch: 84%; font-weight: 700; line-height: 1.06; letter-spacing: -.008em; }
.mono { font: 600 16px/1.3 var(--font-mono); letter-spacing: .03em; text-transform: uppercase; }
.ln-mask { padding-block: .14em; }
.ln-mask:first-child { margin-top: -.14em; }
.ln-mask:last-child { margin-bottom: -.14em; }
.ln-mask ~ .ln-mask { margin-top: -.28em; }

.btn { display: inline-flex; align-items: center; gap: 10px; font: 600 16px/1 var(--font-mono); letter-spacing: .03em; text-transform: uppercase; padding: 17px 22px; border-radius: 8px; background: var(--ink); color: var(--white); transition: background-color .16s var(--ease-out); }
.btn:hover { background: #2a2a2a; }
.btn-brand { background: var(--brand-grad); transition: filter .16s var(--ease-out); font: 700 19px/1 var(--font-body); font-stretch: 90%; letter-spacing: 0; text-transform: none; padding: 15px 22px; }
.btn-brand:hover { background: var(--brand-grad); filter: brightness(1.12); }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* Cinta y header: los mismos de la home */
.ticker { position: fixed; inset: 0 0 auto 0; z-index: 30; height: var(--bar); background: var(--shell); color: #a8a8a8; overflow: hidden; display: flex; align-items: center; }
.ticker-track { display: flex; flex: none; white-space: nowrap; }
.ticker-track span { padding-right: 1.4em; }
.top { display: grid; grid-template-columns: 1fr 1.3fr auto 1.3fr 1fr; align-items: center; gap: clamp(20px, 3.4vw, 56px); margin: calc(var(--bar) + var(--gutter)) 0 var(--gutter); padding: 14px var(--pad); border-radius: var(--radius); }
.top .tag { color: var(--ash); }
.top nav { display: flex; gap: clamp(18px, 2.6vw, 40px); white-space: nowrap; }
.top nav:first-of-type { justify-self: end; }
.top nav a:hover { color: var(--brand-deep); }
.logo-mark { display: block; height: 62px; width: auto; }
/* La franja de arriba se va y vuelve junto con el encabezado; la barra de progreso también. */
.ticker { transition: translate .55s var(--ease-out); }
.scroll-progress { transition: top .55s var(--ease-out); }
.head-hidden .ticker { translate: 0 -100%; }
.head-hidden .scroll-progress { top: -4px; }
/* Selector de idioma, junto al botón del encabezado. */
.top-end { justify-self: end; display: flex; align-items: center; gap: clamp(14px, 1.6vw, 26px); }
.lang { display: flex; gap: 6px; font-size: 14px; color: var(--ash); }
.lang a { padding: 4px 0; transition: color .2s var(--ease-out); }
.lang a[aria-current="true"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.lang a:hover { color: var(--brand-deep); }
/* Encabezado: blanco esmerilado, se esconde al bajar y vuelve al subir. */
.top { position: sticky; top: calc(var(--bar) + 8px); z-index: 35; background: #fff; -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); transition: translate .55s var(--ease-out), box-shadow .3s var(--ease-out); }
.top.is-hidden { translate: 0 calc(-100% - var(--bar) - 24px); }
.top.is-stuck { background: #ffffffc7; box-shadow: 0 12px 40px #0000001f; }
.top-mark { height: 1px; margin-top: -1px; }
.logo-mark { transition: transform .55s cubic-bezier(.34, 1.56, .64, 1); }
.top a:hover .logo-mark { transform: scale(1.12); }
/* En celular no va la franja fina de arriba: el encabezado aparece al subir. */
@media (max-width: 900px) { :root { --bar: 0px; } .ticker { display: none; } .scroll-progress { top: 0; } }

.top .btn { justify-self: end; }

/* Bloques */
.b { position: relative; border-radius: var(--radius); margin-bottom: var(--gutter); overflow: hidden; }

/* Portada */
.cover { display: flex; flex-direction: column; justify-content: space-between; gap: 64px; min-height: calc(100svh - 150px); padding: var(--pad); background: var(--c); color: var(--on); }
.cover-meta { width: min(100%, 860px); margin: clamp(24px, 7vh, 88px) 0 0 clamp(0px, 22vw, 330px); }
.cover-tags { display: flex; flex-wrap: wrap; gap: 6px 40px; margin-bottom: 14px; }
.cover-lead { font-size: clamp(30px, 3.5vw, 52px); }
.cover-title { font-size: clamp(76px, 17vw, 270px); }
.cover-title-long { font-size: clamp(50px, 13vw, 210px); }

/* Imagen a todo el ancho */
.b-full { background: var(--c2); }
.b-full img { width: 100%; }

/* Par de imágenes */
.b-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); margin-bottom: var(--gutter); }
.b-pair > * { border-radius: var(--radius); overflow: hidden; margin: 0; }
.b-pair img { width: 100%; height: 100%; object-fit: cover; }

/* Texto */
.b-note { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding: clamp(40px, 7vw, 104px) var(--pad); background: var(--c); color: var(--on); }
.b-note > .mono { font: 400 clamp(44px, 7.4vw, 116px)/.95 var(--font-display); letter-spacing: .05em; }
.b-note .statement { font-size: clamp(32px, 4.6vw, 70px); }
/* Títulos en dos tiempos (como "Una sola cabeza" en la home): contorno y relleno letra por letra. */
.duo { -webkit-text-stroke: clamp(1px, .016em, 2.4px) var(--on); }
.duo-a, .duo-b { display: block; }
.duo-a { color: transparent; }
.js-motion [data-duo] { visibility: hidden; }
.b-note p + p { margin-top: 22px; font-size: clamp(19px, 1.7vw, 24px); line-height: 1.28; max-width: 34em; }

/* Lista de puntos: problemas, pasos, decisiones */
.b-list { padding: clamp(32px, 5vw, 72px) var(--pad); background: var(--c2); color: var(--on2, var(--ink)); }
.b-list h2 { font-size: clamp(52px, 8.6vw, 132px); margin-bottom: clamp(28px, 4vw, 56px); }
.b-list ol { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: var(--gutter); }
.b-list li { background: var(--white); color: var(--ink); border-radius: 20px; padding: 24px; display: grid; gap: 34px; align-content: space-between; min-height: 230px; }
.b-list .n { font-family: var(--font-display); font-stretch: 74%; font-weight: 800; font-size: 58px; line-height: .9; color: var(--brand); }
.b-list strong { display: block; font: 700 24px/1.1 var(--font-display); font-stretch: 84%; margin-bottom: 6px; }

/* Laptop: el sitio se recorre dentro de la pantalla con el scroll */
.b-laptop { padding: clamp(40px, 7vw, 104px) clamp(16px, 6vw, 96px); background: var(--c2); }
.laptop { position: relative; width: min(100%, 1120px); margin: 0 auto; aspect-ratio: 1446 / 876; }
.laptop .frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.laptop .screen { position: absolute; left: 10.166%; top: 3.425%; width: 79.737%; height: 85.502%; background: #000; border-radius: 6px 6px 0 0; overflow: hidden; }
.laptop .screen img { width: 100%; will-change: transform; }
.laptop .screen video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* Fila de celulares */
.b-phones { display: flex; justify-content: center; gap: clamp(10px, 2vw, 28px); padding: clamp(40px, 6vw, 88px) var(--pad); background: var(--c2); }
.phone { position: relative; flex: 0 1 clamp(150px, 19vw, 290px); aspect-ratio: 401 / 824; }
.phone .frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.phone .screen { position: absolute; left: 4.489%; top: 7.039%; width: 91.022%; height: 91.019%; background: #fff; border-radius: 0 0 12% 12% / 0 0 6% 6%; overflow: hidden; }
.phone .screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.b-phones .phone:nth-child(even) { margin-top: clamp(20px, 5vw, 72px); }

/* Testimonio */
.b-voice { display: grid; place-items: center; padding: clamp(56px, 9vw, 130px) var(--pad); background: var(--c); color: var(--on); text-align: center; }
.b-voice blockquote { font-size: clamp(36px, 6vw, 92px); max-width: 15em; }
.b-voice figcaption { margin-top: 26px; }

/* Créditos */
.credits { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: clamp(20px, 3vw, 44px); align-items: end; padding: var(--pad); background: var(--stone); }
.credits-tile { background: #9d9d9d; padding: 26px; display: grid; place-items: center; }
.credits-tile img { height: clamp(120px, 12vw, 170px); width: auto; filter: brightness(0); }
.credits h2 { font: inherit; margin-bottom: 12px; }
.credits ul { list-style: none; padding: 0; }
.credits .live { display: inline-block; margin-top: 16px; text-decoration: underline; text-underline-offset: 3px; }
.credits-copy { text-align: justify; hyphens: auto; }
@media (max-width: 900px) { .credits-copy { text-align: left; } }
/* En pantallas táctiles, los enlaces de texto tienen un área de toque más grande sin mover el diseño. */
@media (pointer: coarse) {
  .lang a { padding: 12px 6px; margin: -12px -6px; }
  .case-link, .talk-alt a, .credits .live, .svx-wa, .credits-copy a { padding-block: 10px; margin-block: -10px; }
}


/* Más casos */
.more { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 16px; align-items: center; padding: clamp(40px, 6vw, 88px) var(--pad); background: var(--amber); }
.more a { display: block; }
.more img { width: 100%; border-radius: 50%; transition: transform .35s var(--ease-out); }
.more a:hover img { transform: scale(1.03); }
.more h3 { font: 700 clamp(22px, 2.5vw, 34px)/1.05 var(--font-display); font-stretch: 84%; margin-top: 14px; }
.more-title { font-size: clamp(64px, 10vw, 156px); text-align: right; }

/* Cierre */
.end { display: flex; justify-content: space-between; align-items: end; gap: 28px; flex-wrap: wrap; padding: clamp(40px, 5vw, 72px) var(--pad) var(--pad); background: var(--brand); color: var(--white); }
.end h2 { font-size: clamp(60px, 10vw, 160px); }
.end p { margin-top: 18px; font-size: clamp(19px, 1.8vw, 24px); font-weight: 700; max-width: 26em; }
.end img { height: 150px; width: auto; }
.foot-legal { flex: 1 0 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; margin-top: 12px; padding-top: 18px; border-top: 1px solid #ffffff38; font-size: 13px; color: #ffffffb3; }
.end .foot-legal { margin-top: 12px; font-size: 13px; font-weight: 500; max-width: none; }
@media (max-width: 900px) { .foot-legal { flex-direction: column; } .talk-alt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } }

@media (max-width: 900px) {
  .top { grid-template-columns: 1fr auto; gap: 12px; padding: 10px 16px; }
  .top .tag, .top nav { display: none; }
  .logo-mark { height: 50px; }
  .btn-brand { padding: 13px 16px; }
  .cover { min-height: calc(100svh - 130px); }
  .cover-meta { margin-left: 0; }
  .cover-title { font-size: 18vw; }
  .cover-title-long { font-size: 13vw; }
  .b-note, .b-pair, .credits { grid-template-columns: 1fr; }
  .b-list ol { grid-template-columns: 1fr; }
  .b-list li { min-height: 0; gap: 20px; }
  .b-list h2 { font-size: 15vw; }
  /* Los celulares pasan a una fila que se desliza con el dedo. */
  .b-phones { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; }
  .phone { flex: 0 0 62vw; scroll-snap-align: center; }
  .b-phones .phone:nth-child(even) { margin-top: 0; }
  .more { grid-template-columns: 1fr 1fr; }
  .more-title { grid-column: 1 / -1; grid-row: 1; text-align: left; font-size: 19vw; }
}

/* Contacto directo (agenda y WhatsApp) y menú flotante, iguales a la home. */
.end .talk-actions { margin-top: 22px; }
.end { padding-bottom: max(var(--pad), 110px); } /* deja libre el botón del menú flotante */
.talk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.talk-alt a { white-space: nowrap; text-decoration: underline; text-underline-offset: 4px; }
.wa-icon { display: inline-block; width: 1.25em; height: 1.25em; margin-right: .45em; vertical-align: -.28em; flex: none; }
.fab { position: fixed; z-index: 40; left: 50%; bottom: 20px; translate: -50% 0; width: 60px; height: 60px; border: 0; border-radius: 50%; background: var(--white); color: var(--ink); cursor: pointer; box-shadow: 0 0 0 6px #ffffff40; display: grid; place-content: center; gap: 4px; opacity: 0; pointer-events: none; transition: opacity .25s var(--ease-out); }
.fab.show { opacity: 1; pointer-events: auto; }
.fab i { display: block; width: 22px; height: 3px; background: var(--ink); }
.sheet { position: fixed; z-index: 39; left: 50%; bottom: 96px; translate: -50% 0; width: min(340px, calc(100vw - 32px)); background: var(--ink); color: var(--white); border-radius: 14px; padding: 12px; display: none; }
.sheet.open { display: grid; gap: 2px; }
.sheet a { display: block; padding: 13px 12px; border-radius: 8px; font-size: 22px; font-weight: 700; }
.sheet a:hover { background: #262626; }
.sheet .sheet-wa { display: flex; align-items: center; margin-top: 6px; border-top: 1px solid #ffffff26; border-radius: 0 0 8px 8px; padding-top: 17px; }
.sheet .sheet-wa .wa-icon { width: 26px; height: 26px; margin-right: 12px; color: #25d366; }
@media (max-width: 1100px) { .top .tag { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
