/* The class quiz: one question on screen at a time, black, gold for the choices. */

:root {
  --gold: #ffd60a;
  --ink: #050505;
  --paper: #f2f2f2;
  --muted: #8a8a8a;
  --line: #222;
  --c: #f79000;
  --g: clamp(16px, 2.6vw, 40px);
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100svh; display: flex; flex-direction: column; background: #000; color: var(--paper); font: 400 18px/1.5 "Inter", system-ui, sans-serif; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }

.display { font-family: "Anton", Impact, sans-serif; font-weight: 400; text-transform: uppercase; line-height: .98; letter-spacing: .002em; }
.label { font: 600 13px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sub { color: #b5b5b5; font-size: clamp(18px, 1.7vw, 23px); line-height: 1.4; }

.nav { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 14px var(--g); }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 14px/1 var(--mono); letter-spacing: .14em; }
.brand img { border-radius: 7px; }
.nav-cta { padding: 9px 18px; border-radius: 999px; background: var(--gold); color: var(--ink); font-weight: 600; font-size: 15px; }

main { position: relative; flex: 1; display: flex; justify-content: center; padding: clamp(24px, 6vw, 80px) var(--g) 60px; }
.step { position: relative; z-index: 1; width: min(100%, 880px); animation: in .45s cubic-bezier(.16, 1, .3, 1); }
@keyframes in { from { opacity: 0; transform: translateY(18px); } }

/* Start */
#start { text-align: center; }
#start h1 { font-size: clamp(72px, 13vw, 170px); margin: 14px 0 18px; }
#start h1 em { font-style: normal; color: var(--gold); }
#start .sub { max-width: 30em; margin: 0 auto; }
.go { margin-top: 30px; height: 62px; padding: 0 44px; border: 0; border-radius: 16px; background: var(--gold); color: var(--ink); font-weight: 700; font-size: 19px; cursor: pointer; transition: transform .2s; }
.faces { display: flex; justify-content: center; gap: 8px; margin-top: 44px; flex-wrap: wrap; }
.faces img { width: clamp(40px, 6vw, 64px); border-radius: 12px; opacity: .8; }

/* Forge */
.faces canvas { width: clamp(44px, 7vw, 72px); height: auto; border-radius: 14px; background: #111; }
.forge { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: start; width: min(100%, 980px); }
.forge-stage { aspect-ratio: 424 / 440; overflow: hidden; border-radius: 28px; border: 1px solid var(--line); background: radial-gradient(70% 60% at 50% 35%, #2a2a2a, #000 90%); }
.forge-stage canvas, .r-hero canvas { display: block; width: 100%; height: auto; }
.forge-pick h2 { font-size: clamp(48px, 6vw, 80px); margin-bottom: 18px; }
.pick { display: grid; grid-template-columns: 80px 1fr; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.seg { display: inline-flex; padding: 4px; border-radius: 14px; background: #141414; width: max-content; }
.seg button { padding: 10px 18px; border: 0; border-radius: 10px; background: none; font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--gold); color: var(--ink); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #000; box-shadow: 0 0 0 1px #333; cursor: pointer; touch-action: manipulation; }
.swatches button.on { box-shadow: 0 0 0 2px var(--gold); }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper button { width: 44px; height: 44px; border: 1px solid #2a2a2a; border-radius: 12px; background: #0d0d0d; font-size: 24px; line-height: 1; cursor: pointer; touch-action: manipulation; }
.stepper b { min-width: 76px; text-align: center; font: 600 15px/1 var(--mono); }
.forge-go { display: flex; gap: 12px; margin-top: 24px; }
.forge-go .go { margin-top: 0; flex: 1; }
.shuffle { height: 62px; padding: 0 24px; border: 1px solid #3a3a3a; border-radius: 16px; background: none; font-weight: 700; font-size: 17px; cursor: pointer; }

/* Questions */
.dots { display: flex; gap: 6px; margin-bottom: 26px; }
.dots i { flex: 1; height: 5px; border-radius: 9px; background: #222; }
.dots i.on { background: var(--gold); }
#q-text { font-size: clamp(46px, 7.4vw, 96px); margin: 12px 0 28px; }
.answers { display: grid; gap: 10px; }
.answers.many { grid-template-columns: 1fr 1fr; }
.answers button { display: flex; align-items: center; gap: 16px; width: 100%; padding: 20px 22px; border: 1px solid #2a2a2a; border-radius: 18px; background: #0d0d0d; text-align: left; font-size: clamp(18px, 1.8vw, 23px); font-weight: 600; letter-spacing: -.01em; cursor: pointer; touch-action: manipulation; transition: border-color .15s, background .15s, transform .15s; }
.answers button i { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #1b1b1b; font: 600 14px/1 var(--mono); font-style: normal; color: var(--gold); }
.answers button.picked { border-color: var(--gold); background: #1a1600; transform: scale(.99); }

/* Result */
.result { width: min(100%, 1040px); }
#r-friend { margin-bottom: 18px; color: var(--paper); }
#r-friend a { color: var(--gold); border-bottom: 2px solid; }
.r-card { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.r-class, .r-boss { padding: 26px; border-radius: 28px; }
.r-class { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; text-align: center; background: radial-gradient(80% 70% at 50% 40%, color-mix(in srgb, var(--c) 45%, #000), #000 95%); border: 1px solid color-mix(in srgb, var(--c) 40%, #000); }
.r-class .label { color: var(--paper); }
#r-name { font-size: clamp(64px, 9.6vw, 128px); color: var(--c); margin: 8px 0 14px; }
.r-hero { width: min(80%, 340px); margin: 0 auto; aspect-ratio: 424 / 470; overflow: hidden; animation: pop .6s .1s cubic-bezier(.3, 1.5, .5, 1) both; }
#r-face { width: min(62%, 240px); margin: 0 auto; border-radius: 26px; border: 3px solid var(--c); box-shadow: 0 0 0 6px #000, 0 26px 70px -12px var(--c); animation: pop .6s .1s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes pop { from { transform: scale(.7) rotate(-4deg); opacity: 0; } }
.r-style { margin-top: 20px; font: 600 14px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.r-grows { margin-top: 6px; color: #c9c9c9; font-size: 16px; }
.r-boss { background: #0c0c0c; border: 1px solid var(--line); }
#r-boss-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 18px; margin-top: 12px; }
#r-boss { font-size: clamp(34px, 4vw, 52px); margin-top: 16px; }
.r-flavor { margin-top: 6px; color: #c9c9c9; font-size: 17px; }
.r-beat { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.r-beat span { display: block; font: 600 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.r-beat b { display: block; margin-top: 6px; font-size: 19px; }

.r-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }
.r-actions .go { margin-top: 0; }
.store { display: inline-flex; align-items: center; gap: 12px; height: 62px; padding: 0 26px 0 20px; border-radius: 16px; border: 2px solid #3a3a3a; color: var(--paper); transition: transform .2s; }
.store svg { width: 26px; height: 26px; flex: none; }
.store span { display: flex; flex-direction: column; line-height: 1.12; }
.store small { font-size: 12px; opacity: .75; }
.store b { font-size: 19px; font-weight: 700; }
.r-status { min-height: 1.5em; margin-top: 10px; text-align: center; font: 600 14px/1.4 var(--mono); color: var(--gold); }
.r-circle { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 22px; padding: 22px 26px; border-radius: 22px; background: radial-gradient(90% 140% at 100% 0%, #2a2f7a, #11132c 60%); border: 1px solid #2b2f5e; color: #c8cbe6; }
.r-circle b { color: #fff; }
.discord { padding: 14px 22px; border-radius: 14px; background: #5865f2; color: #fff; font-weight: 700; }
.again { display: block; margin: 26px auto 0; padding: 8px 2px; border: 0; border-bottom: 2px solid; background: none; color: var(--muted); font-weight: 700; cursor: pointer; }

footer { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 24px; padding: 26px var(--g) 34px; color: var(--muted); font-size: 14px; }
footer nav { display: flex; gap: 20px; }

@media (hover: hover) {
  .go:hover, .store:hover { transform: translateY(-3px) rotate(-1deg); }
  .answers button:hover { border-color: #555; background: #141414; }
}

@media (max-width: 760px) {
  .answers.many { grid-template-columns: 1fr; }
  .forge { grid-template-columns: 1fr; }
  .forge-stage { position: sticky; top: 0; z-index: 2; width: min(100%, 300px); margin: 0 auto; aspect-ratio: 424 / 400; }
  .forge-pick h2 { display: none; }
  .answers button { padding: 16px 16px; }
  .r-card { grid-template-columns: 1fr; }
  .r-actions > * { flex: 1 1 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
