/* Base común de los heroes estáticos (plano técnico) */
@font-face { font-family: "Geist"; src: url("https://cdn.jsdelivr.net/npm/geist@1.9.0/dist/fonts/geist-sans/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("https://cdn.jsdelivr.net/npm/geist@1.9.0/dist/fonts/geist-mono/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root, [data-theme="oscuro"] {
  --bg: #1d1d1c; --bg2: #232322; --ink: #ecebe6; --mute: rgba(236,235,230,.56); --line: rgba(236,235,230,.86);
  --guia: rgba(236,235,230,.3); --grid: rgba(236,235,230,.07); --grid2: rgba(236,235,230,.13);
  --accent: #68ED94; --accent-line: #68ED94;
  --btn-bg: #ecebe6; --btn-ink: #161616; --grano: .09; --grano-mezcla: screen;
  --logo-ink: #ecebe6; --logo-block: #68ED94; --logo-on-block: #121212;
}
[data-theme="claro"] {
  --bg: #e7e6e1; --bg2: #dfded8; --ink: #191918; --mute: rgba(25,25,24,.58); --line: rgba(25,25,24,.86);
  --guia: rgba(25,25,24,.3); --grid: rgba(25,25,24,.07); --grid2: rgba(25,25,24,.14);
  --accent: #68ED94; --accent-line: #17733B;
  --btn-bg: #191918; --btn-ink: #ecebe6; --grano: .16; --grano-mezcla: multiply;
  --logo-ink: #191918; --logo-block: #68ED94; --logo-on-block: #121212;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body { background: var(--bg); color: var(--ink); font-family: "Geist", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: clip; transition: background .4s ease, color .4s ease; }
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: var(--grano); mix-blend-mode: var(--grano-mezcla);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 1.4 -.2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
a { color: inherit; text-decoration: none; }
.mono { font-family: "Geist Mono", ui-monospace, monospace; font-size: 12.5px; color: var(--mute); }

.nav { position: absolute; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 40px; }
.logo { width: 92px; display: block; } .logo svg { display: block; width: 100%; height: auto; }
.nav ul { display: flex; gap: 28px; list-style: none; font-size: 14px; color: var(--mute); }
.nav ul a:hover { color: var(--ink); }
.nav .der { display: flex; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; font-size: 14.5px; font-weight: 500; border: 1px solid var(--line); transition: background .2s, color .2s, border-color .2s; white-space: nowrap; }
.btn.lleno { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }
.btn.borde { color: var(--ink); border-color: var(--guia); }
.btn.borde:hover { border-color: var(--ink); }
.ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.bajada { font-size: 17px; line-height: 1.45; color: var(--mute); text-wrap: pretty; }

/* dibujos */
svg .fb { fill: var(--bg); }
svg .ln { fill: none; stroke: var(--line); stroke-width: 1.1; stroke-linejoin: round; stroke-linecap: round; }
svg .fi { fill: none; stroke: var(--line); stroke-width: .8; opacity: .72; stroke-linecap: round; stroke-linejoin: round; }
svg .ac { fill: var(--accent); stroke: var(--line); stroke-width: .8; }
svg .eje { fill: none; stroke: var(--guia); stroke-width: 1; stroke-dasharray: 3 5; }
svg .gu { fill: none; stroke: var(--guia); stroke-width: 1; }
svg .gr { fill: none; stroke: var(--grid2); stroke-width: 1; }
svg .punto { fill: var(--line); }
svg .tx { font-family: "Geist Mono", monospace; font-size: 11.5px; fill: var(--mute); }
svg .tx.ink { fill: var(--ink); }
svg .tn { font-family: "Geist", sans-serif; font-size: 14px; font-weight: 500; fill: var(--ink); }
svg .tag { fill: var(--bg); stroke: var(--line); stroke-width: 1; }

/* pastilla de abajo: propuestas + fondo */
.pasar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 82%, transparent); border: 1px solid var(--guia); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); white-space: nowrap; }
.pasar a, .pasar button { appearance: none; border: 0; background: none; color: var(--mute); font: 500 13px "Geist", sans-serif; min-height: 36px; padding: 0 13px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; }
.pasar a[aria-current="true"] { background: var(--ink); color: var(--bg); }
.pasar .sep { width: 1px; height: 18px; background: var(--guia); margin: 0 4px; }

@media (max-width: 979px) {
  .nav { padding: 16px; } .nav ul, .nav .der .borde { display: none; }
  .bajada { font-size: 15.5px; }
  .ctas .btn { flex: 1 1 auto; }
  .pasar .nom { display: none; }
  .pasar a, .pasar button { padding: 0 11px; }
}

