/* Fonts: Geist + Geist Mono (OFL), self-hosted. Warm cream palette, bronze accent and serif headings follow headofsales.me. */
@font-face { font-family: "Geist"; src: url(fonts/geist-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(fonts/geist-mono-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #f4efe6; --surface: #fbf8f2; --ink: #292724; --muted: #6b665f; --line: #ddd5ca;
  --accent: #9a6d50; --accent-ink: #ffffff; --accent-soft: #eadfd2; --good: #4f6b5e; --warn: #b45309;
  --r: 14px; --ease: cubic-bezier(.32,.72,0,1);
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #171411; --surface: #211d19; --ink: #f2ede5; --muted: #b3aa9d; --line: #3a342e;
    --accent: #d2a47f; --accent-ink: #1a1410; --accent-soft: #3a2f26; --good: #8fb3a1; --warn: #e0954d; }
  .logo img { filter: brightness(0) invert(1); }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; background: var(--bg); min-height: 100dvh; overflow-x: hidden; }
svg { display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.mono { font-family: var(--mono); }

/* Background: three slow bronze orbs */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-orbs i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; background: radial-gradient(circle, var(--accent-soft), transparent 70%); animation: drift 22s ease-in-out infinite alternate; }
.bg-orbs i:nth-child(1) { width: 52vw; height: 52vw; top: -14vw; right: -10vw; }
.bg-orbs i:nth-child(2) { width: 42vw; height: 42vw; bottom: -12vw; left: -12vw; animation-delay: -7s; opacity: .38; }
.bg-orbs i:nth-child(3) { width: 26vw; height: 26vw; top: 38%; left: 36%; animation-delay: -13s; opacity: .22; }
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(3vw,2vw,0) scale(1.12); } }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1180px; margin: 0 auto; padding: 20px 24px 0; }
.logo img { display: block; height: 34px; width: auto; }
.snd { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: blur(6px);
  font: 500 .8rem var(--sans); color: var(--muted); transition: border-color .25s, color .25s, background-color .25s; }
.snd:hover { border-color: var(--accent); color: var(--ink); }
.snd[aria-pressed=true] { border-color: var(--accent); color: var(--ink); }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i { display: block; width: 3px; height: 4px; background: var(--accent); border-radius: 2px; transform-origin: bottom; }
.snd[aria-pressed=true] .eq i { animation: eq 1s ease-in-out infinite; }
.snd[aria-pressed=true] .eq i:nth-child(2) { animation-delay: -.3s; } .snd[aria-pressed=true] .eq i:nth-child(3) { animation-delay: -.6s; } .snd[aria-pressed=true] .eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }

#app { max-width: 1180px; margin: 0 auto; padding: 8px 24px 40px; overflow-x: clip; }
.screen[hidden] { display: none !important; }
.screen.active { animation: rise .8s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.reveal.in { opacity: 1; transform: none; }

/* Intro */
#intro { display: grid; gap: 40px; padding-top: 24px; }
.kicker { margin: 0 0 14px; font: 600 .72rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
h1 { font: 500 clamp(2.3rem, 7.2vw, 4.1rem)/1.02 var(--serif); letter-spacing: -.02em; margin: 0 0 18px; text-wrap: balance; }
.lede { color: var(--muted); font-size: 1.08rem; margin: 0; max-width: 31rem; }
.start-note { margin-top: 16px; font-family: var(--mono); font-size: .8rem; letter-spacing: .02em; }
.intro-art { position: relative; }
.arch-wrap { position: relative; max-width: 440px; margin: 0 auto; padding: 0 0 40px; }
.arch { margin: 0; position: relative; aspect-ratio: 3 / 4; border-radius: 999px 999px 26px 26px; overflow: hidden; box-shadow: 0 30px 60px -28px rgba(41,39,36,.55); animation: arch-in 1.3s var(--ease) both; background: var(--accent-soft); }
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; display: block; animation: slow-zoom 24s ease-in-out infinite alternate; }
@keyframes arch-in { from { clip-path: inset(100% 0 0 0 round 999px 999px 26px 26px); transform: scale(.96); } to { clip-path: inset(0 0 0 0 round 999px 999px 26px 26px); transform: none; } }
@keyframes slow-zoom { from { transform: scale(1); } to { transform: scale(1.07); } }
.ring-deco i { position: absolute; border: 1px solid var(--accent); border-radius: 999px 999px 26px 26px; opacity: .45; animation: ring-breathe 7s ease-in-out infinite; }
.ring-deco i:nth-child(1) { inset: -12px -12px 28px -12px; }
.ring-deco i:nth-child(2) { inset: -22px -22px 18px -22px; opacity: .22; animation-delay: -3.5s; }
@keyframes ring-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.018); } }
.chips { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chips li { display: flex; flex-direction: column; padding: 12px 16px; border-radius: var(--r); background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line); backdrop-filter: blur(6px);
  opacity: 0; animation: chip-in .8s var(--ease) forwards, bob 6s ease-in-out infinite; animation-delay: calc(.7s + var(--i) * .14s), calc(1.6s + var(--i) * .5s); }
