:root {
  --burgundy: #4A0E2E;
  --gold: #C9A96E;
  --ivory: #FAF8F5;
  --charcoal: #2C2C2C;
  --rose-gold: #B76E79;
  --border: rgba(183, 110, 121, 0.38);
  --shadow: rgba(44, 44, 44, 0.14);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

body::selection {
  background: var(--gold);
  color: var(--burgundy);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

.quiz-page {
  min-height: calc(100svh - 132px);
}

.quiz-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100svh;
  gap: 28px;
  align-items: end;
  padding: 24px 20px 42px;
  background-color: var(--ivory);
  background-image: url("./assets/hero-still-life.jpg");
  background-position: 52% 50%;
  background-size: cover;
}

.quiz-hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(250, 248, 245, 0.72);
  content: "";
}

.quiz-intro {
  max-width: 640px;
}

.brand {
  margin-bottom: 64px;
  color: var(--burgundy);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.quiz-intro h1 {
  max-width: 680px;
  margin-bottom: 18px;
  color: var(--burgundy);
  font-size: 3rem;
  line-height: 1;
}

.hero__copy {
  max-width: 600px;
  margin-bottom: 18px;
  color: var(--charcoal);
}

.hero__note {
  margin-bottom: 0;
  color: rgba(44, 44, 44, 0.78);
  font-size: 0.9rem;
  font-weight: 500;
}

.quiz-panel {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
  background: rgba(250, 248, 245, 0.94);
  box-shadow: 0 24px 64px var(--shadow);
  backdrop-filter: blur(8px);
}

.quiz-panel__top {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.quiz-panel h2 {
  margin-bottom: 0;
  color: var(--burgundy);
  font-size: 2.1rem;
  line-height: 1;
}

.quiz-step {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--burgundy);
  font-size: 0.76rem;
  font-weight: 700;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(183, 110, 121, 0.2);
}

.progress-bar {
  display: block;
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
  transition: width 260ms ease;
}

.quiz-stage {
  min-height: 382px;
  padding-top: 26px;
}

.question-card,
.result-card {
  animation: fade-up 240ms ease both;
}

.question-card h3,
.result-card h3 {
  margin-bottom: 20px;
  color: var(--burgundy);
  font-size: 2.1rem;
  line-height: 1;
}

.option-list {
  display: grid;
  gap: 12px;
}

.option-button {
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(183, 110, 121, 0.34);
  border-radius: 8px;
  padding: 14px 16px;
  background: rgba(250, 248, 245, 0.78);
  color: var(--charcoal);
  cursor: pointer;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.option-button:hover,
.option-button.is-selected {
  border-color: var(--gold);
  background: var(--burgundy);
  color: var(--ivory);
  transform: translateY(-1px);
}

.option-button span {
  display: block;
  font-weight: 700;
}

.option-button:disabled {
  cursor: default;
  opacity: 0.78;
}

.quiz-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 22px;
  color: inherit;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  transform: none;
}

.button:focus-visible,
.option-button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(201, 169, 110, 0.68);
  outline-offset: 3px;
}

.button--gold {
  width: 100%;
  background: var(--gold);
  color: var(--burgundy);
}

.button--gold:hover {
  background: var(--rose-gold);
  color: var(--ivory);
}

.button--ghost {
  border-color: var(--border);
  background: rgba(250, 248, 245, 0.62);
  color: var(--burgundy);
}

.button--ghost:hover {
  border-color: var(--gold);
  background: var(--ivory);
}

.result-card {
  display: grid;
  gap: 18px;
}

.result-reason {
  margin-bottom: 2px;
  color: rgba(44, 44, 44, 0.82);
  font-size: 1rem;
}

.signup-form {
  display: grid;
  gap: 12px;
  align-content: start;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.signup-form label {
  color: var(--burgundy);
  font-weight: 700;
}

.form-row {
  display: grid;
  gap: 12px;
}

input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(183, 110, 121, 0.34);
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(250, 248, 245, 0.96);
  color: var(--charcoal);
}

input::placeholder {
  color: rgba(44, 44, 44, 0.52);
}

.form-note {
  margin-bottom: 0;
  color: rgba(44, 44, 44, 0.68);
  font-size: 0.88rem;
}

.site-footer {
  display: grid;
  gap: 8px;
  padding: 26px 20px;
  background: var(--charcoal);
  color: rgba(250, 248, 245, 0.78);
  font-size: 0.88rem;
}

.site-footer p {
  margin-bottom: 0;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 740px) {
  .quiz-hero {
    min-height: calc(100svh - 84px);
    grid-template-columns: minmax(0, 0.92fr) minmax(390px, 0.78fr);
    gap: 44px;
    align-items: center;
    padding: 42px;
    background-position: center;
  }

  .quiz-hero::before {
    background: rgba(250, 248, 245, 0.54);
  }

  .brand {
    margin-bottom: 88px;
    font-size: 1.5rem;
  }

  .quiz-intro h1 {
    font-size: 4.8rem;
  }

  .hero__copy {
    font-size: 1.08rem;
  }

  .quiz-panel {
    padding: 28px;
  }

  .quiz-panel h2 {
    font-size: 2.6rem;
  }

  .question-card h3,
  .result-card h3 {
    font-size: 2.55rem;
  }

  .form-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .button--gold {
    width: auto;
  }

  .site-footer {
    grid-template-columns: auto 1fr;
    justify-content: space-between;
    padding: 30px 42px;
  }

  .site-footer p:last-child {
    text-align: right;
  }
}

@media (min-width: 1120px) {
  .quiz-hero {
    padding-left: calc((100vw - 1120px) / 2);
    padding-right: calc((100vw - 1120px) / 2);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none;
    transition: none;
  }
}
