/* ============================================================
   vibecoding.cat — Landing
   Paleta inspirada en el Instagram: fondo casi negro, neón
   púrpura → cian, acentos magenta. Tipografía Sora + JetBrains Mono.
   ============================================================ */

:root {
  --bg:        #05060d;
  --bg-soft:   #0a0b18;
  --panel:     #10122a;
  --panel-2:   #141733;
  --border:    rgba(150, 120, 255, 0.16);
  --border-hi: rgba(168, 130, 255, 0.45);

  --text:      #eef0ff;
  --muted:     #9aa0c4;

  --purple:    #a855f7;
  --violet:    #7c3aed;
  --cyan:      #22d3ee;
  --blue:      #3b82f6;
  --magenta:   #d946ef;
  --red:       #f43f5e;
  --green:     #22c55e;

  --grad:      linear-gradient(100deg, #a855f7 0%, #6366f1 45%, #22d3ee 100%);
  --grad-soft: linear-gradient(135deg, rgba(168,85,247,.18), rgba(34,211,238,.12));
  --glow:      0 0 40px rgba(168, 85, 247, 0.35);

  --radius:    18px;
  --maxw:      1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: 'Sora', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3 { line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: break-word; }
a { color: inherit; text-decoration: none; }

/* ---------- Fondo decorativo ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(124, 92, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 92, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
}
.bg-glow {
  position: fixed; z-index: -1; border-radius: 50%;
  filter: blur(120px); opacity: 0.5; pointer-events: none;
}
.glow-1 { width: 540px; height: 540px; top: -180px; left: -120px;
  background: radial-gradient(circle, #7c3aed, transparent 70%); animation: float 14s ease-in-out infinite; }
.glow-2 { width: 480px; height: 480px; top: 30%; right: -140px;
  background: radial-gradient(circle, #22d3ee, transparent 70%); animation: float 18s ease-in-out infinite reverse; }

@keyframes float {
  0%,100% { transform: translateY(0) translateX(0); }
  50%     { transform: translateY(40px) translateX(20px); }
}

/* ---------- Utilidades ---------- */
.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.grad-red {
  background: linear-gradient(100deg, #f43f5e, #fb923c);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: inherit; font-weight: 700; font-size: .98rem;
  padding: .85rem 1.5rem; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .2s ease, box-shadow .25s ease, filter .2s ease;
  white-space: nowrap;
}
.btn-sm { padding: .55rem 1.1rem; font-size: .9rem; }
.btn-block { width: 100%; justify-content: center; padding: 1rem; font-size: 1.05rem; }
.btn-primary {
  background: var(--grad); color: #fff;
  /* IDÉNTICO al CTA flotante "Matricúlate": una sola sombra púrpura + anillo
     interior de 1px, y SIN border (el flotante no lo tiene) para que el borde
     redondeado salga igual de limpio. */
  border: none;
  box-shadow:
    0 12px 34px -8px rgba(124, 58, 237, .6),
    inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.btn-primary:hover {
  transform: translateY(-2px); filter: brightness(1.08);
}
.btn-ghost {
  background: rgba(255,255,255,.03); color: var(--text); border-color: var(--border-hi);
}
.btn-ghost:hover { transform: translateY(-2px); background: rgba(168,85,247,.12); }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: var(--maxw); margin: 0 auto; padding: 1rem 1.5rem;
  backdrop-filter: blur(14px);
}
.navbar::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(5, 6, 13, 0.6); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.15rem; }
.brand-icon {
  width: 34px; height: 34px; flex: none; display: block;
  filter: drop-shadow(0 4px 12px rgba(124, 58, 237, .45));
  transition: transform .25s ease;
}
.brand:hover .brand-icon { transform: rotate(-4deg) scale(1.05); }
.brand-name .dot { color: var(--purple); }
.nav-links { display: flex; gap: 1.6rem; font-size: .95rem; color: var(--muted); }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto; padding: 5rem 1.5rem 3rem;
  text-align: center;
}
.hero-inner { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.badge {
  font-size: .85rem; color: var(--text);
  padding: .45rem 1rem; border-radius: 999px;
  border: 1px solid var(--border-hi); background: var(--grad-soft);
}
.hero-title { font-size: clamp(2rem, 8.5vw, 5.2rem); font-weight: 800; }
.hero-title .line { display: block; }
.hero-sub { max-width: 620px; color: var(--muted); font-size: 1.15rem; }
.hero-sub strong { color: var(--text); }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

/* Wordmark neón estilo Instagram */
.neon-wordmark {
  margin-top: 2rem; display: flex; flex-direction: column; line-height: .92;
  font-family: 'Sora', sans-serif; font-weight: 800;
  font-size: clamp(3rem, 11vw, 8rem); letter-spacing: .04em;
  color: #fff;
  text-shadow:
    0 0 8px #fff,
    0 0 22px var(--purple),
    0 0 48px var(--violet),
    0 0 80px var(--magenta);
  animation: flicker 5s infinite;
}
@keyframes flicker {
  0%, 92%, 100% { opacity: 1; }
  93%   { opacity: .72; }
  95%   { opacity: 1; }
  96%   { opacity: .85; }
}

/* ---------- Secciones ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 5rem 1.5rem; }
.section-dark {
  max-width: none; margin-top: 3rem;
  background:
    radial-gradient(ellipse 60% 100% at 50% 0%, rgba(124,58,237,.16), transparent 70%),
    var(--bg-soft);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.section-dark > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 3rem; }
.eyebrow {
  font-family: 'JetBrains Mono', monospace; font-size: .85rem;
  color: var(--cyan); letter-spacing: .05em;
}
.section-head h2 { font-size: clamp(1.7rem, 5.2vw, 3rem); margin: .6rem 0 1rem; }
.section-head p { color: var(--muted); font-size: 1.1rem; }

/* ---------- Cards (¿Qué es?) ---------- */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card, .ventaja, .step, .compare-card, .faq, .stat, .cta-box {
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--border); border-radius: var(--radius);
}
.card { padding: 2rem 1.6rem; transition: transform .25s, border-color .25s, box-shadow .25s; }
.card:hover, .ventaja:hover { transform: translateY(-6px); border-color: var(--border-hi); box-shadow: 0 18px 50px rgba(124,58,237,.25); }
.card-icon {
  width: 56px; height: 56px; display: grid; place-items: center;
  font-size: 1.4rem; font-family: 'JetBrains Mono', monospace;
  border-radius: 14px; margin-bottom: 1.1rem;
  background: var(--grad-soft); border: 1px solid var(--border-hi);
  box-shadow: inset 0 0 22px rgba(168,85,247,.18);
}
.card h3, .ventaja h3, .step h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.card p, .ventaja p, .step p { color: var(--muted); }

/* ---------- Problema / Solución ---------- */
.compare {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.5rem; align-items: center;
}
.compare-card { padding: 2rem; position: relative; }
.compare-card.problema { border-color: rgba(244,63,94,.3); }
.compare-card.solucion { border-color: rgba(34,197,94,.35); box-shadow: 0 0 50px rgba(34,197,94,.12); }
.compare-tag {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .05em;
  padding: .3rem .8rem; border-radius: 999px; margin-bottom: 1rem;
}
.tag-red   { background: rgba(244,63,94,.15); color: #fda4af; }
.tag-green { background: rgba(34,197,94,.15); color: #86efac; }
.compare-quote { font-size: 1.2rem; font-weight: 600; margin-bottom: 1.2rem; }
.compare-list { list-style: none; display: flex; flex-direction: column; gap: .6rem; color: var(--muted); }
.compare-arrow { font-size: 2rem; color: var(--purple); text-align: center; }

/* ---------- Cómo funciona (pasos) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.step { padding: 1.8rem 1.4rem; position: relative; overflow: hidden; }
.step::after {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  background: var(--grad); opacity: .8;
}
.step-num {
  width: 46px; height: 46px; display: grid; place-items: center;
  font-weight: 800; font-size: 1.2rem; border-radius: 12px; margin-bottom: 1rem;
  background: var(--grad); color: #fff; box-shadow: var(--glow);
}
.steps-tagline { text-align: center; margin-top: 2.5rem; color: var(--muted); font-size: 1.15rem; }
.steps-tagline strong { color: var(--text); }

/* ---------- Stats + Ventajas ---------- */
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; margin-bottom: 3rem; }
.stat { padding: 2rem 1.5rem; text-align: center; }
.stat-value { display: block; font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; }
.stat-text { color: var(--muted); font-size: .98rem; }
.ventajas { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.ventaja { padding: 2rem 1.6rem; transition: transform .25s, border-color .25s, box-shadow .25s; }

/* ---------- FAQ ---------- */
.faqs { display: flex; flex-direction: column; gap: 1rem; max-width: 760px; margin: 0 auto; }
.faq { padding: 0 1.5rem; transition: border-color .25s; }
.faq[open] { border-color: var(--border-hi); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.25rem 0;
  font-weight: 600; font-size: 1.08rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq-icon { font-size: 1.5rem; color: var(--purple); transition: transform .25s; line-height: 1; }
.faq[open] .faq-icon { transform: rotate(45deg); }
.faq p { color: var(--muted); padding-bottom: 1.25rem; }

/* ---------- CTA / Formulario ---------- */
.section-cta { padding-top: 2rem; }
.cta-box {
  max-width: 640px; margin: 0 auto; padding: 3rem 2.4rem; text-align: center;
  background:
    radial-gradient(ellipse 80% 100% at 50% 0%, rgba(168,85,247,.2), transparent 70%),
    linear-gradient(180deg, var(--panel-2), var(--bg-soft));
  border: 1px solid var(--border-hi); box-shadow: 0 0 70px rgba(124,58,237,.25);
}
.cta-box h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: .8rem; }
.cta-box > p { color: var(--muted); margin-bottom: 1.8rem; }
.form { display: flex; flex-direction: column; gap: 1rem; text-align: left; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form input, .form textarea {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--text);
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: 12px; padding: .9rem 1rem; transition: border-color .2s, box-shadow .2s;
  resize: vertical;
}
.form input::placeholder, .form textarea::placeholder { color: #6b7099; }
.form input:focus, .form textarea:focus {
  outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(168,85,247,.18);
}
.form-note { text-align: center; color: var(--muted); font-size: .85rem; margin-top: -.2rem; }

.flash { padding: .9rem 1.1rem; border-radius: 12px; margin-bottom: 1.2rem; font-weight: 600; }
.flash-ok    { background: rgba(34,197,94,.14); color: #86efac; border: 1px solid rgba(34,197,94,.4); }
.flash-error { background: rgba(244,63,94,.14); color: #fda4af; border: 1px solid rgba(244,63,94,.4); }

/* ---------- Footer ---------- */
.footer {
  text-align: center; padding: 3.5rem 1.5rem 2.5rem; margin-top: 3rem;
  border-top: 1px solid var(--border); background: var(--bg-soft);
  display: flex; flex-direction: column; align-items: center; gap: .8rem;
}
.footer-brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.2rem; }
.footer-tag { color: var(--muted); }
.footer-social { display: flex; gap: 1.5rem; margin-top: .3rem; }
.footer-social a { color: var(--purple); font-weight: 600; transition: color .2s; }
.footer-social a:hover { color: var(--cyan); }
.footer-copy { color: #5d628a; font-size: .85rem; margin-top: .5rem; }

/* ---------- Animación reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cards-3, .steps, .stats, .ventajas { grid-template-columns: 1fr 1fr; }
  .compare { grid-template-columns: 1fr; }
  .compare-arrow { transform: rotate(90deg); }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .cards-3, .steps, .stats, .ventajas, .form-row { grid-template-columns: 1fr; }
  .navbar { padding: .85rem 1.1rem; }
  .brand { font-size: 1.05rem; }
  .hero { padding: 3rem 1.2rem 2.5rem; }
  .section { padding: 3.5rem 1.2rem; }
  .cta-box { padding: 2.2rem 1.4rem; }
}

@media (max-width: 400px) {
  .navbar { padding: .75rem .9rem; gap: .5rem; }
  .brand-name { font-size: .98rem; }
  .btn-sm { padding: .5rem .85rem; font-size: .82rem; }
  .hero-cta .btn, .hero-cta { width: 100%; justify-content: center; }
  .neon-wordmark { font-size: clamp(2.4rem, 13vw, 5rem); }
  .compare-quote { font-size: 1.08rem; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .bg-glow, .neon-wordmark { animation: none; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   PREMIUM UPGRADE — glassmorphism, profundidad 3D, glow y micro-interacciones.
   Se aplica SOBRE la base (mismas clases → estas reglas ganan por orden).
   Mantiene el branding: violeta→cian, Sora + JetBrains Mono, tema oscuro.
   ========================================================================== */

:root {
  --glass:        rgba(255, 255, 255, 0.045);
  --glass-2:      rgba(255, 255, 255, 0.018);
  --glass-border: rgba(255, 255, 255, 0.09);
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-lg:    0 30px 80px -24px rgba(3, 4, 10, 0.85);
}

/* --- Grano sutil sobre todo el fondo (textura, quita el plano digital) --- */
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: .04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- Tercer blob de luz ambiental --- */
.glow-3 {
  width: 440px; height: 440px; bottom: -180px; left: 34%;
  background: radial-gradient(circle, #6366f1, transparent 70%);
  animation: float 22s ease-in-out infinite;
}

/* --- Glassmorphism en superficies --- */
.card, .ventaja, .step, .stat {
  background: linear-gradient(180deg, var(--glass), var(--glass-2));
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--glass-border);
  position: relative; isolation: isolate;
}
/* Borde de luz superior (reflejo) en las tarjetas */
.card::before, .ventaja::before, .step::before, .stat::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  padding: 1px; pointer-events: none; z-index: -1;
  background: linear-gradient(180deg, rgba(255,255,255,.16), transparent 42%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

/* --- Tilt 3D + spotlight que sigue el cursor (JS pone --mx/--my/--rx/--ry) --- */
[data-tilt] {
  transform: perspective(900px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg));
  transform-style: preserve-3d; will-change: transform;
  transition: transform .5s var(--ease-out), border-color .3s, box-shadow .3s;
}
[data-tilt]::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%),
              rgba(168,85,247,.20), transparent 46%);
  opacity: 0; transition: opacity .35s;
}
[data-tilt]:hover { border-color: var(--border-hi);
  box-shadow: 0 26px 60px -26px rgba(124,58,237,.55); }
[data-tilt]:hover::after { opacity: 1; }
[data-tilt] .card-icon, [data-tilt] .step-num { transform: translateZ(30px); }

/* --- Botón primario: micro-escala al pulsar. SIN overflow ni barrido de
   brillo: el overflow:hidden clipaba el degradado en las esquinas redondeadas
   y ensuciaba el borde. Así se renderiza tan limpio como el CTA flotante. --- */
.btn:active { transform: scale(.97); }

/* --- Navbar: estado al hacer scroll --- */
.navbar.scrolled::before {
  background: rgba(5,6,13,.85); box-shadow: 0 10px 34px -12px rgba(0,0,0,.65);
}

/* --- HERO: centrado, con las letras neon 3D como protagonista --- */
.hero { padding-top: 3.5rem; }
.hero-inner { text-align: center; }

/* Letras neon "VIBE CODING" con inclinación 3D (parallax con el ratón) */
.neon-stage { perspective: 900px; width: 100%; display: flex; justify-content: center; margin-top: 2rem; }
.neon-wordmark {
  transform-style: preserve-3d; will-change: transform;
  transition: transform .35s var(--ease-out); margin-top: 0;
}
.neon-wordmark span { display: block; }

/* --- Consola / editor de código (ahora en su propia sección #demo) --- */
.demo-stage { position: relative; perspective: 1200px; display: flex; justify-content: center; max-width: 560px; margin: 0 auto; }
.code-window {
  width: 100%; max-width: 460px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, rgba(20,23,51,.92), rgba(9,10,22,.94));
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg), 0 0 70px -12px rgba(124,58,237,.45);
  transform: rotateY(-11deg) rotateX(6deg);
  transform-style: preserve-3d; transition: transform .6s var(--ease-out); will-change: transform;
}
.demo-stage:hover .code-window { transform: rotateY(-3deg) rotateX(2deg); }
.code-bar {
  display: flex; align-items: center; gap: .5rem; padding: .8rem 1rem;
  border-bottom: 1px solid var(--glass-border); background: rgba(255,255,255,.03);
}
.code-dot { width: 12px; height: 12px; border-radius: 50%; }
.code-dot.r { background: #ff5f57; } .code-dot.y { background: #febc2e; } .code-dot.g { background: #28c840; }
.code-file { margin-left: .5rem; font-family: 'JetBrains Mono', monospace; font-size: .78rem; color: var(--muted); }
.code-body { padding: 1.2rem 1.3rem; font-family: 'JetBrains Mono', monospace; font-size: .84rem; line-height: 1.85; }
.code-line {
  opacity: 0; transform: translateY(8px);
  white-space: pre-wrap; word-break: break-word;
}
.demo-stage.in .code-line { animation: codeIn .55s var(--ease-out) forwards; }
.code-line:nth-child(1){animation-delay:.25s}
.code-line:nth-child(2){animation-delay:.55s}
.code-line:nth-child(3){animation-delay:.85s}
.code-line:nth-child(4){animation-delay:1.05s}
.code-line:nth-child(5){animation-delay:1.25s}
.code-line:nth-child(6){animation-delay:1.45s}
.code-line:nth-child(7){animation-delay:1.65s}
.c-com { color: #6b7099; } .c-key { color: var(--purple); } .c-str { color: var(--cyan); }
.c-fn { color: #f0abfc; } .c-prompt { color: #86efac; font-weight: 700; }
.code-cursor {
  display: inline-block; width: 8px; height: 1.05em; background: var(--cyan);
  vertical-align: -3px; margin-left: 2px; animation: blink 1.1s steps(1) infinite;
}
@keyframes codeIn { to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }

/* Chips flotantes de cristal alrededor del editor */
.hero-chip {
  position: absolute; z-index: 2; padding: .5rem .85rem; border-radius: 12px;
  font-size: .82rem; font-weight: 600; white-space: nowrap;
  background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border); box-shadow: 0 12px 34px -12px rgba(0,0,0,.7);
  animation: floatChip 6s ease-in-out infinite;
}
.hero-chip.c1 { top: -8%; left: -2%; }
.hero-chip.c2 { bottom: -6%; right: -2%; animation-delay: 2.4s; }
@keyframes floatChip { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-13px); } }

/* Reveal escalonado: JS asigna --d como retardo */
.reveal { transition-delay: var(--d, 0s); }

/* --- Responsive de la consola y las letras neon --- */
@media (max-width: 640px) {
  .demo-stage { max-width: 440px; }
  .code-window { transform: none; max-width: 100%; }
  .hero-chip.c1 { top: -6%; left: 0; }
  .hero-chip.c2 { bottom: -2%; right: 0; }
  .neon-wordmark { transform: none !important; }
}
@media (max-width: 460px) {
  .hero-chip { display: none; }
  [data-tilt] { transform: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .glow-3 { animation: none; }
  .code-line { opacity: 1; transform: none; animation: none; }
  .code-cursor, .hero-chip { animation: none; }
  .code-window { transform: none; }
  [data-tilt] { transition: none; }
}

/* ==========================================================================
   DETALLES GLOBALES — presentes durante TODA la navegación de la landing.
   ========================================================================== */

/* Luz que sigue al cursor por toda la página (solo desktop con puntero) */
.cursor-glow {
  position: fixed; top: 0; left: 0; z-index: -1; pointer-events: none;
  width: 620px; height: 620px; border-radius: 50%;
  transform: translate(-50%, -50%); will-change: transform;
  background: radial-gradient(circle, rgba(168,85,247,.16), rgba(34,211,238,.06) 45%, transparent 68%);
  filter: blur(30px); opacity: 0; transition: opacity .6s ease, transform .12s ease-out;
}
.cursor-glow.on { opacity: 1; }

/* Barra de progreso de scroll (fija arriba del todo) */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 100;
  background: var(--grad); box-shadow: 0 0 12px rgba(124,58,237,.6);
  transition: width .1s linear;
}

/* Navbar scroll-spy: subrayado degradado en el enlace activo */
.nav-links a { position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 0;
  background: var(--grad); border-radius: 2px; transition: width .3s var(--ease-out);
}
.nav-links a.active { color: var(--text); }
.nav-links a.active::after, .nav-links a:hover::after { width: 100%; }

/* CTA flotante persistente (aparece tras el hero) */
.sticky-cta {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 90;
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .8rem 1.3rem; border-radius: 999px; font-weight: 700; color: #fff;
  background: var(--grad);
  box-shadow: 0 12px 34px -8px rgba(124,58,237,.6), inset 0 0 0 1px rgba(255,255,255,.1);
  opacity: 0; transform: translateY(22px) scale(.9); pointer-events: none;
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-out), filter .2s;
}
.sticky-cta.show { opacity: 1; transform: none; pointer-events: auto; }
.sticky-cta.show:hover { filter: brightness(1.08); transform: translateY(-2px); }
.sticky-cta .pulse-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #fff;
  animation: ctaPulse 2s infinite;
}
@keyframes ctaPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,.6); }
  70%  { box-shadow: 0 0 0 10px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* Glass también en comparativa, FAQ y caja CTA (coherencia con el resto) */
.compare-card, .faq, .cta-box {
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.faq { transition: border-color .25s, box-shadow .25s; }
.faq:hover { border-color: var(--border-hi); box-shadow: 0 14px 40px -22px rgba(124,58,237,.5); }

/* Línea de acento degradada junto al eyebrow (detalle en cada sección) */
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; }
.eyebrow::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px;
  background: var(--grad); flex: none;
}

