/*
 * Blinds — sitio público. Tokens copiados de packages/ui/src/tokens.css
 * (fuente TS: BRAND en packages/ui/src/brand.ts). Mantener en espejo.
 * Sin gradientes, glows, sombras ni blur. Las máscaras con
 * repeating-linear-gradient son mecánica de revelado (alfa), nunca color.
 */

:root {
  --brand-violet: #613bfd;
  --brand-ink: #1b1c1d;
  --brand-paper: #fafaf8;
  --brand-gray: #8c8c96;

  --bg: var(--brand-paper);
  --surface: #f1f1ee;
  --elevated: var(--brand-paper);
  --fg: var(--brand-ink);
  --fg-muted: #5e5e68;
  --line: var(--brand-gray);
  --line-subtle: #e3e3df;
  --accent: var(--brand-violet);
  --accent-text: var(--brand-violet);
  --accent-press: #4f2ae6;
  --accent-edge: #5531f0;
  --on-accent: var(--brand-paper);
  --accent-wash: #ece8ff;
  --focus: var(--brand-violet);
  --brand-lines: var(--brand-violet);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);

  --gutter: clamp(20px, 5vw, 56px);
  --max: 1200px;
  --radius: 12px;
  --nav-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--brand-ink);
    --surface: #25262a;
    --elevated: #25262a;
    --fg: var(--brand-paper);
    --fg-muted: var(--brand-gray);
    --line-subtle: #34353a;
    --accent-text: #9f8bff;
    --accent-press: #7556ff;
    --accent-wash: #2b2545;
    --focus: #9f8bff;
  }
}

/* ---------- Base ---------- */

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