/* ---------- escenas con intro y scroll (variantes de Plano y Retícula) ---------- */
.escena { position: relative; }
.cuadro { position: sticky; top: 0; height: 100svh; min-height: 620px; overflow: hidden; }
.cuadro.cuadricula { background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 24px 24px; background-position: -1px -1px; }
#dib { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.texto { position: absolute; will-change: transform, opacity; }
.texto.plano { left: 56px; top: 0; bottom: 0; width: min(44vw, 640px); display: flex; flex-direction: column; justify-content: space-between; padding: 150px 0 56px; }
.texto.plano .arriba { display: flex; flex-direction: column; gap: 22px; max-width: 400px; }
.texto.reti { left: 56px; top: 132px; width: min(36vw, 520px); display: flex; flex-direction: column; gap: 26px; }
.texto.reti .abajo { display: flex; flex-direction: column; gap: 22px; max-width: 400px; }
.escena h1 { font-weight: 500; letter-spacing: -.05em; }
.texto.plano h1 { font-size: clamp(52px, 6.6vw, 108px); line-height: .95; }
.texto.reti h1 { font-size: clamp(56px, 7.4vw, 124px); line-height: .9; letter-spacing: -.055em; }
.escena h1 > span { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.escena h1 > span > span { display: block; }
.rotulo-hoja { position: absolute; right: 56px; bottom: 56px; display: grid; grid-template-columns: auto auto; border: 1px solid var(--line); font: 12px "Geist Mono", monospace; background: var(--bg); }
.rotulo-hoja span { padding: 7px 12px; border-top: 1px solid var(--guia); color: var(--mute); }
.rotulo-hoja span:nth-child(-n+2) { border-top: 0; }
.rotulo-hoja span:nth-child(even) { color: var(--ink); border-left: 1px solid var(--guia); text-align: right; }

/* panel con la capa actual */
.panel { position: absolute; left: 56px; top: 50%; transform: translateY(-50%); width: min(30vw, 420px); pointer-events: none; }
.panel .num { font: 13px "Geist Mono", monospace; color: var(--accent-line); display: block; margin-bottom: 14px; }
.panel h2 { font-weight: 500; font-size: clamp(36px, 4.2vw, 64px); line-height: 1; letter-spacing: -.04em; margin-bottom: 16px; }
.panel p { font-size: 17px; line-height: 1.45; color: var(--mute); max-width: 32ch; text-wrap: pretty; }
.panel .paso { position: absolute; left: 0; right: 0; top: 0; transform: translateY(-50%); will-change: opacity, transform; }
.panel .marcas { position: absolute; left: 0; top: calc(50% + 120px); display: flex; gap: 6px; }
.panel .marcas i { width: 18px; height: 2px; background: var(--guia); transition: background .3s; }
.panel .marcas i.si { background: var(--ink); }

.anima h1 > span > span { transform: translateY(105%); animation: sube .9s cubic-bezier(.2,.7,.1,1) forwards; animation-delay: var(--d, 1.6s); }
.anima h1 > span:nth-child(2) > span { animation-delay: calc(var(--d, 1.6s) + .15s); }
.anima .entra, .anima .nav { opacity: 0; animation: aparece .8s ease forwards; animation-delay: var(--d2, 2s); }
.anima .nav { animation-delay: .2s; }
@keyframes sube { to { transform: none; } }
@keyframes aparece { to { opacity: 1; } }

.sigue { padding: 120px 56px 120px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; border-top: 1px solid var(--guia); }
.sigue h2 { font-weight: 500; font-size: clamp(30px, 3.2vw, 48px); line-height: 1.05; letter-spacing: -.035em; text-wrap: balance; }
.sigue .clientes { color: var(--ink); opacity: .7; --s: 22px; margin-top: 48px; grid-column: 1 / -1; }

@media (max-width: 979px) {
  .cuadro { min-height: 0; }
  .texto.plano, .texto.reti { left: 16px; right: 16px; width: auto; top: 0; bottom: auto; padding: 92px 0 0; gap: 20px; justify-content: flex-start; }
  .texto.plano .arriba { order: 2; gap: 16px; max-width: none; }
  .texto.plano h1 { order: 1; font-size: clamp(44px, 12.6vw, 66px); }
  .texto.reti h1 { font-size: clamp(50px, 15vw, 76px); }
  .texto.reti .abajo { gap: 16px; max-width: none; }
  .rotulo-hoja { right: auto; left: 16px; bottom: 74px; font-size: 10.5px; grid-template-columns: repeat(6, auto); }
  .rotulo-hoja span { padding: 5px 7px; border-top: 0; }
  .rotulo-hoja span + span { border-left: 1px solid var(--guia); }
  .panel { left: 16px; right: 16px; width: auto; top: auto; bottom: 76px; transform: none; height: 128px; }
  .panel .paso { top: auto; bottom: 0; transform: none; }
  .panel h2 { font-size: 30px; margin-bottom: 8px; }
  .panel .num { margin-bottom: 8px; }
  .panel p { font-size: 15px; }
  .panel .marcas { display: none; }
  .sigue { grid-template-columns: 1fr; padding: 80px 16px 110px; gap: 24px; }
}
@media (prefers-reduced-motion: reduce) { .anima * { animation-duration: .01s !important; animation-delay: 0s !important; } }