@media (max-width: 640px) {
  .sticky-cta { right: 50%; bottom: 1rem; padding: .72rem 1.1rem;
    transform: translateX(50%) translateY(22px) scale(.95); }
  .sticky-cta.show { transform: translateX(50%); }
  .sticky-cta.show:hover { transform: translateX(50%); }
}
@media (hover: none) { .cursor-glow { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .cursor-glow { display: none; }
  .scroll-progress { transition: none; }
  .sticky-cta .pulse-dot { animation: none; }
}

/* --- Formulario de matrícula nativo (mismo estilo que la caja CTA) --- */
/* Especificidad .cta-box .mat-price para ganar a `.cta-box > p` (muted). */
.cta-box .mat-price {
  font-family: 'JetBrains Mono', monospace; color: var(--cyan);
  font-size: .95rem; font-weight: 600; margin: -.4rem 0 1.6rem;
}
.mat-terms {
  display: flex; align-items: flex-start; gap: .6rem;
  font-size: .85rem; color: var(--muted); text-align: left; cursor: pointer;
}
.mat-terms input {
  margin-top: .15rem; width: 17px; height: 17px; flex: none;
  accent-color: var(--purple); cursor: pointer;
}
.mat-ok { text-align: center; padding: .5rem 0 1rem; }
.mat-ok-check {
  width: 58px; height: 58px; border-radius: 50%; margin: 0 auto .7rem;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 27px; font-weight: 800;
  background: rgba(34,197,94,.14); color: #86efac; border: 1px solid rgba(34,197,94,.4);
}
.mat-ok h3 { font-size: 1.2rem; margin-bottom: .3rem; }
.mat-ok p { color: var(--muted); }

/* --- Burbuja flotante de WhatsApp --- */
.wa-bubble {
  position: fixed; left: 1.4rem; bottom: 1.4rem; z-index: 90;
  display: inline-flex; align-items: center; gap: .7rem;
}
.wa-icon {
  position: relative; width: 60px; height: 60px; flex: none;
  border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: #25d366;
  box-shadow: 0 12px 30px -8px rgba(37,211,102,.6), inset 0 0 0 1px rgba(255,255,255,.2);
  transition: transform .2s var(--ease-out);
}
.wa-icon svg { width: 30px; height: 30px; display: block; }
.wa-icon::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  animation: waPulse 2.4s infinite;
}
.wa-bubble:hover .wa-icon { transform: scale(1.07); }
@keyframes waPulse {
  0%   { box-shadow: 0 0 0 0 rgba(37,211,102,.5); }
  70%  { box-shadow: 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}
.wa-teaser {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--glass-border);
  padding: .5rem .85rem; border-radius: 12px;
  font-size: .82rem; font-weight: 600; white-space: nowrap;
  box-shadow: 0 10px 26px -14px rgba(0,0,0,.75);
}
@media (max-width: 640px) {
  .wa-bubble { left: 1rem; bottom: 1rem; }
  .wa-teaser { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wa-icon::before { animation: none; }
}
