/* =========================================================
   EduFreedom — Coming Soon landing page
   Design tokens, base, layout, components, animations
   ========================================================= */

:root {
  /* Palette */
  --bg-0: #0d0f1c;
  --bg-1: #12152a;
  --bg-2: #171b34;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #f4f5fb;
  --muted: #a3a8c3;
  --muted-dim: #757a99;

  --violet: #7c5cff;
  --violet-soft: #9b7cff;
  --coral: #ff8a5c;
  --pink: #ff6a8a;

  --grad-brand: linear-gradient(120deg, #9b7cff 0%, #7c5cff 45%, #ff8a5c 100%);
  --grad-accent: linear-gradient(120deg, #ff8a5c, #ff6a8a);

  /* Shape & motion */
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 10px 40px -8px rgba(124, 92, 255, 0.45);

  --container: 1160px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: "Space Grotesk", var(--font-body);
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 600;
}

:focus-visible {
  outline: 2px solid var(--violet-soft);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px;
  background: var(--violet); color: #fff;
  padding: 10px 16px; border-radius: 10px; z-index: 200;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}
.container-narrow { max-width: 780px; }

.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.section-alt { background: linear-gradient(180deg, var(--bg-0), var(--bg-1) 50%, var(--bg-0)); }

.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.75rem); margin: 12px 0 16px; }
.section-lede { color: var(--muted); font-size: 1.08rem; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--violet-soft);
  font-weight: 600;
}

.gradient-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
  white-space: nowrap;
}
.btn-sm { padding: 10px 18px; font-size: 0.9rem; }

.btn-primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 44px -8px rgba(124, 92, 255, 0.6); }
.btn-primary:active { transform: translateY(0); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(13, 15, 28, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: 72px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { display: inline-flex; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand-name span { color: var(--violet-soft); }

.nav { display: flex; gap: 30px; margin-left: auto; }
.nav a {
  color: var(--muted); font-size: 0.96rem; font-weight: 500;
  position: relative; transition: color 0.2s var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 100%; height: 2px; background: var(--grad-brand);
  transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { transform: scaleX(1); }

.nav-cta { margin-left: 4px; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.25s var(--ease), opacity 0.2s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none; flex-direction: column; gap: 4px;
  padding: 12px 24px 24px;
  background: rgba(13, 15, 28, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.mobile-nav a { padding: 12px 4px; color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--border); }
.mobile-nav a:last-child { border: 0; margin-top: 10px; text-align: center; }
.mobile-nav.open { display: flex; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: flex; align-items: center;
  padding: 80px 0 100px;
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 2; max-width: 820px; }

.badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: var(--radius-pill);
  font-size: 0.88rem; color: var(--muted);
  margin-bottom: 26px;
}
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 0 rgba(255, 138, 92, 0.6); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 138, 92, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(255, 138, 92, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 138, 92, 0); }
}

.hero-title { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 700; margin-bottom: 22px; }
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--muted); max-width: 620px; margin-bottom: 34px; }

.hero-meta {
  list-style: none; padding: 0; margin-top: 26px;
  display: flex; flex-wrap: wrap; gap: 22px;
  color: var(--muted); font-size: 0.94rem;
}
.hero-meta li { display: inline-flex; gap: 6px; }

/* Aurora background */
.aurora { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(70px); opacity: 0.55;
  will-change: transform;
}
.blob-1 { width: 480px; height: 480px; background: radial-gradient(circle, #7c5cff, transparent 70%); top: -120px; left: -80px; animation: float1 16s ease-in-out infinite; }
.blob-2 { width: 420px; height: 420px; background: radial-gradient(circle, #ff8a5c, transparent 70%); top: 40px; right: -100px; animation: float2 19s ease-in-out infinite; }
.blob-3 { width: 360px; height: 360px; background: radial-gradient(circle, #ff6a8a, transparent 70%); bottom: -140px; left: 34%; animation: float3 22s ease-in-out infinite; opacity: 0.4; }

@keyframes float1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(60px, 40px); } }
@keyframes float2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-50px, 50px); } }
@keyframes float3 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(30px, -50px); } }

.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 40%, transparent 100%);
}

