/* ============================================================
   THE 5 LEVELS OF AI — shared design system
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* surfaces */
  --cream: #f6f1e9;
  --cream-2: #efe8dc;
  --paper: #fffdf9;
  --ink: #1d1c2b;
  --ink-soft: #4a4860;
  --ink-mute: #6c697f;
  --line: #e3dccf;

  /* level accents */
  --l1: #7c8aa5;
  --l2: #e0883b;
  --l3: #3a9d78;
  --l4: #5b6ee6;
  --l5: #9b6ef0;

  /* deep end */
  --deep: #0d0e1a;
  --deep-2: #14162a;
  --deep-line: #2a2c44;

  --accent: var(--l4);
  --accent-soft: #e4e7fb;

  --shadow-sm: 0 1px 2px rgba(29, 28, 43, 0.04), 0 4px 14px rgba(29, 28, 43, 0.06);
  --shadow-md: 0 8px 30px rgba(29, 28, 43, 0.10);
  --shadow-lg: 0 24px 60px rgba(29, 28, 43, 0.16);

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --maxw: 1080px;
  --sec-y: 96px;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.01em; font-optical-sizing: auto; }
/* big display pulls high optical size for crisp confident serifs; small serif italics pull low so hairlines don't thin */
.hero h1, .sec-head h2, .cta-band h2, .iceberg h2, .result-hero h1 { font-variation-settings: "opsz" 110; text-wrap: balance; }
.lvl-body .tagline, .result-hero .r-tag, .pm-move-p { font-variation-settings: "opsz" 24; }
em { font-style: italic; }

a { color: inherit; }

.serif { font-family: var(--font-display); }
.muted { color: var(--ink-mute); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: 15px 28px; border-radius: 100px; border: none; cursor: pointer;
  background: var(--ink); color: var(--cream);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  box-shadow: var(--shadow-sm); text-decoration: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--accent { background: var(--accent); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; }
.btn--ghost:hover { border-color: var(--ink); background: transparent; }
.btn--lg { padding: 18px 34px; font-size: 1.08rem; }
.btn .arr { transition: transform .18s ease; }
.btn:hover .arr { transform: translateX(4px); }

/* ---------- level chip ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .78rem; font-weight: 600; letter-spacing: .02em;
  padding: 5px 12px; border-radius: 100px;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink-soft);
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ---------- tool pills ---------- */
.tools { display: flex; flex-wrap: wrap; gap: 8px; }
.tool {
  font-size: .82rem; font-weight: 500; color: var(--ink-soft);
  padding: 6px 13px; border-radius: 8px; background: var(--paper);
  border: 1px solid var(--line);
}

/* ============================================================
   LANDING PAGE
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(10px); background: rgba(246,241,233,.8);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.nav.scrolled { border-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: -.01em; }
.brand b { color: var(--accent); }
.nav-cta { font-size: .92rem; }

/* hero */
.hero { padding: 88px 0 72px; text-align: center; position: relative; overflow: hidden; }
.hero .eyebrow {
  font-size: .82rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: 22px;
}
.hero h1 { font-size: clamp(2.7rem, 7vw, 5.4rem); font-weight: 600; letter-spacing: -.02em; }
.hero h1 .grad {
  background: linear-gradient(100deg, var(--l1), var(--l2) 32%, var(--l3) 55%, var(--l4) 78%, var(--l5));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  font-style: italic;
}
.hero p.lead {
  max-width: 600px; margin: 26px auto 0; font-size: 1.2rem; line-height: 1.5; color: var(--ink-soft);
}
.hero .cta-row { margin-top: 38px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .sub { margin-top: 18px; font-size: .9rem; color: var(--ink-mute); }

/* the spectrum bar */
.spectrum { display: flex; gap: 6px; max-width: 560px; margin: 52px auto 0; }
.spectrum .seg { flex: 1; height: 7px; border-radius: 100px; opacity: .9; }

/* section heading */
.sec { padding: var(--sec-y) 0; position: relative; }
.sec-head { text-align: center; max-width: 660px; margin: 0 auto 54px; }
.sec-head .kicker { font-size: .82rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); }
.sec-head h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); margin-top: 14px; }
.sec-head p { font-size: 1.12rem; color: var(--ink-soft); margin-top: 16px; }

