:root {
  color-scheme: dark;
  --bg: #0b0707;
  --panel: #17100f;
  --panel-light: #211615;
  --wine: #8d111c;
  --wine-light: #b21d2b;
  --gold: #e4ac42;
  --gold-soft: #f0c777;
  --text: #fffaf5;
  --muted: #c9bbb3;
}

* { box-sizing: border-box; }

html {
  width: 100%;
  overflow-x: hidden;
  background: var(--bg);
}

body {
  margin: 0;
  width: 100%;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Sora", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, a { font: inherit; }
button { color: inherit; }
img { max-width: 100%; }

.quiz-app, .screen {
  width: 100%;
  min-height: 100svh;
  overflow-x: hidden;
}

.screen { display: none; }
.screen.is-active { display: flex; }

.cover {
  position: relative;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: url("../images/quiz-cover.png") center / cover no-repeat;
}

.cover__shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(9, 5, 5, .7) 0%, rgba(7, 4, 4, .86) 55%, rgba(7, 4, 4, .96) 100%),
    linear-gradient(0deg, rgba(7, 4, 4, .76), rgba(7, 4, 4, .28));
}

.cover__content {
  position: relative;
  width: min(720px, calc(100% - 32px));
  padding: 48px 0 56px;
  text-align: center;
  z-index: 1;
}

.brand {
  display: block;
  width: 218px;
  height: 130px;
  margin: 0 auto 26px;
  object-fit: contain;
}

.eyebrow, .question__number, .result__ready {
  margin: 0 0 16px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .16em;
}

.cover h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(42px, 5vw, 74px);
  line-height: 1.02;
  letter-spacing: -.05em;
}

.cover h1 span, .result h2 span { color: var(--gold); }

.cover__lead {
  max-width: 650px;
  margin: 24px auto 0;
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.5;
}

