/* =====================================================================
   MyAcada — Design tokens
   Palette: deep indigo (authority/trust) + teal (growth/clarity)
   + amber (energy/attention, JAMB brand association with exam clocks)
   Signature element: the hero mock CBT question card with a live
   countdown — because the product's core moment is a timed question.
   ===================================================================== */
:root {
  --indigo-900: #1b1440;
  --indigo-700: #2d1f7a;
  --indigo-600: #3b2aa3;
  --indigo-500: #4d38c9;
  --teal-500: #0f9b8e;
  --teal-400: #17c3b2;
  --amber-500: #f5a524;
  --amber-400: #ffc453;
  --ink-900: #14131f;
  --ink-700: #3c3a52;
  --ink-500: #6a6785;
  --paper-0: #ffffff;
  --paper-50: #f7f6fb;
  --paper-100: #eeecf9;
  --line-200: #e2dff2;
  --success-500: #1f9d5c;
  --success-100: #e2f6ea;
  --danger-500: #d64545;
  --danger-100: #fbe6e6;

  --font-display: 'Sora', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 12px 30px -10px rgba(27, 20, 64, 0.18);
  --shadow-pop: 0 20px 50px -12px rgba(27, 20, 64, 0.3);
  --container: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--paper-0);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 .5em; line-height: 1.15; color: var(--indigo-900); }
p { margin: 0 0 1em; color: var(--ink-700); }
a { color: var(--indigo-600); text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--amber-500); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  padding: .85em 1.6em; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  min-height: 48px;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--amber-500); color: var(--indigo-900); box-shadow: var(--shadow-card); }
.btn-primary:hover { background: var(--amber-400); box-shadow: var(--shadow-pop); }
.btn-outline { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-ghost { color: var(--indigo-600); }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger-500); color: #fff; }
.btn-sm { padding: .5em 1.1em; font-size: .82rem; min-height: 36px; }

/* ---------------- NAV ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-200);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--indigo-900); display: flex; align-items: center; gap: 8px; }
.brand-logo { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; display: block; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber-500); }
.nav-links { display: none; list-style: none; gap: 28px; margin: 0; padding: 0; }
.nav-links a { color: var(--ink-700); font-weight: 600; font-size: .93rem; }
.nav-links a:hover { color: var(--indigo-600); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-actions .btn { padding: .6em 1.2em; }
.nav-toggle { display: inline-flex; background: none; border: none; font-size: 1.6rem; color: var(--indigo-900); cursor: pointer; }
.mobile-menu { display: none; flex-direction: column; gap: 4px; padding: 10px 20px 16px; border-top: 1px solid var(--line-200); }
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 10px 6px; font-weight: 600; color: var(--ink-700); border-radius: var(--radius-sm); }
.mobile-menu a:hover { background: var(--paper-100); }

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .mobile-menu { display: none !important; }
}

/* ---------------- HERO ---------------- */
.hero {
  background: radial-gradient(circle at 15% 20%, var(--indigo-700), var(--indigo-900) 60%);
  color: #fff; padding: 56px 0 70px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 22px 22px; opacity: .5;
}
.hero-inner { position: relative; z-index: 1; display: grid; gap: 40px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--amber-400);
  background: rgba(245,165,36,.12); padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2rem, 6vw, 3.2rem); color: #fff; margin-bottom: .4em; }
.hero h1 span { color: var(--amber-400); }
.hero p.lead { color: rgba(255,255,255,.82); font-size: 1.08rem; max-width: 520px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-stats { display: flex; gap: 26px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats div { min-width: 90px; }
.hero-stats strong { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--amber-400); }
.hero-stats span { font-size: .78rem; color: rgba(255,255,255,.7); text-transform: uppercase; letter-spacing: .04em; }

/* --- Signature element: mock CBT exam card in the hero --- */
.exam-mock {
  background: var(--paper-0); border-radius: var(--radius-lg); padding: 22px;
  box-shadow: var(--shadow-pop); color: var(--ink-900); max-width: 420px; width: 100%;
  border: 1px solid rgba(255,255,255,.4);
}
.exam-mock-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.exam-mock-badge { font-size: .72rem; font-weight: 700; color: var(--teal-500); background: rgba(15,155,142,.12); padding: 4px 10px; border-radius: 999px; }
.exam-mock-timer { font-family: var(--font-mono); font-weight: 700; color: var(--indigo-900); background: var(--paper-100); padding: 4px 10px; border-radius: var(--radius-sm); font-size: .85rem; }
.exam-mock-q { font-weight: 600; margin-bottom: 14px; font-size: .95rem; }
.exam-mock-opt {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-200); margin-bottom: 8px; font-size: .88rem;
}
.exam-mock-opt .letter { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; background: var(--paper-100); flex-shrink: 0; }
.exam-mock-opt.correct { border-color: var(--success-500); background: var(--success-100); }
.exam-mock-opt.correct .letter { background: var(--success-500); color: #fff; }

/* ---------------- SECTIONS ---------------- */
.section { padding: 64px 0; }
.section-alt { background: var(--paper-50); }
.section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section-eyebrow { font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-500); }
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); }

/* How it works */
.steps { display: grid; gap: 22px; grid-template-columns: 1fr; }
.step-card { background: var(--paper-0); border: 1px solid var(--line-200); border-radius: var(--radius-lg); padding: 26px; position: relative; }
.step-num { font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--line-200); position: absolute; top: 18px; right: 20px; }
.step-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.step-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--indigo-900); color: var(--amber-400); font-weight: 800; margin-bottom: 14px; }

@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

