/* Codexa — base: tokens, tipografía, la señal "encendido", botones y navegación.
   Concepto: la página empieza de noche y cada título se prende al entrar en pantalla. */
:root {
  color-scheme: dark;
  --night: #07070c;
  --night-2: #0d0d16;
  --night-3: #141420;
  --line: rgba(236, 236, 244, .08);
  --line-2: rgba(236, 236, 244, .14);
  --ink: #ececf4;
  --mute: #8b8ba6;
  --off: #2a2a3c;                 /* letra apagada */
  --indigo: #6366f1;
  --indigo-hi: #8b8ff8;
  --lamp: #ffc46b;                /* la luz encendida */
  --lamp-hot: #ffdca0;
  --lamp-glow: rgba(255, 186, 90, .4);
  --cyan: #22d3ee;                /* solo para el glitch del logo */
  --rose: #f43f5e;
  --wa: #25d366;

  --display: "Anybody", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --gut: max(20px, env(safe-area-inset-left, 0px));
  --gut-r: max(20px, env(safe-area-inset-right, 0px));
  --maxw: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { background: var(--night); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
::selection { background: var(--lamp); color: #1a1205; }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: calc(var(--maxw) + var(--gut) + var(--gut-r)); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut-r); }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 10px; background: var(--lamp); color: #1a1205; font-weight: 600; transition: top .2s; }
.skip:focus { top: 12px; }

/* ---------- Tipos de texto ---------- */
.eyebrow { font: 500 11.5px/1.2 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--indigo-hi); }
.sec-head { display: grid; gap: 18px; margin-bottom: clamp(40px, 6vw, 72px); max-width: 860px; }
.sec-lead { max-width: 52ch; font-size: clamp(16px, 1.35vw, 18.5px); line-height: 1.6; color: var(--mute); text-wrap: pretty; }

/* ---------- La señal: títulos que se encienden ---------- */
.lamp { font-family: var(--display); font-weight: 800; text-transform: uppercase; line-height: .92; letter-spacing: -.005em;
  font-size: clamp(42px, 7.2vw, 108px); color: var(--ink); text-wrap: balance; }
.lamp em { font-style: normal; }
.lamp .w { display: inline-block; color: var(--off); font-variation-settings: "wght" 170, "wdth" 74;
  transition: font-variation-settings 1.1s var(--ease), color .7s var(--ease), text-shadow 1s var(--ease);
  transition-delay: calc(var(--i, 0) * 65ms); }
.lamp.is-on .w { color: var(--ink); font-variation-settings: "wght" 820, "wdth" 74; }
.lamp.is-on .w.hot { color: var(--lamp); text-shadow: 0 0 14px rgba(255, 186, 90, .35), 0 0 54px rgba(255, 160, 50, .22);
  animation: flick 1s steps(1, end) calc(var(--i, 0) * 65ms + .25s) 1 both; }
@keyframes flick { 0% { opacity: .3; } 8% { opacity: 1; } 13% { opacity: .35; } 21% { opacity: 1; } 27% { opacity: .55; } 38%, 100% { opacity: 1; } }
.lamp-xl { font-size: clamp(56px, 12vw, 190px); }

/* ---------- Aparecer al hacer scroll ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.rv.in { opacity: 1; transform: none; }

/* ---------- Botones ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 24px; border-radius: 999px;
  font: 600 15px/1 var(--sans); letter-spacing: -.005em; white-space: nowrap; transition: transform .25s var(--ease), background .25s, box-shadow .35s, border-color .25s, color .25s; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 13.5px; }
.btn-lamp { background: var(--lamp); color: #1d1405; box-shadow: 0 0 0 0 rgba(255, 186, 90, 0), 0 10px 30px -12px rgba(255, 170, 60, .6); }
.btn-lamp:hover { background: var(--lamp-hot); transform: translateY(-1px); box-shadow: 0 0 0 6px rgba(255, 186, 90, .12), 0 16px 40px -12px rgba(255, 170, 60, .75); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--ink); background: rgba(255, 255, 255, .02); }
.btn-ghost:hover { border-color: rgba(255, 196, 107, .5); color: var(--lamp-hot); }

/* ---------- Navegación ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gut-r) 14px var(--gut); transition: background .4s, border-color .4s, padding .4s; border-bottom: 1px solid transparent; }
.nav.solid { background: rgba(7, 7, 12, .72); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2); border-bottom-color: var(--line); padding-top: calc(10px + env(safe-area-inset-top, 0px)); padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 20px/1 var(--display); font-variation-settings: "wght" 800, "wdth" 82; text-transform: uppercase; letter-spacing: .01em; }
.nav-links { display: flex; gap: 30px; font-size: 14px; color: var(--mute); }
.nav-links a { position: relative; padding: 6px 0; transition: color .2s; }
.nav-links a:hover, .nav-links a.cur { color: var(--ink); }
.nav-links a.cur::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 8px var(--lamp); }
@media (max-width: 860px) { .nav-links { display: none; } }

/* ---------- Pie y botón de WhatsApp ---------- */
.foot { border-top: 1px solid var(--line); padding: 36px 0 calc(36px + env(safe-area-inset-bottom, 0px)); color: var(--mute); font-size: 14px; }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.foot-inner .brand { color: var(--ink); font-size: 17px; }
.foot nav { display: flex; gap: 20px; margin-left: auto; }
.foot nav a:hover { color: var(--ink); }
.foot-c { width: 100%; font: 400 12px/1 var(--mono); color: #5c5c74; }
.wa-fab { position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); bottom: max(18px, env(safe-area-inset-bottom, 0px)); z-index: 90; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; background: var(--wa); color: #fff; box-shadow: 0 12px 30px -8px rgba(37, 211, 102, .55); transition: transform .25s var(--ease); }
.wa-fab:hover { transform: scale(1.06); }

@media (prefers-reduced-motion: reduce) {
  .lamp .w { transition: none; }
  .lamp.is-on .w.hot { animation: none; }
  .rv { transition: none; opacity: 1; transform: none; }
}
