:root {
  --ink: #11110f;
  --brown: #11110f;
  --cream: #fbf8f1;
  --paper: #ffffff;
  --sage: #d8c28e;
  --sage-dark: #b58b2a;
  --clay: #9a7b34;
  --gold: #b58b2a;
  --light-gold: #d8c28e;
  --warm-cream: #f3eee3;
  --line: rgba(181, 139, 42, 0.34);
  --shadow: 0 24px 70px rgba(17, 17, 15, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--cream);
  color: var(--ink);
  font-family: "Merriweather", Georgia, serif;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--cream);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: "Saira", system-ui, sans-serif;
  font-weight: 600;
}

.page-shell {
  min-height: 100vh;
}

.site-header {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 25px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
}

.brand-name {
  font-family: "Cormorant", Georgia, serif;
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.brand-subtitle,
.header-note,
.eyebrow {
  font-family: "Saira", system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.header-note {
  color: #7c725f;
  text-transform: uppercase;
}

.quiz-section {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 164px);
  padding: 64px 24px 70px;
}

.intro-copy {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 52px 34px 30px;
  border-top: 1px solid #262620;
  background: var(--ink);
  text-align: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--light-gold);
}

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

h1,
h2,
.result-title {
  font-family: "Cormorant", Georgia, serif;
  color: var(--brown);
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(2.55rem, 7vw, 5.2rem);
  line-height: 0.99;
  letter-spacing: -0.045em;
  color: #ffffff;
}

h1 em {
  color: #ffffff;
  font-weight: 600;
}

.lede {
  max-width: 620px;
  margin: 0 auto;
  color: #f7f2e8;
  font-size: 1.02rem;
  line-height: 1.7;
}

.quiz-card {
  position: relative;
  z-index: 2;
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 24px 48px 42px;
  border: 0;
  border-bottom: 3px solid var(--gold);
  border-radius: 0;
  background: var(--ink);
  box-shadow: var(--shadow);
}

.routine-preview {
  display: grid;
  grid-template-columns: 1fr 44px 1fr 44px 1fr;
  align-items: center;
  margin-bottom: 30px;
}

.routine-step {
  min-height: 224px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.step-number {
  color: var(--light-gold);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.step-image-wrap {
  width: 118px;
  aspect-ratio: 1;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--light-gold);
  background: #ffffff;
}

.step-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.routine-step strong,
.routine-step small {
  display: block;
}

.routine-step strong {
  margin-bottom: 3px;
  color: #ffffff;
  font-family: "Cormorant", Georgia, serif;
  font-size: 1.28rem;
}

.routine-step small {
  color: #f7f2e8;
  font-size: 0.76rem;
}

.routine-line {
  height: 1px;
  background: var(--line);
}

.primary-button,
.secondary-button,
.answer-button {
  border: 0;
  cursor: pointer;
}

.primary-button {
  width: min(100%, 340px);
  min-height: 57px;
  margin: 0 auto;
  padding: 15px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: #c49a36;
  box-shadow: 0 10px 28px rgba(181, 139, 42, 0.28);
  transform: translateY(-2px);
}

.microcopy {
  margin: 12px 0 0;
  color: #d8c28e;
  font-size: 0.76rem;
  text-align: center;
}

.progress-wrap {
  margin-bottom: 30px;
}

.progress-wrap > span {
  display: block;
  margin-bottom: 9px;
  color: #d8c28e;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.progress-track {
  height: 4px;
  overflow: hidden;
  border-radius: 8px;
  background: #34322c;
}

.progress-track span {
  width: 20%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--gold);
  transition: width 280ms ease;
}

.question-heading {
  margin: 0 0 10px;
  font-size: clamp(1.85rem, 5vw, 2.6rem);
  line-height: 1.12;
  color: #ffffff;
}

.question-help {
  margin-bottom: 23px;
  color: #f7f2e8;
  line-height: 1.55;
}

.answers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.answer-button {
  min-height: 92px;
  padding: 17px 18px;
  display: grid;
  grid-template-columns: 38px 1fr 20px;
  align-items: center;
  gap: 12px;
  border: 1px solid #d8c28e;
  border-radius: 17px;
  background: #fbf8f1;
  color: var(--ink);
  text-align: left;
  transition: border 160ms ease, background 160ms ease, transform 160ms ease;
}

.answer-button:hover,
.answer-button:focus-visible {
  border-color: var(--gold);
  background: #f3eee3;
  transform: translateY(-2px);
}

.answer-button[aria-pressed="true"] {
  border-color: var(--gold);
  background: #efe3c4;
}

.answer-emoji {
  font-size: 1.4rem;
  text-align: center;
}

.answer-label strong,
.answer-label small {
  display: block;
}

.answer-label strong {
  margin-bottom: 4px;
  color: var(--brown);
  font-size: 0.93rem;
}

.answer-label small {
  color: #7c725f;
  font-size: 0.76rem;
  line-height: 1.35;
}

.answer-arrow {
  color: var(--gold);
  font-size: 1.1rem;
}

.text-button {
  margin: 22px 0 0;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: #d8c28e;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
}