html {
  color-scheme: light dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection { background: var(--accent); color: var(--on-accent); }
input, textarea { caret-color: var(--accent-text); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

html { scrollbar-color: var(--line) var(--bg); }

h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 16px; border-radius: 8px; font-weight: 500; text-decoration: none;
  transition: top 160ms var(--ease-out);
}
.skip:focus-visible { top: 12px; }

/* ---------- Tipografía ---------- */

.display {
  font-size: clamp(3rem, 1.5rem + 6.4vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 800;
  text-wrap: balance;
}

.title {
  font-size: clamp(2rem, 1.3rem + 3vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 700;
  text-wrap: balance;
}

.lead {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.5;
  max-width: 34em;
  text-wrap: pretty;
}

.body { font-size: 1rem; max-width: 38em; text-wrap: pretty; }
.muted { color: var(--fg-muted); }

/* ---------- Gesto de marca: dos líneas paralelas ---------- */

.lines { display: inline-flex; flex-direction: column; flex-shrink: 0; }
.lines i { display: block; background: var(--brand-lines); transform-origin: left center; }
.lines--sm { gap: 3px; } .lines--sm i { width: 16px; height: 2px; }
.lines--lg { gap: 7px; } .lines--lg i { width: 64px; height: 5px; }

.js .lines[data-lines] i { transform: scaleX(0); transition: transform 900ms var(--ease-expo); }
.js .lines[data-lines] i:nth-child(2) { transition-delay: 90ms; }
.js .lines[data-lines].is-in i { transform: scaleX(1); }

/* ---------- Botones ---------- */

.btn {
  --h: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--h); padding: 0 18px;
  border-radius: var(--radius); border: 1px solid transparent;
  font: inherit; font-weight: 500; font-size: 1rem; line-height: 1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out),
              border-color 160ms var(--ease-out), transform 100ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn--sm { --h: 40px; padding: 0 14px; font-size: 0.9375rem; }
.btn--lg { --h: 56px; padding: 0 24px; font-size: 1.0625rem; }
.btn--block { width: 100%; }

.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--secondary { background: transparent; color: var(--fg); border-color: var(--line); }
.btn--ghost { background: transparent; color: var(--accent-text); padding-left: 12px; padding-right: 12px; }
.btn--paper { background: var(--brand-paper); color: var(--brand-violet); }

@media (hover: hover) {
  .btn--primary:hover { background: var(--accent-press); }
  .btn--secondary:hover { background: var(--surface); border-color: var(--fg); }
  .btn--ghost:hover { background: var(--accent-wash); }
  .btn--paper:hover { background: var(--accent-wash); color: var(--brand-violet); }
}

/* Botón a la app todavía sin publicar: se lee como estado, no como acción. */
.btn.is-soon { background: var(--accent-wash); color: var(--accent-text); cursor: default; }
.btn.is-soon:active { transform: none; }
.btn--paper.is-soon { background: transparent; color: var(--brand-paper); border-color: rgb(250 250 248 / 0.6); }

/* ---------- Wordmark (arte final, vectorizado del brand book) ---------- */

.wordmark { display: block; width: 120px; height: 28px; --wm-letters: var(--fg); --wm-lines: var(--brand-violet); }
.wordmark--paper { width: 136px; height: 32px; --wm-letters: var(--brand-paper); --wm-lines: var(--brand-paper); }

/* ---------- Revelado por láminas (texto) ---------- */

@property --o {
  syntax: "<number>";
  inherits: false;
  initial-value: 1;
}

.js [data-reveal] {
  --slat: 0.22em;
  --o: 0;
  -webkit-mask-image: repeating-linear-gradient(to bottom, #000 0, #000 calc(var(--slat) * var(--o)), transparent calc(var(--slat) * var(--o)), transparent var(--slat));
          mask-image: repeating-linear-gradient(to bottom, #000 0, #000 calc(var(--slat) * var(--o)), transparent calc(var(--slat) * var(--o)), transparent var(--slat));
  transition: --o 1100ms var(--ease-expo);
}
.js [data-reveal].is-in { --o: 1; }
.js [data-reveal].is-done { -webkit-mask-image: none; mask-image: none; }

/* Elementos que suben (resto del contenido) */
.js [data-rise] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-expo); }
.js [data-rise].is-in { opacity: 1; transform: none; }

/* ---------- Láminas (componente) ---------- */

.slats {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  perspective: 900px;
  pointer-events: none;
}
.slat {
  flex: 1 1 0;
  margin-bottom: -1px; /* sin rendijas al estar cerrada */
  background: var(--accent);
  border-bottom: 1px solid var(--accent-edge);
  transform: rotateX(var(--tilt, 0deg));
  transform-origin: 50% 50%;
  backface-visibility: hidden;
  will-change: transform;
}

/* ---------- Intro: la pantalla abre como una persiana ---------- */

.intro {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column;
  perspective: 1200px;
  pointer-events: none;
}
.intro .slat {
  border-bottom-color: var(--accent-edge);
  animation: intro-open 1250ms var(--ease-in-out) both;
  animation-delay: calc(180ms + var(--k) * 55ms);
}
@keyframes intro-open {
  0%   { transform: rotateX(0deg); }
  70%  { transform: rotateX(86deg); opacity: 1; }
  100% { transform: rotateX(90deg); opacity: 0; }
}
.intro.is-gone { display: none; }

/* ---------- Navegación ---------- */

.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--nav-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 240ms var(--ease-out), border-color 240ms var(--ease-out);
}
.nav.is-solid { background: var(--bg); border-bottom-color: var(--line-subtle); }
.nav__inner {
  max-width: var(--max); height: 100%; margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 24px;
}
.nav__brand { display: inline-flex; align-items: center; min-height: 44px; border-radius: 6px; }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-size: 0.9375rem; font-weight: 500; text-decoration: none; color: var(--fg-muted);
  border-radius: 8px; transition: color 160ms var(--ease-out);
}
@media (hover: hover) { .nav__links a:hover { color: var(--fg); } }
.nav .btn { margin-left: 8px; }
@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav .btn { margin-left: auto; --h: 44px; }
}

/* ---------- Hero ---------- */

.hero {
  max-width: var(--max); margin: 0 auto;
  min-height: 100svh;
  padding: calc(var(--nav-h) + clamp(32px, 7vh, 88px)) var(--gutter) clamp(48px, 8vh, 96px);
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px); align-items: center;
}
.hero__copy { display: flex; flex-direction: column; align-items: flex-start; }
.hero .lines { margin-top: 28px; }
.hero__lead { margin-top: 28px; color: var(--fg); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 36px; }
.hero__note { margin-top: 16px; font-size: 0.875rem; color: var(--fg-muted); }

.js .hero__lead, .js .hero__actions, .js .hero__note, .js .persiana {
  opacity: 0; transform: translateY(16px);
  transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-expo);
}
.js .is-ready .hero__lead { transition-delay: 120ms; }
.js .is-ready .hero__actions { transition-delay: 220ms; }
.js .is-ready .hero__note { transition-delay: 300ms; }
.js .is-ready .persiana { transition-delay: 160ms; }
.js .is-ready .hero__lead, .js .is-ready .hero__actions, .js .is-ready .hero__note, .js .is-ready .persiana { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; align-items: start; padding-bottom: 32px; }
}

