/* =====================================================================
   RECONNECTIA · v3
   Recorrido cinemático en 9 escenas
   Monocromo papel/tinta · Switzer + Inter · Lenis + GSAP
   ===================================================================== */

:root {
  --c-bg:       #F6F6F4;
  --c-bg-alt:   #ECECEA;
  --c-line:     #D9D9D6;
  --c-mute:     #8A8A88;
  --c-ink:      #1A1A1C;
  --c-ink-soft: #2B2B2E;

  --ff-display: "PP Neue Montreal", "Switzer", "Inter", system-ui, sans-serif;
  --ff-sans:    "Inter", "Switzer", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ff-mono:    "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  --fs-eyebrow: clamp(10px, 0.68vw, 12px);
  --fs-body:    clamp(15px, 1vw, 18px);
  --fs-h3:      clamp(22px, 2vw, 32px);
  --fs-h2:      clamp(40px, 6.2vw, 96px);
  --fs-hero:    clamp(64px, 11vw, 192px);
  --fs-mega:    clamp(72px, 14vw, 260px);

  --lh-tight:   0.92;
  --lh-display: 1.0;
  --lh-body:    1.55;

  --tracking-eyebrow: 0.18em;
  --tracking-button:  0.14em;
  --tracking-display: -0.025em;

  --pad-side:  clamp(20px, 6vw, 96px);
  --pad-sect:  clamp(80px, 14vh, 200px);
  --hud-pad:   clamp(18px, 2.6vh, 26px);

  --ease-text:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-cam:     cubic-bezier(0.65, 0, 0.35, 1);
  --ease-micro:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-curtain: cubic-bezier(0.77, 0, 0.175, 1);

  --dur-fast:  0.25s;
  --dur-base:  0.6s;
  --dur-slow:  1.1s;

  --z-canvas:  10;
  --z-content: 20;
  --z-hud:     70;
  --z-cursor:  90;
  --z-tweaks:  95;
  --z-menu:    97;

  /* Paleta de acento "Give 2 match" — uso muy moderado (≤5% del lienzo).
     Solo se aplica a 2-3 elementos puntuales (palabra puente del hero y un
     hover de CTA); el cuerpo se mantiene en papel/tinta. */
  --c-accent-rose:  #e73d64;
  --c-accent-mauve: #c675ae;
  --c-accent-lilac: #838ebd;
  --c-accent-cyan:  #35a9cd;
}

.theme-warm {
  --c-bg:       #F4F1EC;
  --c-bg-alt:   #EAE6DF;
  --c-line:     #D6D2CA;
  --c-mute:     #8B867E;
  --c-ink:      #161514;
  --c-ink-soft: #292724;
}

/* =====================================================================
   Base
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--ff-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { overflow-x: hidden; cursor: none; }
@media (hover: none) { body { cursor: auto; } }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, video, svg { display: block; max-width: 100%; }
.svg-defs { position: absolute; width: 0; height: 0; pointer-events: none; }
::selection { background: var(--c-ink); color: var(--c-bg); }

/* =====================================================================
   Tipografía base
   ===================================================================== */

.eyebrow {
  font-family: var(--ff-sans);
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  color: var(--c-mute);
  font-weight: 500;
}

h3, p { margin: 0; }

.reveal-mask .line-wrap { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.reveal-mask .line { display: block; will-change: transform; }

/* Hero: NO initial hide via CSS — JS animates from inline transform */
.scene--hero .hero__title .line { transform: translateY(0); }

em {
  font-style: italic;
  font-family: var(--ff-display);
  font-weight: 400;
}

/* =====================================================================
   WORDMARK + BRAND LOGO
   ===================================================================== */

/* ---------- Wordmark (CSS fallback, used in some places) ---------- */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.05em;
  font-family: var(--ff-display);
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--c-ink);
  line-height: 1;
  white-space: nowrap;
}
.wordmark > span { display: inline-block; }
.wordmark .wm-block {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-ink);
  color: var(--c-bg);
  font-style: normal;
  letter-spacing: -0.04em;
  padding: 0.04em 0.18em 0.08em;
  border-radius: 0.1em;
  margin-left: 0.1em;
  line-height: 0.9;
}
.wordmark--sm  { font-size: 22px; }
.wordmark--lg  { font-size: clamp(48px, 8vw, 120px); }
.wordmark--xl  { font-size: clamp(72px, 18vw, 260px); letter-spacing: -0.045em; }

/* ---------- Brand logo with hover color reveal ---------- */
.brand-logo {
  position: relative;
  display: inline-block;
  line-height: 0;
}
.brand-logo img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.5s var(--ease-cam);
}
.brand-logo .l-color {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.brand-logo:hover .l-base { opacity: 0; }
.brand-logo:hover .l-color { opacity: 1; }

/* Variants by size */
.brand-logo--sm     { width: clamp(110px, 11vw, 150px); }
.brand-logo--md     { width: clamp(180px, 18vw, 260px); }
.brand-logo--lg     { width: clamp(260px, 34vw, 480px); }
.brand-logo--hud    { width: clamp(132px, 14.3vw, 198px); }
.brand-logo--footer { width: clamp(220px, 28vw, 360px); }

/* Inverted variant — invierte el logo para fondos oscuros (footer, ink).
   Usa invert(1) puro para preservar el contraste interno del cuadrado "iA". */
.brand-logo--inverted img { filter: invert(1) hue-rotate(180deg); }

/* HUD: cuando el HUD está en modo ink (escenas oscuras), invertimos el logo */
.hud.is-ink .hud__brand .brand-logo img { filter: invert(1) hue-rotate(180deg); }

/* ---------- Badge iA — el cuadrado del logo, escalado en em ---------- */
.ia-word { white-space: nowrap; }
.ia-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0.10em 0.16em 0.14em;
  margin-left: 0.05em;
  border-radius: 0.18em;
  background: var(--c-ink);
  color: var(--c-bg);
  font-family: var(--ff-display);
  font-style: normal;
  font-weight: 500;
  font-size: 0.78em;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: none;
  vertical-align: -0.06em;
}
/* Variante invertida para fondos tinta */
.scene--ink .ia-chip,
.duo__half--ink .ia-chip,
.footer .ia-chip {
  background: var(--c-bg);
  color: var(--c-ink);
}

/* Isotipo (just the shape, no text) */
.brand-iso {
  width: clamp(48px, 5vw, 72px);
  height: auto;
  display: inline-block;
  line-height: 0;
  position: relative;
}
.brand-iso img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.5s var(--ease-cam);
}

/* Cesea Sistemas partner logo */
.partner-logo {
  position: relative;
  display: inline-block;
  width: clamp(110px, 12vw, 180px);
  line-height: 0;
}
.partner-logo img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.5s var(--ease-cam), filter 0.5s var(--ease-cam);
}
.partner-logo .l-base {
  /* Monochrome dark version for paper backgrounds */
  filter: grayscale(1) brightness(0.25) contrast(1.2);
}
.partner-logo--cesea-light .l-base {
  /* Monochrome light version for dark/ink backgrounds */
  filter: grayscale(1) brightness(0) invert(1);
}
.partner-logo .l-color {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.partner-logo:hover .l-base  { opacity: 0; }
.partner-logo:hover .l-color { opacity: 1; }

/* =====================================================================
   BUTTONS
   ===================================================================== */

.btn-ghost {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border: 1px solid var(--c-ink);
  background: transparent;
  color: var(--c-ink);
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: var(--tracking-button);
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: color var(--dur-fast) var(--ease-micro);
  font-weight: 500;
}
.btn-ghost::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--c-ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--dur-base) var(--ease-micro);
  z-index: -1;
}
.btn-ghost:hover { color: var(--c-bg); }
.btn-ghost:hover::before { transform: scaleY(1); }

