/* ox2.css — sistema visual del prototipo de inicio v2.
   Blanco roto y tinta; el azul→rojo de la marca solo codifica datos (y la X del logo). */

:root {
  --bg: #fbfbfd; --bg2: #f5f5f7; --panel: #ffffff;
  --ink: #1d1d1f; --ink2: #6e6e73; --ink3: #a1a1a6; --line: #d2d2d7; --hair: #e8e8ed;
  --blue: #1f5fd8; --ice: #5aa8e8; --fire: #ff9a3d; --red: #ff5f3d; --red-ink: #d9481f;
  --pad: clamp(20px, 4.4vw, 72px);
  --sans: "Mona Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --logo: "Anton", "Arial Narrow", sans-serif;
  --e-out: cubic-bezier(.16, 1, .3, 1);
  --e-io: cubic-bezier(.65, 0, .35, 1);
}
[data-theme="dark"] {
  --bg: #08090d; --bg2: #0e1016; --panel: #12141b;
  --ink: #f5f5f7; --ink2: #a1a1a6; --ink3: #6e6e73; --line: #2a2c35; --hair: #1b1d25;
  --red-ink: #ff7d3d;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.47; letter-spacing: -0.011em; -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
section[data-theme], footer[data-theme] { background: var(--bg); color: var(--ink); }

/* ---------- tipografía ---------- */
.h1 { font-weight: 800; font-stretch: 112%; letter-spacing: -0.048em; line-height: .94; font-size: clamp(46px, 6.4vw, 132px); }
.h2 { font-weight: 760; font-stretch: 110%; letter-spacing: -0.042em; line-height: .98; font-size: clamp(38px, 5.6vw, 96px); text-wrap: balance; }
/* la segunda frase del título va en color (hielo/fuego), no en un gris que no se ve */
.h2 em { font-style: normal; color: var(--blue); }
#opt .h2 em, #sec .h2 em { color: var(--red); }
.lede { margin-top: clamp(18px, 2.2vw, 30px); font-size: clamp(18px, 1.5vw, 23px); line-height: 1.36; color: var(--ink2); max-width: 33em; letter-spacing: -0.014em; text-wrap: pretty; }
/* eyebrow: etiqueta en color, sin el cuadradito (tic de IA) */
.eyebrow { font-size: 14px; font-weight: 650; letter-spacing: 0.01em; margin-bottom: clamp(14px, 1.6vw, 22px); color: var(--blue); }
.eyebrow[data-tone="red"] { color: var(--red); }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 24px; border-radius: 25px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 16px; transition: transform .35s var(--e-out), background .25s; }
.btn:hover { transform: translateY(-2px); background: var(--blue); color: #fff; }
.btn svg { width: 15px; height: 15px; transition: transform .35s var(--e-out); }
.btn:hover svg { transform: translateX(3px); }
.lnk { font-weight: 600; font-size: 16px; display: inline-flex; align-items: center; gap: 8px; border-bottom: 1.5px solid var(--line); padding-bottom: 3px; transition: border-color .25s; }
.lnk:hover { border-color: var(--ink); }

/* ---------- logo ---------- */
.logo { font-family: var(--logo); font-size: 20px; letter-spacing: .055em; line-height: 1; display: inline-flex; }
.logo .x { background: linear-gradient(90deg, #1f5fd8 0%, #3d84e0 24%, #5aa8e8 42%, #ff9a3d 60%, #ff7d3d 80%, #ff5f3d 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- cápsula de navegación ---------- */
.isla { position: fixed; z-index: 80; top: 14px; left: 50%; translate: -50% 0; height: 50px; padding: 0 7px 0 20px; display: flex; align-items: center; gap: 6px; border-radius: 25px;
  background: rgba(13, 14, 19, .9); color: #f5f5f7; -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 12px 34px -12px rgba(0, 0, 0, .35); white-space: nowrap; max-width: calc(100vw - 20px);
  transition: background .5s var(--e-io), color .5s var(--e-io), box-shadow .5s; }
.isla[data-over="dark"] { background: rgba(250, 250, 252, .92); color: #1d1d1f; box-shadow: 0 12px 34px -12px rgba(0, 0, 0, .6); }
.isla-links { display: flex; overflow: hidden; max-width: 420px; opacity: 1; margin-left: 14px; transition: max-width .7s var(--e-out), opacity .35s, margin .7s var(--e-out); }
.isla-links a { font-size: 13.5px; font-weight: 520; padding: 8px 11px; opacity: .72; transition: opacity .2s; }
.isla-links a:hover { opacity: 1; }
.isla-now { display: flex; align-items: center; gap: 9px; overflow: hidden; max-width: 0; opacity: 0; font-size: 13.5px; transition: max-width .7s var(--e-out), opacity .35s, margin .7s var(--e-out); }
.isla-now i { width: 2px; height: 13px; border-radius: 1px; background: var(--ice); flex: none; transition: background .4s; }
.isla-now[data-tone="red"] i { background: var(--red); }
.isla-now b { font-weight: 650; }
.isla-now span { opacity: .62; }
.isla-now em { font-style: normal; font-family: var(--mono); font-size: 12px; opacity: .55; font-variant-numeric: tabular-nums; }
.isla.has-now:not(:hover):not(:focus-within) .isla-links { max-width: 0; opacity: 0; margin-left: 0; }
.isla.has-now:not(:hover):not(:focus-within) .isla-now { max-width: 520px; opacity: 1; margin-left: 16px; }
.isla-cta { margin-left: 12px; height: 36px; padding: 0 16px; border-radius: 18px; display: inline-flex; align-items: center; font-size: 13.5px; font-weight: 650; background: #f5f5f7; color: #1d1d1f; transition: background .3s, color .3s; }
.isla-cta:hover { background: var(--red); color: #fff; }
.isla[data-over="dark"] .isla-cta { background: #1d1d1f; color: #f5f5f7; }
.isla[data-over="dark"] .isla-cta:hover { background: var(--red); }

/* ---------- hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 660px; overflow: hidden; }
.hero-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-scrim { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, var(--bg) 0, color-mix(in srgb, var(--bg) 82%, transparent) 26%, transparent 46%),
              linear-gradient(90deg, color-mix(in srgb, var(--bg) 90%, transparent) 0, color-mix(in srgb, var(--bg) 60%, transparent) 30%, transparent 50%); }
.hero-in { position: absolute; inset: 0; padding: 92px var(--pad) clamp(22px, 3.4vh, 40px); display: flex; flex-direction: column; pointer-events: none; }
.hero-in > * { pointer-events: auto; }
.hero-top { max-width: 1240px; }
.hero .h1 { white-space: nowrap; pointer-events: none; }
.hero .h1 .r { display: inline-block; will-change: transform; }
.hero .h1 .ac { color: var(--blue); }
.hero-note { margin-top: clamp(26px, 5vh, 64px); display: inline-flex; align-items: center; gap: 12px; font-size: clamp(15px, 1.15vw, 17px); color: var(--ink2); font-weight: 500; }
.hero-note .mk { width: 2px; height: 16px; border-radius: 1px; background: var(--blue); transition: background .5s, height .5s; }
.hero-note.done .mk { background: var(--red); }
.hero-note b { color: var(--ink); font-weight: 650; }
.hero-row { margin-top: clamp(14px, 2.2vh, 26px); display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.hero-sub { font-size: clamp(17px, 1.42vw, 22px); line-height: 1.34; color: var(--ink2); max-width: 30em; letter-spacing: -0.014em; }
.hero-sub b { color: var(--ink); font-weight: 600; }
.hero-ctas { display: flex; align-items: center; gap: 26px; }

.ed { margin-top: auto; width: min(41vw, 590px); background: color-mix(in srgb, var(--panel) 94%, transparent); border: 1px solid var(--hair); border-radius: 18px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 24px 60px -24px rgba(20, 30, 60, .22); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.ed-tabs { display: flex; border-bottom: 1px solid var(--hair); }
.ed-tabs button { position: relative; flex: 1; padding: 13px 8px 12px; font-family: var(--mono); font-size: 12.5px; color: var(--ink3); text-align: center; transition: color .3s; overflow: hidden; }
.ed-tabs button + button { border-left: 1px solid var(--hair); }
.ed-tabs button:hover { color: var(--ink2); }
.ed-tabs button[aria-selected="true"] { color: var(--ink); background: var(--panel); }
.ed-tabs button::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--ink); transform-origin: left; transform: scaleX(var(--k, 0)); }
.ed-code { font-family: var(--mono); font-size: clamp(11.5px, .92vw, 13.5px); line-height: 1.82; padding: 12px 0 10px; counter-reset: ln; height: calc(1.82em * 13 + 22px); overflow: hidden; }
.ed-code .l { display: flex; align-items: baseline; padding: 0 16px 0 0; white-space: pre; position: relative; opacity: 0; transform: translateX(-6px); transition: opacity .35s, transform .5s var(--e-out), background .18s; }
.ed-code .l.in { opacity: 1; transform: none; }
.ed-code .l::before { counter-increment: ln; content: counter(ln); width: 40px; text-align: right; padding-right: 14px; color: var(--ink3); opacity: .7; flex: none; }
.ed-code .l.pc { background: color-mix(in srgb, var(--blue) 9%, transparent); box-shadow: 2px 0 0 var(--blue) inset; }
.ed-code .k { color: var(--blue); } .ed-code .s { color: var(--red-ink); } .ed-code .c { color: var(--ink3); } .ed-code .f { color: var(--ink); font-weight: 500; }
.ed-code .v { margin-left: 14px; font-size: .88em; color: var(--blue); background: color-mix(in srgb, var(--blue) 8%, transparent); border-radius: 5px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.ed-code .v.hot { color: var(--red-ink); background: color-mix(in srgb, var(--red) 10%, transparent); }
.ed-foot { border-top: 1px solid var(--hair); padding: 9px 16px 10px; font-size: 12.5px; color: var(--ink2); display: flex; align-items: center; gap: 9px; }
.ed-foot i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); flex: none; animation: latido 1.6s var(--e-io) infinite; }
@keyframes latido { 50% { opacity: .25; } }

/* ---------- manifiesto ---------- */
.dicho { padding: clamp(110px, 20vh, 240px) var(--pad) clamp(90px, 16vh, 200px); }
.dicho p { font-weight: 720; font-stretch: 106%; font-size: clamp(30px, 4.5vw, 78px); line-height: 1.06; letter-spacing: -0.04em; max-width: 21em; text-wrap: pretty; }
.dicho .w { color: var(--line); transition: color .12s linear; }
.dicho .w.on { color: var(--ink); }
.dicho .w.on.az { color: var(--blue); } .dicho .w.on.ro { color: var(--red-ink); }

/* ---------- escenario con capítulos ---------- */
.stage { position: relative; }
.stage-head { padding: clamp(100px, 17vh, 210px) var(--pad) clamp(44px, 8vh, 110px); max-width: 1560px; }
.stage-track { position: relative; }
.stage-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--bg); }
.stage-canvas, .stage-layer, .stage-scrim, .stage-ui { position: absolute; inset: 0; }
.stage-canvas { width: 100%; height: 100%; display: block; }
.stage-scrim { pointer-events: none; background: linear-gradient(90deg, var(--bg) 0, color-mix(in srgb, var(--bg) 90%, transparent) 22%, color-mix(in srgb, var(--bg) 40%, transparent) 37%, transparent 50%); }
.stage-ui { pointer-events: none; padding: 92px var(--pad) clamp(22px, 3.6vh, 40px); display: flex; flex-direction: column; }
.stage-copy { position: relative; flex: 1; width: min(33vw, 500px); }
.ch-copy { position: absolute; left: 0; right: 0; top: 46%; transform: translateY(calc(-50% + 22px)); opacity: 0; visibility: hidden; transition: opacity .45s, transform .8s var(--e-out), visibility 0s .45s; }
.ch-copy.is-on { opacity: 1; visibility: visible; transform: translateY(-50%); transition: opacity .6s .12s, transform .9s var(--e-out) .08s, visibility 0s; }
.ch-kicker { font-size: 15px; font-weight: 650; display: flex; align-items: baseline; gap: 12px; }
.ch-kicker span { font-family: var(--mono); font-weight: 500; font-size: 13px; color: var(--ink3); }
.ch-title { margin-top: 14px; font-weight: 740; font-stretch: 108%; font-size: clamp(27px, 2.9vw, 50px); line-height: 1.02; letter-spacing: -0.038em; text-wrap: balance; }
.ch-text { margin-top: 16px; font-size: clamp(16px, 1.22vw, 19px); line-height: 1.42; color: var(--ink2); text-wrap: pretty; }
.ch-text b { color: var(--ink); font-weight: 600; }
.readouts { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 14px 30px; }
.readouts dt { font-size: 12.5px; color: var(--ink3); }
.readouts dd { margin-top: 2px; font-family: var(--mono); font-weight: 500; font-size: clamp(17px, 1.5vw, 23px); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rail { list-style: none; display: flex; gap: 4px; pointer-events: auto; flex-wrap: wrap; }
.rail button { position: relative; display: flex; align-items: baseline; gap: 9px; padding: 11px 16px 13px 0; margin-right: 14px; font-size: 14px; font-weight: 560; color: var(--ink3); transition: color .35s; }
.rail button span { font-family: var(--mono); font-size: 12px; font-weight: 500; }
.rail button i { position: absolute; left: 0; right: 14px; bottom: 0; height: 2px; background: var(--hair); }
.rail button i::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(0); }
.rail li.is-done button i::after { transform: scaleX(1); }
.rail li.is-on button { color: var(--ink); }
.rail li.is-on button i::after { transform: scaleX(var(--t, 0)); }
.rail button:hover { color: var(--ink); }

/* ---------- pie ---------- */
.pie { padding: clamp(48px, 8vh, 96px) var(--pad) 28px; font-size: 13.5px; color: var(--ink2); border-top: 1px solid var(--hair); }
.pie-cols { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 28px; padding-bottom: clamp(36px, 6vh, 72px); }
.pie-cols .logo { font-size: 30px; color: var(--ink); }
.pie-cols p { margin-top: 12px; max-width: 22em; }
.pie h5 { font-size: 13px; font-weight: 650; color: var(--ink); margin-bottom: 10px; }
.pie-cols a { display: block; line-height: 2.05; transition: color .2s; }
.pie-cols a:hover { color: var(--ink); }
.pie-base { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--hair); font-size: 12.5px; }

/* ---------- modo solo (bancos de prueba y capturas) ---------- */
body.is-solo > :not(.is-solo-target) { display: none !important; }
body.is-solo { overflow: hidden; }

/* ---------- pantallas estrechas ---------- */
@media (max-width: 899px) {
  .isla { padding-left: 16px; }
  .isla-links { display: none; }
  .isla.has-now .isla-now { max-width: 46vw; opacity: 1; margin-left: 12px; }
  .isla-now span, .isla-now em { display: none; }
  .hero { height: auto; min-height: 100svh; }
  .hero .h1 { white-space: normal; }
  .hero-in { position: relative; min-height: 100svh; }
  .hero-row { flex-direction: column; align-items: flex-start; gap: 18px; }
  .hero-scrim { background: linear-gradient(180deg, var(--bg) 0, color-mix(in srgb, var(--bg) 84%, transparent) 34%, transparent 52%); }
  .ed { width: 100%; margin-top: 44vh; }
  .ed-code { height: calc(1.82em * 8 + 22px); }
  .ed-tabs button { font-size: 11px; padding-inline: 2px; }
  .stage-scrim { background: linear-gradient(180deg, var(--bg) 0, color-mix(in srgb, var(--bg) 92%, transparent) 36%, transparent 50%); }
  .stage-ui { padding-top: 78px; }
  .stage-copy { width: 100%; flex: none; height: 36vh; }
  .ch-copy { top: 0; transform: translateY(14px); }
  .ch-copy.is-on { transform: none; }
  .readouts { margin-top: 14px; gap: 8px 22px; }
  .rail { margin-top: auto; }
  .rail button { font-size: 0; padding-right: 0; margin-right: 8px; min-width: 40px; }
  .rail button span { font-size: 12px; }
  .rail button i { right: 0; }
  .pie-cols { grid-template-columns: 1fr 1fr; }
  .pie-cols > :first-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
