/* ==========================================================
   FEF Educación - Landing Page optimizada
   Diseño futurista + avión de papel con planeo natural
   ========================================================== */

:root {
  color-scheme: dark;
  --bg: #050914;
  --bg-deep: #03050c;
  --text: #f8fbff;
  --muted: #aeb8d7;
  --line: rgba(255, 255, 255, .12);
  --glass: rgba(9, 15, 31, .72);
  --glass-strong: rgba(12, 19, 39, .9);
  --cyan: #19e8ff;
  --blue: #2c8cff;
  --purple: #a855f7;
  --green: #00ffb2;
  --shadow: 0 30px 110px rgba(0, 0, 0, .48);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f9ff;
  --bg-deep: #edf4ff;
  --text: #0c1222;
  --muted: #526079;
  --line: rgba(12, 18, 34, .13);
  --glass: rgba(255, 255, 255, .72);
  --glass-strong: rgba(255, 255, 255, .9);
  --shadow: 0 30px 110px rgba(20, 45, 95, .18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 6% 38%, rgba(168, 85, 247, .28), transparent 24rem),
    radial-gradient(circle at 86% 34%, rgba(25, 232, 255, .22), transparent 26rem),
    radial-gradient(circle at 50% 100%, rgba(91, 42, 255, .2), transparent 28rem),
    linear-gradient(135deg, var(--bg), var(--bg-deep));
  overflow-x: hidden;
}

body::selection {
  background: rgba(25, 232, 255, .28);
}

#particles-js {
  position: fixed;
  inset: 0;
  z-index: -3;
}

.ambient-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, #000 0%, #000 58%, transparent 100%);
}

/* =======================
   Vuelo natural del avión
   ======================= */

.flight-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.flight-layer-back {
  z-index: 0;
  opacity: .62;
}

.flight-layer-front {
  z-index: 4;
  mix-blend-mode: screen;
}

.trail-canvas {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: visible;
}

.ghost-trail,
.live-trail {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ghost-trail {
  stroke-width: .34;
  stroke-dasharray: 1 2.6;
  opacity: .46;
  filter: drop-shadow(0 0 12px rgba(25, 232, 255, .32));
  animation: trailDrift 28s linear infinite;
}

.trail-purple {
  stroke: rgba(168, 85, 247, .72);
}

.trail-cyan {
  stroke: rgba(25, 232, 255, .68);
  animation-duration: 32s;
  animation-direction: reverse;
}

.live-trail {
  stroke: rgba(25, 232, 255, .86);
  stroke-width: .42;
  stroke-dasharray: 1.25 2.25;
  stroke-dashoffset: 0;
  opacity: .82;
  filter:
    drop-shadow(0 0 8px rgba(25, 232, 255, .55))
    drop-shadow(0 0 18px rgba(168, 85, 247, .18));
}

@keyframes trailDrift {
  to {
    stroke-dashoffset: -80;
  }
}



.plane-glow-shape {
  fill: rgba(25, 232, 255, .22);
  transform: translate(4px, 6px);
  filter: blur(6px);
}

.plane-fold-a {
  fill: rgba(0, 229, 255, .36);
}

.plane-fold-b {
  fill: rgba(168, 85, 247, .30);
}

/* =======================
   Layout
   ======================= */

.site-header,
.hero,
.site-footer {
  position: relative;
  z-index: 3;
  width: min(1440px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  width: clamp(160px, 17vw, 230px);
  height: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: .95rem;
  opacity: .9;
  transition: color .25s ease, opacity .25s ease;
}

.nav-links a:hover {
  color: var(--cyan);
  opacity: 1;
}

.theme-toggle {
  min-width: 132px;
  border: 1px solid color-mix(in srgb, var(--cyan) 60%, var(--purple));
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(8, 13, 29, .62);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  backdrop-filter: blur(16px);
  box-shadow: 0 0 28px rgba(25, 232, 255, .12);
}

.theme-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan);
}

.hero {
  min-height: calc(100vh - 92px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, .85fr);
  align-items: center;
  gap: clamp(36px, 6vw, 96px);
  padding: clamp(56px, 8vw, 104px) 0 84px;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.eyebrow {
  width: fit-content;
  margin: 0 0 22px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(255,255,255,.055);
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  box-shadow: inset 0 0 28px rgba(25, 232, 255, .08);
}

.hero h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(3.3rem, 7.4vw, 7.35rem);
  line-height: .92;
  letter-spacing: -.08em;
  font-weight: 900;
}

.hero h1 span {
  display: block;
  background: linear-gradient(135deg, #ffffff 8%, var(--cyan) 42%, var(--purple) 82%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-description {
  max-width: 650px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.72;
  font-weight: 500;
}

.hero-description b {
  color: var(--green);
}

.countdown-card {
  max-width: 680px;
  margin-top: 32px;
}

.countdown-card h2 {
  margin: 0 0 16px;
  font-size: 1.35rem;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 14px;
}

.countdown article {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.025));
  padding: 18px 14px;
  text-align: center;
  backdrop-filter: blur(18px);
}

.countdown strong {
  display: block;
  font-size: clamp(2rem, 3.2vw, 3.2rem);
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--cyan);
  text-shadow: 0 0 22px rgba(25, 232, 255, .3);
}

.countdown span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.location-line,
.target-date {
  display: block;
  margin-top: 12px;
  color: var(--muted);
}

.target-date {
  margin-top: 5px;
  opacity: .78;
}

.whatsapp-card {
  width: min(460px, 100%);
  margin-top: 28px;
  padding: 16px 18px;
  border: 1px solid var(--green);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(0,255,178,.12), rgba(25,232,255,.06));
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 0 32px rgba(0, 255, 178, .14);
  transition: transform .25s ease, box-shadow .25s ease;
}