/* level cards (landing) */
.levels { display: flex; flex-direction: column; gap: 22px; }
.lvl-card {
  display: grid; grid-template-columns: 168px 1fr; gap: 30px; align-items: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px 30px; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.lvl-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--lc, var(--accent)); }
.lvl-visual { position: relative; }
.lvl-img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; display: block; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.lvl-badge { position: absolute; top: -12px; left: -12px; width: 48px; height: 48px; border-radius: 14px; background: var(--lc); color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1.65rem; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); }
.lvl-kicker { display: flex; align-items: center; gap: 10px; }
.lvl-kicker .word { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }
.lvl-kicker .lvl-emoji { font-size: 1.1rem; }
.lvl-body h3 { font-size: 1.7rem; margin-top: 8px; }
.lvl-body .tagline { font-style: italic; font-family: var(--font-display); font-size: 1.12rem; color: var(--lct, var(--lc)); margin-top: 4px; }
.lvl-body .story { margin-top: 16px; color: var(--ink-soft); max-width: 64ch; }
.lvl-body .tools { margin-top: 20px; }

@media (max-width: 640px) {
  .lvl-card { grid-template-columns: 96px 1fr; gap: 18px; padding: 20px; align-items: start; }
  .lvl-badge { width: 30px; height: 30px; font-size: 1rem; border-radius: 9px; }
  .lvl-body h3 { font-size: 1.45rem; }
}

/* iceberg teaser */
.iceberg { background: var(--deep); color: #ece9f5; border-radius: var(--r-xl); padding: 64px 48px; position: relative; overflow: hidden; }
.iceberg::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(900px 360px at 50% -10%, rgba(155,110,240,.22), transparent 70%);
}
.iceberg .wrap-inner { position: relative; z-index: 2; max-width: 820px; margin: 0 auto; text-align: center; }
.iceberg h2 { font-size: clamp(2rem, 4.4vw, 3rem); color: #fff; }
.iceberg p { color: #b9b5cf; font-size: 1.12rem; margin-top: 16px; }
.ladder { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; text-align: left; }
.rung {
  background: var(--deep-2); border: 1px solid var(--deep-line); border-radius: var(--r);
  padding: 16px 18px; transition: border-color .2s, transform .2s;
}
.rung:hover { border-color: var(--l5); transform: translateY(-2px); }
.rung .rn { font-family: var(--font-display); font-size: .85rem; color: var(--l5); font-weight: 600; }
.rung .rname { font-weight: 600; margin-top: 2px; color: #fff; }
.rung .rnote { font-size: .82rem; color: #9894b4; margin-top: 6px; line-height: 1.5; }

/* CTA band */
.cta-band { text-align: center; padding: var(--sec-y) 0; }
.cta-band h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.cta-band p { font-size: 1.18rem; color: var(--ink-soft); margin: 18px auto 34px; max-width: 540px; }

footer { padding: 40px 0 60px; text-align: center; color: var(--ink-mute); font-size: .9rem; border-top: 1px solid var(--line); }
footer b { color: var(--ink-soft); }

/* ============================================================
   QUIZ
   ============================================================ */
.quiz-sec { padding: 80px 0 var(--sec-y); }
.quiz-card {
  max-width: 720px; margin: 0 auto; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); padding: 44px 46px; position: relative; z-index: 2;
}
.quiz-progress { height: 6px; background: var(--cream-2); border-radius: 100px; overflow: hidden; margin-bottom: 30px; }
.quiz-progress .bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--l2), var(--l4)); border-radius: 100px; transition: width .4s cubic-bezier(.4,0,.2,1); }
.q-count { font-size: .82rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-mute); }
.q-text { font-family: var(--font-display); font-size: 1.8rem; font-weight: 600; margin: 10px 0 28px; line-height: 1.15; letter-spacing: -.015em; text-wrap: balance; }
.q-opts { display: flex; flex-direction: column; gap: 12px; }
.opt {
  text-align: left; font-family: var(--font-body); font-size: 1.04rem; color: var(--ink);
  background: var(--cream); border: 1.5px solid var(--line); border-radius: var(--r);
  padding: 17px 20px; cursor: pointer; transition: all .15s ease;
  display: flex; align-items: center; gap: 14px;
}
.opt:hover { border-color: var(--accent); background: var(--paper); transform: translateX(3px); }
.opt .mark { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex-shrink: 0; transition: all .15s; }
.opt:hover .mark { border-color: var(--accent); }
.opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.opt.sel .mark { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--accent-soft); }
.quiz-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 30px; }
.link-btn { background: none; border: none; color: var(--ink-mute); font-family: var(--font-body); font-size: .95rem; cursor: pointer; font-weight: 500; }
.link-btn:hover { color: var(--ink); }
.link-btn:disabled { opacity: .35; cursor: default; }