/* ---------- Persiana del hero: una escena que se mira, no un control ----------
 * Loop: la mano entra, toca, las láminas giran y se ve el talento; se cierra y repite.
 * Estados en .persiana: is-hand (mano adentro), is-tap (toque), is-open (abierta). */

.persiana { justify-self: end; width: 100%; max-width: 440px; }
@media (max-width: 900px) { .persiana { justify-self: start; } }

.persiana__window {
  position: relative; height: clamp(300px, 36vh, 340px); border-radius: 20px; overflow: hidden;
  background: var(--accent-wash);
}
.persiana__behind { position: absolute; inset: 0; padding: 28px 26px; display: flex; flex-direction: column; }
.talent__title { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; }
.talent { margin-top: 14px; }
.talent div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.talent div:last-child { border-bottom: 0; }
.talent dt { font-size: 0.875rem; color: var(--fg-muted); }
.talent dd { font-size: 0.9375rem; font-weight: 600; text-align: right; display: inline-flex; align-items: center; gap: 8px; }
.talent__tag { margin-top: auto; align-self: flex-start; font-size: 0.75rem; font-weight: 500; color: var(--fg-muted); }
.fit { font-size: 1.5rem !important; font-weight: 700 !important; color: var(--accent-text); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.meter { display: inline-flex; gap: 3px; }
.meter i { width: 14px; height: 6px; border-radius: 1px; background: var(--line-subtle); }
.meter i:nth-child(-n+4) { background: var(--accent); }

.persiana .slats { perspective: 700px; }
.persiana .slat {
  border-bottom: 2px solid var(--accent-press);
  transition: transform 900ms var(--ease-expo), opacity 260ms var(--ease-out);
  transition-delay: calc(var(--k) * 45ms), 0ms;
}
.persiana.is-open .slat {
  transform: rotateX(90deg); opacity: 0;
  transition-delay: calc(var(--k) * 45ms), calc(420ms + var(--k) * 45ms);
}

.persiana__cta {
  position: absolute; left: 26px; right: 26px; top: 50%; transform: translateY(-50%);
  font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.25rem); font-weight: 800; line-height: 0.98; letter-spacing: -0.035em;
  color: var(--brand-paper); pointer-events: none;
  transition: opacity 240ms var(--ease-out), transform 600ms var(--ease-expo);
}
.persiana.is-open .persiana__cta { opacity: 0; transform: translateY(calc(-50% - 12px)); }

/* La mano: ícono de puntero (Lucide, ISC) en estilo sticker: trazo ink sobre un contorno blanco grueso. */
.hand__halo { stroke: var(--brand-paper); stroke-width: 5; }
.hand__line { stroke: var(--brand-ink); stroke-width: 1.8; }
.hand {
  position: absolute; right: 22%; bottom: 18%; width: 64px; height: 64px;
  fill: none; stroke-linecap: round; stroke-linejoin: round;
  opacity: 0; transform: translate(70px, 90px) rotate(-8deg);
  transition: transform 800ms var(--ease-expo), opacity 300ms var(--ease-out);
  pointer-events: none;
}
.persiana.is-hand .hand { opacity: 1; transform: translate(0, 0) rotate(-8deg); }
.persiana.is-tap .hand { transform: translate(0, 4px) rotate(-8deg) scale(0.88); transition-duration: 140ms; }
.persiana.is-open .hand { opacity: 0; transform: translate(40px, 120px) rotate(-8deg); transition-duration: 700ms; }

.tap-ring {
  position: absolute; right: calc(22% + 30px); bottom: calc(18% + 50px); width: 44px; height: 44px; margin: -22px;
  border-radius: 50%; border: 2px solid var(--brand-paper); opacity: 0; pointer-events: none;
}
.persiana.is-tap .tap-ring { animation: tap-ring 700ms var(--ease-out); }
@keyframes tap-ring { from { opacity: 1; transform: scale(0.4); } to { opacity: 0; transform: scale(1.8); } }

.persiana__caption { margin-top: 14px; font-size: 0.875rem; color: var(--fg-muted); }

