/* Fuentes y tokens del sistema «Papelería» (ver DESIGN_SYSTEM.md). */
@font-face { font-family: "Recursive Sans"; font-style: oblique 0deg 15deg; font-weight: 300 1000; font-display: swap; src: url("fonts/recursive-sans.woff2") format("woff2-variations"); }
@font-face { font-family: "Recursive Code"; font-style: oblique 0deg 15deg; font-weight: 300 1000; font-display: swap; src: url("fonts/recursive-code.woff2") format("woff2-variations"); }
@font-face { font-family: "Recursive Typed"; font-style: oblique 0deg 15deg; font-weight: 300 1000; font-display: swap; src: url("fonts/recursive-typed.woff2") format("woff2-variations"); }
:root {
  --signal-50: #fff5ef; --signal-100: #ffe6d9; --signal-200: #ffccb2; --signal-300: #ffa880; --signal-400: #ff8050;
  --signal-500: #ff5a1f; --signal-600: #e5480f; --signal-700: #b83d0e; --signal-800: #8c2f0c; --signal-900: #5e200a;
  --signal: var(--signal-500);
  --paper: #f7f7f5; --sheet: #ffffff; --ink: #1d2230; --ink-soft: #615955;
  --rule: #f0dfd5; --rule-strong: #a8806c;
  --carbon: #2a3ca6; --carbon-deep: #1f2d80; --carbon-wash: #e6e9f6;
  --canary: #f6ecb0; --canary-deep: #7a5f0c; --stamp: #b23427; --stamp-wash: #f8e3df;
  --font-sans: "Recursive Sans", ui-sans-serif, system-ui, sans-serif;
  --font-code: "Recursive Code", ui-monospace, "SF Mono", Menlo, monospace;
  --font-typed: "Recursive Typed", ui-monospace, "SF Mono", Menlo, monospace;
  --r-sm: 2px; --r-md: 3px; --r-lg: 4px; --r-xl: 6px;
  --shadow-sheet: 0 1px 0 0 var(--rule), 0 14px 34px -18px rgb(29 34 48 / 0.45);
  --shadow-key: inset 0 -2px 0 0 rgb(0 0 0 / 0.22);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}