/* track grid */
.track-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .track-grid { grid-template-columns: 1fr; } }
.track-opt { text-align: left; }
.track-opt .ti { font-size: 1.4rem; }
.track-opt .tl { font-weight: 600; display: block; }
.track-opt .tb { font-size: .85rem; color: var(--ink-mute); display: block; margin-top: 2px; line-height: 1.4; }

/* ---------- RESULT ---------- */
.result { max-width: 760px; margin: 0 auto; position: relative; z-index: 2; }
.result-hero {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); padding: 48px 46px; text-align: center; position: relative; overflow: hidden;
}
.result-hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--rc, var(--accent)); }
.result-hero .reveal-eyebrow { font-size: .82rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); }
.result-hero .badge {
  width: 92px; height: 92px; border-radius: 26px; margin: 20px auto 0;
  display: flex; align-items: center; justify-content: center; font-size: 2.6rem;
  background: var(--rc-soft); border: 1px solid var(--rc);
}
.result-img { position: relative; width: 208px; margin: 22px auto 0; }
.result-img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 20px; display: block; box-shadow: var(--shadow-md); border: 1px solid var(--line); }
.result-emoji { position: absolute; bottom: -12px; right: -12px; width: 48px; height: 48px; border-radius: 14px; background: var(--rc-soft); border: 1px solid var(--rc); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: var(--shadow-sm); }
.result-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-top: 22px; }
.result-hero h1 .lvlnum { color: var(--rc); }
.result-hero .r-tag { font-style: italic; font-family: var(--font-display); font-size: 1.25rem; color: var(--ink-soft); margin-top: 10px; }
.result-hero .r-sub { font-size: 1.08rem; color: var(--ink-soft); margin-top: 16px; max-width: 52ch; margin-left: auto; margin-right: auto; }

.next-block { margin-top: 30px; }
.next-block .nb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.next-block .nb-head .kicker { font-size: .82rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }
.next-block h2 { font-size: 1.9rem; }
.next-block h2 .to { color: var(--nc); }

.steps { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.step {
  display: grid; grid-template-columns: 44px 1fr; gap: 18px; align-items: start;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px 24px; box-shadow: var(--shadow-sm);
}
.step .sn {
  width: 44px; height: 44px; border-radius: 12px; background: var(--nc-soft); color: var(--nc);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display);
  font-weight: 600; font-size: 1.3rem;
}
.step h4 { font-size: 1.18rem; font-family: var(--font-body); font-weight: 700; }
.step p { color: var(--ink-soft); margin-top: 5px; font-size: .98rem; }

