/* Donnie Does Deals — a pinstripe suit with gilt lettering.
   One loud thing (the worsted + gilt hero), everything else quiet and plain. */
:root {
  --worsted: #1d2433;
  --worsted-deep: #161c28;
  --chalk: #ece6d9;
  --gilt: #c8a45c;
  --gilt-hi: #e3c98c;
  --gilt-shade: #7c6230;
  --barolo: #6b1c2a;
  --shirt: #fbfaf7;
  --ink: #1d2433;
  --ink-soft: #4a5263;
  --rule: rgba(29, 36, 51, 0.14);
  --verde: #2e7d4f;
  --bianco: #f4f1ea;
  --rosso: #b8333a;
  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --text: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 74rem;
  --gutter: clamp(1rem, 5vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Scale the whole page up on bigger screens so desktop doesn't read tiny. */
@media (min-width: 64rem) { html { font-size: 112.5%; } }
@media (min-width: 90rem) { html { font-size: 125%; } }
body {
  margin: 0;
  background: var(--shirt);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--text);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, legend { font-family: var(--display); font-weight: 700; margin: 0; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---- The fabric: navy worsted with a soft chalk stripe ---- */
.worsted {
  color: var(--chalk);
  background-color: var(--worsted);
  background-image:
    repeating-linear-gradient(90deg,
      rgba(236, 230, 217, 0) 0 25px,
      rgba(236, 230, 217, 0.05) 25px 26px,
      rgba(236, 230, 217, 0.11) 26px 27px,
      rgba(236, 230, 217, 0.05) 27px 28px,
      rgba(236, 230, 217, 0) 28px 34px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Wordmark: gilt sign lettering ---- */
.mark { display: inline-grid; justify-items: start; text-decoration: none; color: var(--gilt); }
.mark-name {
  font: 700 2.1rem/0.9 var(--display);
  letter-spacing: 0.01em;
  text-shadow: 0 -1px 0 var(--gilt-hi), 0 2px 0 var(--gilt-shade);
}
.mark-tag { font: italic 500 1.15rem/1.2 var(--display); margin-top: 0.15rem; padding-left: 0.1rem; }
.stitch { display: flex; gap: 3px; margin-top: 0.5rem; padding-left: 0.15rem; }
.stitch i { width: 14px; height: 3px; display: block; }
.stitch i:nth-child(1) { background: var(--verde); }
.stitch i:nth-child(2) { background: var(--bianco); }
.stitch i:nth-child(3) { background: var(--rosso); }

/* ---- Hero ---- */
.hero { display: flex; }
@media (min-width: 52rem) { .hero { min-height: 88svh; } }
.hero > .wrap {
  width: 100%;
  display: flex; flex-direction: column; justify-content: space-between;
  padding-top: clamp(1.5rem, 5vw, 2.75rem);
  padding-bottom: clamp(2.5rem, 8vw, 5rem);
  gap: clamp(4rem, 14vh, 8rem);
}
.hero-body { display: grid; gap: 2.5rem; align-items: end; }
.hero-copy { max-width: 40rem; }
.hero h1 {
  font-size: clamp(2.65rem, 7.4vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.012em;
  font-variation-settings: "opsz" 32;
  text-wrap: balance;
}
.lede { margin-top: 1.25rem; max-width: 34rem; font-size: 1.125rem; color: rgba(236, 230, 217, 0.88); }
.hero .btn { margin-top: 2rem; }
.fine { margin-top: 0.85rem; font-size: 0.9375rem; color: rgba(236, 230, 217, 0.7); }

.portrait {
  margin: 0; justify-self: start;
  width: min(16rem, 70vw); aspect-ratio: 4 / 5;
  border: 2px solid var(--gilt); outline: 1px solid var(--gilt-shade); outline-offset: 5px;
  border-radius: 50% / 42%; overflow: hidden;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 52rem) {
  .hero-body { grid-template-columns: 1fr auto; column-gap: 4rem; }
  .portrait { justify-self: end; width: clamp(16rem, 24vw, 22rem); }
}
.portrait img { object-position: 50% 0; }

/* ---- Buttons ---- */
.btn {
  display: inline-block; cursor: pointer;
  font: 600 1.0625rem/1 var(--text);
  padding: 1.05rem 1.5rem; border: 0; border-radius: 2px;
  transition: background-color 0.15s ease;
}
.btn-gilt { background: var(--gilt); color: var(--worsted-deep); box-shadow: inset 0 -2px 0 var(--gilt-shade); }
.btn-gilt:hover { background: var(--gilt-hi); }
.btn-ink { background: var(--worsted); color: var(--chalk); }
.btn-ink:hover { background: var(--worsted-deep); }
:focus-visible { outline: 3px solid var(--gilt); outline-offset: 3px; }
.shirt :focus-visible, .quiz :focus-visible { outline-color: var(--barolo); }

/* ---- How it works (a real sequence, so it's numbered) ---- */
.steps { padding: clamp(3.5rem, 10vw, 6rem) 0 clamp(2rem, 6vw, 3.5rem); }
.steps h2, .closer h2 { font-size: clamp(1.9rem, 6vw, 2.75rem); line-height: 1.1; }
.step-list { list-style: none; counter-reset: step; padding: 0; margin: 2.25rem 0 0; display: grid; gap: 2rem; }
.step-list li { counter-increment: step; display: grid; grid-template-columns: 2.75rem 1fr; column-gap: 1rem; align-items: start; max-width: 40rem; }
.step-list li::before {
  content: counter(step);
  font: italic 500 2.6rem/1 var(--display);
  color: var(--barolo);
}
.step-list h3 { font-size: 1.35rem; line-height: 1.25; }
.step-list p { margin-top: 0.35rem; color: var(--ink-soft); }
@media (min-width: 60rem) {
  .step-list { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
}

/* ---- A word from Donnie ---- */
.word { padding: clamp(1.5rem, 5vw, 3rem) 0 clamp(3.5rem, 10vw, 6rem); }
.word blockquote { margin: 0; padding-top: 2rem; border-top: 1px solid var(--rule); max-width: 44rem; }
.word blockquote p { font: italic 500 clamp(1.45rem, 4.6vw, 2rem)/1.35 var(--display); font-variation-settings: "opsz" 24; }
.word blockquote footer { margin-top: 1rem; font-weight: 600; color: var(--ink-soft); }

/* ---- Closer ---- */
.closer { padding: clamp(3.5rem, 10vw, 5.5rem) 0; }
.closer .btn { margin-top: 1.5rem; }

/* ---- Footer ---- */
.site-foot { background: var(--worsted-deep); color: rgba(236, 230, 217, 0.72); font-size: 0.9375rem; padding: 2.25rem 0 calc(2.25rem + env(safe-area-inset-bottom)); }
.site-foot .wrap { display: grid; gap: 0.6rem; }
.foot-mark { font: 700 1.2rem/1 var(--display); color: var(--gilt); }
.site-foot a { color: var(--chalk); }

/* ---- Quiz ---- */
.quiz {
  padding: 0; border: 0; color: var(--ink); background: var(--shirt);
  width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0;
}
.quiz::backdrop { background: rgba(22, 28, 40, 0.72); }
@media (min-width: 40rem) {
  .quiz { width: 34rem; height: auto; max-height: 92vh; margin: auto; border-radius: 3px; }
}
.quiz-inner { padding: 1rem var(--gutter) calc(2rem + env(safe-area-inset-bottom)); }
.quiz-top { display: flex; align-items: center; justify-content: space-between; min-height: 2.75rem; }
.quiz-back, .quiz-close {
  background: none; border: 0; padding: 0.6rem 0; cursor: pointer;
  font: 500 0.9375rem/1 var(--text); color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px;
}
.quiz-back[hidden] { display: block; visibility: hidden; }
.quiz-count { font-size: 0.9375rem; color: var(--ink-soft); }
.progress { height: 3px; background: var(--rule); margin: 0.25rem 0 2rem; }
.progress span { display: block; height: 100%; width: 0; background: var(--gilt-shade); transition: width 0.25s ease; }

.q { border: 0; margin: 0; padding: 0; min-width: 0; display: none; }
.q.is-active { display: grid; gap: 1rem; }
.q legend { font-variation-settings: "opsz" 28; font-size: clamp(1.7rem, 6.5vw, 2.1rem); line-height: 1.15; padding: 0; margin-bottom: 1.25rem; float: left; width: 100%; }
.q legend + * { clear: both; }

.choices { display: grid; gap: 0.6rem; }
.choices button {
  text-align: left; cursor: pointer;
  font: 500 1.0625rem/1.3 var(--text); color: var(--ink);
  background: #fff; border: 1px solid var(--rule); border-radius: 3px;
  padding: 1rem 1.1rem;
}
.choices button:hover { border-color: var(--ink); }
.choices button[aria-pressed="true"] { background: var(--worsted); color: var(--chalk); border-color: var(--worsted); }
.choices-row { grid-template-columns: repeat(3, 1fr); }
.choices-row button { text-align: center; padding: 0.85rem 0.5rem; }

.field { display: grid; gap: 0.35rem; font-weight: 500; font-size: 0.9375rem; }
.field input, .field select {
  font: 400 1.0625rem/1.3 var(--text); color: var(--ink);
  padding: 0.85rem 0.9rem; border: 1px solid rgba(29, 36, 51, 0.32); border-radius: 3px; background: #fff;
  width: 100%;
}
.field input:focus, .field select:focus { border-color: var(--ink); }
.consent { font-size: 0.8125rem; line-height: 1.45; color: var(--ink-soft); }
.error { color: var(--barolo); font-weight: 500; }
.hp { position: absolute; left: -9999px; }
.q .btn { justify-self: start; margin-top: 0.5rem; }
.done h3 { font-size: 2rem; line-height: 1.15; }
.done p { color: var(--ink-soft); max-width: 30rem; }

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