* { box-sizing: border-box; }
::selection { background: var(--signal-200); color: var(--ink); }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--font-sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
img, svg { display: block; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Accesibilidad ---------- */
/* Foco de teclado: anillo sólido con contraste sobre papel, naranja y tinta. */
:focus-visible { outline: 2px solid var(--signal-800); outline-offset: 3px; border-radius: var(--r-sm); }
.live :focus-visible, .stage-frame :focus-visible { outline-color: var(--signal-300); }
.cta-box :focus-visible { outline-color: var(--ink); }
/* Lo enfocado y los destinos de los anclajes no quedan bajo la barra fija. */
[id], :focus { scroll-margin-top: 84px; }
.visually-hidden { 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; z-index: 100; top: 10px; left: 10px; padding: 10px 14px; font: 600 14px/1 var(--font-code); color: var(--paper); background: var(--ink); border-radius: var(--r-md); text-decoration: none; transform: translateY(-160%); }
.skip:focus { transform: none; }
/* Con el botón de pausa, también se para lo decorativo. */
.paused .track, .paused .float-chip { animation-play-state: paused; }
.code { font-family: var(--font-code); }
.typed { font-family: var(--font-typed); color: var(--carbon); }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; font: 650 14.5px/1 var(--font-code); letter-spacing: -0.01em; color: var(--ink); text-decoration: none; background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--r-lg); cursor: pointer; transition: background .15s, border-color .15s, transform .15s; white-space: nowrap; }
.btn:hover { background: var(--signal-50); border-color: var(--ink-soft); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { background: var(--signal); border-color: var(--signal-700); box-shadow: var(--shadow-key); }
.btn.primary:hover { background: var(--signal-400); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn.lg { height: 52px; padding: 0 24px; font-size: 16px; }
.btn.ink { background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: inset 0 -2px 0 0 rgb(0 0 0 / .4); }
.btn.ink:hover { background: #2b3245; }

/* ---------- Chips por familia ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; font: 500 11.5px/1.35 var(--font-code); border: 1px solid; border-radius: 999px; white-space: nowrap; }
.fam-identity { border-color: rgb(42 60 166 / .3); background: var(--carbon-wash); color: var(--carbon-deep); }
.fam-secret { border-color: rgb(178 52 39 / .3); background: var(--stamp-wash); color: var(--stamp); }
.fam-place { border-color: rgb(122 95 12 / .3); background: rgb(246 236 176 / .6); color: var(--canary-deep); }
.fam-measure { border-color: var(--signal-300); background: var(--signal-50); color: var(--signal-800); }
.fam-choice { border-color: rgb(29 34 48 / .25); background: var(--sheet); color: var(--ink); }
.fam-other { border-color: var(--rule); background: var(--paper); color: var(--ink-soft); }

/* ---------- Navegación ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgb(247 247 245 / .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-bottom-color: var(--rule); }
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.wordmark { display: flex; align-items: baseline; gap: 6px; }
.wordmark b { font: 750 19px/1 var(--font-code); letter-spacing: -0.035em; }
.wordmark span { font: 15px/1 var(--font-typed); }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { font: 500 13.5px/1 var(--font-code); text-decoration: none; padding: 9px 12px; border-radius: var(--r-md); color: var(--ink-soft); transition: color .15s, background .15s; }
.nav-links a:hover { color: var(--ink); background: var(--signal-50); }
.nav .btn { height: 38px; font-size: 13.5px; }
.sm-only { display: none; }
.lang { font: 600 12.5px/1 var(--font-code); letter-spacing: 0.04em; text-decoration: none; padding: 9px 10px; border: 1px solid var(--rule); border-radius: var(--r-md); color: var(--ink-soft); transition: color .15s, border-color .15s; }
.lang:hover { color: var(--ink); border-color: var(--rule-strong); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 40px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: repeating-linear-gradient(to bottom, transparent 0 35px, rgb(240 223 213 / .7) 35px 36px); mask-image: linear-gradient(to bottom, #000 0%, #000 50%, transparent 92%); -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 50%, transparent 92%); }
.hero-copy { position: relative; text-align: center; max-width: 900px; margin: 0 auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; font: 500 12.5px/1 var(--font-code); background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: 999px; }
.eyebrow i { font-style: normal; font-weight: 650; padding: 4px 7px; border-radius: 999px; background: var(--signal); box-shadow: var(--shadow-key); }
h1 { margin: 22px 0 0; font: 800 clamp(42px, 7.4vw, 92px)/.98 var(--font-code); letter-spacing: -0.055em; }
h1 .line { display: block; }
.marker { position: relative; white-space: nowrap; padding: 0 .08em; background: linear-gradient(var(--signal), var(--signal)) no-repeat 0 88% / 0% 42%; transition: background-size 1s var(--ease) .5s; }
.loaded .marker { background-size: 100% 42%; }
.hero p.lead { max-width: 640px; margin: 24px auto 0; font-size: clamp(16px, 2vw, 19px); color: var(--ink-soft); }
.hero p.lead b { color: var(--ink); font-weight: 600; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }
.hero-note { margin-top: 14px; font: 12.5px var(--font-code); color: var(--ink-soft); }
.float-chip { position: absolute; z-index: 0; animation: float 6s ease-in-out infinite; box-shadow: 0 8px 18px -10px rgb(29 34 48 / .35); font-size: 13px; padding: 4px 11px; }
.float-chip:nth-of-type(2n) { animation-duration: 7.5s; animation-delay: -2s; }
.float-chip:nth-of-type(3n) { animation-duration: 8.5s; animation-delay: -4s; }
@keyframes float { 0%, 100% { translate: 0 0; rotate: var(--rot, -4deg); } 50% { translate: 0 -14px; rotate: calc(var(--rot, -4deg) * -1); } }
.hero-copy > *:not(.float-chip) { position: relative; z-index: 1; }

/* Entrada escalonada */
.rise { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.loaded .rise { opacity: 1; transform: none; }
.rise.d1 { transition-delay: .08s; } .rise.d2 { transition-delay: .16s; } .rise.d3 { transition-delay: .24s; } .rise.d4 { transition-delay: .32s; } .rise.d5 { transition-delay: .45s; }

/* ---------- Escenario de la demo (el «vídeo») ---------- */
.stage-shell { position: relative; margin: 56px auto 0; max-width: 1100px; }
.stage-shell::before { content: ""; position: absolute; inset: 24px -24px -24px 24px; background: var(--signal); border: 1.5px solid var(--ink); border-radius: 12px; z-index: -1; }
.stage-frame { background: var(--ink); border: 1.5px solid var(--ink); border-radius: 12px; padding: 10px; box-shadow: 0 40px 80px -40px rgb(29 34 48 / .6); }
.stage-wrap { position: relative; width: 100%; aspect-ratio: 1040 / 620; overflow: hidden; border-radius: 6px; }
.stage { position: absolute; top: 0; left: 0; width: 1040px; height: 620px; transform-origin: 0 0; transform: scale(var(--s, 1)); background: var(--paper); font-family: var(--font-sans); }
.win-bar { height: 42px; display: flex; align-items: center; gap: 14px; padding: 0 14px; background: var(--sheet); border-bottom: 1px solid var(--rule); }
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--rule); border: 1px solid #e6cfc2; }
.url { flex: 1; max-width: 520px; height: 28px; display: flex; align-items: center; gap: 8px; padding: 0 12px; font: 12.5px var(--font-code); color: var(--ink-soft); background: var(--paper); border: 1px solid var(--rule); border-radius: 999px; }
.url svg { width: 12px; height: 12px; }
.url b { color: var(--ink); font-weight: 500; }
.ext { margin-left: auto; position: relative; width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--r-lg); transition: background .2s; }
.ext svg { width: 22px; height: 22px; }
.ext.on { background: var(--signal-100); }
.site { position: absolute; top: 42px; left: 0; right: 0; bottom: 0; padding: 22px 32px; }
.site-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font: 700 15px var(--font-code); letter-spacing: -0.02em; }
.site-head i { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); }
.site-head span { margin-left: 18px; font: 500 12px var(--font-code); color: var(--ink-soft); }
.site-head span + span { margin-left: 4px; }
.sheet { position: relative; width: 528px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-xl); box-shadow: var(--shadow-sheet); padding: 18px 22px 20px; }
.sheet .sheet-title { margin: 0 0 3px; color: var(--ink); font: 750 19px/1.1 var(--font-code); letter-spacing: -0.03em; }
.sheet > p { margin: 0 0 14px; font-size: 12.5px; color: var(--ink-soft); }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 14px; }
.f { position: relative; display: grid; gap: 5px; }
.f.full { grid-column: 1 / -1; }
.f .lbl { font: 500 11px/1.2 var(--font-code); color: var(--ink-soft); }
.box { position: relative; height: 32px; display: flex; align-items: center; padding: 0 10px; background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--r-md); font: 13px var(--font-typed); color: var(--carbon); transition: border-color .2s, box-shadow .2s, background .2s; overflow: hidden; white-space: nowrap; }
.box .ph { color: var(--ink-soft); opacity: .5; }
.box .val:not(:empty) + .ph { display: none; }
.box.select::after { content: ""; position: absolute; right: 11px; top: 12px; width: 6px; height: 6px; border-right: 1.5px solid var(--ink-soft); border-bottom: 1.5px solid var(--ink-soft); transform: rotate(45deg); }
.box.typing { border-color: var(--signal-700); box-shadow: 0 0 0 3px rgb(184 61 14 / .22); }
.box.typing .val::after { content: ""; display: inline-block; width: 1.5px; height: 15px; margin-left: 1px; background: var(--carbon); vertical-align: -3px; animation: blink .7s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.f.hit .box { border-color: var(--signal); background: var(--signal-50); }
.f .tag { position: absolute; right: 6px; top: -3px; transform: scale(0); transform-origin: right bottom; transition: transform .35s var(--spring); }
.f.tagged .tag { transform: scale(1); }
.opts { display: flex; gap: 16px; align-items: center; height: 32px; font-size: 13.5px; }
.opts label, .chk { display: inline-flex; align-items: center; gap: 7px; }
.rad, .cbx { width: 15px; height: 15px; border: 1px solid var(--rule-strong); background: var(--sheet); border-radius: 50%; display: grid; place-items: center; transition: background .2s, border-color .2s; }
.cbx { border-radius: 2px; }
.rad.on { border-color: var(--signal-700); }
.rad.on::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); }
.cbx.on { background: var(--signal); border-color: var(--signal-700); }
.cbx.on::after { content: ""; width: 4px; height: 8px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.sheet .submit { margin-top: 14px; display: inline-flex; height: 32px; align-items: center; padding: 0 14px; font: 600 12.5px var(--font-code); background: var(--signal); border: 1px solid var(--signal-700); border-radius: var(--r-md); box-shadow: var(--shadow-key); }
.scanline { position: absolute; left: -1px; right: -1px; top: 0; height: 2px; background: var(--signal); opacity: 0; pointer-events: none; }
.scanline::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 46px; background: rgb(255 90 31 / .08); border-bottom: 0; }
.scanline.run { opacity: 1; }
.stamp { position: absolute; left: 260px; top: 250px; padding: 10px 18px; font: 800 26px/1 var(--font-code); letter-spacing: .02em; color: var(--stamp); border: 3.5px solid var(--stamp); border-radius: 6px; transform: rotate(-11deg) scale(2.4); opacity: 0; pointer-events: none; mix-blend-mode: multiply; text-align: center; }
.stamp small { display: block; margin-top: 5px; font: 600 11px var(--font-code); letter-spacing: .08em; }
.stamp.on { animation: stamp .45s var(--ease) forwards; }
@keyframes stamp { 0% { opacity: 0; transform: rotate(-11deg) scale(2.4); } 60% { opacity: .92; transform: rotate(-11deg) scale(.94); } 100% { opacity: .85; transform: rotate(-11deg) scale(1); } }
.stage.shake { animation: shake .3s; }
@keyframes shake { 30% { translate: 0 2px; } 60% { translate: 0 -1px; } }

