:root {
  --fondo: #06111b;
  --tinta: #f4fbff;
  --suave: #a9c3d1;
  --agua: #5de0ff;
  --rojo: #e10600;
  --linea: #1d3446;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}
a { color: inherit; }

/* Escena */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden; isolation: isolate; }
.scene { position: absolute; inset: 0; z-index: -2; }
.scene svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pista { clip-path: polygon(52% 0, 100% 0, 100% 100%, 40% 100%); }
.scene .auto { inset: auto; right: 3vw; bottom: 5vh; width: min(62vw, 880px); height: auto; overflow: visible; }
.velo {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 55% at 50% 50%, rgb(6 17 27 / .82), rgb(6 17 27 / .35) 70%, transparent),
    linear-gradient(to bottom, transparent 92%, var(--fondo));
}

/* Agua corriendo */
.ola { animation: correr 9s linear infinite; }
.ola2 { animation-duration: 12s; animation-direction: reverse; }
.ola3 { animation-duration: 7s; }
.ola4 { animation-duration: 10s; animation-direction: reverse; }
@keyframes correr { to { transform: translateX(400px); } }
.d { animation: brillar 5s ease-in-out infinite; }
.d2 { animation-delay: .6s; } .d3 { animation-delay: 1.2s; } .d4 { animation-delay: 1.8s; }
.d5 { animation-delay: 2.4s; } .d6 { animation-delay: 3s; } .d7 { animation-delay: 3.6s; } .d8 { animation-delay: 4.2s; }
@keyframes brillar { 0%, 100% { opacity: 0; transform: translateX(-30px); } 50% { opacity: 1; transform: translateX(60px); } }
.burb { animation: subir 7s ease-in infinite; }
.b2 { animation-delay: 1.5s; animation-duration: 8s; } .b3 { animation-delay: 3s; } .b4 { animation-delay: 4.5s; animation-duration: 9s; } .b5 { animation-delay: 2s; }
@keyframes subir { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .8; } 100% { transform: translateY(-560px); opacity: 0; } }

/* Fórmula 1 */
.l { animation: pasar 1.1s linear infinite; }
.l2 { animation-duration: .8s; animation-delay: -.3s; } .l3 { animation-duration: 1.4s; animation-delay: -.6s; }
.l4 { animation-duration: .9s; animation-delay: -.2s; } .l5 { animation-duration: 1.2s; animation-delay: -.9s; }
@keyframes pasar { from { transform: translateX(-380px); } to { transform: translateX(900px); } }
.bandas { animation: franja .45s linear infinite; }
@keyframes franja { to { transform: translateX(-80px); } }
.coche { animation: vibrar .18s ease-in-out infinite alternate; }
@keyframes vibrar { from { transform: translateY(0); } to { transform: translateY(2.5px); } }
.rueda { animation: girar .35s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.est { animation: estela .5s linear infinite; }
.e2 { animation-delay: -.15s; } .e3 { animation-delay: -.3s; }
@keyframes estela { from { opacity: 0; transform: translateX(30px); } 40% { opacity: 1; } to { opacity: 0; transform: translateX(-40px); } }

/* Texto */
.hero { align-items: start; }
.contenido { padding: clamp(4rem, 12vh, 7rem) 1rem 0; text-align: center; max-width: 52rem; }
.sello {
  display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 1.5rem;
  padding: .45rem 1rem; border: 1px solid rgb(255 255 255 / .35); border-radius: 999px;
  font-size: .8rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  background: rgb(6 17 27 / .5);
}
.sello span { width: .55rem; height: .55rem; border-radius: 50%; background: var(--rojo); animation: pulso 1.4s ease-in-out infinite; }
@keyframes pulso { 50% { opacity: .25; } }
h1 {
  margin: 0; font-size: clamp(1.6rem, 5vw, 2.6rem); font-weight: 500; line-height: 1.1; color: var(--suave);
  text-wrap: balance;
}
h1 em {
  display: block; margin-top: .4rem; font-style: normal; font-weight: 800; color: var(--tinta);
  font-size: clamp(2.6rem, 10vw, 6rem); line-height: .98; letter-spacing: -.02em;
  text-shadow: 0 2px 30px rgb(0 0 0 / .5);
}
.ir {
  display: inline-block; margin-top: 2rem; padding: .85rem 1.8rem; border-radius: .6rem;
  background: var(--tinta); color: var(--fondo); font-weight: 700; text-decoration: none;
  transition: transform 140ms ease, background-color 160ms ease;
}
.ir:hover { background: var(--agua); }
.ir:active { transform: scale(.97); }

/* Contacto */
.contacto { padding: clamp(3rem, 8vw, 6rem) 1rem; background: var(--fondo); }
.caja { max-width: 36rem; margin: 0 auto; }
.caja h2 { margin: 0; font-size: clamp(1.8rem, 5vw, 2.4rem); letter-spacing: -.01em; }
.intro { color: var(--suave); margin: .4rem 0 1.8rem; }
.campo { margin-bottom: 1.1rem; }
.campo label { display: block; margin-bottom: .35rem; font-weight: 600; font-size: .95rem; }
input, textarea {
  width: 100%; min-height: 48px; padding: .7rem .85rem; border: 1.5px solid var(--linea); border-radius: .55rem;
  background: #0b1c2a; color: var(--tinta); font: inherit; transition: border-color 160ms ease;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus-visible, textarea:focus-visible { outline: 3px solid rgb(93 224 255 / .35); border-color: var(--agua); }
[aria-invalid="true"] { border-color: #ff6b6b; }
.err { margin: .3rem 0 0; color: #ff8f8f; font-size: .875rem; font-weight: 600; }
.err:empty { display: none; }
button {
  min-height: 50px; padding: .75rem 2rem; border: 0; border-radius: .6rem; background: var(--agua); color: #04202c;
  font: inherit; font-weight: 800; cursor: pointer; transition: transform 120ms ease, opacity 160ms ease;
}
button:active { transform: scale(.97); }
button[disabled] { opacity: .65; cursor: progress; }
.nota { color: var(--suave); font-size: .85rem; margin: .9rem 0 0; }
.aviso { padding: .85rem 1rem; border-radius: .55rem; font-weight: 600; }
.aviso-ok { background: rgb(60 220 140 / .14); color: #8cf0be; }
.aviso-mal { background: rgb(255 107 107 / .14); color: #ff9a9a; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
footer { padding: 1.5rem 1rem 2.5rem; text-align: center; color: var(--suave); font-size: .85rem; border-top: 1px solid var(--linea); }
footer p { margin: 0; }
[hidden] { display: none !important; }

/* Celular: agua arriba, pista abajo */
@media (max-width: 700px) {
  .pista { clip-path: polygon(0 60%, 100% 50%, 100% 100%, 0 100%); }
  .scene .auto { right: 2vw; width: 98vw; bottom: 6vh; }
  .velo { background: radial-gradient(ellipse 90% 50% at 50% 42%, rgb(6 17 27 / .85), rgb(6 17 27 / .3) 75%, transparent), linear-gradient(to bottom, transparent 94%, var(--fondo)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