.scroll-cue {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid var(--border-strong);
  border-radius: 14px; z-index: 2;
}
.scroll-cue span {
  display: block; width: 4px; height: 8px; margin: 7px auto 0;
  background: var(--muted); border-radius: 2px;
  animation: scrolldot 1.8s infinite;
}
@keyframes scrolldot { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Signup form ---------- */
.signup-form { max-width: 480px; }
.field {
  display: flex; gap: 8px;
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 6px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field:focus-within { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.16); }
.field input {
  flex: 1; min-width: 0;
  background: transparent; border: 0; outline: none;
  color: var(--text); font-size: 1rem; padding: 0 16px;
  font-family: var(--font-body);
}
.field input::placeholder { color: var(--muted-dim); }
.field .btn { flex-shrink: 0; }

.form-note { font-size: 0.85rem; color: var(--muted-dim); margin-top: 12px; padding-left: 6px; transition: color 0.2s var(--ease); }
.signup-form.is-error .field { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255,106,138,0.14); }
.signup-form.is-error .form-note { color: var(--pink); }
.signup-form.is-success .field { border-color: #4ad991; box-shadow: 0 0 0 4px rgba(74,217,145,0.16); }
.signup-form.is-success .form-note { color: #7ff0b6; }

/* ---------- Pillars (about) ---------- */
.pillars {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.pillar {
  padding: 28px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.pillar-num { font-family: var(--font-display); font-size: 0.9rem; color: var(--coral); font-weight: 700; letter-spacing: 0.1em; }
.pillar h3 { font-size: 1.2rem; margin: 12px 0 8px; }
.pillar p { color: var(--muted); font-size: 0.96rem; }

/* ---------- Features grid ---------- */
.features-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card {
  padding: 30px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  position: relative;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(400px circle at 50% -20%, rgba(124,92,255,0.14), transparent 60%);
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.card:hover { transform: translateY(-6px); border-color: var(--border-strong); background: var(--surface-strong); }
.card:hover::before { opacity: 1; }
.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(124,92,255,0.22), rgba(255,138,92,0.18));
  color: var(--violet-soft);
  margin-bottom: 18px;
  border: 1px solid var(--border-strong);
}
.card h3 { font-size: 1.24rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.98rem; }

/* ---------- Steps ---------- */
.steps {
  list-style: none; padding: 0; counter-reset: step;
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.step { position: relative; padding: 30px 26px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--grad-brand); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  margin-bottom: 16px; box-shadow: var(--shadow-glow);
}
.step h3 { font-size: 1.2rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.98rem; }

/* ---------- Tag cloud ---------- */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 12px; }
.tag {
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--muted);
  font-weight: 500; font-size: 0.96rem;
  transition: transform 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.tag:hover { transform: translateY(-3px); color: var(--text); border-color: var(--violet); background: var(--surface-strong); }

/* ---------- Stats band ---------- */
.stats-band {
  background: linear-gradient(120deg, rgba(124,92,255,0.14), rgba(255,138,92,0.1));
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: clamp(48px, 7vw, 80px) 0;
}
.stats-grid {
  display: grid; gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  text-align: center;
}
.stat-num {
  display: block;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1;
}
.stat-label { display: block; color: var(--muted); margin-top: 10px; font-size: 0.96rem; }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.faq-q {
  width: 100%; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px;
  background: none; border: 0; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 1.06rem; color: var(--text);
}
.faq-icon { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; background: var(--violet-soft); border-radius: 2px;
  transition: transform 0.3s var(--ease);
}
.faq-icon::before { top: 7px; left: 0; width: 16px; height: 2px; }
.faq-icon::after { top: 0; left: 7px; width: 2px; height: 16px; }
.faq-q[aria-expanded="true"] .faq-icon::after { transform: scaleY(0); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease); }
.faq-a p { padding: 0 24px 22px; color: var(--muted); }

/* ---------- Final CTA ---------- */
.cta-panel {
  position: relative; overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--bg-2), var(--bg-1));
  padding: clamp(40px, 6vw, 72px);
  box-shadow: var(--shadow);
}
.aurora-cta .blob { opacity: 0.4; filter: blur(80px); }
.aurora-cta .blob-1 { top: -160px; right: -80px; left: auto; }
.aurora-cta .blob-2 { bottom: -180px; left: -60px; top: auto; }
.cta-content { position: relative; z-index: 2; max-width: 560px; }
.cta-content h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 14px; }
.cta-content p { color: var(--muted); margin-bottom: 28px; font-size: 1.05rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-1); padding-top: 64px; }
.footer-inner {
  display: grid; gap: 40px;
  grid-template-columns: 1.6fr 1.4fr 1fr;
  padding-bottom: 48px;
}
.footer-tag { color: var(--muted); margin-top: 16px; max-width: 300px; }
.footer-links { display: flex; gap: 48px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4, .footer-social h4 { font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-dim); margin-bottom: 4px; }
.footer-col a { color: var(--muted); font-size: 0.96rem; transition: color 0.2s var(--ease); }
.footer-col a:hover { color: var(--text); }

.social-row { display: flex; gap: 12px; margin-top: 6px; }
.social-row a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--muted);
  transition: transform 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.social-row a:hover { transform: translateY(-3px); color: var(--text); border-color: var(--violet); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  padding: 24px 24px; border-top: 1px solid var(--border);
  color: var(--muted-dim); font-size: 0.9rem;
}
.footer-legal a { transition: color 0.2s var(--ease); }
.footer-legal a:hover { color: var(--text); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-social { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .field { flex-direction: column; padding: 10px; border-radius: var(--radius); }
  .field input { padding: 10px 12px; }
  .field .btn { width: 100%; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { gap: 32px; }
  .hero { min-height: auto; padding-top: 48px; }
  .scroll-cue { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .blob { animation: none; }
}