.result-kicker {
  margin: 0 0 7px;
  color: var(--light-gold);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.result-title {
  margin: 0 0 12px;
  font-size: clamp(2.1rem, 6vw, 3.7rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: #ffffff;
}

.result-intro {
  max-width: 650px;
  margin-bottom: 24px;
  color: #f7f2e8;
  line-height: 1.6;
}

.result-swatch {
  height: 7px;
  margin: 0 0 27px;
  border-radius: 100%;
  background: linear-gradient(90deg, var(--result-color), color-mix(in srgb, var(--result-color) 36%, white));
}

.routine-result {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.result-product {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fbf8f1;
}

.product-image-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-bottom: 16px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid #ddd3bf;
  border-radius: 12px;
  background: #ffffff;
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.result-product span {
  color: #9a7b34;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.result-product h3 {
  margin: 8px 0 7px;
  color: var(--brown);
  font-size: 0.93rem;
  line-height: 1.35;
}

.result-product p {
  margin: 0;
  color: #81736a;
  font-size: 0.76rem;
  line-height: 1.45;
}

.use-note {
  margin-bottom: 22px;
  padding: 15px 17px;
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: #f3eee3;
  color: #514b40;
  font-size: 0.84rem;
  line-height: 1.55;
}

.cleanser-swap {
  margin: -8px 0 22px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px dashed #d8c28e;
  border-radius: 14px;
  color: #f7f2e8;
  font-size: 0.78rem;
  line-height: 1.45;
}

.cleanser-swap strong,
.cleanser-swap span {
  display: block;
}

.cleanser-swap strong {
  margin-bottom: 3px;
  color: #ffffff;
}

.cleanser-swap a {
  flex: 0 0 auto;
  color: var(--light-gold);
  font-weight: 700;
  text-decoration: none;
}

.result-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 27px;
}

.result-actions .primary-button {
  width: auto;
  margin: 0;
  padding-inline: 25px;
}

.secondary-button {
  min-height: 52px;
  padding: 14px 20px;
  border: 1px solid var(--light-gold);
  border-radius: 999px;
  background: transparent;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.swaps {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.swaps h3 {
  margin: 0 0 5px;
  color: #ffffff;
  font-family: "Cormorant", Georgia, serif;
  font-size: 1.35rem;
}

.swaps > p {
  color: #f7f2e8;
  font-size: 0.82rem;
}

.swap-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.swap-card {
  padding: 15px;
  border-radius: 14px;
  border: 1px solid #ddd3bf;
  background: #fbf8f1;
}

.swap-card strong,
.swap-card small {
  display: block;
}

.swap-card strong {
  margin-bottom: 4px;
  color: var(--brown);
  font-size: 0.85rem;
}

.swap-card small {
  color: #82746a;
  font-size: 0.74rem;
  line-height: 1.4;
}

.restart-button {
  margin-top: 20px;
}

.botanical {
  position: absolute;
  z-index: 0;
  width: 260px;
  height: 330px;
  opacity: 0.08;
  pointer-events: none;
}

.botanical::before,
.botanical::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 2px;
  height: 100%;
  background: var(--gold);
  transform: rotate(24deg);
}

.botanical::after {
  left: 31%;
  height: 78%;
  transform: rotate(-28deg);
}

.botanical-left {
  left: -80px;
  bottom: 10%;
  transform: rotate(-18deg);
  border-radius: 60% 20% 60% 20%;
  background: repeating-radial-gradient(ellipse at 45% 45%, transparent 0 19px, var(--sage-dark) 20px 21px, transparent 22px 39px);
}

.botanical-right {
  right: -90px;
  top: 8%;
  transform: rotate(22deg);
  border-radius: 20% 60% 20% 60%;
  background: repeating-radial-gradient(ellipse at 55% 55%, transparent 0 17px, var(--clay) 18px 19px, transparent 20px 35px);
}

footer {
  width: min(980px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0 38px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  border-top: 1px solid var(--line);
  color: #7c725f;
  font-size: 0.72rem;
  line-height: 1.55;
}

footer p {
  max-width: 720px;
  margin: 0;
}

footer a {
  flex: 0 0 auto;
  color: var(--brown);
  font-weight: 700;
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid rgba(181, 139, 42, 0.5);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .site-header {
    width: calc(100% - 36px);
    padding: 19px 0;
  }

  .header-note {
    display: none;
  }

  .quiz-section {
    padding: 44px 14px 50px;
  }

  .intro-copy {
    margin-bottom: 0;
    padding: 42px 20px 24px;
  }

  h1 {
    font-size: clamp(2.55rem, 13vw, 4rem);
  }

  .lede {
    font-size: 0.92rem;
  }

  .quiz-card {
    padding: 18px 17px 34px;
    border-radius: 0;
  }

  .routine-preview {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }

  .routine-line {
    display: none;
  }

  .routine-step {
    min-height: 170px;
    padding-inline: 2px;
  }

  .routine-step strong {
    font-size: 1rem;
  }

  .step-image-wrap {
    width: min(92px, 27vw);
  }

  .answers-grid,
  .routine-result,
  .swap-grid {
    grid-template-columns: 1fr;
  }

  .answer-button {
    min-height: 80px;
  }

  .result-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .cleanser-swap {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .result-actions .primary-button,
  .secondary-button {
    width: 100%;
    text-align: center;
  }

  footer {
    width: calc(100% - 36px);
    flex-direction: column;
    gap: 18px;
  }
}

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