.btn-ghost--light {
  border-color: var(--c-bg);
  color: var(--c-bg);
}
.btn-ghost--light::before { background: var(--c-bg); }
.btn-ghost--light:hover { color: var(--c-ink); }

/* =====================================================================
   CURSOR
   ===================================================================== */

.cursor {
  position: fixed; top: 0; left: 0;
  width: 0; height: 0;
  pointer-events: none;
  z-index: var(--z-cursor);
  mix-blend-mode: difference;
}
.cursor__dot {
  position: absolute; top: 0; left: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  transition: transform var(--dur-fast) var(--ease-micro);
}
.cursor__label {
  position: absolute; top: 0; left: 0;
  width: 92px; height: 92px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  display: grid; place-items: center;
  transform: translate(-50%, -50%) scale(0);
  font-family: var(--ff-sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-button);
  transition: transform var(--dur-base) var(--ease-micro);
  font-weight: 500;
}
.cursor.is-hover .cursor__dot { transform: translate(-50%, -50%) scale(0); }
.cursor.is-hover .cursor__label { transform: translate(-50%, -50%) scale(1); }
html.no-cursor { cursor: auto; }
html.no-cursor .cursor { display: none; }
html.no-cursor body { cursor: auto; }

/* ---------------------------------------------------------------------
   Paleta "Give 2 match" — exclusivamente en la animación del cursor.
   Cuando el cursor entra en un elemento interactivo (data-cursor-hover),
   el blob se enciende ciclando por los 4 colores. El resto del lienzo
   permanece en papel/tinta.
   --------------------------------------------------------------------- */
.cursor.is-hover { mix-blend-mode: normal; }
.cursor.is-hover .cursor__label {
  color: var(--c-ink);
  animation: cursorPalette 6s linear infinite;
}
@keyframes cursorPalette {
  0%, 100% { background: var(--c-accent-rose); }
  25%      { background: var(--c-accent-mauve); }
  50%      { background: var(--c-accent-lilac); }
  75%      { background: var(--c-accent-cyan); }
}

/* =====================================================================
   HUD · persistent UI on every scene
   ===================================================================== */

.hud {
  position: fixed;
  z-index: var(--z-hud);
  pointer-events: none;
  color: var(--c-ink);
  transition: opacity var(--dur-base) var(--ease-cam), color var(--dur-base) var(--ease-cam);
}
.hud > * { pointer-events: auto; }

/* When current scene is INK (dark), HUD flips to paper color */
.hud.is-ink { color: var(--c-bg); }

html[data-hud="off"] .hud { opacity: 0; pointer-events: none; }

.hud--brand   { top: var(--hud-pad); left: var(--pad-side); }
.hud--route   { bottom: calc(var(--hud-pad) + 12px); left: var(--pad-side); display: flex; align-items: center; gap: 10px; }
.hud--menu    { bottom: calc(var(--hud-pad) + 6px); right: var(--pad-side); }

.hud .eyebrow { color: currentColor; opacity: .7; }
.hud__brand .wordmark { font-size: 22px; color: currentColor; }
.hud__brand .wm-block {
  background: var(--c-ink);
  color: var(--c-bg);
}
.hud.is-ink .hud__brand .wm-block {
  background: var(--c-bg);
  color: var(--c-ink);
}

.hud__route-dot { font-size: 8px; line-height: 1; opacity: .55; }

.hud__menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid currentColor;
  color: currentColor;
  background: var(--c-bg);
  font-weight: 500;
  letter-spacing: var(--tracking-button);
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
}
.hud.is-ink .hud__menu-btn { background: var(--c-ink); color: var(--c-bg); }
.hud__menu-icon { font-size: 14px; line-height: 1; }

@media (max-width: 720px) {
  .hud--route { display: none; }
  .hud--menu .hud__menu-btn span:last-child { display: none; }
}

/* =====================================================================
   PROGRESS bar (bottom edge)
   ===================================================================== */

.progress {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: var(--c-line);
  z-index: var(--z-hud);
  pointer-events: none;
}
.progress__fill {
  display: block;
  height: 100%;
  background: var(--c-ink);
  width: 0%;
  transition: width 0.15s linear;
}

/* =====================================================================
   MENU (scene index)
   ===================================================================== */

.menu {
  position: fixed; inset: 0;
  background: var(--c-ink);
  color: var(--c-bg);
  z-index: var(--z-menu);
  display: grid;
  grid-template-rows: auto 1fr;
  padding: var(--pad-side);
  transform: translateY(-100%);
  transition: transform 0.7s var(--ease-curtain);
}
.menu[hidden] { display: none; }
.menu.is-open { transform: translateY(0); }
.menu__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid color-mix(in oklab, var(--c-bg), transparent 80%);
  padding-bottom: 16px;
}
.menu__head .eyebrow { color: var(--c-bg); opacity: .7; }
.menu__close {
  font-size: 36px;
  line-height: 1;
  color: var(--c-bg);
}
.menu__list {
  list-style: none;
  padding: 40px 0 0;
  margin: 0;
  display: grid;
  gap: 0;
  align-content: start;
}
.menu__list li { border-bottom: 1px solid color-mix(in oklab, var(--c-bg), transparent 85%); }
.menu__list a {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: baseline;
  gap: 24px;
  padding: 22px 0;
  font-family: var(--ff-display);
  font-size: clamp(28px, 4vw, 56px);
  letter-spacing: -0.02em;
  color: var(--c-bg);
  line-height: 1;
  font-weight: 500;
  transition: padding 0.4s var(--ease-cam), opacity 0.4s var(--ease-cam);
}
.menu__list a:hover { padding-left: 16px; }
.menu__list a .m-num { color: var(--c-mute); font-family: var(--ff-sans); font-size: 14px; letter-spacing: 0.18em; text-transform: uppercase; }
.menu__list a .m-tag { color: var(--c-mute); font-family: var(--ff-sans); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; align-self: center; }

/* =====================================================================
   SCENE (base)
   ===================================================================== */

.scene {
  position: relative;
  min-height: 100vh;
  padding: clamp(140px, 22vh, 240px) var(--pad-side) clamp(80px, 12vh, 140px);
  overflow: hidden;
  background: var(--c-bg);
}

.scene--ink {
  background: var(--c-ink);
  color: var(--c-bg);
}
.scene--ink .eyebrow { color: color-mix(in oklab, var(--c-bg), transparent 50%); }
.scene--ink em { color: color-mix(in oklab, var(--c-bg), transparent 40%); }

/* =====================================================================
   HERO
   ===================================================================== */

.scene--hero {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(24px, 4vh, 56px);
}
.scene__metaphor {
  position: absolute;
  inset: auto 0 0 0;
  height: 65%;
  pointer-events: none;
  z-index: 0;
  opacity: .45;
  mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 100%);
}

.hero__meta, .hero__title, .hero__foot { position: relative; z-index: 1; }
.hero__meta {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  border-top: 1px solid var(--c-line);
  padding-top: 18px;
}
.hero__title {
  font-family: var(--ff-display);
  font-size: clamp(72px, 13vw, 220px);
  line-height: 0.88;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 0;
  align-self: center;
}
.hero__title .line { padding-right: 0.05em; }
.hero__title em {
  font-family: var(--ff-display);
  font-style: italic;
  color: var(--c-ink);
  font-weight: 500;
  display: block;
}