/* Panel dentro del escenario: réplica fiel del panel real */
.ppanel { position: absolute; top: 58px; right: 18px; width: 446px; height: 544px; display: flex; flex-direction: column; overflow: hidden; background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--r-xl); box-shadow: 0 1px 0 0 var(--rule), 0 24px 50px -20px rgb(29 34 48 / .55); transform: translateX(calc(100% + 40px)); transition: transform .6s var(--ease); font-size: 12px; }
.ppanel.on { transform: none; }
.p-head { display: flex; align-items: center; gap: 9px; padding: 9px 12px; background: var(--signal); border-bottom: 1px solid rgb(29 34 48 / .8); }
.p-head svg { width: 26px; height: 26px; }
.p-head .grip { width: 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; opacity: .6; }
.p-head .grip i { width: 2.5px; height: 2.5px; border-radius: 50%; background: var(--ink); }
.p-head b { display: block; font: 750 15px/1 var(--font-code); letter-spacing: -0.035em; }
.p-head small { display: block; margin-top: 3px; font: 11px var(--font-code); }
.p-head .x { margin-left: auto; font: 16px var(--font-code); opacity: .7; }
.p-tools { display: flex; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--rule); }
.p-search { flex: 1; height: 28px; display: flex; align-items: center; gap: 6px; padding: 0 8px; font: 11.5px var(--font-code); color: var(--ink-soft); background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--r-md); }
.p-search svg { width: 12px; height: 12px; }
.seg { display: flex; border: 1px solid var(--rule-strong); border-radius: var(--r-md); overflow: hidden; background: var(--sheet); }
.seg span { position: relative; padding: 0 10px; height: 26px; display: grid; place-items: center; font: 600 11px var(--font-code); color: var(--ink-soft); transition: background .25s, color .25s; }
.seg span.on { background: var(--signal); color: var(--ink); box-shadow: inset 0 0 0 1px var(--signal-700); }
.p-th { display: grid; grid-template-columns: 1.25fr 1fr 1.25fr; gap: 8px; padding: 6px 12px; font: 500 10.5px var(--font-code); color: var(--ink-soft); background: var(--signal-100); border-bottom: 1px solid var(--rule-strong); }
.p-rows { flex: 1; overflow: hidden; }
.p-row { display: grid; grid-template-columns: 1.25fr 1fr 1.25fr; gap: 8px; align-items: center; padding: 6px 12px; border-bottom: 1px solid rgb(240 223 213 / .7); opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s var(--ease), background .3s; }
.p-row.on { opacity: 1; transform: none; }
.p-row.flash { background: var(--signal-100); }
.p-row .nm { font: 600 11.5px/1.2 var(--font-code); }
.p-row .nm .chip { margin-top: 3px; font-size: 9.5px; padding: 0 6px; }
.p-src { height: 24px; display: flex; align-items: center; gap: 5px; padding: 0 7px; font: 10.5px var(--font-code); background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--r-md); white-space: nowrap; overflow: hidden; }
.p-src svg { width: 10px; height: 10px; flex: none; }
.p-ex { font: 11px var(--font-typed); color: var(--carbon); border-bottom: 1px dotted var(--rule-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-bottom: 1px; }
.p-foot { display: flex; align-items: center; gap: 8px; padding: 9px 10px; background: var(--signal-50); border-top: 1px solid var(--rule); }
.p-foot span { font: 10.5px var(--font-code); color: var(--ink-soft); margin-right: auto; white-space: nowrap; }
.p-btn { white-space: nowrap; height: 28px; display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; font: 650 11.5px var(--font-code); background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--r-md); transition: transform .1s, background .2s; }
.p-btn svg { width: 12px; height: 12px; }
.p-btn.primary { background: var(--signal); border-color: var(--signal-700); box-shadow: var(--shadow-key); }
.p-btn.press { transform: translateY(1px); box-shadow: none; }
.toast { position: absolute; left: 50%; bottom: 22px; display: flex; align-items: center; gap: 10px; padding: 10px 16px; font: 600 13px var(--font-code); color: var(--paper); background: var(--ink); border-radius: var(--r-lg); box-shadow: 0 14px 30px -12px rgb(29 34 48 / .6); transform: translate(-50%, 20px); opacity: 0; transition: transform .35s var(--spring), opacity .25s; white-space: nowrap; z-index: 5; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast i { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--signal); color: var(--ink); font-style: normal; font-size: 11px; }
.cursor { position: absolute; left: 0; top: 0; z-index: 10; width: 26px; height: 26px; pointer-events: none; transition: transform .75s cubic-bezier(.55, .05, .25, 1); filter: drop-shadow(0 3px 4px rgb(0 0 0 / .25)); }
.ripple { position: absolute; z-index: 9; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 2px solid var(--signal); pointer-events: none; animation: ripple .55s var(--ease) forwards; }
@keyframes ripple { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.scramble { color: var(--signal-700); }

/* Capítulos del vídeo */
.chapters { display: grid; grid-template-columns: auto repeat(5, 1fr); gap: 8px; margin-top: 18px; align-items: stretch; }
.play { width: 46px; display: grid; place-items: center; background: var(--ink); color: var(--paper); border: 0; border-radius: var(--r-lg); cursor: pointer; }
.play svg { width: 16px; height: 16px; }
.chap { position: relative; text-align: left; padding: 10px 12px 12px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-lg); cursor: pointer; font: inherit; color: inherit; overflow: hidden; transition: border-color .2s, transform .2s; }
.chap:hover { border-color: var(--rule-strong); transform: translateY(-2px); }
.chap b { display: block; font: 650 13px/1.2 var(--font-code); letter-spacing: -0.01em; }
.chap small { display: block; margin-top: 2px; font: 11px var(--font-code); color: var(--ink-soft); }
.chap .n { font: 600 10.5px var(--font-typed); color: var(--signal-700); }
.chap .bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--signal); }
.chap.active { border-color: var(--signal-700); }
.chap.done .bar { width: 100%; }

