/* ===== Academia Kepler · estilo "Nueva era" ===== */
:root {
  --navy-900: #050d22;
  --navy-800: #0b1e40;
  --navy-700: #12305e;
  --green: #22a37e;
  --neon: #2ef2c0;
  --cyan: #38d9f5;
  --white: #f4f8ff;
  --muted: #a9b8d6;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(46, 242, 192, 0.22);
  --radius: 24px;
  --maxw: 1180px;
  --font: "Lexend", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  font-family: var(--font);
  color: var(--white);
  background: radial-gradient(1200px 800px at 80% -10%, #16346b 0%, transparent 60%),
              radial-gradient(900px 700px at -10% 30%, #0f2a55 0%, transparent 60%),
              var(--navy-900);
  line-height: 1.6;
  overflow-x: hidden;
}
html, body { overflow-x: clip; } /* evita desplazamiento lateral en celulares */
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; }
.glow { position: fixed; border-radius: 50%; filter: blur(110px); opacity: .35; z-index: -1; pointer-events: none; }
.glow-1 { width: 520px; height: 520px; background: var(--green); top: 10%; right: -160px; animation: drift 18s ease-in-out infinite; }
.glow-2 { width: 420px; height: 420px; background: #2b5bd7; bottom: 5%; left: -140px; animation: drift 22s ease-in-out infinite reverse; }
@keyframes drift { 50% { transform: translate(-60px, 80px) scale(1.15); } }

.grad {
  background: linear-gradient(100deg, var(--neon), var(--cyan) 50%, var(--green));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ===== Botones ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.6em; border-radius: 999px; font-weight: 600; border: 0;
  transition: transform .25s, box-shadow .25s, background .25s;
}
.btn-primary {
  background: linear-gradient(120deg, var(--green), var(--neon));
  color: #032a22; box-shadow: 0 10px 30px -8px rgba(46, 242, 192, .55);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -8px rgba(46, 242, 192, .75); }
.btn-ghost { border: 1.5px solid rgba(255,255,255,.25); background: rgba(255,255,255,.04); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--neon); transform: translateY(-3px); }
.btn-lg { font-size: 1.05rem; padding: 1em 1.9em; }
.btn-sm { font-size: .9rem; padding: .6em 1.2em; }
.btn-block { width: 100%; }

/* ===== Nav ===== */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  width: min(var(--maxw), calc(100% - 24px)); z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 10px 18px; border-radius: 999px;
  background: rgba(8, 20, 46, .55); border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: background .3s, box-shadow .3s;
}
.nav.scrolled { background: rgba(8, 20, 46, .85); box-shadow: 0 10px 40px -10px rgba(0,0,0,.6); }
.nav-logo img { height: 42px; width: auto; background: #fff; border-radius: 12px; padding: 4px 8px; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: .95rem; }
.nav-links a:not(.btn) { color: var(--muted); position: relative; transition: color .2s; }
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px;
  background: var(--neon); transition: width .25s;
}
.nav-links a:not(.btn):hover { color: var(--white); }
.nav-links a:not(.btn):hover::after { width: 100%; }
.nav-toggle { display: none; background: none; border: 0; width: 42px; height: 42px; position: relative; }
.nav-toggle span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--white); border-radius: 2px; transition: .3s; }
.nav-toggle span:nth-child(1) { top: 14px; } .nav-toggle span:nth-child(2) { top: 20px; } .nav-toggle span:nth-child(3) { top: 26px; }
.nav-toggle.open span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  min-height: 100vh; max-width: var(--maxw); margin: 0 auto; padding: 130px 24px 80px;
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 30px; position: relative;
}
.pill {
  display: inline-flex; align-items: center; gap: 10px; font-size: .85rem; font-weight: 500;
  padding: 8px 16px; border-radius: 999px; background: rgba(46,242,192,.1); border: 1px solid var(--glass-border); color: var(--neon);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 0 0 rgba(46,242,192,.7); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(46,242,192,0); } 100% { box-shadow: 0 0 0 0 rgba(46,242,192,0); } }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.2rem); line-height: 1.02; font-weight: 800; letter-spacing: -.03em; margin: 22px 0 18px; }