.whatsapp-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 44px rgba(0, 255, 178, .24);
}

.whatsapp-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--green);
  border-radius: 999px;
  color: var(--green);
  flex: 0 0 auto;
}

.whatsapp-icon svg {
  width: 29px;
  height: 29px;
  fill: currentColor;
}

.whatsapp-card strong,
.whatsapp-card small {
  display: block;
}

.whatsapp-card small {
  margin-top: 4px;
  color: var(--muted);
}

.whatsapp-card em {
  margin-left: auto;
  color: var(--green);
  font-style: normal;
  font-size: 1.6rem;
}

.platform-preview {
  display: grid;
  place-items: center;
  position: relative;
  z-index: 2;
}

.device-card {
  width: min(430px, 100%);
  min-height: 640px;
  border: 1px solid var(--line);
  border-radius: 38px;
  background:
    radial-gradient(circle at 50% 20%, rgba(25,232,255,.18), transparent 15rem),
    var(--glass-strong);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: perspective(1100px) rotateY(-7deg) rotateX(3deg);
  backdrop-filter: blur(20px);
}

.device-top {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
}

.device-top span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.35);
}

.device-body {
  padding: 44px 36px 36px;
}

.device-logo {
  width: 118px;
  height: auto;
  margin-bottom: 42px;
}

.device-body p {
  margin: 0 0 18px;
  color: var(--green);
  font-weight: 900;
  letter-spacing: .1em;
  font-size: .8rem;
}

.device-body h2 {
  margin: 0;
  font-size: clamp(3rem, 4.5vw, 4.7rem);
  line-height: .92;
  letter-spacing: -.08em;
}

.progress-bar {
  height: 12px;
  margin: 28px 0 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  width: 82%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--purple));
  box-shadow: 0 0 24px rgba(25, 232, 255, .45);
}

.feature-list {
  display: grid;
  gap: 14px;
}

.feature-list article {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.045);
}

.feature-list article span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--cyan);
  border-radius: 999px;
  color: var(--cyan);
}

.feature-list strong,
.feature-list small {
  display: block;
}

.feature-list small {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.4;
}

.scroll-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 6;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--purple);
  background: rgba(8, 13, 29, .72);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.site-footer {
  padding: 28px 0 36px;
  color: var(--muted);
  font-size: .9rem;
}

/* =======================
   Responsive
   ======================= */

@media (max-width: 1080px) {
  .nav-links {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .platform-preview {
    display: none;
  }
}

@media (max-width: 720px) {
  .site-header,
  .hero,
  .site-footer {
    width: min(100% - 28px, 640px);
  }

  .site-header {
    min-height: 78px;
  }

  .brand img {
    width: 158px;
  }

  .theme-toggle {
    min-width: auto;
    padding: 11px 13px;
  }

  .theme-text {
    font-size: 0;
  }

  .theme-text::after {
    content: "●";
    font-size: .8rem;
  }

  .flight-layer {
    position: absolute;
    height: 100svh;
    min-height: 720px;
  }

  .flight-layer-front {
    z-index: 4;
    opacity: .9;
  }

  .paper-plane {
    width: clamp(58px, 17vw, 78px);
  }

  .live-trail {
    stroke-width: .66;
    stroke-dasharray: 1.15 2.1;
    opacity: .86;
  }

  .ghost-trail {
    stroke-width: .48;
  }

  .hero {
    min-height: auto;
    padding: 34px 0 56px;
  }

  .eyebrow {
    margin-top: 46px;
  }

  .hero h1 {
    font-size: clamp(3rem, 15vw, 4.9rem);
  }

  .hero-description {
    font-size: 1rem;
  }

  .countdown {
    grid-template-columns: repeat(2, 1fr);
  }

  .countdown article {
    padding: 16px 10px;
  }

  .whatsapp-card {
    align-items: center;
  }

  .scroll-top {
    right: 18px;
    bottom: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }

  .paper-plane {
    opacity: .3;
  }
}


/* ==========================================================
   Corrección avión visible + planeo natural
   ========================================================== */

.paper-plane-svg {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  filter:
    drop-shadow(0 0 1.1px rgba(255, 255, 255, .95))
    drop-shadow(0 0 2.4px rgba(25, 232, 255, .85))
    drop-shadow(0 0 5.5px rgba(44, 140, 255, .48));
  will-change: transform, opacity;
}

.paper-plane-inner {
  transform-box: fill-box;
  transform-origin: center;
}

.plane-body {
  fill: #eafcff;
}

.plane-glow-shape {
  fill: rgba(25, 232, 255, .28);
  transform: translate(.8px, 1px);
  filter: blur(.9px);
}

.plane-fold-a {
  fill: rgba(20, 205, 255, .62);
}

.plane-fold-b {
  fill: rgba(168, 85, 247, .36);
}

.plane-line {
  fill: none;
  stroke: rgba(5, 9, 20, .5);
  stroke-width: .45;
  stroke-linecap: round;
}

.trail-canvas-front {
  overflow: visible;
}

.live-trail {
  stroke-width: .42;
  stroke-dasharray: 1.4 2.35;
  opacity: .72;
}

/* Se mantiene el avión visible aunque pase por zonas claras */
.flight-layer-front {
  mix-blend-mode: normal;
}

@media (max-width: 720px) {
  .paper-plane-svg {
    filter:
      drop-shadow(0 0 1px rgba(255, 255, 255, 1))
      drop-shadow(0 0 2.2px rgba(25, 232, 255, .9))
      drop-shadow(0 0 4.6px rgba(44, 140, 255, .5));
  }

  .live-trail {
    stroke-width: .62;
  }
}