/* ---------- Cinta de tipos ---------- */
.band { margin-top: 90px; background: var(--signal); border-block: 1.5px solid var(--ink); padding: 18px 0; overflow: hidden; transform: rotate(-1.4deg); width: 104%; margin-left: -2%; }
.band + .band { margin-top: -6px; transform: rotate(1deg); background: var(--ink); }
.track { display: flex; gap: 10px; width: max-content; animation: marquee 48s linear infinite; }
.band.rev .track { animation-direction: reverse; animation-duration: 60s; }
.band .chip { font-size: 15px; padding: 6px 14px; border-color: var(--ink); background: var(--sheet); color: var(--ink); }
.band .chip b { font-weight: 700; }
.band.rev .chip { background: transparent; border-color: rgb(247 247 245 / .3); color: var(--paper); }
.band .sep { align-self: center; font: 700 18px var(--font-code); }
.band.rev .sep { color: var(--signal); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Secciones ---------- */
section { position: relative; }
.sec { padding: 120px 0 40px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font: 600 13px var(--font-code); color: var(--signal-700); }
.kicker::before { content: ""; width: 18px; height: 2px; background: var(--signal); }
h2 { margin: 14px 0 0; font: 780 clamp(32px, 5vw, 58px)/1.02 var(--font-code); letter-spacing: -0.05em; max-width: 16ch; }
h2 em { font-style: normal; color: var(--signal-700); }
.sec-lead { max-width: 560px; margin: 18px 0 0; font-size: 17.5px; color: var(--ink-soft); }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 40px; flex-wrap: wrap; }