.hero__foot {
  display: grid;
  grid-template-columns: minmax(0, 40ch) 1fr auto;
  align-items: end;
  gap: 24px;
}
.hero__lead {
  max-width: 40ch;
  color: var(--c-ink-soft);
  text-wrap: pretty;
}
.hero__scroll {
  justify-self: end;
  display: flex; flex-direction: column;
  align-items: center; gap: 12px;
  color: var(--c-mute);
}
.hero__scroll .line-v {
  display: block; width: 1px; height: 56px;
  background: currentColor;
  position: relative; overflow: hidden;
}
.hero__scroll .line-v::after {
  content: ""; position: absolute;
  top: -100%; left: 0; right: 0;
  height: 100%; background: var(--c-bg);
  animation: scrollLine 2.4s var(--ease-cam) infinite;
}
@keyframes scrollLine {
  0%   { top: -100%; }
  60%  { top: 100%; }
  100% { top: 100%; }
}

/* Metaphor layers */
html[data-metaphor="tipografia"] .scene__metaphor { display: none; }
.metaphor-trayecto, .metaphor-constelacion {
  position: absolute; inset: 0;
}
.metaphor-trayecto svg, .metaphor-constelacion svg { width: 100%; height: 100%; }
.metaphor-trayecto .ml-axis { stroke: var(--c-ink); stroke-width: 1; opacity: .12; }
.metaphor-trayecto .ml-arc {
  stroke: var(--c-ink); stroke-width: 1.2; fill: none; opacity: .35;
  stroke-dasharray: 1500; stroke-dashoffset: 1500;
  animation: drawArc 4s var(--ease-cam) .4s forwards;
}
.metaphor-trayecto .ml-arc.is-dashed { stroke-dasharray: 4 6; animation: none; stroke-dashoffset: 0; opacity: .2; }
.metaphor-trayecto .ml-node { fill: var(--c-ink); opacity: 0; animation: nodeIn 0.6s var(--ease-text) forwards; }
.metaphor-trayecto .ml-label {
  fill: var(--c-mute);
  font-family: var(--ff-sans);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  opacity: 0;
  animation: nodeIn 0.6s var(--ease-text) forwards;
}
@keyframes drawArc { to { stroke-dashoffset: 0; } }
@keyframes nodeIn { to { opacity: 1; } }
.metaphor-constelacion circle { fill: var(--c-ink); opacity: .55; }
.metaphor-constelacion line   { stroke: var(--c-ink); opacity: .18; stroke-width: 1; }

/* =====================================================================
   SCENE 02 — DUO (Tesis + Red profesional, split-screen)
   ===================================================================== */

.scene--duo {
  padding: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.duo__half {
  display: grid;
  place-content: center;
  gap: clamp(20px, 3vh, 36px);
  padding: clamp(96px, 14vh, 150px) clamp(28px, 4vw, 72px) clamp(60px, 10vh, 110px);
  min-width: 0;
}
.duo__half--paper { background: var(--c-bg); }
.duo__half--ink   { background: var(--c-ink); color: var(--c-bg); }
.duo__half--ink .eyebrow { color: color-mix(in oklab, var(--c-bg), transparent 50%); }
.duo__half--ink em { color: color-mix(in oklab, var(--c-bg), transparent 40%); }

/* La frase reutiliza .phrase__text a media columna, alineada a la izquierda */
.scene--duo .phrase__text {
  font-size: clamp(30px, 3.6vw, 64px);
  justify-content: flex-start;
  text-align: left;
}

.duo__title {
  font-family: var(--ff-display);
  font-size: clamp(36px, 4.6vw, 88px);
  line-height: 1.0;
  letter-spacing: var(--tracking-display);
  font-weight: 500;
  margin: 0;
  max-width: 14ch;
}
.duo__line { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.duo__line > span { display: block; transform: translateY(120%); transition: transform 1s var(--ease-text); }
.scene--duo.is-revealed .duo__line > span { transform: translateY(0); }
.scene--duo.is-revealed .duo__line:nth-child(2) > span { transition-delay: 0.10s; }
.scene--duo.is-revealed .duo__line:nth-child(3) > span { transition-delay: 0.20s; }

.duo__foot {
  max-width: 44ch;
  color: color-mix(in oklab, var(--c-bg), transparent 40%);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s var(--ease-text) 0.35s, transform 0.8s var(--ease-text) 0.35s;
}
.scene--duo.is-revealed .duo__foot { opacity: 1; transform: none; }

.phrase__text {
  font-family: var(--ff-display);
  font-size: clamp(40px, 6.4vw, 110px);
  line-height: 1.05;
  letter-spacing: var(--tracking-display);
  font-weight: 500;
  color: var(--c-ink);
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.18em 0.32em;
  text-wrap: pretty;
}
.phrase__text .w {
  display: inline-block;
  opacity: 0.12;
  transform: translateY(0.18em);
  transition: opacity 0.3s var(--ease-text), transform 0.6s var(--ease-text);
}
.phrase__text .w.is-on {
  opacity: 1;
  transform: translateY(0);
}
.phrase__text .w.em { font-style: italic; color: var(--c-mute); }
.phrase__text .br {
  flex-basis: 100%;
  height: 0;
  margin: 0;
  padding: 0;
}

/* =====================================================================
   SCENE INK (interstitials)
   ===================================================================== */

.scene--ink {
  display: grid;
  place-content: center;
  text-align: center;
  gap: clamp(24px, 4vh, 48px);
}
.ink__text {
  font-family: var(--ff-display);
  font-size: clamp(48px, 8vw, 144px);
  line-height: 1.0;
  letter-spacing: var(--tracking-display);
  font-weight: 500;
  margin: 0;
  max-width: 22ch;
  margin-inline: auto;
}
.ink__text em { color: color-mix(in oklab, var(--c-bg), transparent 40%); }
.ink__foot {
  max-width: 56ch;
  margin-inline: auto;
  color: color-mix(in oklab, var(--c-bg), transparent 40%);
  letter-spacing: 0.16em;
}
.ink__mega {
  font-family: var(--ff-display);
  font-size: var(--fs-mega);
  line-height: 0.94;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 0;
}
.ink__cta { margin-top: 24px; align-self: center; justify-self: center; }
.scene--ink-final { gap: clamp(40px, 6vh, 80px); }

/* =====================================================================
   SCENE CHAPTER · pinned multi-stage
   ===================================================================== */

.scene--chapter {
  position: relative;
  padding: 0;
  height: 100vh;
}

.stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(96px, 14vh, 150px) var(--pad-side) clamp(80px, 12vh, 140px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px);
  transition: opacity 0.5s var(--ease-cam), transform 0.7s var(--ease-cam);
  will-change: opacity, transform;
}
.stage.is-on { pointer-events: auto; opacity: 1; transform: translateY(0); }

/* Stage title lines: hidden by default, slide up when stage becomes active */
.stage .reveal-mask .line {
  transform: translateY(120%);
  transition: transform 1.0s var(--ease-text);
}
.stage.is-on .reveal-mask .line { transform: translateY(0); }
.stage.is-on .reveal-mask .line:nth-child(1) { transition-delay: 0.05s; }
.stage.is-on .reveal-mask .line:nth-child(2) { transition-delay: 0.13s; }
.stage.is-on .reveal-mask .line:nth-child(3) { transition-delay: 0.21s; }
.stage.is-on .reveal-mask .line:nth-child(4) { transition-delay: 0.29s; }
.stage.is-on .reveal-mask .line:nth-child(5) { transition-delay: 0.37s; }

/* Stage body copy: fade in with the stage */
.stage .stage__lede,
.stage .stage__copy p,
.stage .stage__small,
.stage .stage__big {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s var(--ease-text) 0.1s, transform 0.7s var(--ease-text) 0.1s;
}
.stage.is-on .stage__lede,
.stage.is-on .stage__copy p,
.stage.is-on .stage__small,
.stage.is-on .stage__big {
  opacity: 1;
  transform: translateY(0);
}

.stage__inner { width: 100%; max-width: 1400px; margin: 0 auto; display: grid; gap: clamp(20px, 3vh, 40px); }

.stage--title {
  justify-items: start;
  text-align: left;
}
.stage__title {
  font-family: var(--ff-display);
  font-size: clamp(48px, 8vw, 144px);
  line-height: 0.98;
  letter-spacing: var(--tracking-display);
  font-weight: 500;
  margin: 0;
  color: var(--c-ink);
}
.stage__title--md { font-size: clamp(40px, 4.8vw, 88px); }
.stage__lede {
  max-width: 48ch;
  color: var(--c-ink-soft);
  font-size: clamp(16px, 1.2vw, 20px);
  text-wrap: pretty;
}

.stage--split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
}
.stage--split .stage__copy { display: grid; gap: 16px; max-width: 48ch; }
.stage--split .stage__copy h3 { margin-bottom: 4px; }
.stage--split p { color: var(--c-ink-soft); }
.stage--split p em { color: var(--c-ink); }
.stage__h3 {
  font-family: var(--ff-display);
  font-size: clamp(28px, 3vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--c-ink);
}
.stage__hint {
  color: var(--c-mute);
  margin-top: 8px;
  border-top: 1px solid var(--c-line);
  padding-top: 12px;
}