/* tailored prompt box */
.prompt-box {
  margin-top: 28px; background: var(--deep); color: #ece9f5; border-radius: var(--r-lg);
  padding: 28px 30px; position: relative;
}
.prompt-box .pb-label { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--l5); }
.prompt-box .pb-text { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.45; margin-top: 12px; color: #fff; }
.prompt-box .copy {
  margin-top: 18px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  color: #fff; font-size: .85rem; font-weight: 600; padding: 9px 16px; border-radius: 100px; cursor: pointer;
  transition: background .15s;
}
.prompt-box .copy:hover { background: rgba(255,255,255,.16); }

.result-actions { margin-top: 32px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.note-line { margin-top: 18px; font-size: .9rem; color: var(--ink-mute); background: var(--accent-soft); border-radius: var(--r); padding: 14px 18px; }

.hidden { display: none !important; }

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

@media (max-width: 640px) {
  .quiz-card, .result-hero { padding: 30px 24px; }
  .q-text { font-size: 1.5rem; }
  .iceberg { padding: 44px 24px; }
  .result-img { width: 168px; }
}

/* ============================================================
   PRO MOVE (Karpathy method)
   ============================================================ */
.promove-sec { padding: var(--sec-y) 0; }
.pm-quote { max-width: 780px; margin: 0 auto 46px; text-align: center; }
.pm-quote span { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.7rem); font-weight: 600; font-style: italic; line-height: 1.16; color: var(--ink); }
.pm-quote .pm-quote-by { margin-top: 14px; font-size: .92rem; color: var(--ink-mute); font-weight: 500; }
.pm-layers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pm-layer { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 26px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.pm-layer::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--pc); }
.pm-layer-head { display: flex; align-items: center; gap: 12px; }
.pm-n { width: 38px; height: 38px; border-radius: 11px; background: var(--pc-soft); color: var(--pct); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; flex-shrink: 0; }
.pm-layer-head h3 { font-size: 1.5rem; }
.pm-idea { margin-top: 14px; color: var(--ink-soft); font-size: .98rem; }
.pm-moves { margin-top: 18px; display: flex; flex-direction: column; gap: 13px; }
.pm-move { border-left: 3px solid var(--pc); padding-left: 14px; }
.pm-move-t { font-weight: 700; font-size: .96rem; color: var(--ink); }
.pm-move-p { font-family: var(--font-display); font-style: italic; color: var(--pct); font-size: .95rem; margin-top: 3px; line-height: 1.4; }
.pm-foot { max-width: 720px; margin: 36px auto 0; text-align: center; font-size: .95rem; color: var(--ink-mute); background: var(--paper); border: 1px dashed var(--line); border-radius: var(--r); padding: 16px 20px; }
@media (max-width: 820px) { .pm-layers { grid-template-columns: 1fr; } }

/* ============================================================
   ACCESSIBILITY — focus, tap targets, motion, touch hover
   ============================================================ */
:where(a, button, .opt, .btn, .link-btn, .copy, .nav-arrow, .dots .dot, input):focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px;
}
.slide--dark :focus-visible, .prompt-box :focus-visible, .iceberg :focus-visible { outline-color: #fff; }
.link-btn { min-height: 44px; padding: 10px 8px; display: inline-flex; align-items: center; margin: -6px -8px; }

.lvl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.pm-layer:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* on touch, neutralize sticky hover-movement so taps don't jitter (keep color/border feedback) */
@media (hover: none) {
  .btn:hover, .opt:hover, .lvl-card:hover, .pm-layer:hover, .nav-arrow:hover, .rung:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .fade { opacity: 1 !important; transform: none !important; }
}

/* ---------- iceberg deep-dive (screenshot) ---------- */
.iceberg-deep { display: flex; align-items: center; gap: 44px; text-align: left; max-width: 960px; margin: 0 auto; }
.iceberg-deep-text { flex: 1; }
.iceberg-deep-img { flex-shrink: 0; }
.iceberg-deep-img img { width: 290px; max-width: 38vw; border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--deep-line); display: block; }
@media (max-width: 760px) {
  .iceberg-deep { flex-direction: column; text-align: center; gap: 26px; }
  .iceberg-deep-img img { width: 230px; max-width: 72vw; }
}

/* ---------- email capture (quiz result) ---------- */
.email-capture { margin-top: 28px; background: var(--rc-soft, var(--accent-soft)); border: 1px solid color-mix(in srgb, var(--rc, var(--accent)) 30%, transparent); border-radius: var(--r-lg); padding: 30px 28px; text-align: center; }
.email-capture .ec-emoji { font-size: 1.8rem; }
.email-capture .ec-title { font-size: 1.5rem; margin-top: 6px; }
.email-capture .ec-sub { color: var(--ink-soft); margin-top: 8px; font-size: 1rem; max-width: 46ch; margin-left: auto; margin-right: auto; }
.email-capture .ec-sub b { color: var(--nc, var(--rc, var(--accent))); }
.ec-form { display: flex; gap: 10px; max-width: 470px; margin: 20px auto 0; }
.ec-form input { flex: 1; min-width: 0; font-family: var(--font-body); font-size: 1rem; padding: 14px 20px; border-radius: 100px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); }
.ec-form input:focus-visible { outline: 3px solid var(--rc, var(--accent)); outline-offset: 2px; border-color: transparent; }
.ec-form .btn--accent { background: var(--rc, var(--accent)); white-space: nowrap; }
.ec-msg { margin-top: 12px; font-size: .9rem; min-height: 1.1em; color: var(--ink-mute); }
.ec-msg.err { color: #c0492f; }
@media (max-width: 520px) { .ec-form { flex-direction: column; } }