/* Cifras */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1.5px solid var(--ink); border-radius: 10px; background: var(--sheet); overflow: hidden; margin-top: 110px; }
.stat { padding: 26px 26px 24px; border-right: 1px solid var(--rule); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font: 800 clamp(40px, 5vw, 60px)/1 var(--font-code); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.stat b sup { font-size: .45em; color: var(--signal-700); vertical-align: .9em; margin-left: 2px; }
.stat span { display: block; margin-top: 8px; font: 500 13px var(--font-code); color: var(--ink-soft); }

/* Bento con hojas por triplicado */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 56px; }
.card { position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: 360px; padding: 26px; transition: transform .35s var(--ease); }
.card::before, .card::after { content: ""; position: absolute; inset: 0; border: 1.5px solid var(--ink); border-radius: 10px; }
.card::before { z-index: -1; background: var(--sheet); }
.card::after { z-index: -2; background: var(--canary); box-shadow: 0 0 0 0 var(--signal-200), 0 0 0 0 var(--ink); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.card:hover { transform: translate(-5px, -5px); }
.card:hover::after { transform: translate(6px, 6px); box-shadow: 6px 6px 0 0 var(--signal-200), 6px 6px 0 1.5px var(--ink); }
.card.wide { grid-column: span 2; }
.card.full { grid-column: 1 / -1; min-height: 0; }
.card.tall { grid-row: span 2; }
.card h3 { margin: 0; font: 750 23px/1.12 var(--font-code); letter-spacing: -0.035em; }
.card p { margin: 10px 0 0; font-size: 15px; color: var(--ink-soft); max-width: 46ch; }
.card .viz { margin-top: auto; padding-top: 24px; }
.card .num { position: absolute; top: 22px; right: 24px; font: 600 11px var(--font-typed); color: var(--ink-soft); }

/* Viz: detección */
.detect { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; position: relative; }
.dtile { position: relative; height: 92px; padding: 10px; background: var(--paper); border: 1px dashed var(--rule-strong); border-radius: var(--r-lg); display: flex; flex-direction: column; justify-content: space-between; transition: background .3s, border-color .3s; overflow: hidden; }
.dtile small { font: 500 11px var(--font-code); color: var(--ink-soft); }
.dtile .mini { height: 24px; border: 1px solid var(--rule-strong); border-radius: var(--r-md); background: var(--sheet); display: flex; align-items: center; padding: 0 7px; gap: 4px; font: 11px var(--font-typed); color: var(--carbon); }
.dtile .ok { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--signal); border: 1px solid var(--signal-700); display: grid; place-items: center; transform: scale(0); transition: transform .4s var(--spring); }
.dtile .ok::after { content: ""; width: 4px; height: 8px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.dtile.seen { background: var(--signal-50); border-style: solid; border-color: var(--signal-300); }
.dtile.seen .ok { transform: scale(1); }
.otp6 { display: flex; gap: 3px; }
.otp6 i { width: 14px; height: 20px; border: 1px solid var(--rule-strong); border-radius: 2px; background: var(--sheet); font: normal 11px/18px var(--font-typed); text-align: center; color: var(--carbon); }
.segd { display: flex; gap: 3px; font: 11px var(--font-typed); color: var(--carbon); }
.segd i { font-style: normal; padding: 1px 3px; background: var(--carbon-wash); border-radius: 2px; }
.shadowbox { border: 1px dashed var(--ink-soft) !important; }
.iframebox { outline: 3px solid var(--rule); outline-offset: 2px; }

/* Viz: idiomas */
.langviz { border: 1px solid var(--rule-strong); border-radius: var(--r-lg); background: var(--paper); overflow: hidden; }
.langviz .top { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-bottom: 1px solid var(--rule); background: var(--sheet); font: 600 12px var(--font-code); }
.lrow { display: grid; grid-template-columns: 82px 1fr; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--rule); font-size: 13px; perspective: 400px; }
.lrow:last-child { border-bottom: 0; }
.lrow small { font: 500 11px var(--font-code); color: var(--ink-soft); }
.lrow .typed { display: inline-block; font-size: 13.5px; transform-origin: 50% 50%; backface-visibility: hidden; }
.lrow .typed.flip { animation: flip .55s var(--ease); }
@keyframes flip { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); opacity: .2; } 51% { transform: rotateX(-90deg); opacity: .2; } 100% { transform: rotateX(0); } }
.flag { font: 600 11px var(--font-code); }