.stage__visual { display: grid; place-items: center; }
.stage__visual figcaption { margin-top: 14px; text-align: center; }

.stage--numbers { justify-items: start; text-align: left; gap: clamp(20px, 3vh, 40px); }
.bignums {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 56px);
  width: 100%;
  border-top: 1px solid var(--c-line);
  padding-top: 28px;
}
.bignums li { display: grid; gap: 8px; }
.bignum {
  font-family: var(--ff-display);
  font-size: clamp(48px, 6vw, 110px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 500;
  color: var(--c-ink);
}

@media (max-width: 980px) {
  .stage--split { grid-template-columns: 1fr; gap: 32px; }
  .bignums { grid-template-columns: 1fr; gap: 24px; }
}

/* =====================================================================
   CHAPTER VISUAL — PORTAL (Entidades · stage 2)
   ===================================================================== */

.portal {
  width: 100%;
  max-width: 480px;
  background: var(--c-bg);
  border: 1px solid var(--c-ink);
  box-shadow: 0 4px 0 var(--c-ink);
}
.portal__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
}
.portal__row--head { border-bottom: 1px solid var(--c-line); }
.portal__list { list-style: none; padding: 0; margin: 0; }
.portal__list li {
  display: grid;
  grid-template-columns: 1fr auto 14px;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-line);
}
.portal__name {
  font-family: var(--ff-display);
  font-size: clamp(15px, 1.1vw, 18px);
  letter-spacing: -0.012em;
  color: var(--c-ink);
  font-weight: 500;
}
.portal__meta { color: var(--c-mute); font-family: var(--ff-mono); font-size: 12px; }
.portal__dot { color: var(--c-ink); font-size: 10px; opacity: .8; }
.portal__dot.is-full { color: var(--c-mute); opacity: .4; }
.portal__foot {
  display: flex; justify-content: space-between;
  padding: 14px 18px;
  border-top: 1px solid var(--c-ink);
}
.portal__foot .eyebrow { color: var(--c-ink); }

/* =====================================================================
   CHAPTER VISUAL — TINDER (Entidades · stage 3)
   ===================================================================== */

.tinder {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 3 / 4;
}
.tinder__card {
  position: absolute;
  inset: 0;
  background: var(--c-bg);
  border: 1px solid var(--c-ink);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform-origin: center bottom;
  box-shadow: 0 2px 0 var(--c-ink);
}
.tinder__card--1 { transform: translate(0,0) rotate(-2deg); z-index: 3; box-shadow: 0 4px 0 var(--c-ink); }
.tinder__card--2 { transform: translate(8px,-8px) rotate(1.5deg); z-index: 2; opacity: .55; }
.tinder__card--3 { transform: translate(-8px,-16px) rotate(-1deg); z-index: 1; opacity: .25; }

.tinder__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--c-line);
  padding-bottom: 10px;
}
.tinder__title {
  font-family: var(--ff-display);
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.012em;
  margin: 0;
  color: var(--c-ink);
}
.tinder__meta { color: var(--c-mute); font-size: 13px; }
.tinder__match {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--c-ink);
}
.tinder__match .dot {
  width: 8px; height: 8px;
  background: var(--c-ink);
  border-radius: 50%;
  display: inline-block;
}
.tinder__foot {
  display: flex; justify-content: space-between;
  border-top: 1px solid var(--c-line);
  padding-top: 12px;
  color: var(--c-ink);
}

/* =====================================================================
   CHAPTER VISUAL — INMAIL (Empresas · stage 3)
   ===================================================================== */

.inmail {
  width: 100%; max-width: 460px;
  border: 1px solid var(--c-ink);
  background: var(--c-bg);
  padding: 22px;
  display: grid;
  gap: 0;
  box-shadow: 0 4px 0 var(--c-ink);
}
.inmail__row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--c-line);
  align-items: baseline;
}
.inmail__row--full { border-bottom: 1px solid var(--c-ink); }
.inmail__val { color: var(--c-ink); font-size: 14px; }
.inmail__body { padding: 16px 0; display: grid; gap: 12px; color: var(--c-ink-soft); font-size: 15px; line-height: 1.5; }
.inmail__cta {
  display: flex; justify-content: space-between;
  border-top: 1px solid var(--c-line);
  padding-top: 12px;
  color: var(--c-ink);
}

/* =====================================================================
   SCENE 09 — HORIZONTAL ECOSYSTEM
   ===================================================================== */

.scene--horizontal {
  height: 100vh;
  padding: 0;
  background: var(--c-bg-alt);
  overflow: hidden;
}
.hroad {
  position: relative;
  height: 100%;
  width: 100%;
  display: grid;
  grid-template-rows: 1fr;
}
.hroad__track {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
  width: max-content;
  will-change: transform;
}
.hroad__block {
  flex: 0 0 auto;
  height: 100%;
  display: grid;
  align-content: center;
  padding: 0 clamp(60px, 8vw, 140px);
}
.hroad__block--title { width: 100vw; padding-left: var(--pad-side); }
.hroad__block--close { width: 80vw; }