/* Features */
.features-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
.feature-card { background: var(--paper-0); border-radius: var(--radius-md); padding: 24px; border: 1px solid var(--line-200); transition: box-shadow .2s, transform .2s; }
.feature-card:hover { box-shadow: var(--shadow-card); transform: translateY(-3px); }
.feature-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 12px; }
.feature-icon.teal { background: rgba(15,155,142,.12); color: var(--teal-500); }
.feature-icon.amber { background: rgba(245,165,36,.14); color: #b3760f; }
.feature-icon.indigo { background: rgba(61,42,163,.1); color: var(--indigo-600); }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.feature-card p { font-size: .9rem; margin: 0; }

@media (min-width: 640px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }

/* Testimonials */
.testimonials { display: grid; gap: 18px; grid-template-columns: 1fr; }
.testimonial-card { background: var(--paper-0); border-radius: var(--radius-md); padding: 22px; border: 1px solid var(--line-200); }
.testimonial-card p { font-style: italic; color: var(--ink-900); font-size: .95rem; }
.testimonial-name { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.testimonial-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--indigo-600); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.testimonial-name strong { font-size: .88rem; color: var(--indigo-900); }
.testimonial-name span { font-size: .78rem; color: var(--ink-500); }
@media (min-width: 760px) { .testimonials { grid-template-columns: repeat(3, 1fr); } }

/* FAQ accordion */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line-200); }
.faq-q { width: 100%; text-align: left; background: none; border: none; padding: 18px 4px; font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--indigo-900); display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.faq-q .plus { transition: transform .2s ease; color: var(--teal-500); font-size: 1.3rem; }
.faq-item.open .faq-q .plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-a p { padding: 0 4px 18px; font-size: .92rem; }

/* CTA banner */
.cta-banner {
  background: linear-gradient(120deg, var(--indigo-700), var(--teal-500));
  border-radius: var(--radius-lg); padding: 44px 30px; text-align: center; color: #fff;
  margin: 0 auto; max-width: var(--container);
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255,255,255,.85); }

/* Newsletter / contact */
.contact-grid { display: grid; gap: 30px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.form-card { background: var(--paper-0); border: 1px solid var(--line-200); border-radius: var(--radius-lg); padding: 26px; }
label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-700); margin-bottom: 14px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: .8em .9em; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-200); font-family: var(--font-body); font-size: .95rem; background: var(--paper-0); color: var(--ink-900);
}
input:focus, select:focus, textarea:focus { border-color: var(--indigo-500); outline: none; }
textarea { resize: vertical; min-height: 100px; }

/* Footer */
.site-footer { background: var(--indigo-900); color: rgba(255,255,255,.75); padding: 44px 0 24px; }
.footer-grid { display: grid; gap: 26px; grid-template-columns: 1fr; margin-bottom: 30px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.site-footer h4 { color: #fff; font-size: .9rem; margin-bottom: 12px; }
.site-footer a { color: rgba(255,255,255,.7); display: block; margin-bottom: 8px; font-size: .88rem; }
.site-footer a:hover { color: var(--amber-400); }
.footer-bottom { text-align: center; font-size: .8rem; border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: .9rem; margin-bottom: 16px; }
.alert-success { background: var(--success-100); color: var(--success-500); }
.alert-error { background: var(--danger-100); color: var(--danger-500); }
.alert-warning { background: rgba(245,165,36,.14); color: #8a5a09; }

/* Mobile bottom action bar (landing page) */
.mobile-actionbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  display: flex; background: var(--paper-0); border-top: 1px solid var(--line-200);
  box-shadow: 0 -8px 24px rgba(27,20,64,.1);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  gap: 8px;
}
.mobile-actionbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: .68rem; font-weight: 700; color: var(--ink-700); padding: 8px 4px;
  border-radius: var(--radius-sm); min-height: 48px;
}
.mobile-actionbar a .ico { font-size: 1.15rem; }
.mobile-actionbar a.primary { background: var(--amber-500); color: var(--indigo-900); }
body.has-mobile-bar { padding-bottom: 74px; }
@media (min-width: 900px) { .mobile-actionbar { display: none; } body.has-mobile-bar { padding-bottom: 0; } }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------------- AUTH PAGES ---------------- */
.auth-page { background: var(--paper-50); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { background: var(--paper-0); border-radius: var(--radius-lg); padding: 34px 28px; max-width: 420px; width: 100%; box-shadow: var(--shadow-card); }

/* Subject picker — used on register.php and student/practice.php */
.subject-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .subject-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .subject-grid { grid-template-columns: repeat(3, 1fr); } }
.subject-card { border: 1.5px solid var(--line-200); border-radius: var(--radius-md); padding: 18px; cursor: pointer; transition: border-color .15s, box-shadow .15s, opacity .15s; }
.subject-card:hover { border-color: var(--indigo-500); box-shadow: var(--shadow-card); }
.subject-card input { display: none; }
.subject-card h4 { margin: 0; font-size: .98rem; }
.subject-card p { margin: 4px 0 0; font-size: .8rem; }
.subject-card.selected { border-color: var(--indigo-600); background: var(--paper-100); }
.subject-card:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.subject-card.subject-locked { cursor: default; position: relative; padding-right: 40px; }
.subject-card.subject-locked::after { content: '🔒'; position: absolute; top: 16px; right: 16px; font-size: .9rem; }
.brand-mark { text-align: center; font-size: 1.3rem; margin-bottom: 20px; }
.auth-footer-link { text-align: center; margin-top: 16px; font-size: .88rem; color: var(--ink-500); }
