:root {
  --ink: #211d19;
  --paper: #f3eee6;
  --cream: #fffaf2;
  --coffee: #7c3f22;
  --line: rgba(33, 29, 25, .18);
  --muted: #6d645d;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
button, input { font: inherit; }

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  background: linear-gradient(90deg, rgba(24,20,17,.9) 0%, rgba(24,20,17,.7) 38%, rgba(24,20,17,.04) 72%), url("hero-espresso.png") center/cover;
  color: var(--cream);
  overflow: hidden;
}
.hero__inner { width: min(1180px, calc(100% - 48px)); margin: auto; padding: 80px 0; }
.brand, .eyebrow { margin: 0 0 26px; font-size: .72rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
h1, h2, legend { font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.035em; }
h1 { max-width: 760px; margin: 0; font-size: clamp(3rem, 7vw, 6.8rem); line-height: .93; }
.hero__copy { max-width: 570px; margin: 32px 0; font-size: clamp(1.05rem, 1.6vw, 1.35rem); line-height: 1.55; }
.hero__note { margin: 18px 0 0; color: rgba(255,250,242,.72); font-size: .82rem; }
.button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; border: 0; padding: 0 24px; font-weight: 750; cursor: pointer; transition: transform .18s ease, background .18s ease; text-decoration: none; }
.button:hover { transform: translateY(-2px); }
.button:focus-visible, .text-button:focus-visible, .question label:has(input:focus-visible) { outline: 3px solid #df9b6c; outline-offset: 3px; }
.button--primary { color: #fff; background: var(--coffee); }
.button--primary:hover { background: #944d29; }
.button--dark { color: #fff; background: var(--ink); }
.button--quiet { color: var(--ink); background: transparent; border: 1px solid var(--line); }

.proof { display: flex; gap: 48px; align-items: center; justify-content: space-between; padding: 28px max(24px, calc((100% - 1180px)/2)); background: var(--ink); color: var(--cream); }
.proof p { max-width: 500px; margin: 0; font-family: Georgia, serif; font-size: 1.3rem; }
.proof ul { display: flex; gap: 28px; margin: 0; padding: 0; list-style: none; color: #d6c7b9; font-size: .84rem; }

.selector { display: grid; grid-template-columns: .75fr 1.25fr; gap: clamp(48px, 8vw, 120px); width: min(1180px, calc(100% - 48px)); margin: auto; padding: 120px 0; }
.selector__intro { position: sticky; top: 48px; align-self: start; }
.selector h2, .principles h2 { margin: 0 0 20px; font-size: clamp(2.4rem, 4vw, 4.5rem); line-height: 1; }
.selector__intro > p:last-child, .principles > p:last-child { color: var(--muted); line-height: 1.7; }
.quiz, .result { min-height: 560px; padding-top: 8px; animation: rise .42s ease both; }
.progress { margin-bottom: 46px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.progress__track { height: 2px; margin-top: 12px; background: var(--line); }
.progress__track span { display: block; width: 25%; height: 100%; background: var(--coffee); transition: width .3s ease; }
.question { display: grid; gap: 12px; margin: 0; padding: 0; border: 0; animation: rise .28s ease both; }
.question legend { margin-bottom: 8px; font-size: clamp(2rem, 3.5vw, 3.3rem); line-height: 1.04; }
.question__hint { margin: 0 0 14px; color: var(--muted); }
.question label { display: block; border-top: 1px solid var(--line); cursor: pointer; transition: background .18s ease; }
.question label:last-of-type { border-bottom: 1px solid var(--line); }
.question label:hover { background: rgba(255,255,255,.42); }
.question input { position: absolute; opacity: 0; }
.question span { display: grid; gap: 4px; padding: 20px 16px; color: var(--muted); }
.question strong { color: var(--ink); font-size: 1.08rem; }
.question label:has(input:checked) { background: var(--ink); }
.question label:has(input:checked) span, .question label:has(input:checked) strong { color: var(--cream); }
.quiz__actions { display: flex; justify-content: space-between; margin-top: 30px; }
.quiz__actions .button:only-child { margin-left: auto; }
.quiz__error { min-height: 20px; margin: 16px 0 0; color: #9e2f21; font-size: .88rem; }

.result__summary { max-width: 650px; font-size: 1.2rem; line-height: 1.6; }
.result__specs { display: grid; grid-template-columns: repeat(3, 1fr); margin: 36px 0; border-block: 1px solid var(--line); }
.result__specs div { padding: 22px 16px 22px 0; }
.result__specs dt { color: var(--muted); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.result__specs dd { margin: 7px 0 0; font-weight: 750; }
.result__reason { margin: 32px 0; }
.result__reason h3 { margin-bottom: 8px; }
.result__reason p { color: var(--muted); line-height: 1.65; }
.result__response { min-height: 24px; color: var(--coffee); font-weight: 700; }
.text-button { border: 0; padding: 10px 0; color: var(--muted); background: transparent; text-decoration: underline; cursor: pointer; }
.principles { padding: 100px max(24px, calc((100% - 1180px)/2)); background: #d9cbbb; }
.principles h2 { max-width: 780px; }
.principles > p:last-child { max-width: 630px; }
footer { padding: 28px 24px; background: var(--ink); color: #b8aaa0; text-align: center; font-size: .78rem; }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
@media (max-width: 760px) {
  .hero { min-height: 92svh; background-position: 62% center; }
  .hero__inner { width: min(100% - 32px, 560px); padding-top: 180px; }
  .hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(24,20,17,.92), rgba(24,20,17,.1)); pointer-events: none; }
  .hero__inner { position: relative; z-index: 1; }
  .proof { display: block; }
  .proof ul { flex-wrap: wrap; gap: 10px 20px; margin-top: 20px; }
  .selector { grid-template-columns: 1fr; width: min(100% - 32px, 600px); padding: 76px 0; }
  .selector__intro { position: static; }
  .quiz, .result { min-height: 0; }
  .result__specs { grid-template-columns: 1fr; }
  .result__specs div { border-bottom: 1px solid var(--line); }
  .result__specs div:last-child { border: 0; }
}