.hroad__title {
  font-family: var(--ff-display);
  font-size: clamp(48px, 9vw, 160px);
  line-height: 0.95;
  letter-spacing: var(--tracking-display);
  font-weight: 500;
  margin: 0;
  color: var(--c-ink);
}
.hroad__lede {
  margin-top: 32px;
  color: var(--c-mute);
  font-size: clamp(14px, 1vw, 16px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hroad__close-text {
  font-family: var(--ff-display);
  font-size: clamp(32px, 4vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--c-ink);
  max-width: 22ch;
  margin-top: 16px;
}
.hroad__close-text em { color: var(--c-mute); }

.hroad__path {
  flex: 0 0 auto;
  width: 2600px;
  height: 100%;
  display: grid;
  align-items: center;
}
.hroad__svg { width: 100%; height: 75%; min-height: 440px; color: var(--c-ink); }
.hr-axis { stroke: var(--c-ink); stroke-width: 1; opacity: .18; }
.hr-line {
  fill: none;
  stroke: var(--c-ink);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 6000;
  stroke-dashoffset: 6000;
}
.hr-stop circle { fill: var(--c-ink); }
.hr-stop .hr-tick { stroke: var(--c-ink); stroke-width: 1; }
.hr-stop text {
  font-family: var(--ff-sans);
  font-size: 14px;
  fill: var(--c-ink);
  font-weight: 500;
}
.hr-stop .hr-meta {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  fill: var(--c-mute);
}
.hr-stop .hr-step {
  font-family: var(--ff-display);
  font-size: 22px;
  letter-spacing: -0.02em;
  fill: var(--c-mute);
}
.hr-stop {
  opacity: 0;
  transform: translateY(16px) scale(0.94);
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.6s var(--ease-text), transform 0.9s var(--ease-text);
}
.hr-stop.is-on { opacity: 1; transform: translateY(0) scale(1); }
/* stagger interno: punto → nº paso → etiqueta → meta */
.hr-stop text       { opacity: 0; transition: opacity 0.5s var(--ease-text) 0.18s; }
.hr-stop .hr-step   { transition-delay: 0.08s; }
.hr-stop .hr-meta,
.hr-stop .hr-chip-txt { transition-delay: 0.28s; }
.hr-stop.is-on text { opacity: 1; }
.hr-stop .hr-chip   { opacity: 0; transition: opacity 0.5s var(--ease-text) 0.28s; }
.hr-stop.is-on .hr-chip { opacity: 1; }

/* Chip iA dentro del SVG ("Transferenc[iA] exitosa") */
.hr-chip { fill: var(--c-ink); }
.hr-chip-txt {
  font-family: var(--ff-display);
  font-size: 9px;
  fill: var(--c-bg-alt);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

/* Marcador viajero sobre el path */
.hr-runner { opacity: 0; transition: opacity 0.4s var(--ease-text); }
.hr-runner.is-live { opacity: 1; }
.hr-runner__ring { fill: var(--c-bg-alt); stroke: var(--c-ink); stroke-width: 2; }
.hr-runner__dot  { fill: var(--c-ink); }

.hroad__hint {
  position: absolute;
  bottom: 24px; right: var(--pad-side);
  color: var(--c-mute);
  pointer-events: none;
}

/* =====================================================================
   FOOTER
   ===================================================================== */

.footer {
  background: var(--c-ink);
  color: var(--c-bg);
  padding: clamp(60px, 10vh, 120px) var(--pad-side) 36px;
  display: grid;
  gap: clamp(40px, 6vh, 80px);
}
.footer .eyebrow { color: color-mix(in oklab, var(--c-bg), transparent 40%); }
.footer a { color: var(--c-bg); }
.footer a:hover { color: var(--c-bg); opacity: .7; }

.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  border-bottom: 1px solid color-mix(in oklab, var(--c-bg), transparent 80%);
  padding-bottom: 32px;
}
.footer__brand .wordmark { color: var(--c-bg); }
.footer__brand .wm-block { background: var(--c-bg); color: var(--c-ink); }
.footer__slogan { margin-top: 12px; }
.footer__back { color: var(--c-bg); white-space: nowrap; }

.footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.footer__col { display: grid; gap: 8px; align-content: start; }
.footer__h { margin-bottom: 8px; }
.footer__col a { font-size: clamp(15px, 1.1vw, 18px); }

.footer__bot {
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  border-top: 1px solid color-mix(in oklab, var(--c-bg), transparent 80%);
  padding-top: 18px;
}

@media (max-width: 720px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

/* =====================================================================
   TWEAKS PANEL
   ===================================================================== */

.tweaks {
  position: fixed;
  bottom: 64px;
  right: 24px;
  z-index: var(--z-tweaks);
  width: min(320px, calc(100vw - 32px));
  background: var(--c-bg);
  color: var(--c-ink);
  border: 1px solid var(--c-ink);
  box-shadow: 0 6px 0 var(--c-ink);
  font-family: var(--ff-sans);
}
.tweaks[hidden] { display: none; }
.tweaks__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-line);
}
.tweaks__close { font-size: 22px; line-height: 1; padding: 0 4px; color: var(--c-ink); }
.tweaks__body { padding: 8px 0; max-height: 70vh; overflow: auto; }
.tweaks__group { padding: 12px 16px; border-bottom: 1px solid var(--c-line); }
.tweaks__group:last-child { border-bottom: 0; }
.tweaks__h { margin-bottom: 8px; display: block; }
.tweaks__radio {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  border: 1px solid var(--c-ink);
}
.tweaks__radio button {
  padding: 8px 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-ink);
  border-right: 1px solid var(--c-ink);
  transition: background var(--dur-fast) var(--ease-micro), color var(--dur-fast) var(--ease-micro);
  font-weight: 500;
}
.tweaks__radio button:last-child { border-right: 0; }
.tweaks__radio button.is-active { background: var(--c-ink); color: var(--c-bg); }
.tweaks__slider {
  display: grid;
  grid-template-columns: 1fr 36px;
  align-items: center;
  gap: 8px;
}
.tweaks__slider input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  height: 1px;
  background: var(--c-line);
  width: 100%;
}
.tweaks__slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  background: var(--c-ink);
  border-radius: 50%;
  border: 0;
  cursor: pointer;
}
.tweaks__slider input[type=range]::-moz-range-thumb {
  width: 14px; height: 14px;
  background: var(--c-ink);
  border-radius: 50%;
  border: 0;
  cursor: pointer;
}
.tweaks__slider span { font-family: var(--ff-mono); font-size: 12px; text-align: right; }

.tweaks-handle {
  position: fixed;
  bottom: 64px;
  right: 24px;
  z-index: var(--z-tweaks);
  border: 1px solid var(--c-ink);
  background: var(--c-bg);
  padding: 8px 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
  box-shadow: 0 4px 0 var(--c-ink);
}
.tweaks-handle[hidden] { display: none; }

/* =====================================================================
   PROCESS TABLE (Empresas · stage 4) — contracting process coverage
   ===================================================================== */

.process {
  width: 100%;
  max-width: 880px;
  border: 1px solid var(--c-ink);
  background: var(--c-bg);
  box-shadow: 0 4px 0 var(--c-ink);
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.process__head, .process__foot {
  display: grid;
  grid-template-columns: 1fr 70px 200px 80px;
  gap: 12px;
  padding: 14px 18px;
  align-items: center;
  border-bottom: 1px solid var(--c-line);
  color: var(--c-mute);
}
.process__foot {
  border-bottom: 0;
  border-top: 1px solid var(--c-ink);
  background: var(--c-ink);
  color: var(--c-bg);
}
.process__foot .eyebrow { color: color-mix(in oklab, var(--c-bg), transparent 35%); }
.process__foot strong {
  font-family: var(--ff-display);
  font-size: clamp(18px, 1.6vw, 24px);
  letter-spacing: -0.012em;
  font-weight: 500;
}
.process__body { list-style: none; padding: 0; margin: 0; }
.process__row {
  display: grid;
  grid-template-columns: 1fr 70px 200px 80px;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--c-line);
  align-items: center;
  font-size: 13px;
  color: var(--c-ink);
}
.process__row:last-child { border-bottom: 0; }
.process__name { display: grid; gap: 2px; }
.process__name b {
  font-family: var(--ff-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.012em;
}
.process__name span { color: var(--c-mute); font-size: 12px; }
.process__pct {
  font-family: var(--ff-mono);
  font-size: 14px;
  text-align: right;
  color: var(--c-mute);
}
.process__cov {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--c-ink);
  display: flex;
  align-items: center;
  gap: 6px;
}
.process__cov::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--c-ink);
  border-radius: 50%;
}
.process__cov--none { color: var(--c-mute); }
.process__cov--none::before { background: var(--c-line); }
.process__cov--partial::before { background: var(--c-mute); }
.process__check {
  font-family: var(--ff-mono);
  font-size: 14px;
  text-align: right;
  color: var(--c-ink);
}
.process__check--no { color: var(--c-line); }

