:root {
  --bg: #0a0f16;
  --bg-2: #0e1520;
  --panel: #121b28;
  --line: rgba(255,255,255,.08);
  --ink: #eef3f8;
  --muted: #9fb0c3;
  --green: #33c06a;
  --green-2: #7be6a6;
  --green-deep: #0c5233;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
.container { width: min(1140px, 90%); margin: 0 auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: "Sora", system-ui, sans-serif; margin: 0; line-height: 1.08; letter-spacing: -0.02em; }
.grad { background: linear-gradient(100deg, var(--green-2), var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Fondo aurora animado */
.aurora {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(50% 40% at 80% 10%, rgba(51,192,106,.16), transparent 70%),
    radial-gradient(45% 45% at 10% 20%, rgba(51,192,106,.10), transparent 70%),
    radial-gradient(60% 50% at 60% 100%, rgba(20,120,70,.14), transparent 70%);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { 0% { transform: translate3d(0,0,0) scale(1);} 100% { transform: translate3d(0,-24px,0) scale(1.08);} }

/* NAV */
.nav { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid transparent; transition: background .3s, border-color .3s, backdrop-filter .3s; }
.nav.scrolled { background: rgba(10,15,22,.72); backdrop-filter: blur(12px); border-color: var(--line); }
.nav__inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: "Sora"; font-weight: 700; font-size: 19px; }
.brand__logo { height: 30px; width: auto; display: block; }
.brand--sm { font-size: 16px; }
.brand--sm .brand__logo { height: 24px; }
.nav__links { margin-left: auto; display: flex; gap: 26px; color: var(--muted); font-weight: 500; font-size: 15px; }
.nav__links a { position: relative; }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: var(--green); transition: width .25s; }
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { width: 100%; }

/* Botones */
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; padding: 11px 20px; border-radius: 999px; transition: transform .12s ease, box-shadow .25s, background .25s, border-color .25s; cursor: pointer; }
.btn--lg { padding: 15px 28px; font-size: 16px; }
.btn--primary { background: var(--green); color: #05130b; box-shadow: 0 10px 30px rgba(51,192,106,.28); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(51,192,106,.4); }
.btn--line { border: 1px solid var(--line); color: var(--ink); background: rgba(255,255,255,.02); }
.btn--line:hover { border-color: var(--green); color: var(--green-2); transform: translateY(-2px); }

/* HERO */
.hero { padding: 90px 0 70px; }
.hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow { color: var(--green-2); font-weight: 600; font-size: 14px; letter-spacing: .04em; }
.hero h1 { font-size: clamp(40px, 7vw, 76px); font-weight: 800; margin: 18px 0; }
.lead { color: var(--muted); font-size: clamp(17px, 2.2vw, 21px); max-width: 40ch; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }

/* Escena animada: auto + portón */
.stage { display: flex; justify-content: center; }
.scene { width: min(520px, 100%); height: auto; overflow: visible; }
.ground { stroke: rgba(255,255,255,.16); stroke-width: 2; stroke-dasharray: 2 12; stroke-linecap: round; }
.post { fill: #2a3648; }
.post--front { fill: #3a4a60; }
.gate__frame { fill: rgba(51,192,106,.10); stroke: var(--green); stroke-width: 2; }
.gate__slats line { stroke: var(--green); stroke-opacity: .55; stroke-width: 3; stroke-linecap: round; }
.gate { animation: gateopen 8s cubic-bezier(.65,0,.35,1) infinite; }
@keyframes gateopen {
  0%, 28% { transform: translateX(0); }
  42%, 66% { transform: translateX(158px); }
  80%, 100% { transform: translateX(0); }
}
.car { animation: drive 8s cubic-bezier(.5,0,.5,1) infinite; }
@keyframes drive {
  0% { transform: translateX(-300px); }
  30% { transform: translateX(70px); }
  40% { transform: translateX(70px); }
  68%, 100% { transform: translateX(560px); }
}
.car__body { fill: #eef3f8; }
.car__glass { fill: #7d90a6; }
.car__stripe { fill: var(--green); }
.car__beam { fill: rgba(123,230,166,.30); opacity: 0; animation: beam 8s ease-in-out infinite; }
@keyframes beam { 0%,26% { opacity: 0; } 34%,64% { opacity: .5; } 72%,100% { opacity: 0; } }
.wheel .tyre { fill: #0a0f16; stroke: #33445a; stroke-width: 3; }
.wheel .hub { fill: #33445a; }
.wheel .spoke { fill: #33445a; }
.wheel { transform-box: fill-box; transform-origin: center; animation: roll 1.1s linear infinite; }
@keyframes roll { to { transform: rotate(360deg); } }

/* STATS */
.stats { padding: 30px 0 20px; }
.stats__grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 40px 0; }
.stat { text-align: center; }
.stat__num { display: block; font-family: "Sora"; font-weight: 800; font-size: clamp(34px, 5vw, 52px); background: linear-gradient(120deg, var(--green-2), var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__label { color: var(--muted); font-size: 14px; }

/* SECTIONS */
.section { padding: 96px 0; }
.kicker { color: var(--green-2); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; margin: 0 0 14px; }
.section__title { font-size: clamp(30px, 4.5vw, 48px); font-weight: 800; margin-bottom: 48px; }

/* STEPS */
.steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.step { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: transform .25s, border-color .25s, background .25s; }
.step:hover { transform: translateY(-6px); border-color: rgba(51,192,106,.5); background: var(--panel); }
.step__n { font-family: "Sora"; font-weight: 800; font-size: 15px; color: var(--green); letter-spacing: .1em; }
.step h3 { font-size: 22px; margin: 14px 0 6px; }
.step p { color: var(--muted); margin: 0; font-size: 15px; }

/* TECH (sección técnica) */
.section--tech { background: linear-gradient(180deg, transparent, rgba(51,192,106,.03), transparent); }
.tech-figure { margin: 0 auto; max-width: 800px; }
.tech-figure img { width: 100%; height: auto; display: block; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.45); background: #fff; }
.tech { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; }
.tech__h { font-family: "Sora"; font-size: 15px; font-weight: 700; color: var(--green-2); letter-spacing: .04em; margin: 0 0 18px; text-transform: uppercase; }
.tech__pipe, .tech__specs { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }

.pipe { list-style: none; counter-reset: p; margin: 0; padding: 0; }
.pipe li { position: relative; padding: 16px 0 16px 44px; border-bottom: 1px dashed var(--line); }
.pipe li:last-child { border-bottom: 0; }
.pipe li::before { counter-increment: p; content: counter(p, decimal-leading-zero); position: absolute; left: 0; top: 16px; font-family: "Sora"; font-weight: 800; font-size: 13px; color: var(--green); }
.pipe__k { display: block; font-weight: 600; font-size: 16px; }
.pipe__v { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }

.specs { margin: 0; }
.specs > div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.specs > div:last-child { border-bottom: 0; }
.specs dt { color: var(--green-2); font-weight: 600; font-size: 14px; }
.specs dd { margin: 0; color: var(--ink); font-size: 15px; }

/* CTA */
.cta { padding: 110px 0; text-align: center; }
.cta h2 { font-size: clamp(32px, 5.5vw, 60px); font-weight: 800; margin-bottom: 30px; }

/* FOOTER */
.footer { border-top: 1px solid var(--line); padding: 30px 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; }
.footer__muted { color: var(--muted); font-size: 14px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.steps .step.reveal, .cards .card.reveal, .stats__grid .stat.reveal { transition-delay: var(--d, 0s); }

/* Responsive */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 44px; }
  .steps { grid-template-columns: repeat(2,1fr); }
  .tech { grid-template-columns: 1fr; }
  .nav__links { display: none; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: 1fr; gap: 28px; }
}

/* Respeta reduce-motion */
@media (prefers-reduced-motion: reduce) {
  .aurora, .scanner__line, .scanner__box, .scanner__status, .gate__bar { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scanner__status { opacity: 1; }
  .scanner__box { opacity: 1; }
}
