/* Styled after the coravin.com storefront (Coravin eCommerce Content Guide, Commerce-UI 2025):
   burgundy top bar with the white logo, thin all-caps serif titles, sentence-case serif headlines,
   geometric sans body, white cards on warm off-white, photo heroes under a flat black scrim.
   Brand fonts (The Seasons, Neulis Sans) are on Adobe Fonts, which this site can't load, so the
   closest Google Fonts stand in: Cormorant Garamond for The Seasons, Jost for Neulis Sans. */
:root {
  --ground: #f7f3ee;
  --card: #ffffff;
  --ink: #121212;
  --accent: #4a1c26;
  --accent-hover: #351219;
  --on-accent: #ffffff;
  --error: #8a1c1c;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Top bar, as on the storefront: burgundy with the white logo centred */
.top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 20px;
  min-height: 56px;
  background: var(--accent);
  color: var(--on-accent);
}
.logo { width: 116px; height: auto; display: block; }
.top .back {
  justify-self: start;
  font: inherit;
  font-size: 15px;
  color: var(--on-accent);
  background: none;
  border: 0;
  padding: 8px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.top .spacer { width: 1px; }

.progress { height: 3px; background: #e6dcd2; }
.progress > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.25s ease; }

main {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}
@media (min-width: 700px) { main { padding-top: 10vh; } }

/* Section titles: thin serif capitals, like OUR PRODUCTS and COMPARE on the storefront */
h1 {
  font-family: var(--serif);
  font-weight: 300;
  text-transform: uppercase;
  font-size: 40px;
  line-height: 1.05;
  margin: 0 0 20px;
}
@media (min-width: 700px) { h1 { font-size: 60px; } }

/* Questions: sentence-case serif, like the storefront's card headlines */
h2, legend.q {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.15;
  margin: 0 0 12px;
  padding: 0;
  color: var(--ink);
}
@media (min-width: 700px) { h2, legend.q { font-size: 36px; } }

p { margin: 0 0 16px; }
.hint { margin: 0 0 20px; }
.small { font-size: 15px; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

/* Answer cards: white on the off-white ground; picked = burgundy, like the storefront's selected tab */
.options { display: grid; gap: 8px; margin-top: 20px; }
.option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 12px 16px;
  background: var(--card);
  border-radius: 6px;
  cursor: pointer;
}
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option .mark {
  flex: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--ink);
  background: var(--card);
}
.option.radio .mark { border-radius: 50%; }
.option.check .mark { border-radius: 3px; }
.option:has(input:checked) { background: var(--accent); color: var(--on-accent); }
.option input:checked ~ .mark { border-color: var(--on-accent); background: var(--on-accent); box-shadow: inset 0 0 0 4px var(--accent); }
.option input:focus-visible ~ .mark { outline: 3px solid var(--accent); outline-offset: 4px; }
.option:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }

label.field { display: block; font-weight: 500; margin: 16px 0 6px; }
input[type='email'],
input[type='text'],
textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid transparent;
  border-radius: 6px;
  padding: 13px 14px;
}
textarea { min-height: 150px; resize: vertical; }
input:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.code-input { font-size: 24px; max-width: 220px; }

.actions { display: flex; align-items: center; gap: 16px; margin-top: 32px; flex-wrap: wrap; }

/* Buttons: burgundy rectangle, like "Add to cart"; white on photos, like "Discover more >" */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 16px/1 var(--sans);
  color: var(--on-accent);
  background: var(--accent);
  border: 0;
  border-radius: 4px;
  padding: 16px 26px;
  min-height: 52px;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--accent-hover); }
.btn.go::after { content: '›'; font-size: 22px; line-height: 0; position: relative; top: -1px; }
.btn[disabled] { background: #7d5b65; cursor: wait; }
.btn:focus-visible, .top .back:focus-visible, .link:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.top .back:focus-visible { outline-color: var(--on-accent); }
.link {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 8px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
a { color: var(--accent); }

.error { color: var(--error); font-weight: 500; margin: 16px 0 0; }
.error:empty { display: none; }
.count { font-size: 14px; margin: 6px 0 0; }

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

/* Hero screens (intro, sign-in, thank you): the storefront hero photo under a flat black scrim,
   text centred and white, per the guide's hero module (20-80% black scrim) */
.hero main { max-width: none; padding: 0; display: flex; }
.hero .progress { display: none; }
.hero-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 64px;
  color: #fff;
  text-align: center;
  background-color: #1b1512;
  background-image: linear-gradient(rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.62)), url('/img/hero.webp');
  background-size: cover;
  background-position: center 60%;
}
.hero-inner { width: 100%; max-width: 600px; }
.hero-panel h1 { color: #fff; }
.hero-panel p { font-size: 17px; }
.hero-panel .actions { justify-content: center; }
.hero-panel .btn { background: #fff; color: var(--ink); }
.hero-panel .btn:hover { background: #ece6df; }
.hero-panel .btn:focus-visible, .hero-panel .link:focus-visible { outline-color: #fff; }
.hero-panel .error { color: #ffd2cc; }
.hero-panel label.field { text-align: left; }
.hero-panel .field-wrap { max-width: 400px; margin: 0 auto; text-align: left; }
.hero-panel input:focus-visible { outline-color: #fff; }

/* Results page */
.admin main { max-width: 860px; padding-top: 32px; }
.admin h1 { color: var(--accent); }
.admin h2 { font-size: 26px; margin-top: 56px; }
.stat { font-family: var(--serif); font-weight: 300; font-size: 64px; color: var(--accent); line-height: 1; margin: 8px 0 4px; }
.bars { display: grid; gap: 10px; margin-top: 16px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 12px; align-items: center; }
.bar-label { font-size: 15px; }
.bar-track { display: flex; align-items: center; gap: 8px; }
.bar-fill { height: 22px; background: var(--accent); min-width: 2px; border-radius: 2px; }
.bar-value { font-size: 14px; white-space: nowrap; }
.texts { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.texts li { background: var(--card); padding: 14px 16px; border-radius: 6px; white-space: pre-wrap; }
@media (max-width: 520px) { .bar-row { grid-template-columns: 1fr; gap: 4px; } }