/* Viz: patrones válidos */
.regex { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font: 13px var(--font-code); background: var(--ink); color: var(--paper); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.regex em { font-style: normal; color: var(--signal-300); }
.regex .lab { margin-left: auto; font-size: 11px; padding: 2px 7px; border-radius: 999px; background: rgb(255 255 255 / .1); }
.slot { position: relative; height: 54px; overflow: hidden; border: 1px solid var(--ink); border-top: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); background: var(--sheet); }
.slot .reel { position: absolute; left: 14px; right: 14px; top: 0; transition: transform .7s var(--ease); }
.slot .reel div { height: 54px; display: flex; align-items: center; font: 17px var(--font-typed); color: var(--carbon); letter-spacing: .02em; white-space: nowrap; }
.valid { display: flex; align-items: center; gap: 8px; margin-top: 10px; font: 500 12px var(--font-code); color: var(--ink-soft); }
.valid i { font-style: normal; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--signal); color: var(--ink); font-size: 11px; font-weight: 800; transition: transform .3s var(--spring); }
.valid i.pop { transform: scale(1.35); }

/* Viz: eventos de framework */
.term { padding: 12px 14px; height: 168px; overflow: hidden; background: var(--ink); color: #c9cbd3; border-radius: var(--r-lg); font: 12.5px/1.75 var(--font-code); position: relative; }
.term .ln { opacity: 0; transform: translateY(6px); animation: ln .35s var(--ease) forwards; white-space: nowrap; }
@keyframes ln { to { opacity: 1; transform: none; } }
.term .ev { color: var(--signal-300); }
.term .vl { color: #9fb0ff; }
.term .ok { color: #8fd18f; }
.fw { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

/* Viz: privacidad */
.perm { display: grid; gap: 8px; }
.perm div { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-lg); font: 12.5px var(--font-code); }
.perm div b { font-weight: 650; }
.perm div span { margin-left: auto; color: var(--ink-soft); font-size: 11.5px; }
.lock { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; background: var(--signal); border: 1.5px solid var(--ink); box-shadow: var(--shadow-key); margin-bottom: 14px; }
.lock svg { width: 24px; height: 24px; }

/* Cómo funciona */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 60px; border: 1.5px solid var(--ink); border-radius: 10px; overflow: hidden; background: var(--sheet); }
.step { position: relative; padding: 30px 28px 34px; border-right: 1px solid var(--rule); }
.step:last-child { border-right: 0; }
.step .big { font: 800 84px/0.9 var(--font-code); letter-spacing: -0.06em; color: transparent; -webkit-text-stroke: 1.5px var(--ink); transition: color .4s; }
.step:hover .big, .step.lit .big { color: var(--signal); }
.step h3 { margin: 20px 0 0; font: 750 22px/1.15 var(--font-code); letter-spacing: -0.03em; }
.step p { margin: 10px 0 0; color: var(--ink-soft); font-size: 15px; }
.step kbd { font: 600 12px var(--font-code); padding: 2px 6px; border: 1px solid var(--rule-strong); border-bottom-width: 2px; border-radius: var(--r-md); background: var(--paper); }

/* Demo en vivo */
.live { margin-top: 120px; padding: 110px 0 120px; background: var(--ink); color: var(--paper); overflow: hidden; }
.live::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgb(247 247 245 / .09) 1px, transparent 1px); background-size: 22px 22px; pointer-events: none; }
.live .kicker { color: var(--signal-300); }
.live h2 { color: var(--paper); max-width: 18ch; }
.live h2 em { color: var(--signal); }
.live .sec-lead { color: #b8bac4; }
.live-grid { position: relative; display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: start; margin-top: 10px; }
.live-actions { display: grid; gap: 12px; margin-top: 34px; max-width: 380px; }
.live-actions .btn { justify-content: flex-start; height: 54px; font-size: 15px; }
.live-actions .btn small { margin-left: auto; font-weight: 500; font-size: 11.5px; opacity: .65; }
.live-actions .btn.ghost { background: transparent; color: var(--paper); border-color: rgb(247 247 245 / .25); }
.live-actions .btn.ghost:hover { background: rgb(247 247 245 / .08); border-color: rgb(247 247 245 / .5); }
.result { margin-top: 18px; min-height: 22px; font: 13px var(--font-code); color: var(--signal-300); }
.live-note { margin-top: 26px; display: flex; gap: 10px; font-size: 13.5px; color: #9a9caa; max-width: 400px; }
.live-note svg { width: 16px; height: 16px; flex: none; margin-top: 3px; }
.real-form { position: relative; color: var(--ink); background: var(--sheet); border: 1.5px solid var(--ink); border-radius: 10px; padding: 0 26px 26px; box-shadow: 14px 14px 0 0 var(--signal); }
.real-form .fh { display: flex; align-items: center; gap: 10px; margin: 0 -26px 20px; padding: 16px 26px 14px; border-bottom: 1px solid var(--rule); }
.real-form .fh b { font: 750 19px var(--font-code); letter-spacing: -0.03em; }
.real-form .fh i { font: 600 11px var(--font-typed); font-style: normal; padding: 4px 6px; background: var(--signal); border-radius: var(--r-md); box-shadow: var(--shadow-key); }
.real-form .fh span { margin-left: auto; font: 11.5px var(--font-code); color: var(--ink-soft); }
.rg { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.rg .full { grid-column: 1 / -1; }
.rg label { display: grid; gap: 6px; align-content: start; font: 500 11.5px/1.3 var(--font-code); color: var(--ink-soft); }
.rg input:not([type=checkbox]):not([type=radio]), .rg select, .rg textarea { width: 100%; min-height: 38px; padding: 8px 10px; background: var(--sheet); color: var(--carbon); font: 14px/1.4 var(--font-typed); border: 1px solid var(--rule-strong); border-radius: var(--r-md); outline: none; transition: border-color .15s, box-shadow .15s, background .4s; }
.rg textarea { min-height: 70px; resize: vertical; }
.rg select { appearance: none; background: var(--sheet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23615955' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E") no-repeat right 10px center; }
.rg ::placeholder { color: var(--ink-soft); opacity: .5; }
.rg input:focus, .rg select:focus, .rg textarea:focus { border-color: var(--signal-700); box-shadow: 0 0 0 3px rgb(184 61 14 / .25); }
.rg input.got, .rg select.got, .rg textarea.got { background: var(--carbon-wash); }
.rg fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 6px; }
.rg legend { padding: 0; margin-bottom: 6px; font: 500 11.5px var(--font-code); color: var(--ink-soft); }
.rg .inl { display: flex; align-items: center; gap: 8px; font: 14.5px var(--font-sans); color: var(--ink); cursor: pointer; }
.rg .row { display: flex; flex-wrap: wrap; gap: 18px; }
.rg input[type=checkbox], .rg input[type=radio] { width: 16px; height: 16px; margin: 0; accent-color: var(--signal); }
.req { color: var(--stamp); }

/* FAQ */
.faq { margin-top: 48px; display: grid; gap: 12px; max-width: 860px; }
.faq details { background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--r-xl); padding: 0 22px; transition: border-color .2s; }
.faq details[open] { border-color: var(--ink); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px; padding: 20px 0; font: 650 17px/1.3 var(--font-code); letter-spacing: -0.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; width: 28px; height: 28px; flex: none; display: grid; place-items: center; border: 1px solid var(--rule-strong); border-radius: 50%; font: 500 18px/1 var(--font-code); transition: transform .3s var(--ease), background .2s; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--signal); border-color: var(--signal-700); }
.faq details p { margin: 0 0 22px; color: var(--ink-soft); max-width: 70ch; }

/* CTA final */
.cta { margin: 130px 0 0; }
.cta-box { position: relative; overflow: hidden; padding: 80px 56px; background: var(--signal); border: 1.5px solid var(--ink); border-radius: 14px; }
.cta-box h2 { max-width: 14ch; font-size: clamp(38px, 6.5vw, 82px); }
.cta-box h2 s { text-decoration-thickness: 5px; text-decoration-color: var(--ink); color: var(--signal-900); font-family: var(--font-typed); font-weight: 600; }
.cta-box p { margin: 20px 0 0; max-width: 520px; font-size: 18px; }
.cta-box .hero-ctas { justify-content: flex-start; }
.cta-box .btn.ghostink { background: transparent; border-color: var(--ink); }
.cta-box .btn.ghostink:hover { background: rgb(29 34 48 / .08); }
.cta-logo { position: absolute; right: -40px; bottom: -60px; width: 380px; height: 380px; transform: rotate(-12deg); opacity: .95; }
footer { padding: 60px 0 50px; font: 13px var(--font-code); color: var(--ink-soft); }
footer .wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
footer .brand svg { width: 24px; height: 24px; }
footer nav { margin-left: auto; display: flex; gap: 18px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

/* Aparición al hacer scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.bento .reveal.in:nth-child(2), .steps .reveal.in:nth-child(2) { transition-delay: .08s; }
.bento .reveal.in:nth-child(3), .steps .reveal.in:nth-child(3) { transition-delay: .16s; }
.bento .reveal.in:nth-child(4) { transition-delay: .08s; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .card.wide { grid-column: span 2; }
  .card.tall { grid-row: auto; }
  .live-grid { grid-template-columns: 1fr; gap: 40px; }
  .float-chip { display: none; }
  .chapters { grid-template-columns: auto repeat(5, minmax(0, 1fr)); }
  .chap small { display: none; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .nav-links { display: none; }
  .nav .lang { margin-left: auto; }
  .nav .btn { padding: 0 12px; }
  .lg-only, .live-actions .btn small { display: none; }
  .sm-only { display: inline; }
  .live-grid > * { min-width: 0; }
  .hero { padding-top: 44px; }
  .stage-shell::before { inset: 12px -8px -12px 8px; }
  .stage-frame { padding: 5px; }
  .chapters { grid-template-columns: auto repeat(5, minmax(0, 1fr)); gap: 5px; }
  .chap { padding: 8px 6px 10px; }
  .chap b { font-size: 11px; }
  .chap .n { display: none; }
  .play { width: 38px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .bento { grid-template-columns: 1fr; gap: 22px; }
  .card.wide, .card.full { grid-column: auto; }
  .card { min-height: 0; padding: 22px; }
  .detect { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; border-bottom: 1px solid var(--rule); }
  .step:last-child { border-bottom: 0; }
  .rg { grid-template-columns: 1fr; }
  .real-form { padding: 0 18px 20px; box-shadow: 8px 8px 0 0 var(--signal); }
  .real-form .fh { margin: 0 -18px 18px; padding: 14px 18px 12px; }
  .live-actions { max-width: none; }
  .cta-box { padding: 48px 24px 200px; }
  .cta-logo { width: 220px; height: 220px; right: -20px; bottom: -40px; }
  .sec { padding-top: 90px; }
  footer nav { margin-left: 0; }
  .privgrid { grid-template-columns: 1fr !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .track { animation: none; }
}