@media (max-width: 820px) {
  .process__head, .process__row, .process__foot {
    grid-template-columns: 1fr 50px 60px;
  }
  .process__cov { display: none; }
}

/* =====================================================================
   v4 · MOCKUPS · Service / Wallet / Persona / Ledger / Categories / VS / Check
   ===================================================================== */

/* ---------- Common card mockup base ---------- */
.service, .wallet, .persona, .check, .vs {
  width: 100%;
  max-width: 460px;
  background: var(--c-bg);
  border: 1px solid var(--c-ink);
  box-shadow: 0 4px 0 var(--c-ink);
  padding: 22px;
  display: grid;
  gap: 14px;
}

/* ---------- SERVICE card (Paso 01) ---------- */
.service__head, .wallet__head, .check__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--c-line);
  padding-bottom: 12px;
}
.service__title {
  font-family: var(--ff-display);
  font-size: clamp(24px, 2.4vw, 36px);
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.05;
  margin: 0;
  color: var(--c-ink);
}
.service__meta { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.service__meta li {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid var(--c-line);
  color: var(--c-ink);
  font-size: 14px;
}
.service__meta li:last-child { border-bottom: 1px solid var(--c-line); }
.service__price {
  font-family: var(--ff-display);
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--c-ink);
}
.service__foot, .wallet__foot, .check__foot {
  display: flex; justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--c-ink);
  color: var(--c-ink);
}

/* ---------- WALLET card (Pasos 02 y 03) ---------- */
.wallet__live { display: inline-flex; align-items: center; gap: 6px; }
.wallet__pulse {
  width: 6px; height: 6px;
  background: var(--c-ink);
  border-radius: 50%;
  display: inline-block;
  animation: walletPulse 1.6s ease-in-out infinite;
}
@keyframes walletPulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.wallet__big {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--ff-display);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--c-ink);
  margin-top: 4px;
}
.wallet__big-num { font-size: clamp(64px, 7vw, 120px); }
.wallet__big-unit { font-size: clamp(20px, 2vw, 28px); color: var(--c-mute); }
.wallet__sub { color: var(--c-mute); }
.wallet__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.wallet__list li {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--c-line);
  color: var(--c-ink);
  font-size: 14px;
}
.wallet__list li:last-child { border-bottom: 1px solid var(--c-line); }
.wallet__when { color: var(--c-mute); }
.wallet__delta {
  font-family: var(--ff-mono);
  font-size: 14px;
  font-weight: 500;
}
.wallet__delta--in  { color: var(--c-ink); }
.wallet__delta--out { color: var(--c-mute); }

/* ---------- PERSONA card (José stage 1) ---------- */
.persona { max-width: 440px; padding: 24px; gap: 20px; }
.persona__avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, var(--c-bg) 0 22px, transparent 22px),
    repeating-linear-gradient(45deg, var(--c-ink) 0 2px, transparent 2px 6px),
    var(--c-ink);
  border: 1px solid var(--c-ink);
}
.persona__id { display: grid; gap: 4px; }
.persona__name {
  font-family: var(--ff-display);
  font-size: clamp(28px, 2.8vw, 40px);
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--c-ink);
  line-height: 1;
}
.persona__role { color: var(--c-mute); }
.persona__tags { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; border-top: 1px solid var(--c-line); }
.persona__tags span {
  border: 1px solid var(--c-ink);
  padding: 6px 12px;
  font-size: 12px;
  color: var(--c-ink);
  font-family: var(--ff-mono);
  letter-spacing: -0.01em;
}

/* ---------- LEDGER (José journal stages 2-4) ---------- */
.stage--journal {
  text-align: left;
  justify-items: start;
  max-width: 720px;
  margin: 0 auto;
  gap: clamp(18px, 2.4vh, 28px);
}
.stage--journal .stage__big {
  font-family: var(--ff-display);
  font-size: clamp(48px, 7vw, 120px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-weight: 500;
  color: var(--c-ink);
  margin: 0;
}
.stage--journal .stage__small {
  color: var(--c-ink-soft);
  font-size: clamp(16px, 1.1vw, 19px);
  max-width: 56ch;
  text-wrap: pretty;
}
.ledger {
  width: 100%;
  max-width: 520px;
  border: 1px solid var(--c-ink);
  background: var(--c-bg);
  box-shadow: 0 4px 0 var(--c-ink);
  display: grid;
}
.ledger__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-line);
  color: var(--c-ink);
  font-family: var(--ff-mono);
  font-size: 14px;
}
.ledger__row:last-child { border-bottom: 0; }
.ledger__row--in  span:last-child { color: var(--c-ink); }
.ledger__row--out span:last-child { color: var(--c-ink); opacity: .9; }
.ledger__row--total {
  background: var(--c-ink);
  color: var(--c-bg);
  font-family: var(--ff-display);
  font-size: clamp(20px, 1.8vw, 26px);
  letter-spacing: -0.012em;
  padding: 16px 18px;
}
.ledger__row--total .eyebrow { color: color-mix(in oklab, var(--c-bg), transparent 40%); }
.ledger__row--neg { background: var(--c-ink-soft); }
.ledger__note {
  padding: 12px 18px;
  border-top: 1px solid var(--c-line);
  color: var(--c-mute);
  font-size: 11px;
}

/* ---------- STAGE--SPLIT-NARROW (José intro) ---------- */
.stage--split-narrow {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  max-width: 1100px;
  margin: 0 auto;
  gap: clamp(32px, 5vw, 80px);
}

/* =====================================================================
   SCENE 06 · CATEGORÍAS · grid grande
   ===================================================================== */

.scene--categories {
  padding: clamp(120px, 18vh, 200px) var(--pad-side) clamp(80px, 12vh, 140px);
  background: var(--c-bg);
  min-height: 100vh;
  display: grid;
  gap: clamp(40px, 6vh, 80px);
}
.categories__head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: end;
  border-bottom: 1px solid var(--c-line);
  padding-bottom: clamp(24px, 4vh, 40px);
}
.categories__title {
  font-family: var(--ff-display);
  font-size: clamp(40px, 5.6vw, 88px);
  line-height: 1.0;
  letter-spacing: var(--tracking-display);
  font-weight: 500;
  margin: 0;
  color: var(--c-ink);
}
.categories__lede {
  color: var(--c-ink-soft);
  font-size: clamp(15px, 1.1vw, 18px);
  max-width: 48ch;
  text-wrap: pretty;
}
@media (max-width: 880px) {
  .categories__head { grid-template-columns: 1fr; }
}

.categories {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  border-top: 1px solid var(--c-line);
  border-left: 1px solid var(--c-line);
}
.cat {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  padding: clamp(20px, 2.2vh, 30px);
  border-right: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
  min-height: 180px;
  background: var(--c-bg);
  transition: background var(--dur-base) var(--ease-cam), color var(--dur-base) var(--ease-cam);
  cursor: default;
}
.cat:hover { background: var(--c-ink); color: var(--c-bg); }
.cat:hover .cat__num,
.cat:hover .cat__hint { color: color-mix(in oklab, var(--c-bg), transparent 40%); }

.cat__num { align-self: start; }
.cat__name {
  font-family: var(--ff-display);
  font-size: clamp(20px, 1.6vw, 26px);
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.1;
  color: inherit;
}
.cat__hint {
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--c-mute);
  font-family: var(--ff-mono);
}