.hero h1 .plane { display: inline-block; color: var(--neon); font-size: .6em; transform: rotate(-20deg); animation: fly 3.5s ease-in-out infinite; }
@keyframes fly { 50% { transform: translate(14px, -14px) rotate(-10deg); } }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 520px; font-weight: 300; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 38px; }
.hero-meta { display: flex; gap: 26px; flex-wrap: wrap; }
.hero-meta div { white-space: nowrap; }
.hero-meta div { display: flex; align-items: center; gap: 12px; }
.hero-meta strong { font-size: 2.1rem; font-weight: 800; color: var(--neon); line-height: 1; }
.hero-meta span { font-size: .8rem; color: var(--muted); line-height: 1.3; }

.hero-art { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.hero-robot {
  width: 86%; position: relative; z-index: 2;
  filter: drop-shadow(0 30px 50px rgba(46,242,192,.35));
  animation: float 6s ease-in-out infinite; transition: transform .2s ease-out;
}
@keyframes float { 50% { translate: 0 -22px; } }
.orbit { position: absolute; border-radius: 50%; border: 1.5px solid rgba(46,242,192,.25); animation: spin linear infinite; }
.orbit-1 { inset: 4%; animation-duration: 26s; transform: rotateX(70deg); }
.orbit-2 { inset: 14%; animation-duration: 18s; border-color: rgba(56,217,245,.25); animation-direction: reverse; }
.orbit-3 { inset: -4%; animation-duration: 40s; border-style: dashed; border-color: rgba(255,255,255,.12); }
@keyframes spin { to { rotate: 360deg; } }
.planet { position: absolute; border-radius: 50%; top: -10px; left: 50%; }
.p1 { width: 20px; height: 20px; background: radial-gradient(circle at 30% 30%, #9ff, var(--green)); box-shadow: 0 0 20px var(--neon); }
.p2 { width: 14px; height: 14px; background: radial-gradient(circle at 30% 30%, #fff, #2b5bd7); box-shadow: 0 0 16px #5b8cff; }
.p3 { width: 26px; height: 26px; background: radial-gradient(circle at 30% 30%, #5b7bb8, var(--navy-700)); box-shadow: 0 0 20px rgba(91,123,184,.6); }
.scroll-hint { position: absolute; bottom: 26px; left: 50%; translate: -50% 0; width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.3); border-radius: 20px; }
.scroll-hint span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; background: var(--neon); border-radius: 2px; animation: wheel 1.8s infinite; }
@keyframes wheel { to { transform: translateY(14px); opacity: 0; } }

/* ===== Marquee ===== */
.marquee { overflow: hidden; border-block: 1px solid rgba(255,255,255,.08); background: rgba(46,242,192,.05); padding: 18px 0; transform: rotate(-1.5deg); margin: 20px -20px 40px; }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 38s linear infinite; font-weight: 600; font-size: 1.15rem; white-space: nowrap; }
.marquee-track span { color: var(--white); opacity: .85; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ===== Secciones ===== */
.section { max-width: var(--maxw); margin: 0 auto; padding: 90px 24px; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 54px; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--neon); margin-bottom: 12px; }
h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; }
.section-head p { color: var(--muted); margin-top: 14px; font-size: 1.08rem; font-weight: 300; }
.glass { background: var(--glass); border: 1px solid rgba(255,255,255,.09); border-radius: var(--radius); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

/* ===== Programas ===== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card {
  position: relative; padding: 26px 26px 30px; border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255,255,255,.09), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.09); overflow: hidden;
  transition: transform .2s ease-out, border-color .3s, box-shadow .3s; transform-style: preserve-3d;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(46,242,192,.18), transparent 45%);
  opacity: 0; transition: opacity .3s;
}
.card:hover { border-color: var(--glass-border); box-shadow: 0 30px 60px -20px rgba(46,242,192,.3); }
.card:hover::before { opacity: 1; }
.card-art { height: 230px; display: grid; place-items: center; margin-bottom: 8px; background: radial-gradient(circle at 50% 60%, rgba(46,242,192,.2), transparent 65%); }
.card-art img { max-height: 225px; width: auto; filter: drop-shadow(0 18px 24px rgba(0,0,0,.45)); transition: transform .4s; }
.card:hover .card-art img { transform: translateY(-8px) scale(1.04); }
.tag { display: inline-block; font-size: .78rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: rgba(46,242,192,.12); color: var(--neon); }
.card h3 { font-size: 1.7rem; font-weight: 800; margin: 12px 0 8px; }
.card p { color: var(--muted); font-size: .97rem; font-weight: 300; }
.checks { list-style: none; margin: 16px 0 20px; display: grid; gap: 8px; font-size: .92rem; }
.checks li { padding-left: 28px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 800; background: var(--green); color: #032a22; }
.card-link { font-weight: 600; color: var(--neon); }
.card-link:hover { text-decoration: underline; }

/* ===== Ciclo ===== */
.ciclo { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; padding: 48px; position: relative; overflow: hidden; }
.ciclo::after { content: ""; position: absolute; width: 380px; height: 380px; right: -120px; top: -140px; border-radius: 50%; border: 1px dashed rgba(46,242,192,.25); }
.ciclo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 30px; }
.ci { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 18px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); }
.ci > span { font-size: 1.6rem; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: rgba(46,242,192,.1); flex-shrink: 0; }
.ci small { display: block; color: var(--muted); font-size: .78rem; }
.ci strong { font-size: .98rem; font-weight: 600; line-height: 1.3; }
.countdown { padding: 30px; border-radius: 20px; background: linear-gradient(160deg, rgba(34,163,126,.25), rgba(18,48,94,.4)); border: 1px solid var(--glass-border); align-self: center; text-align: center; }
.cd-title { color: var(--neon); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: .82rem; }
.cd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0 24px; }
.cd-grid div { background: rgba(5,13,34,.55); border-radius: 14px; padding: 14px 4px; }
.cd-grid strong { display: block; font-size: 2.2rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.cd-grid span { font-size: .72rem; color: var(--muted); }
.cd-note { color: var(--muted); font-size: .82rem; margin-top: 12px; }

/* ===== Beneficios ===== */
.benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.benefit { padding: 22px 22px 28px; text-align: center; transition: transform .3s, border-color .3s; }
.benefit:hover { transform: translateY(-8px); border-color: var(--glass-border); }
.benefit img { width: 82%; margin: 0 auto 6px; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 14px 20px rgba(0,0,0,.45)); transition: transform .4s; }
.benefit:hover img { transform: scale(1.06) rotate(-2deg); }
.benefit h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.benefit p { color: var(--muted); font-size: .9rem; font-weight: 300; }

/* ===== Galería ===== */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; grid-auto-flow: dense; gap: 16px; }
.gallery figure { position: relative; overflow: hidden; border-radius: 20px; border: 1px solid rgba(255,255,255,.08); cursor: zoom-in; }
.gallery figure.wide { grid-column: span 2; }
.gallery figure.tall { grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.gallery figure:hover img { transform: scale(1.08); }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 16px 12px; font-size: .88rem; font-weight: 600; background: linear-gradient(transparent, rgba(5,13,34,.9)); }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(3,8,22,.92); display: none; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox.open { display: grid; }
.lightbox img { max-height: 88vh; border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }

/* ===== Reto ===== */
.reto { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: center; padding: 40px 48px; overflow: hidden; }
.reto-robot { width: 100%; animation: float 5s ease-in-out infinite; filter: drop-shadow(0 20px 30px rgba(46,242,192,.3)); }
.reto-q { font-size: 1.25rem; margin: 16px 0 22px; font-weight: 400; }
.reto-opts { display: flex; gap: 12px; flex-wrap: wrap; }
.reto-opts button {
  padding: 14px 28px; border-radius: 16px; font-weight: 700; font-size: 1.1rem; color: var(--white);
  background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.15); transition: .25s;
}
.reto-opts button:hover:not(:disabled) { border-color: var(--neon); transform: translateY(-3px); }
.reto-opts button.ok { background: var(--green); border-color: var(--neon); color: #032a22; }
.reto-opts button.bad { background: rgba(255,80,110,.18); border-color: #ff5a78; animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.reto-msg { margin-top: 18px; min-height: 1.6em; color: var(--muted); }
.reto-msg strong { color: var(--neon); }

/* ===== Ubicación ===== */
.map-wrap { display: grid; grid-template-columns: 1fr 360px; overflow: hidden; padding: 0; }
.map-wrap iframe { width: 100%; height: 100%; min-height: 420px; border: 0; filter: invert(.9) hue-rotate(180deg) saturate(.8) contrast(.9); }
.map-card { padding: 30px; display: flex; flex-direction: column; justify-content: center; gap: 10px; text-align: center; background: linear-gradient(160deg, rgba(34,163,126,.18), rgba(18,48,94,.3)); }
.map-card img { width: 85%; margin: 0 auto; filter: drop-shadow(0 16px 24px rgba(0,0,0,.45)); }
.map-card h3 { font-size: 1.4rem; }
.map-card p { color: var(--muted); }
.map-card .btn { align-self: center; margin-top: 8px; }

/* ===== Contacto ===== */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 48px; position: relative; overflow: hidden; align-items: center; }
.contact-art { width: 230px; margin-bottom: 8px; filter: drop-shadow(0 16px 24px rgba(0,0,0,.45)); animation: float 6s ease-in-out infinite; }
.contact-text p { color: var(--muted); margin: 14px 0 26px; font-weight: 300; }
.contact-list { list-style: none; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 16px; align-items: center; padding: 16px 18px; border-radius: 18px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); }
.contact-list li > span { font-size: 1.4rem; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: rgba(46,242,192,.1); flex-shrink: 0; }
.contact-list small { display: block; color: var(--muted); font-size: .76rem; }
.contact-list a { color: var(--white); font-weight: 500; }
.contact-list a:hover { color: var(--neon); }