.chips b { font: 500 1.75rem/1 var(--serif); color: var(--accent); }
.chips span { font-size: .78rem; color: var(--muted); margin-top: 3px; line-height: 1.25; }
@keyframes chip-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
.quote-card { margin: 14px 0 0; padding: 18px 20px; border-radius: var(--r); background: var(--ink); color: #f4efe6; opacity: 0; animation: chip-in .9s var(--ease) 1.5s forwards; }
.quote-card p { margin: 0 0 12px; font: italic 500 1.25rem/1.3 var(--serif); }
.quote-card footer { display: flex; flex-direction: column; font-size: .78rem; }
.quote-card footer b { font-weight: 600; letter-spacing: .02em; }
.quote-card footer span { color: #cfc6b8; }
@media (prefers-color-scheme: dark) { .quote-card { background: #2c2722; } }
@media (min-width: 940px) {
  #intro { grid-template-columns: 1.02fr .98fr; align-items: center; gap: 64px; min-height: calc(100dvh - 120px); padding-top: 0; }
  .arch-wrap { max-width: 470px; padding: 0 0 8px; margin: 0 0 0 auto; }
  .chips { display: block; margin: 0; }
  .chips li { position: absolute; width: 164px; }
  .chips li:nth-child(1) { left: -78px; top: 62px; } .chips li:nth-child(2) { right: -54px; top: 168px; }
  .chips li:nth-child(3) { left: -92px; top: 328px; } .chips li:nth-child(4) { right: -40px; top: 430px; }
  .quote-card { position: absolute; left: -38px; bottom: -22px; width: 330px; box-shadow: 0 22px 40px -22px rgba(41,39,36,.6); }
}

/* Buttons */
.primary { display: inline-flex; align-items: center; justify-content: space-between; gap: 18px; border: 0; text-decoration: none;
  background: var(--ink); color: var(--bg); border-radius: 999px; padding: 8px 8px 8px 26px;
  font: 600 1rem var(--sans); margin-top: 30px; min-height: 56px;
  transition: transform .5s var(--ease), background-color .3s var(--ease), box-shadow .4s var(--ease); box-shadow: 0 14px 28px -16px rgba(41,39,36,.7); }
.primary .arr { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.14); transition: transform .5s var(--ease); }
@media (prefers-color-scheme: dark) { .primary { background: var(--accent); color: var(--accent-ink); } .primary .arr { background: rgba(0,0,0,.14); } }
.primary .arr svg { width: 18px; height: 18px; }
.primary:hover .arr { transform: translateX(4px); }
.primary:hover { transform: translateY(-2px); }
.primary:active { transform: scale(.985); }
.primary.disabled { opacity: .45; pointer-events: none; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; color: inherit; font-weight: 600; }
.fine { color: var(--muted); font-size: .9rem; margin: 14px 0 0; }

/* What you get */
.inside-band { padding: 56px 0 16px; }
.inside-band h2 { font: 500 clamp(1.8rem, 5vw, 2.6rem)/1.1 var(--serif); margin: 0 0 24px; letter-spacing: -.01em; text-align: left; }
.cards4 { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.cards4 li { padding: 22px 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); transition: transform .5s var(--ease), border-color .3s; }
.cards4 li:hover { transform: translateY(-4px); border-color: var(--accent); }
.cards4 .ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.cards4 .ic svg { width: 22px; height: 22px; }
.cards4 h3 { font: 600 1rem/1.25 var(--sans); margin: 0 0 6px; }
.cards4 p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.45; }
.expert-link { margin: 22px 0 0; font-size: .95rem; }
.expert-link a { color: var(--accent); text-underline-offset: 3px; }
.cards4.compact { grid-template-columns: 1fr 1fr; gap: 10px; } .cards4.compact li { padding: 16px 14px; } .cards4.compact h3 { font-size: .9rem; } .cards4.compact p { font-size: .82rem; }

/* Quiz */
#quiz { max-width: 640px; margin: 0 auto; padding-top: 28px; }
.qmeta { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; min-height: 40px; }
.back { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; transition: transform .4s var(--ease), border-color .3s; flex: none; }
.back:hover { transform: translateX(-2px); border-color: var(--accent); }
.back[hidden] { display: grid; visibility: hidden; }
.back svg { width: 20px; height: 20px; }
.parts { list-style: none; display: flex; gap: 5px; margin: 0 auto 0 4px; padding: 0; flex: 1; }
.parts li { flex: 1; height: 5px; border-radius: 3px; background: var(--line); transition: background-color .4s var(--ease), transform .4s var(--ease); }
.parts li.done { background: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.parts li.on { background: var(--accent); transform: scaleY(1.5); }
.parts li.know.on, .parts li.know.done { background: var(--good); }
.count { margin: 0; font-family: var(--mono); color: var(--muted); font-size: .95rem; font-variant-numeric: tabular-nums; flex: none; }
.count .of { margin-left: 4px; }
.count .n { color: var(--ink); font-weight: 600; font-size: 1.15rem; }
.progress { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
#bar { height: 100%; width: 0; background: var(--accent); transition: width .6s var(--ease); }
#qwrap { padding-top: 30px; }
.qsec { margin: 0 0 14px; display: flex; flex-direction: column; gap: 2px; }
.qsec b { font: 600 .72rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.qsec span { color: var(--muted); font-size: .88rem; }
#qwrap.know .qsec b { color: var(--good); }
#qwrap.know #qtext::before { content: "?"; display: inline-grid; place-items: center; width: 1.45em; height: 1.45em; margin-right: .5em; border-radius: 50%; background: var(--good); color: var(--bg); font: 700 .7em var(--sans); vertical-align: .12em; }
h2 { font: 500 clamp(1.6rem, 5.4vw, 2.1rem)/1.15 var(--serif); letter-spacing: -.01em; margin: 0 0 24px; text-wrap: balance; }
#qwrap.fwd { animation: infwd .55s var(--ease) both; }
#qwrap.bwd { animation: inbwd .55s var(--ease) both; }
@keyframes infwd { from { opacity: 0; transform: translateX(34px); } to { opacity: 1; transform: none; } }
@keyframes inbwd { from { opacity: 0; transform: translateX(-34px); } to { opacity: 1; transform: none; } }

.options { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 16px; text-align: left; min-height: 60px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 12px 18px 12px 12px; line-height: 1.38;
  transition: transform .45s var(--ease), background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), box-shadow .35s var(--ease);
  opacity: 0; animation: opt-in .55s var(--ease) forwards; animation-delay: calc(var(--k, 0) * 55ms + 120ms); }
@keyframes opt-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.opt .key { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font: 600 .85rem var(--mono); transition: background-color .25s var(--ease), color .25s var(--ease); }
.opt:hover { transform: translateX(5px); border-color: var(--accent); box-shadow: 0 10px 22px -16px rgba(41,39,36,.5); }
.opt:hover .key { background: var(--accent); color: var(--accent-ink); }
.opt:active { transform: scale(.985); }
.opt.picked { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (prefers-color-scheme: dark) { .opt.picked { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); } }
.opt.picked .key { background: rgba(255,255,255,.2); color: inherit; }
.opt.dk { border-style: dashed; color: var(--muted); }
.busy .opt { pointer-events: none; opacity: .55; }
.err { margin-top: 20px; color: var(--warn); }

/* Result card */
#result { max-width: 520px; margin: 0 auto; padding-top: 24px; }
.rcard { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px 24px 24px; overflow: hidden; box-shadow: 0 30px 50px -34px rgba(41,39,36,.55); }
.rcard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--accent), var(--good)); }
.r-title { text-align: center; text-transform: uppercase; letter-spacing: .18em; font: 600 .72rem var(--sans); color: var(--accent); margin: 0; }
.r-date { text-align: center; color: var(--muted); font-size: .78rem; margin: 2px 0 0; font-family: var(--mono); }
.gauge { position: relative; width: 190px; height: 190px; margin: 18px auto 6px; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge .trk { fill: none; stroke: var(--line); stroke-width: 9; }
.gauge .val { fill: none; stroke: url(#gg); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.8s var(--ease) .5s; }
.gauge .num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font: 500 3.6rem/1 var(--serif); font-variant-numeric: tabular-nums; }
.gauge .num small { font: 500 .78rem var(--mono); color: var(--muted); margin-top: 4px; }
.g-lbl { text-align: center; font: 600 .74rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0; }
.band { text-align: center; margin: 8px 0 18px; font: 500 1.12rem/1.3 var(--serif); }
.rrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .95rem; opacity: 0; animation: print .6s var(--ease) forwards; animation-delay: calc(.9s + var(--i) * .16s); }
@keyframes print { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.rrow strong { font-weight: 600; text-align: right; }
.rrow .redact { display: inline-block; height: .85em; background: var(--ink); border-radius: 3px; opacity: .85; }
.know-card { margin: 12px 0 4px; padding: 14px 16px; border-radius: var(--r); background: var(--accent-soft); opacity: 0; animation: print .6s var(--ease) 1.2s forwards; }
.know-card .kt { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: .95rem; }
.know-card .kt b { font: 600 .74rem var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.know-card .kt span { font-weight: 600; }
.pips { display: flex; gap: 8px; margin: 10px 0 8px; }
.pips i { flex: 1; height: 8px; border-radius: 4px; background: var(--line); transform: scaleX(0); transform-origin: left; animation: pip .5s var(--ease) forwards; animation-delay: calc(1.5s + var(--p) * .18s); }
.pips i.ok { background: var(--good); }
@keyframes pip { to { transform: scaleX(1); } }
.know-card p { margin: 0; font-size: .85rem; color: var(--muted); }
.know-card .kb { font: 500 1.05rem var(--serif); color: var(--ink); margin-bottom: 4px; }
.money-lbl { text-transform: uppercase; letter-spacing: .12em; font: 600 .72rem var(--sans); margin: 14px 0 0; color: var(--muted); }
.money-num { font: 500 clamp(2.1rem, 10vw, 3rem)/1.05 var(--serif); white-space: nowrap; letter-spacing: -.02em; color: var(--accent); font-variant-numeric: tabular-nums; margin: 2px 0 0; }
.rcard .fine { margin: 6px 0 0; line-height: 1.4; }
#result .primary { display: flex; margin-top: 26px; }
#result #buy { position: sticky; bottom: 14px; z-index: 6; margin-top: 22px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 16px 30px -12px rgba(154,109,80,.7); }
#result #buy .arr { background: rgba(255,255,255,.2); }
#result .buynote { margin-top: 14px; }
.sample { margin-top: 30px; }
.sample .inside { margin: 0 0 12px; font: 500 1.4rem var(--serif); }

/* Spark: a few specks rise from the score ring when the result opens */
.spark { position: absolute; left: 50%; top: 40%; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); pointer-events: none; opacity: 0; animation: spark 1.6s var(--ease) forwards; }
@keyframes spark { 0% { opacity: 0; transform: translate(0,0) scale(.5); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1); } }

/* Language picker: flags pop in one after another, the chosen one is ringed, picking one swaps the words */
.langpick { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; }
.lp { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink);
  font: 500 .78rem/1 var(--sans); letter-spacing: .04em; opacity: 0; transform: translateY(10px) scale(.9); animation: lp-in .5s var(--ease) forwards; animation-delay: calc(var(--i) * 70ms + 120ms);
  transition: border-color .2s, box-shadow .2s, transform .2s var(--ease), background-color .2s; }
.lp .fl { display: block; width: 26px; height: 17px; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 1px rgba(41,39,36,.18); flex: none; }
.lp .fl svg { width: 100%; height: 100%; }
.lp:hover { transform: translateY(-2px); border-color: var(--accent); }
.lp.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); }
.lp.on .fl { animation: lp-pop .5s var(--ease); }
@keyframes lp-in { to { opacity: 1; transform: none; } }
@keyframes lp-pop { 0% { transform: scale(1); } 40% { transform: scale(1.16) rotate(-3deg); } 100% { transform: scale(1); } }
.swap.in { animation: swap-in .38s var(--ease); }
@keyframes swap-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 520px) { .lp { padding: 5px 7px 5px 5px; gap: 5px; } .lp .fl { width: 22px; height: 15px; } .snd-t { display: none; } .snd { padding: 9px 12px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .lp, .chips li, .quote-card, .opt, .rrow, .know-card { opacity: 1 !important; transform: none !important; }
  .pips i { transform: none; }
  .gauge .val { transition: none; }
  .bg-orbs { display: none; }
}

.prod { font: 600 .72rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.thanks h1 { font-family: var(--serif); }

.expert-card { display: flex; align-items: center; gap: 16px; margin: 26px 0 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.expert-card img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; object-position: 50% 25%; flex: none; }
.expert-card div { display: flex; flex-direction: column; gap: 2px; font-size: .92rem; }
.expert-card b { font: 500 1.25rem/1.1 var(--serif); }
.expert-card span { color: var(--muted); }
.expert-card a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }
