/* Wonder Wits AI — Shared System */
:root {
  --ink:        #111827;   /* Matrix Deep Slate */
  --ink-2:      #1f2937;
  --ink-3:      #374151;
  --paper:      #F9FAFB;   /* Wonderland White */
  --paper-2:    #F1F2F4;
  --paper-3:    #E5E7EB;
  --thread:     #DC2626;   /* The Red Thread */
  --thread-2:   #B91C1C;
  --mint:       #10B981;   /* Logic Mint */
  --mint-soft:  rgba(16,185,129,0.18);
  --shadow:     0 30px 80px rgba(17,24,39,0.18);
  --shadow-sm:  0 8px 24px rgba(17,24,39,0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, .serif {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: inherit;
  margin: 0;
}
h1 { font-size: clamp(44px, 6vw, 64px); line-height: 1.05; }
h2 { font-size: clamp(32px, 4.2vw, 42px); line-height: 1.1; font-weight: 600; }
h3 { font-size: 24px; line-height: 1.3; font-weight: 500; letter-spacing: 0; }
p  { margin: 0; }

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ========== NAV ========== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background .3s ease, backdrop-filter .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(249,250,251,0.85); backdrop-filter: blur(14px); border-bottom-color: rgba(17,24,39,0.08); }
.nav.on-dark.scrolled { background: rgba(17,24,39,0.85); border-bottom-color: rgba(255,255,255,0.08); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 14px; font-family: 'Playfair Display', serif; font-weight: 700; font-size: 20px; }
.brand-mark {
  width: 48px; height: 48px;
  background-image: url("assets/logo.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 8px rgba(17,24,39,0.15));
}
.nav.on-dark .brand-mark { filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4)); }
.footer .brand-mark { filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5)); }
.brand-name { line-height: 1; }
.brand-name small { display: block; font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.55; margin-top: 4px; }

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-size: 14px; font-weight: 500;
  opacity: 0.7;
  position: relative;
  transition: opacity .2s;
}
.nav-links a:hover, .nav-links a.active { opacity: 1; }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--thread);
}

.lang-pill {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  padding: 8px 14px;
  border: 1px solid currentColor;
  border-radius: 999px;
  opacity: 0.6;
  cursor: pointer;
  transition: opacity .2s;
  background: transparent;
  color: inherit;
  font-family: inherit;
}
.lang-pill:hover { opacity: 1; }

/* Language dropdown */
.lang-dropdown {
  position: relative;
}
.lang-dropdown .lang-pill[aria-expanded="true"] { opacity: 1; }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  color: #111;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  z-index: 200;
  font-family: 'Inter', sans-serif;
}
.nav.on-dark .lang-menu {
  background: #111827;
  color: #f5f5f5;
  border-color: rgba(255,255,255,0.08);
}
.lang-dropdown.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-menu li {
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.75;
  transition: background .15s, opacity .15s;
}
.lang-menu li:hover { opacity: 1; background: rgba(0,0,0,0.05); }
.nav.on-dark .lang-menu li:hover { background: rgba(255,255,255,0.08); }
.lang-menu li.active { opacity: 1; color: var(--thread); font-weight: 600; }

/* Footer language list active state */
.lang-active { color: var(--thread) !important; }

/* Glossary cross-link */
.term-link {
  color: inherit;
  text-decoration: none;
  border-bottom: none;
  transition: color .2s;
}
.term-link:hover {
  color: var(--thread);
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  position: relative;
}
.btn-primary {
  background: var(--thread);
  color: white;
  box-shadow: 0 10px 24px -8px rgba(220,38,38,0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -8px rgba(220,38,38,0.65); }
.btn-primary .arrow { transition: transform .2s; }
.btn-primary:hover .arrow { transform: translateX(4px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(17,24,39,0.2);
}
.on-dark .btn-ghost, .dark .btn-ghost { color: var(--paper); border-color: rgba(255,255,255,0.25); }
.btn-ghost:hover { border-color: var(--thread); color: var(--thread); }
.on-dark .btn-ghost:hover, .dark .btn-ghost:hover { color: var(--thread); border-color: var(--thread); }

.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600;
  color: var(--thread);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.text-link:hover { gap: 12px; }

/* ========== PRE-HEADER ========== */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.7;
  font-style: italic;
  font-family: 'Playfair Display', serif;
}
.eyebrow::before {
  content: "";
  width: 32px; height: 1px;
  background: currentColor;
}
.eyebrow.thread { color: var(--thread); opacity: 1; }
.eyebrow.thread::before { background: currentColor; }
/* On dark sections only: lighter rose so it reads on dark backgrounds */
.dark .eyebrow.thread,
.on-dark .eyebrow.thread,
.hero .eyebrow.thread,
.policy .eyebrow.thread,
.maze-section .eyebrow.thread,
.axes .eyebrow.thread,
.morph .eyebrow.thread,
.watch-hero .eyebrow.thread,
.tiers .eyebrow.thread,
.glossary .eyebrow.thread,
.wits-cta .eyebrow.thread,
.cta-strip .eyebrow.thread,
.final-cta .eyebrow.thread,
.sprint-cta .eyebrow.thread,
.watch-cta .eyebrow.thread {
  color: #FCA5A5;
}

/* ========== UTILS ========== */
.dark { background: var(--ink); color: var(--paper); }
.dark h1, .dark h2, .dark h3 { color: var(--paper); }
.section { padding: 120px 0; position: relative; }
.section-sm { padding: 80px 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 40px; }
  .section { padding: 80px 0; }
}

/* The blueprint grid background */
.blueprint-bg {
  background-image:
    linear-gradient(rgba(17,24,39,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17,24,39,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
}
.dark .blueprint-bg {
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ========== FOOTER ========== */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 0 40px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 60px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h4 { font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.55; margin-bottom: 16px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { opacity: 0.7; font-size: 15px; }
.footer ul a:hover { opacity: 1; color: var(--thread); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 13px; opacity: 0.5; }

/* ========== SECTION HEADER ========== */
.section-head { max-width: 720px; margin-bottom: 64px; }
.section-head h2 { margin-top: 18px; }
.section-head .lead { margin-top: 20px; font-size: 18px; opacity: 0.75; line-height: 1.55; max-width: 600px; }

/* Cards */
.card {
  background: var(--paper);
  border: 1px solid rgba(17,24,39,0.08);
  border-radius: 8px;
  padding: 36px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); border-color: rgba(17,24,39,0.16); }
.dark .card { background: var(--ink-2); border-color: rgba(255,255,255,0.06); }
.dark .card:hover { border-color: rgba(255,255,255,0.14); }

.card-num {
  font-family: 'Playfair Display', serif;
  font-size: 14px; font-weight: 700;
  color: var(--thread);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.card-num::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: 0.3; }

/* Floating rabbits */
.float-rabbit {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 30px 40px rgba(17,24,39,0.25));
}
.dark .float-rabbit { filter: drop-shadow(0 30px 40px rgba(0,0,0,0.6)); }

/* checkmark list */
.check-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.check-list li { display: flex; gap: 14px; align-items: flex-start; font-size: 16px; }
.check-list li::before {
  content: "✓";
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--mint-soft);
  color: var(--mint);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  margin-top: 1px;
}

/* Definition pill row */
.def-row { display: flex; flex-wrap: wrap; gap: 8px; }
.def-pill {
  font-size: 12px; font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(17,24,39,0.06);
  letter-spacing: 0.04em;
}
.dark .def-pill { background: rgba(255,255,255,0.06); }