@media (max-width: 440px) {
  .persiana__window { height: 310px; }
  .persiana__behind { padding: 22px 20px; }
  .talent div { padding: 9px 0; }
  .talent dd { font-size: 0.875rem; }
  .hand { width: 56px; height: 56px; }
}

/* Movimiento reducido: la persiana queda abierta, sin mano ni loop. */
@media (prefers-reduced-motion: reduce) {
  .persiana .slat, .persiana__cta, .hand { display: none; }
}

/* ---------- Primero, lo que sabes hacer (escena con scroll) ---------- */

.first { position: relative; height: 320vh; }
.first__sticky {
  position: sticky; top: 0; height: 100svh;
  max-width: var(--max); margin: 0 auto;
  padding: calc(var(--nav-h) + 24px) var(--gutter) 32px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 96px); align-items: center;
}
.first__copy { display: flex; flex-direction: column; gap: 20px; }
.progress { width: 100%; max-width: 280px; height: 2px; background: var(--line-subtle); margin-top: 12px; }
.progress i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); }

.ledger { border-top: 1px solid var(--fg); }
.ledger__row {
  --f: 0;
  position: relative;
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: 16px; align-items: baseline;
  padding: clamp(10px, 1.7vh, 16px) 4px;
  border-bottom: 1px solid var(--line-subtle);
  perspective: 700px;
}
.ledger__k { font-size: 0.875rem; color: var(--fg-muted); }
.ledger__v { font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem); font-weight: 600; letter-spacing: -0.01em; }
.ledger__flap {
  position: absolute; inset: 3px 0;
  background: var(--accent); border-radius: 3px;
  transform-origin: 50% 0%;
  transform: rotateX(calc(var(--f) * -92deg));
  opacity: calc(1 - var(--f) * var(--f));
}
.ledger__flap--locked { background: var(--brand-ink); opacity: 1; transform: none; }
@media (prefers-color-scheme: dark) { .ledger__flap--locked { background: var(--surface); outline: 1px solid var(--line); } }
.ledger__row--locked .ledger__k,
.ledger__row--locked .ledger__v { visibility: hidden; }
.ledger__row--locked::after {
  content: "Foto, nombre y edad · se abre en la entrevista";
  position: absolute; inset: 0; display: flex; align-items: center; padding: 0 16px;
  font-size: 0.875rem; font-weight: 500; color: var(--brand-paper);
}

@media (max-width: 900px) {
  .first { height: 300vh; }
  /* Anclada arriba (no centrada) y metida bajo la barra: sin hueco entre el hero y la escena. */
  .first { margin-top: calc(-1 * var(--nav-h)); }
  .first__sticky { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 20px; padding-top: calc(var(--nav-h) + 16px); }
  .first__copy { gap: 10px; }
  .first__copy .body, .progress { display: none; }
  .first .lead { font-size: 1rem; }
  .ledger__row { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 6px 4px; }
  .ledger__k { font-size: 0.6875rem; }
  .ledger__v { font-size: 0.9375rem; }
  .first .title { font-size: 1.75rem; }
  .first .lead { font-size: 0.9375rem; line-height: 1.45; }
  .ledger__row--locked::after { font-size: 0.8125rem; padding: 0 12px; }
}
@media (max-width: 900px) and (max-height: 760px) {
  .first .lead { display: none; }
}

/* ---------- Conversación ---------- */

