/* The Art History App. Matches the Framer site's look: white page, Instrument Serif + Nunito, grey panels. */
:root {
  --bg: #ffffff;
  --panel: #f4f2ef;
  --card: #faf9f7;
  --line: #e6e2dc;
  --ink: #020003;
  --muted: #6e6a63;
  --taupe: #928376;
  --good: #3c9a5f;
  --good-bg: #e9f6ee;
  --bad: #d9463e;
  --bad-bg: #fcecea;
  --flame: #e8762c;
  --gold: #f4c152;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Nunito", system-ui, -apple-system, sans-serif;
  --max: 1100px;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.eyebrow.light { color: #fff; }
.fine { font-size: 13px; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; padding: 14px 24px; font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap; transition: transform .12s ease, box-shadow .12s ease, background .2s ease; }
.btn-sm { padding: 10px 16px; font-size: 14px; }
.btn-ink { background: #000; color: #fff; box-shadow: 0 3px 0 #3a3733; }
.btn-ink:hover { background: #1c1a18; }
.btn-ink:active, .btn-paper:active, .btn-game:active { transform: translateY(3px); box-shadow: 0 0 0 transparent; }
.btn-paper { background: #fff; color: var(--ink); box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.btn-game { background: var(--ink); color: #fff; box-shadow: 0 3px 0 #3a3733; padding: 12px 20px; font-size: 15px; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font: 500 31px/1 "Cormorant", serif; text-decoration: none; color: var(--ink); }
@media (max-width: 520px) { .wordmark { font-size: 24px; } .wordmark img { width: 28px; height: 28px; } }

/* ---------- Hero ---------- */
.hero { position: relative; margin-top: 16px; min-height: 480px; border-radius: 4px; overflow: hidden; display: flex; align-items: center; background: #2a1e14; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,6,3,.78) 0%, rgba(10,6,3,.45) 45%, rgba(10,6,3,.05) 80%); }
.hero-copy { position: relative; z-index: 1; padding: 48px 44px; max-width: 560px; color: #fff; }
.hero h1 { font-size: clamp(52px, 7vw, 76px); line-height: 1; margin-bottom: 18px; }
.hero-sub { font-size: 18px; color: rgba(255,255,255,.9); margin-bottom: 28px; max-width: 440px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.hero-note { font-size: 13px; color: rgba(255,255,255,.85); }

.hero-chips { position: absolute; z-index: 1; right: 40px; bottom: 40px; display: grid; justify-items: end; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: #fff; box-shadow: 0 10px 30px -10px rgba(0,0,0,.45); font-size: 14px; font-weight: 700; animation: float 5s ease-in-out infinite; }
.chip b { font-weight: 900; }
.chip-streak b { color: var(--flame); }
.chip-xp { animation-delay: -1.6s; }
.chip-xp b { color: #b5831a; }
.chip-hearts { gap: 2px; animation-delay: -3.2s; }
@keyframes float { 50% { transform: translateY(-6px); } }
@media (max-width: 820px) {
  .hero { flex-direction: column; align-items: stretch; min-height: 0; }
  .hero::after { background: linear-gradient(180deg, rgba(10,6,3,.55), rgba(10,6,3,.85)); }
  .hero-copy { padding: 40px 24px 16px; }
  .hero-chips { position: relative; right: auto; bottom: auto; justify-items: start; padding: 8px 24px 28px; grid-auto-flow: column; justify-content: start; }
  .chip-xp { display: none; }
}

/* ---------- Feature panel ---------- */
.panel { background: var(--panel); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding: 56px 20px 64px; }
.features h3 { font-size: 28px; line-height: 1.12; margin-bottom: 12px; }
.features p:not(.eyebrow) { color: var(--muted); }
@media (max-width: 820px) { .features { grid-template-columns: 1fr; gap: 32px; padding: 40px 24px; } }

/* ---------- Sections ---------- */
.section { padding-top: 110px; }
.section h2 { font-size: clamp(32px, 4vw, 40px); line-height: 1.1; margin-bottom: 12px; }
.section-sub { color: var(--muted); font-size: 17px; max-width: 560px; }

/* ---------- Play: sample lesson + path ---------- */
.play { display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; margin-top: 40px; align-items: start; }
@media (max-width: 860px) { .play { grid-template-columns: 1fr; } }

.quiz { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 12px 40px -24px rgba(0,0,0,.25); display: flex; flex-direction: column; min-height: 640px; }
.quiz-top { display: flex; align-items: center; gap: 14px; padding: 20px 24px 0; }
.quiz-x { border: 0; background: none; font-size: 26px; line-height: 1; color: #b3ada4; padding: 0 2px; }
.quiz-x:hover { color: var(--ink); }
.quiz-bar { flex: 1; height: 14px; border-radius: 99px; background: var(--line); overflow: hidden; }
.quiz-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--good); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.quiz-stat { display: inline-flex; align-items: center; gap: 4px; font-weight: 900; font-size: 16px; }
.quiz-streak b { color: var(--flame); }
.quiz-hearts b { color: var(--bad); }
.quiz-stat.bump { animation: bump .45s ease; }
@keyframes bump { 40% { transform: scale(1.35); } }

.quiz-stage { flex: 1; padding: 20px 24px 24px; }
.quiz-stage.enter { animation: enter .35s ease; }
@keyframes enter { from { opacity: 0; transform: translateX(16px); } }
.quiz-kicker { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #8a5cc4; margin-bottom: 4px; }
.quiz-q { font-size: 28px; line-height: 1.1; margin-bottom: 4px; }
.quiz-hint { font-size: 14px; color: var(--muted); min-height: 1.5em; margin-bottom: 14px; }
.quiz-art { position: relative; margin: 0 0 16px; border-radius: 12px; overflow: hidden; }
.quiz-art[hidden] { display: none; }
.quiz-art.tappable { cursor: crosshair; }
.tap-marker { position: absolute; width: 38px; height: 38px; translate: -50% -50%; border-radius: 50%; border: 3px solid #fff; background: rgba(2,0,3,.35); box-shadow: 0 0 0 2px rgba(2,0,3,.4); pointer-events: none; }
.tap-marker.right { background: var(--good); }
.tap-marker.wrong { background: var(--bad); }

.quiz-body { display: grid; gap: 10px; }
.opt, .word { font-weight: 700; background: #fff; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 14px; transition: background .15s ease, border-color .15s ease; }
.opt { text-align: left; padding: 13px 16px; font-size: 15px; }
.opt:hover:not(:disabled), .word:hover:not(:disabled) { background: var(--panel); }
.opt:active:not(:disabled), .word:active:not(:disabled) { border-bottom-width: 2px; transform: translateY(2px); }
.opt:disabled, .word:disabled { cursor: default; }
.opt.is-picked { border-color: #8a5cc4; background: #f4eefb; color: #6c3fa6; }
.opt.is-right { border-color: var(--good); background: var(--good-bg); color: var(--good); }
.opt.is-wrong { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }
.opt small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }

.build-line { min-height: 110px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; padding: 10px 0; border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); background: repeating-linear-gradient(transparent 0 52px, var(--line) 52px 54px); }
.build-bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding-top: 14px; }
.word { padding: 8px 12px; font-size: 15px; }
.word.used { color: transparent; background: var(--line); border-color: var(--line); box-shadow: none; pointer-events: none; }

.quiz-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; border-top: 2px solid var(--line); transition: background .25s ease; }
.quiz-feedback { display: grid; gap: 2px; min-height: 44px; align-content: center; }
.quiz-feedback strong { font-size: 19px; font-weight: 900; }
.quiz-feedback span { font-size: 14px; line-height: 1.4; }
.quiz-foot.right { background: var(--good-bg); color: var(--good); border-top-color: transparent; }
.quiz-foot.wrong { background: var(--bad-bg); color: var(--bad); border-top-color: transparent; }
.quiz-foot .btn { flex-shrink: 0; }
.quiz-foot.right .btn { background: var(--good); box-shadow: 0 3px 0 #2a7446; }
.quiz-foot.wrong .btn { background: var(--bad); box-shadow: 0 3px 0 #a8322c; }
.btn:disabled { background: #d8d3cb; box-shadow: 0 3px 0 #c3bcb1; color: #fff; cursor: default; }

.lesson-done { text-align: center; padding: 30px 0 10px; display: grid; gap: 12px; justify-items: center; }
.lesson-done h3 { font-size: 40px; }
.done-stats { display: flex; gap: 8px; justify-content: center; width: 100%; }
.done-stats div { flex: 1 1 0; min-width: 0; max-width: 140px; padding: 12px 6px; border-radius: 14px; border: 2px solid var(--line); background: #fff; display: grid; }
.done-stats b { font-size: clamp(17px, 4.6vw, 22px); font-weight: 900; }
.done-stats span { font-size: 11px; font-weight: 800; letter-spacing: .04em; white-space: nowrap; text-transform: uppercase; color: var(--muted); }
.done-stats .xp b { color: #b5831a; }
.done-stats .st b { color: var(--flame); }
.done-stats .rv b { color: #8a5cc4; }
.lesson-done p { color: var(--muted); max-width: 360px; }

/* Lesson: intro card */
.intro { display: grid; gap: 14px; }
.intro-tag { justify-self: start; padding: 4px 10px; border-radius: 8px; background: #f4eefb; color: #6c3fa6; font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.intro figure { margin: 0; border-radius: 12px; overflow: hidden; }
.intro figcaption { font-size: 13px; color: var(--muted); padding-top: 8px; }
.intro ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.intro li { display: flex; gap: 10px; font-size: 15px; }
.intro li::before { content: ""; flex: 0 0 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: var(--gold); }

/* Lesson: picture grid */
.pics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pic { padding: 6px; background: #fff; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 14px; transition: border-color .15s ease, background .15s ease; }
.pic img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 9px; }
.pic:hover:not(:disabled) { background: var(--panel); }
.pic:disabled { cursor: default; }
.pic.is-picked { border-color: #8a5cc4; background: #f4eefb; }
.pic.is-right { border-color: var(--good); background: var(--good-bg); }
.pic.is-wrong { border-color: var(--bad); background: var(--bad-bg); }

/* Lesson: match pairs */
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.match .opt { text-align: center; padding: 12px 10px; min-height: 60px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.match .opt img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.match .opt.is-done { opacity: .35; border-color: var(--good); background: var(--good-bg); color: var(--good); }
.match .opt.shake { animation: shake .35s; border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@media (max-width: 460px) { .match .opt img { display: none; } }

/* Lesson: images above a question */
.quiz-imgs { display: grid; gap: 10px; margin-bottom: 14px; }
.quiz-imgs.n2 { grid-template-columns: 1fr 1fr; }
.quiz-imgs figure { margin: 0; border-radius: 12px; overflow: hidden; background: var(--line); }
.quiz-imgs.n1 img { width: 100%; max-height: 260px; object-fit: cover; }
.quiz-imgs.n2 img { width: 100%; aspect-ratio: 4 / 5; max-height: 300px; object-fit: cover; }

/* Path */
.path { background: var(--panel); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.path-unit { background: var(--ink); color: #fff; border-radius: 14px; padding: 14px 18px; display: grid; }
.path-unit-next { background: #fff; color: var(--muted); border: 2px dashed var(--line); }
.path-label { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.path-unit strong { font: 400 24px/1.1 var(--serif); }
.path-nodes { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; justify-items: center; }
.node { position: relative; transform: translateX(calc(var(--x) * 64px)); }
.node span { display: grid; place-items: center; width: 64px; height: 58px; border-radius: 50%; background: #d8d3cb; box-shadow: 0 6px 0 #bdb6ab; color: #fff; font-size: 24px; font-weight: 900; }
.node.done span { background: var(--gold); box-shadow: 0 6px 0 #c89a2e; }
.node.current span { background: var(--ink); box-shadow: 0 6px 0 #3a3733; }
.node.current::before { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 3px solid var(--ink); opacity: .25; animation: ring 1.8s ease-out infinite; }
.node.current em { position: absolute; left: calc(100% + 16px); top: 50%; translate: 0 -50%; white-space: nowrap; padding: 6px 12px; border-radius: 10px; background: #fff; border: 2px solid var(--line); font-style: normal; font-size: 13px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); animation: float 2.4s ease-in-out infinite; }
.node.chest span { border-radius: 12px; width: 58px; height: 48px; background: #b98a5b; box-shadow: 0 6px 0 #8a6440; }
@keyframes ring { from { transform: scale(.9); opacity: .4; } to { transform: scale(1.25); opacity: 0; } }

/* ---------- Collection masonry ---------- */
.masonry { columns: 4; column-gap: 12px; margin: 32px 0 20px; }
@media (max-width: 700px) { .masonry { columns: 2; column-gap: 8px; } .masonry img { margin-bottom: 8px; border-radius: 8px; } }
.masonry img { width: 100%; margin-bottom: 12px; border-radius: 12px; break-inside: avoid; transition: transform .4s ease; }
.masonry img:hover { transform: scale(1.015); }

/* ---------- Waitlist ---------- */
#waitlist { padding-top: 110px; }
.waitlist { text-align: center; padding: 64px 24px; display: grid; justify-items: center; }
.waitlist h2 { font-size: clamp(36px, 5vw, 44px); margin-bottom: 14px; }
.waitlist > p:not(.eyebrow):not(.fine) { color: var(--muted); max-width: 440px; margin-bottom: 28px; }
.signup { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; max-width: 460px; margin-bottom: 14px; }
.signup input { flex: 1 1 220px; min-width: 0; padding: 14px 16px; border-radius: 10px; border: 2px solid var(--line); background: #fff; font: inherit; color: var(--ink); }
.signup input:focus { outline: none; border-color: var(--ink); }
.signup.is-done { display: none; }
.signup .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.signup-note.is-error { color: var(--bad); }

/* ---------- Footer ---------- */
.footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 0; padding-top: 28px; padding-bottom: 40px; }
.footer .wordmark { font-size: 28px; }
.footer nav { display: flex; gap: 22px; font-size: 14px; }
.footer nav span { color: var(--muted); }
.footer nav a { text-decoration: none; }
.footer nav a:hover { text-decoration: underline; }
footer.wrap { border-top: 1px solid var(--line); max-width: var(--max); padding-left: 0; padding-right: 0; margin-top: 0; }
@media (max-width: 1132px) { footer.wrap { margin-left: var(--gutter); margin-right: var(--gutter); } }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

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