.cover__audience {
  max-width: 590px;
  margin: 16px auto 30px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.primary-button {
  display: inline-flex;
  max-width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  padding: 16px 28px;
  border: 1px solid #d9b25f;
  border-radius: 8px;
  background: linear-gradient(180deg, #b91f2f, #780d17);
  box-shadow: 0 14px 36px rgba(141, 17, 28, .34), inset 0 1px rgba(255,255,255,.2);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .03em;
  text-align: center;
  text-decoration: none;
  transition: transform .2s ease, filter .2s ease;
}

.primary-button:hover { filter: brightness(1.13); transform: translateY(-2px); }
.primary-button:focus-visible, .answers button:focus-visible, .back-button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.cover .primary-button { margin-top: 30px; }
.microcopy { max-width: 650px; margin: 12px auto 0; color: #9f918a; font-size: 12px; line-height: 1.5; }

.questions {
  align-items: flex-start;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(141, 17, 28, .18), transparent 38%),
    linear-gradient(145deg, #100b0a, #080606 70%);
}

.quiz-shell {
  width: min(720px, calc(100% - 40px));
  min-width: 0;
  padding: 28px 0 52px;
}

.quiz-header { margin-bottom: 56px; }
.quiz-header__logo { display: block; width: 122px; height: 72px; margin: 0 auto 24px; object-fit: contain; }
.progress-meta { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--muted); font-size: 12px; font-weight: 600; }
.progress-track { height: 5px; overflow: hidden; border-radius: 99px; background: #2c2220; }
.progress-track span { display: block; width: 25%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--wine), var(--gold)); transition: width .35s ease; }

.question { display: none; min-width: 0; animation: enter .35s ease both; }
.question.is-active { display: block; }
.question h2 { margin: 0 0 30px; font-size: clamp(27px, 4vw, 39px); line-height: 1.2; letter-spacing: -.035em; }

.answers { display: grid; gap: 12px; }
.answers button {
  position: relative;
  width: 100%;
  min-height: 66px;
  padding: 17px 54px 17px 20px;
  border: 1px solid #3b2b28;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(34, 23, 21, .96), rgba(23, 16, 15, .96));
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  overflow-wrap: anywhere;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.answers button::after { content: "›"; position: absolute; top: 50%; right: 21px; color: var(--gold); font-size: 28px; transform: translateY(-53%); }
.answers button:hover, .answers button.is-selected { border-color: var(--gold); background: #2b1918; transform: translateX(4px); }

.back-button { margin: 24px 0 0; padding: 8px 0; border: 0; background: none; color: #958883; cursor: pointer; font-size: 13px; }
.back-button[hidden] { display: none; }

.loading { align-items: center; justify-content: center; padding: 40px 24px; text-align: center; background: radial-gradient(circle, #241312, #090606 62%); }
.loading__content { width: min(530px, 100%); }
.loading__logo, .result__logo { width: 160px; height: 96px; object-fit: contain; }
.scanner { position: relative; width: 108px; height: 108px; margin: 28px auto; border: 1px solid rgba(228,172,66,.25); border-radius: 50%; }
.scanner::before, .scanner::after { content: ""; position: absolute; border: 1px solid rgba(228,172,66,.18); border-radius: 50%; }
.scanner::before { inset: 13px; }
.scanner::after { inset: 30px; }
.scanner span { position: absolute; inset: -1px; border-top: 2px solid var(--gold); border-radius: 50%; animation: spin 1s linear infinite; }
.loading h2 { margin: 0 0 12px; font-size: clamp(26px, 5vw, 38px); }
.loading p { margin: 0 auto; color: var(--muted); line-height: 1.6; }
.loading-line { height: 4px; margin-top: 32px; overflow: hidden; border-radius: 99px; background: #342321; }
.loading-line span { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, var(--wine), var(--gold)); animation: load 2.6s ease-out both; transform-origin: left; }

.result { justify-content: center; padding: 50px 24px 70px; background: radial-gradient(circle at 50% 0%, rgba(141,17,28,.22), transparent 28%), #0b0707; }
.result__content { width: min(720px, 100%); min-width: 0; }
.result__logo { display: block; margin: 0 auto 28px; }
.result__ready { text-align: center; }
.result h2 { margin: 0 auto 30px; max-width: 680px; font-size: clamp(30px, 5vw, 49px); line-height: 1.14; letter-spacing: -.045em; text-align: center; }

.personalized-result {
  margin: 0 0 30px;
  padding: 22px 24px;
  border-left: 3px solid var(--gold);
  background: linear-gradient(90deg, rgba(228,172,66,.11), transparent);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.65;
}

.result__copy { font-size: 17px; line-height: 1.7; }
.result__copy p { margin: 0 0 10px; }
.result__emphasis { margin-top: 24px !important; font-size: 21px; font-weight: 800; }
.result__list { color: var(--gold-soft); font-size: 19px; font-weight: 700; }

.contrast {
  display: grid;
  gap: 12px;
  margin: 34px 0;
  padding: 28px;
  border: 1px solid #49302c;
  border-radius: 12px;
  background: var(--panel);
  text-align: center;
}
.contrast p { margin: 0 0 8px; color: var(--muted); }
.contrast strong { font-size: 20px; }
.contrast span { color: #8f7f78; font-size: 13px; font-weight: 800; text-transform: uppercase; }
.contrast em { color: var(--gold); font-style: normal; }
.steps-callout { margin: 0 0 24px; font-size: 20px; font-weight: 700; line-height: 1.5; text-align: center; }
.result .primary-button { display: flex; width: min(100%, 510px); margin: 0 auto; }

@keyframes enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes load { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (max-width: 700px) {
  .cover { align-items: center; background-position: 34% center; }
  .cover__shade { background: radial-gradient(circle at center, rgba(7,4,4,.66) 0%, rgba(7,4,4,.9) 72%, rgba(7,4,4,.98) 100%); }
  .cover__content { width: min(100% - 32px, 520px); padding: 28px 0 34px; text-align: center; }
  .brand { width: 155px; height: 92px; margin: 0 auto 13px; }
  .eyebrow { margin-bottom: 12px; font-size: 10px; }
  .cover h1 { font-size: clamp(37px, 11vw, 52px); }
  .cover__lead { margin-top: 16px; font-size: 17px; }
  .cover__audience { margin: 12px 0 22px; font-size: 13px; line-height: 1.5; }
  .cover .primary-button { width: 100%; }
  .quiz-shell { width: min(100% - 28px, 620px); padding-top: 18px; }
  .quiz-header { margin-bottom: 38px; }
  .quiz-header__logo { width: 104px; height: 62px; margin-bottom: 15px; }
  .question h2 { margin-bottom: 24px; font-size: 27px; }
  .answers button { min-height: 61px; padding: 14px 45px 14px 16px; font-size: 14px; }
  .result { padding: 30px 18px 52px; }
  .result h2 { font-size: 31px; }
  .personalized-result, .contrast { padding: 20px; }
  .result__copy { font-size: 16px; }
}

@media (max-width: 420px) {
  .cover__content {
    width: calc(100% - 28px);
    padding: 22px 0;
  }

  .brand {
    width: 138px;
    height: 80px;
    margin-bottom: 10px;
  }

  .cover h1 {
    font-size: clamp(32px, 10vw, 40px);
    line-height: 1.04;
  }

  .cover__lead {
    font-size: 16px;
    line-height: 1.42;
  }

  .cover__audience {
    font-size: 12px;
  }

  .primary-button {
    min-height: 55px;
    padding: 14px 16px;
    font-size: 13px;
  }

  .quiz-shell {
    width: calc(100% - 24px);
  }

  .question h2 {
    font-size: 24px;
  }

  .answers button {
    min-height: 58px;
    padding: 13px 42px 13px 14px;
    font-size: 13px;
  }

  .result {
    padding-inline: 14px;
  }

  .result h2 {
    font-size: 27px;
  }

  .personalized-result,
  .contrast {
    padding: 17px;
  }

  .result__emphasis,
  .contrast strong,
  .steps-callout {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