/* =====================================================================
   VS · comparison bars (Reclutamiento stage 2)
   ===================================================================== */

.vs { max-width: 520px; padding: 22px; gap: 14px; }
.vs__row {
  display: grid;
  grid-template-columns: 110px 110px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--c-line);
  color: var(--c-ink);
  font-size: 14px;
}
.vs__row:first-of-type { border-top: 0; }
.vs__brand {
  font-family: var(--ff-display);
  font-size: clamp(16px, 1.3vw, 20px);
  letter-spacing: -0.012em;
}
.vs__price {
  font-family: var(--ff-mono);
  font-size: 13px;
  color: var(--c-mute);
}
.vs__bar {
  display: block;
  height: 6px;
  background: var(--c-line);
  position: relative;
  overflow: hidden;
}
.vs__bar i {
  display: block;
  position: absolute; inset: 0;
  width: var(--w);
  background: var(--c-ink);
}
.vs__row--us { border-top: 1px solid var(--c-ink); padding-top: 16px; margin-top: 4px; }
.vs__row--us .vs__brand { font-size: clamp(20px, 1.6vw, 26px); }
.vs__row--us .vs__price { color: var(--c-ink); }
.vs__row--us .vs__bar i { background: var(--c-ink); }
.vs__foot {
  color: var(--c-mute);
  border-top: 1px solid var(--c-line);
  padding-top: 12px;
  margin-top: 8px;
}

/* =====================================================================
   CHECK · Check Reconnectia card (Reclutamiento stage 3)
   ===================================================================== */

.check { max-width: 460px; gap: 16px; }
.check__verified {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--c-ink);
}
.check__dot {
  width: 8px; height: 8px;
  background: var(--c-ink);
  border-radius: 50%;
  display: inline-block;
}
.check__id { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: center; }
.check__avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, var(--c-bg) 0 14px, transparent 14px),
    repeating-linear-gradient(135deg, var(--c-ink) 0 2px, transparent 2px 5px),
    var(--c-ink);
  border: 1px solid var(--c-ink);
}
.check__name {
  font-family: var(--ff-display);
  font-size: clamp(20px, 1.6vw, 26px);
  letter-spacing: -0.012em;
  font-weight: 500;
  color: var(--c-ink);
  line-height: 1.1;
}
.check__role { color: var(--c-mute); margin-top: 4px; }
.check__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.check__list li {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid var(--c-line);
  color: var(--c-ink);
  font-size: 14px;
}
.check__list li:last-child { border-bottom: 1px solid var(--c-line); }

/* =====================================================================
   HUD · CTAs y botones extra
   ===================================================================== */

.hud--menu { display: flex; flex-direction: row-reverse; gap: 10px; align-items: center; }
.hud__menu-btn--cta { background: var(--c-ink); color: var(--c-bg); border-color: var(--c-ink); }
.hud.is-ink .hud__menu-btn--cta { background: var(--c-bg); color: var(--c-ink); border-color: var(--c-bg); }
.hud__menu-btn--cta:hover { opacity: .85; }

@media (max-width: 720px) {
  .hud__menu-btn--cta { display: none; }
}

/* =====================================================================
   INK CTAs · row
   ===================================================================== */

.ink__ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}



/* =====================================================================
   PARTNER STRIP — partner badge under a section
   ===================================================================== */

.partner-strip {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: clamp(20px, 3vh, 32px);
  padding-top: clamp(16px, 2vh, 24px);
  border-top: 1px solid var(--c-line);
}
.partner-strip .eyebrow { color: var(--c-mute); }
.partner-strip .partner-logo { width: clamp(120px, 13vw, 180px); }
.partner-strip .partner-name {
  font-family: var(--ff-display);
  font-size: clamp(18px, 1.6vw, 24px);
  letter-spacing: -0.012em;
  font-weight: 500;
  color: var(--c-ink);
}

/* Footer brand logo on dark background — use white version */
.footer__brand--light .l-base {
  /* The PNG is white-on-transparent already; keep as-is */
}
.footer__brand--light .l-color {
  position: absolute;
  inset: 0;
  opacity: 0;
}

/* =====================================================================
   INK PARTNER (cierre + footer)
   ===================================================================== */

.ink__partner {
  margin-top: clamp(40px, 6vh, 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.ink__partner .eyebrow {
  color: color-mix(in oklab, var(--c-bg), transparent 55%);
}
.ink__partner .partner-logo {
  width: clamp(130px, 14vw, 200px);
}

.footer__powered {
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer__powered .partner-logo { width: clamp(110px, 11vw, 160px); }
.footer__brandlink { display: inline-block; }

/* =====================================================================
   CHAPTER COM · visually distinct from main chapters
   ===================================================================== */

.scene--chapter-com {
  background: var(--c-bg-alt);
}

/* =====================================================================
   TIMEBANK — gráfico del banco del tiempo (escena Banco)
   ===================================================================== */

.timebank {
  width: 100%;
  max-width: 460px;
  display: grid;
  gap: clamp(20px, 3vh, 32px);
}
.timebank__dial { position: relative; }
.tb-face  { fill: none; stroke: var(--c-ink); stroke-width: 1.5; }
.tb-ticks line { stroke: var(--c-ink); stroke-width: 1; opacity: .4; }
.tb-pivot { fill: var(--c-ink); }
.tb-hand {
  stroke: var(--c-ink);
  stroke-width: 2;
  stroke-linecap: round;
  transform-origin: 180px 180px;
  transform-box: view-box;
  transition: transform 1.6s var(--ease-cam) 0.2s;
}
.tb-hand--h { transform: rotate(-40deg); }
.tb-hand--m { transform: rotate(-120deg); }
.timebank.is-live .tb-hand--h,
.timebank.is-live .tb-hand--m { transform: rotate(0deg); }

.tb-arc {
  fill: none;
  stroke: var(--c-ink);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 480;
  stroke-dashoffset: 480;
  transition: stroke-dashoffset 1.4s var(--ease-cam) 0.3s;
}
.timebank.is-live .tb-arc { stroke-dashoffset: 0; }
.tb-arc-head {
  fill: none;
  stroke: var(--c-ink);
  stroke-width: 1.5;
  opacity: 0;
  transition: opacity 0.4s var(--ease-text) 1.5s;
}
.timebank.is-live .tb-arc-head { opacity: 1; }

.timebank__tag { position: absolute; opacity: 0; transition: opacity 0.6s var(--ease-text) 1.2s; }
.timebank__tag--give { left: 0; bottom: 10%; }
.timebank__tag--take { right: 0; top: 10%; }
.timebank__motto { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); color: var(--c-mute); }
.timebank.is-live .timebank__tag { opacity: 1; }

.timebank__ledger {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--c-ink);
  background: var(--c-bg);
  box-shadow: 0 4px 0 var(--c-ink);
}
.timebank__ledger li {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-line);
  font-size: 14px;
  color: var(--c-ink);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s var(--ease-text), transform 0.6s var(--ease-text);
}
.timebank.is-live .timebank__ledger li { opacity: 1; transform: none; }
.timebank.is-live .timebank__ledger li:nth-child(1) { transition-delay: 0.9s; }
.timebank.is-live .timebank__ledger li:nth-child(2) { transition-delay: 1.05s; }
.timebank.is-live .timebank__ledger li:nth-child(3) { transition-delay: 1.2s; }
.tb-delta { font-family: var(--ff-mono); font-weight: 500; }
.tb-delta--out { color: var(--c-mute); }
.timebank__ledger li.timebank__total { background: var(--c-ink); color: var(--c-bg); border-bottom: 0; }
.timebank__total .eyebrow { color: color-mix(in oklab, var(--c-bg), transparent 40%); }

/* =====================================================================
   HUD adaptations for new brand logo
   ===================================================================== */

.hud__brand { display: flex; align-items: center; }
.hud__brand .brand-logo { display: block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero__scroll .line-v::after { animation: none; }
}

/* =====================================================================
   RESPONSIVE — Tablet (PC pequeño / orientación vertical)
   ===================================================================== */

@media (max-width: 1180px) {
  :root {
    --pad-side: clamp(20px, 5vw, 64px);
  }
  .stage--split { gap: clamp(28px, 4vw, 56px); }
  .footer__grid { grid-template-columns: repeat(3, 1fr); }
}

/* =====================================================================
   RESPONSIVE — Móvil (hasta 720px)
   ===================================================================== */

@media (max-width: 720px) {
  :root {
    --pad-side:  18px;
    --pad-sect:  clamp(60px, 12vh, 120px);
    --hud-pad:   14px;
    --fs-eyebrow: 10px;
  }

  /* No cursor custom en móvil — usar cursor del sistema */
  body { cursor: auto; }
  .cursor { display: none; }

  /* Scene base padding más ajustado */
  .scene {
    padding: clamp(110px, 18vh, 180px) var(--pad-side) clamp(60px, 10vh, 100px);
  }

  /* ===== HUD ===== */
  .hud--brand   { top: 12px; left: var(--pad-side); }
  .hud--menu    { bottom: 14px; right: var(--pad-side); }
  .hud__menu-btn { padding: 7px 10px; }
  .hud__menu-icon { font-size: 16px; }
  .brand-logo--hud { width: 110px; }

  /* ===== Hero ===== */
  .scene--hero {
    gap: 24px;
    padding-top: 96px;
    padding-bottom: 90px;
  }
  .hero__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-top: 12px;
  }
  .hero__title {
    font-size: clamp(56px, 16vw, 110px);
    line-height: 0.92;
  }
  .hero__foot {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .hero__lead { font-size: 15px; }
  .hero__scroll { justify-self: start; flex-direction: row; gap: 10px; align-items: center; }
  .hero__scroll .line-v { width: 36px; height: 1px; }
  .hero__scroll .line-v::after { display: none; }

  /* ===== Duo (Tesis + Red) — apilado, sin pin ===== */
  .scene--duo { grid-template-columns: 1fr; height: auto; min-height: auto; }
  .duo__half { min-height: 72vh; padding: 90px var(--pad-side) 70px; }
  .duo__title { font-size: clamp(34px, 9vw, 56px); }
  .phrase__text {
    font-size: clamp(30px, 8vw, 56px);
    gap: 0.12em 0.24em;
  }

  /* ===== Ink scenes ===== */
  .ink__text { font-size: clamp(40px, 11vw, 72px); max-width: 18ch; }
  .ink__foot { font-size: 14px; letter-spacing: 0.12em; max-width: 38ch; padding: 0 8px; }
  .ink__mega { font-size: clamp(56px, 18vw, 120px); }
  .ink__ctas { gap: 10px; margin-top: 18px; }
  .ink__ctas .btn-ghost { padding: 12px 18px; font-size: 11px; }

  /* ===== Chapter (pinned multistage) ===== */
  /* En móvil "des-pineamos" los capítulos: cada stage se vuelve scroll natural */
  .scene--chapter {
    height: auto;
    min-height: auto;
    padding: 0;
  }
  .stage {
    position: relative;
    inset: auto;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    padding: 40px var(--pad-side) 70px;
    min-height: auto;
  }
  .stage .reveal-mask .line { transform: translateY(0) !important; }
  .stage .stage__lede,
  .stage .stage__copy p,
  .stage .stage__small,
  .stage .stage__big {
    opacity: 1 !important;
    transform: none !important;
  }

  .stage__title { font-size: clamp(40px, 11vw, 72px); }
  .stage__h3    { font-size: clamp(22px, 6vw, 30px); }
  .stage__lede  { font-size: 15px; max-width: none; }
  .stage--split { grid-template-columns: 1fr; gap: 28px; }
  .stage--split .stage__copy { max-width: none; }

  /* Cards visuales en móvil: centradas, anchura controlada */
  .inmail, .portal, .service, .wallet, .persona, .check, .vs {
    max-width: 100%;
    padding: 18px;
  }
  .tinder { max-width: 84vw; }

  /* Bignums apilados */
  .stage--numbers { gap: 24px; }
  .bignums { grid-template-columns: 1fr; gap: 18px; padding-top: 18px; }
  .bignum { font-size: clamp(42px, 12vw, 72px); }

  /* Process table: simplificación */
  .process__head, .process__row, .process__foot {
    grid-template-columns: 1fr 44px 44px;
    gap: 8px;
    padding: 10px 12px;
    font-size: 12px;
  }
  .process__cov { display: none; }
  .process__name b { font-size: 13px; }
  .process__name span { font-size: 11px; }

  /* ===== Horizontal ecosystem — se convierte en vertical en móvil ===== */
  .scene--horizontal {
    height: auto;
    min-height: auto;
    overflow: visible;
  }
  .hroad { height: auto; }
  .hroad__track {
    flex-direction: column;
    width: 100%;
    transform: none !important;
    height: auto;
    gap: 32px;
    padding: 40px var(--pad-side) 60px;
    align-items: stretch;
  }
  .hroad__block { width: 100% !important; height: auto; padding: 0; }
  .hroad__title { font-size: clamp(42px, 12vw, 76px); }
  .hroad__path { width: 100%; height: auto; }
  .hroad__svg  { min-height: 240px; height: auto; }
  .hr-stop text { font-size: 18px; }
  .hr-stop .hr-meta { font-size: 12px; }
  .hr-stop .hr-step { font-size: 26px; }
  .hr-stop { opacity: 1; transform: none; }
  .hr-stop text { opacity: 1; }
  .hr-stop .hr-chip { opacity: 1; }
  .hr-runner { display: none; }
  .hroad__hint { display: none; }

  /* ===== Footer ===== */
  .footer { padding: 60px var(--pad-side) 32px; gap: 40px; }
  .footer__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding-bottom: 24px;
  }
  .brand-logo--footer { width: min(240px, 70vw); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .footer__bot { gap: 8px; flex-direction: column; align-items: flex-start; }
  .footer__powered { gap: 10px; }

  /* Partner strip en móvil */
  .partner-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* Menu (índice) */
  .menu { padding: 18px; }
  .menu__list { padding: 24px 0 0; }
  .menu__list a {
    grid-template-columns: 36px 1fr;
    gap: 14px;
    padding: 16px 0;
    font-size: clamp(22px, 7vw, 36px);
  }
  .menu__list a .m-tag { display: none; }

  /* Tweaks panel: lo escondemos en móvil (es tooling, no producto) */
  .tweaks, .tweaks-handle { display: none !important; }
}

/* =====================================================================
   RESPONSIVE — Móvil pequeño (hasta 420px)
   ===================================================================== */

@media (max-width: 420px) {
  .hero__title { font-size: clamp(48px, 15vw, 84px); }
  .stage__title { font-size: clamp(34px, 10vw, 60px); }
  .duo__title { font-size: clamp(30px, 10vw, 48px); }
  .ink__text { font-size: clamp(34px, 12vw, 60px); }
  .ink__mega { font-size: clamp(48px, 20vw, 100px); }
  .footer__grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   RESPONSIVE — Pantallas grandes (PC ancho) · pulido tipográfico
   ===================================================================== */

@media (min-width: 1600px) {
  .stage__inner { max-width: 1500px; }
  .hero__title { font-size: clamp(140px, 12vw, 240px); }
}