/* ===== Footer ===== */
.footer { text-align: center; padding: 50px 24px 60px; border-top: 1px solid rgba(255,255,255,.06); margin-top: 40px; }
.footer img { height: 70px; width: auto; margin: 0 auto 14px; background: #fff; border-radius: 14px; padding: 6px 12px; }
.footer p { color: var(--muted); }
.footer .small { font-size: .8rem; margin-top: 6px; opacity: .7; }

/* ===== WhatsApp flotante ===== */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 62px; height: 62px; border-radius: 50%;
  display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 12px 30px rgba(37,211,102,.45);
  animation: pulse-wa 2.4s infinite;
}
.wa-float svg { width: 34px; height: 34px; }
@keyframes pulse-wa { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,.55); } 70% { box-shadow: 0 0 0 16px rgba(37,211,102,0); } 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); } }

/* ===== Animaciones de aparición ===== */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .8s ease; transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 120px; }
  .hero-art { max-width: 460px; margin: 0 auto; order: -1; }
  .lead { margin: 0 auto; }
  .hero-cta, .hero-meta { justify-content: center; }
  .cards { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .ciclo, .contact { grid-template-columns: 1fr; padding: 32px 24px; }
  .benefits { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .reto { grid-template-columns: 1fr; text-align: center; padding: 32px 24px; }
  .reto-robot { width: 200px; margin: 0 auto; }
  .reto-opts { justify-content: center; }
  .map-wrap { grid-template-columns: 1fr; }
  .map-wrap iframe { min-height: 320px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: calc(100% + 10px); left: 0; right: 0; flex-direction: column; gap: 18px;
    padding: 26px; border-radius: 24px; background: rgba(8,20,46,.96); border: 1px solid rgba(255,255,255,.08);
    opacity: 0; pointer-events: none; transform: translateY(-10px); transition: .3s;
  }
  .nav-links.open { opacity: 1; pointer-events: auto; transform: none; }
}
@media (max-width: 560px) {
  .section { padding: 70px 16px; }
  .hero { padding-inline: 16px; }
  .hero-meta { gap: 20px; }
  .ciclo-grid { grid-template-columns: 1fr; }
  .benefits { grid-template-columns: 1fr 1fr; gap: 12px; }
  .benefit { padding: 14px 12px 18px; }
  .benefit h3 { font-size: .95rem; }
  .benefit p { font-size: .8rem; }
  .cd-grid strong { font-size: 1.7rem; }
  .gallery figure.wide { grid-column: span 2; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