.talk {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(96px, 14vh, 160px) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px); align-items: center;
}
.talk__copy { display: flex; flex-direction: column; gap: 24px; }
.ticks { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.ticks li { display: flex; gap: 14px; align-items: baseline; max-width: 34em; }
.ticks li::before {
  content: ""; flex-shrink: 0; width: 14px; height: 7px; transform: translateY(-3px);
  border-top: 2px solid var(--brand-lines); border-bottom: 2px solid var(--brand-lines);
}

.chat {
  background: var(--surface); border-radius: 20px; padding: 0 0 16px;
  border: 1px solid var(--line-subtle);
  max-width: 460px; width: 100%; justify-self: end;
}
.chat__bar {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px; border-bottom: 1px solid var(--line-subtle);
  font-weight: 600;
}
.chat__state { margin-left: auto; font-size: 0.8125rem; font-weight: 500; color: var(--fg-muted); }
.chat__log { display: flex; flex-direction: column; gap: 8px; padding: 20px 16px 4px; min-height: 380px; }
.msg {
  max-width: 82%; padding: 10px 14px; border-radius: 16px;
  font-size: 0.9375rem; line-height: 1.4;
}
.msg--in { align-self: flex-start; background: var(--elevated); border: 1px solid var(--line-subtle); border-bottom-left-radius: 4px; }
.msg--out { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 4px; }
.msg--transcript { background: var(--accent-wash); color: var(--fg); font-style: italic; }
.msg--audio { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.play { width: 0; height: 0; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.wave {
  flex: 1; height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 18'%3E%3Cg fill='%23000'%3E%3Crect x='0' y='7' width='3' height='4' rx='1'/%3E%3Crect x='6' y='4' width='3' height='10' rx='1'/%3E%3Crect x='12' y='1' width='3' height='16' rx='1'/%3E%3Crect x='18' y='5' width='3' height='8' rx='1'/%3E%3Crect x='24' y='2' width='3' height='14' rx='1'/%3E%3Crect x='30' y='6' width='3' height='6' rx='1'/%3E%3Crect x='36' y='3' width='3' height='12' rx='1'/%3E%3Crect x='42' y='0' width='3' height='18' rx='1'/%3E%3Crect x='48' y='5' width='3' height='8' rx='1'/%3E%3Crect x='54' y='7' width='3' height='4' rx='1'/%3E%3Crect x='60' y='3' width='3' height='12' rx='1'/%3E%3Crect x='66' y='1' width='3' height='16' rx='1'/%3E%3Crect x='72' y='4' width='3' height='10' rx='1'/%3E%3Crect x='78' y='6' width='3' height='6' rx='1'/%3E%3Crect x='84' y='2' width='3' height='14' rx='1'/%3E%3Crect x='90' y='5' width='3' height='8' rx='1'/%3E%3Crect x='96' y='7' width='3' height='4' rx='1'/%3E%3Crect x='102' y='4' width='3' height='10' rx='1'/%3E%3Crect x='108' y='6' width='3' height='6' rx='1'/%3E%3Crect x='114' y='7' width='3' height='4' rx='1'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 18'%3E%3Cg fill='%23000'%3E%3Crect x='0' y='7' width='3' height='4' rx='1'/%3E%3Crect x='6' y='4' width='3' height='10' rx='1'/%3E%3Crect x='12' y='1' width='3' height='16' rx='1'/%3E%3Crect x='18' y='5' width='3' height='8' rx='1'/%3E%3Crect x='24' y='2' width='3' height='14' rx='1'/%3E%3Crect x='30' y='6' width='3' height='6' rx='1'/%3E%3Crect x='36' y='3' width='3' height='12' rx='1'/%3E%3Crect x='42' y='0' width='3' height='18' rx='1'/%3E%3Crect x='48' y='5' width='3' height='8' rx='1'/%3E%3Crect x='54' y='7' width='3' height='4' rx='1'/%3E%3Crect x='60' y='3' width='3' height='12' rx='1'/%3E%3Crect x='66' y='1' width='3' height='16' rx='1'/%3E%3Crect x='72' y='4' width='3' height='10' rx='1'/%3E%3Crect x='78' y='6' width='3' height='6' rx='1'/%3E%3Crect x='84' y='2' width='3' height='14' rx='1'/%3E%3Crect x='90' y='5' width='3' height='8' rx='1'/%3E%3Crect x='96' y='7' width='3' height='4' rx='1'/%3E%3Crect x='102' y='4' width='3' height='10' rx='1'/%3E%3Crect x='108' y='6' width='3' height='6' rx='1'/%3E%3Crect x='114' y='7' width='3' height='4' rx='1'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.msg__time { font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.typing { display: inline-flex; gap: 4px; padding: 14px 14px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--fg-muted); animation: typing 1s var(--ease-in-out) infinite; }
.typing i:nth-child(2) { animation-delay: 150ms; }
.typing i:nth-child(3) { animation-delay: 300ms; }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
@keyframes typing { 0%, 100% { opacity: 0.3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

.js .chat[data-chat] .msg { opacity: 0; transform: translateY(10px) scale(0.98); transform-origin: bottom left; }
.js .chat[data-chat] .msg--out { transform-origin: bottom right; }
.js .chat[data-chat] .msg.is-in { opacity: 1; transform: none; transition: opacity 320ms var(--ease-out), transform 420ms var(--ease-expo); }
.chat__note { padding: 8px 20px 0; font-size: 0.8125rem; color: var(--fg-muted); }

@media (max-width: 900px) {
  .talk { grid-template-columns: minmax(0, 1fr); }
  .chat { justify-self: stretch; max-width: none; }
  .chat__log { min-height: 0; }
  .js .chat[data-chat] .msg:not(.is-in) { display: none; }
  .js .chat[data-chat] .msg.is-in { animation: msg-in 420ms var(--ease-expo) both; }
}

/* ---------- Proceso (campo violeta) ---------- */

.process { background: var(--brand-violet); color: var(--brand-paper); }
.process ::selection { background: var(--brand-paper); color: var(--brand-violet); }
.process :focus-visible { outline-color: var(--brand-paper); }
.process__inner {
  position: relative;
  max-width: var(--max); margin: 0 auto;
  padding: clamp(96px, 14vh, 160px) var(--gutter);
}
.process .title { font-size: clamp(2.5rem, 1.2rem + 5.6vw, 6rem); letter-spacing: -0.035em; line-height: 0.98; }
.process__lead { margin-top: 24px; }

.stages {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px); margin-top: clamp(56px, 9vh, 96px);
  counter-reset: s;
}
.stage-col { display: flex; flex-direction: column; gap: 12px; }
.stage-col h3 { font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.75rem); letter-spacing: -0.02em; font-weight: 700; }
.stage-col p { font-size: 1rem; line-height: 1.5; max-width: 26em; }

/* Mini-tarjeta: lo que la empresa ve en cada etapa. La foto queda tras la persiana hasta Revelado. */
.snap {
  display: flex; align-items: center; gap: 14px;
  height: 112px; margin-bottom: 8px; padding: 14px;
  background: var(--brand-paper); color: var(--brand-ink); border-radius: 12px;
}
.snap__id {
  position: relative; flex-shrink: 0; width: 64px; height: 64px; border-radius: 10px; overflow: hidden;
  display: grid; place-items: center;
  background: #ece8ff; color: var(--brand-violet); font-size: 1.25rem; letter-spacing: -0.02em;
}
.snap__slats { position: absolute; inset: 0; display: flex; flex-direction: column; perspective: 200px; }
.snap__slats i {
  flex: 1; margin-bottom: -1px; background: var(--brand-violet); border-bottom: 2px solid #4f2ae6;
  transition: transform 800ms var(--ease-expo), opacity 220ms var(--ease-out);
}
.snap__txt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.snap__txt strong { white-space: nowrap; font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; }
.snap__txt > span { font-size: 0.8125rem; color: #5e5e68; }
.snap__chip {
  margin-top: 6px; font-size: 0.75rem !important; font-weight: 600; color: var(--brand-violet) !important;
  background: #ece8ff; border-radius: 999px; padding: 3px 9px;
}
.snap__chip--solid { background: var(--brand-violet); color: var(--brand-paper) !important; }
/* Sugerido: el nombre tampoco se ve */
.stage-col:not([data-opens]) .snap__txt strong { color: #5e5e68; }

/* Desde Revelado, la persiana de la foto se abre a su turno (gira y se desvanece). */
.process.is-in .stage-col[data-opens] .snap__slats i {
  transform: rotateX(90deg); opacity: 0;
  transition-delay: calc(500ms + var(--s) * 420ms), calc(850ms + var(--s) * 420ms);
}

.rail { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(56px, 8vh, 96px); height: 2px; background: rgb(250 250 248 / 0.3); }
.rail i { display: block; height: 100%; background: var(--brand-paper); transform-origin: left; transform: scaleX(0); transition: transform 2200ms var(--ease-in-out) 300ms; }
.process.is-in .rail i { transform: scaleX(1); }

.js .stage-col { opacity: 0; transform: translateY(20px); transition: opacity 600ms var(--ease-out), transform 800ms var(--ease-expo); transition-delay: calc(200ms + var(--s) * 420ms); }
.process.is-in .stage-col { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .stages { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 48px; }
  .rail { display: none; }
}
@media (max-width: 520px) {
  .stages { grid-template-columns: minmax(0, 1fr); row-gap: 56px; }
}

/* ---------- Pruebas ---------- */

.tests { max-width: var(--max); margin: 0 auto; padding: clamp(96px, 14vh, 160px) var(--gutter); }
.tests__head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; }
.tests__list { margin-top: clamp(48px, 8vh, 80px); border-top: 1px solid var(--fg); }
.test {
  position: relative;
  display: grid; grid-template-columns: 5.5rem 8.5rem minmax(0, 1fr) minmax(0, 1.3fr);
  grid-template-areas: "n u t d";
  gap: 8px 32px; align-items: baseline;
  padding: clamp(24px, 4vh, 40px) 0;
  border-bottom: 1px solid var(--line-subtle);
}
.test__n { grid-area: n; font-size: clamp(3.5rem, 2rem + 4vw, 5.5rem); font-weight: 800; line-height: 0.9; letter-spacing: -0.04em; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.test__unit { grid-area: u; font-size: 0.875rem; color: var(--fg-muted); }
.test__t { grid-area: t; font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.test__d { grid-area: d; color: var(--fg-muted); max-width: 32em; }
.test::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 500ms var(--ease-expo);
}
@media (hover: hover) { .test:hover::after { transform: scaleX(1); } }
.tests__foot { margin-top: 28px; max-width: 40em; }
.js .test[data-rise]:nth-child(2) { transition-delay: 90ms; }
.js .test[data-rise]:nth-child(3) { transition-delay: 180ms; }

@media (max-width: 900px) {
  .tests__head { grid-template-columns: minmax(0, 1fr); }
  .test { grid-template-columns: 3.25rem minmax(0, 1fr); grid-template-areas: "n t" "n u" "n d"; column-gap: 20px; row-gap: 4px; }
  .test__d { margin-top: 6px; }
  .test__n { font-size: 3rem; }
}

/* ---------- Ingreso ---------- */

.enter {
  max-width: var(--max); margin: 0 auto;
  padding: 0 var(--gutter) clamp(96px, 14vh, 160px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: center;
}
.enter__copy { display: flex; flex-direction: column; gap: 20px; }
.phone { display: flex; flex-direction: column; gap: 14px; max-width: 420px; width: 100%; justify-self: end; }
.phone__field {
  display: flex; align-items: center; gap: 12px;
  height: 60px; padding: 0 18px; border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 1.25rem; font-weight: 500; font-variant-numeric: tabular-nums; background: var(--elevated);
}
.phone__cc { color: var(--fg-muted); padding-right: 12px; border-right: 1px solid var(--line-subtle); }
.caret { width: 2px; height: 24px; background: var(--accent-text); margin-left: -10px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.phone__msg {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface); border-radius: 16px; border-top-left-radius: 4px; padding: 14px 16px;
  font-size: 0.9375rem;
}
.phone__from { font-size: 0.75rem; font-weight: 600; color: var(--accent-text); }
.phone__link { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; word-break: break-all; }
@media (max-width: 900px) {
  .enter { grid-template-columns: minmax(0, 1fr); }
  .phone { justify-self: stretch; max-width: none; }
}

/* ---------- Cierre: la persiana se abre sobre el violeta ---------- */

.close { position: relative; height: 200vh; }
.close__sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.close__field {
  position: absolute; inset: 0;
  background: var(--brand-violet); color: var(--brand-paper);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 40px;
  padding: var(--nav-h) max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
}
.close__field ::selection { background: var(--brand-paper); color: var(--brand-violet); }
.close__field :focus-visible { outline-color: var(--brand-paper); }
.close__title {
  font-size: clamp(3.25rem, 1rem + 9vw, 9rem);
  font-weight: 800; line-height: 0.94; letter-spacing: -0.04em;
}
.slats--close { perspective: 1400px; }
.slats--close .slat { background: var(--bg); border-bottom-color: var(--line-subtle); }

/* ---------- Pie ---------- */

.foot { background: var(--brand-violet); color: var(--brand-paper); border-top: 1px solid rgb(250 250 248 / 0.25); }
.foot__inner {
  max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter) calc(40px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px;
}
.foot__small { margin-left: auto; }
@media (max-width: 640px) { .foot__small { margin-left: 0; } }

/* ---------- Motion reducido: todo visible, sin recorridos ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .intro { display: none; }
  .first, .close { height: auto; }
  .first__sticky, .close__sticky { position: relative; height: auto; min-height: 100svh; }
  .ledger__flap:not(.ledger__flap--locked) { display: none; }
  .slats--close { display: none; }
  .caret { animation: none; }
}
