/* ═══════════════════════════════════════════════════════════════
   Math Mastery Academy — marketing site
   Design language: editorial / luxury-academic, navy + cream + gold
═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT,WONK@9..144,300..900,30..100,0..1&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --navy:        #0D1B2A;
  --navy-mid:    #122638;
  --navy-light:  #1A3A5C;
  --navy-line:   rgba(250, 247, 240, 0.10);
  --gold:        #C9A84C;
  --gold-light:  #F0D080;
  --gold-dark:   #8B6914;
  --cream:       #FAF7F0;
  --cream-dark:  #EDE8DC;
  --ink:         #1A2230;
  --ink-soft:    #5D6878;
  --ink-mid:     #2D3A4D;
  --rule:        rgba(13, 27, 42, 0.12);

  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans:  'Inter', -apple-system, system-ui, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, monospace;

  --maxw: 1240px;
}

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

html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink-mid);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy);
  color: var(--cream);
  border-bottom: 1px solid var(--navy-line);
  backdrop-filter: blur(10px);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--cream);
}
.nav-brand .brand-mark { width: 32px; height: 32px; flex-shrink: 0; }
.nav-brand .brand-sub {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 500;
  display: block;
  margin-top: 1px;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 999px;
  color: rgba(250, 247, 240, 0.7);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--cream); background: rgba(250, 247, 240, 0.05); }
.nav-links a.current { color: var(--gold-light); }
.nav-links .nav-cta {
  background: var(--gold);
  color: var(--navy);
  font-weight: 600;
  padding: 10px 20px;
  margin-left: 8px;
}
.nav-links .nav-cta:hover { background: var(--gold-light); color: var(--navy); }

.nav-toggle {
  display: none;
  background: none; border: none;
  color: var(--cream);
  font-size: 1.4rem; cursor: pointer; padding: 4px 8px;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; right: 0; left: 0;
    flex-direction: column; align-items: stretch;
    background: var(--navy);
    padding: 12px 24px 24px;
    gap: 2px;
    border-bottom: 1px solid var(--navy-line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 16px; border-radius: 10px; }
  .nav-links .nav-cta { margin-left: 0; margin-top: 8px; text-align: center; }
}

/* ── Section primitives ─────────────────────────────────────── */
section { padding: 96px 32px; }
.container { max-width: var(--maxw); margin: 0 auto; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #A8842E;
  font-weight: 500;
  margin-bottom: 24px;
  display: inline-block;
}
.section-dark .eyebrow { color: var(--gold); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  letter-spacing: -0.02em;
  color: var(--navy);
  line-height: 1.05;
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4,
.hero h1, .hero h2, .hero h3,
.topband h1, .topband h2, .topband h3,
.reviews-hero h1, .reviews-hero h2,
.demo-hero h1, .demo-hero h2,
.order-hero h1, .order-hero h2,
.coverage h1, .coverage h2, .coverage h3,
.roles h1, .roles h2, .roles h3,
.cta-band h1, .cta-band h2, .cta-band h3,
.case-study h1, .case-study h2, .case-study h3 {
  color: var(--cream);
}

h1 { font-size: clamp(2.5rem, 5.5vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); margin-bottom: 24px; }
h3 { font-size: 1.5rem; margin-bottom: 12px; }
.h-italic em { font-style: italic; color: #A8842E; font-weight: 600; }
.section-dark .h-italic em { color: var(--gold-light); font-weight: 600; }

.lede {
  font-size: 1.18rem;
  line-height: 1.55;
  color: var(--ink-mid);
  max-width: 580px;
}
.section-dark .lede { color: rgba(250, 247, 240, 0.75); }

.section-dark {
  background: var(--navy);
  color: var(--cream);
}
.section-dark p { color: rgba(250, 247, 240, 0.75); }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.005em;
}
.btn-gold {
  background: var(--gold);
  color: var(--navy);
}
.btn-gold:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 12px 30px -10px rgba(201,168,76,0.5); }
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(250, 247, 240, 0.3);
}
.btn-ghost:hover { border-color: var(--gold-light); color: var(--gold-light); }
.btn-dark {
  background: var(--navy);
  color: var(--cream);
}
.btn-dark:hover { background: var(--navy-light); transform: translateY(-2px); }
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(4px); }

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  background: var(--navy);
  color: var(--cream);
  padding: 64px 32px 32px;
  border-top: 4px solid var(--gold);
}
.footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer h4 {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 18px;
}
.footer ul { list-style: none; }
.footer li { margin-bottom: 10px; font-size: 0.92rem; }
.footer li a { color: rgba(250, 247, 240, 0.7); transition: color 0.2s; }
.footer li a:hover { color: var(--gold-light); }
.footer-blurb {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.5;
  color: rgba(250, 247, 240, 0.7);
  max-width: 360px;
}
.footer-bottom {
  max-width: var(--maxw); margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--navy-line);
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em;
  color: rgba(250, 247, 240, 0.5);
  text-transform: uppercase;
}
@media (max-width: 760px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
}

/* ── Fade-up reveal ─────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Decorative bow-mark used as inline ornament ────────────── */
.ornament {
  display: inline-block; color: var(--gold); font-size: 1.2em; vertical-align: middle;
}

/* ── Common layout: split hero ──────────────────────────────── */
.split-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 880px) {
  .split-hero { grid-template-columns: 1fr; gap: 40px; }
}
