:root {
  --chalk: #eef1ef;      /* page: gym chalk, cool not cream */
  --ink: #1d272c;        /* text: rubber-floor slate */
  --slate: #4a5a62;      /* secondary text */
  --tint: #d3e6df;       /* borosilicate edge green */
  --water: #9fcfc3;      /* water in the glass */
  --teal: #0d5957;       /* actions */
  --teal-dark: #083f3d;
  --line: #b4c4bf;
  --error: #a3261c;
  --sleeve: #6fa597;
  --surface: #ffffff;
  --on-teal: #ffffff;
  --control-border: #6f817b;
  --swatch-border: rgba(0, 0, 0, 0.25);
  --bottle-outline: #1d272c;
  --bottle-glass: rgba(211, 230, 223, 0.35);
  --bottle-mark: #1d272c;
  --toggle-icon-fill: transparent;
  --sleeve-outline: none;

  --display: "Avenir Next Condensed", "Avenir Next", "Arial Narrow", sans-serif;
  --body: "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.375rem;
  --step-2: 2rem;
  --step-3: clamp(2.75rem, 6vw + 1rem, 5.5rem);

  --rail: 128px;
  --gutter: clamp(16px, 4vw, 56px);
}
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --chalk: #121a1d;
    --ink: #e6ecea;
    --slate: #a3b3ae;
    --tint: #1d2b29;
    --teal: #5fc9bb;
    --teal-dark: #9ae0d6;
    --line: #34443f;
    --error: #ff8f80;
    --surface: #1a2427;
    --on-teal: #0b1416;
    --control-border: #7d8f8a;
    --swatch-border: rgba(255, 255, 255, 0.45);
    --bottle-outline: #dfe8e5;
    --bottle-glass: rgba(211, 230, 223, 0.65);
    --toggle-icon-fill: currentColor;
    --sleeve-outline: #dfe8e5;
  }
}
@media screen {
  /* Keep identical to the block above. */
  :root[data-theme="dark"] {
    color-scheme: dark;
    --chalk: #121a1d;
    --ink: #e6ecea;
    --slate: #a3b3ae;
    --tint: #1d2b29;
    --teal: #5fc9bb;
    --teal-dark: #9ae0d6;
    --line: #34443f;
    --error: #ff8f80;
    --surface: #1a2427;
    --on-teal: #0b1416;
    --control-border: #7d8f8a;
    --swatch-border: rgba(255, 255, 255, 0.45);
    --bottle-outline: #dfe8e5;
    --bottle-glass: rgba(211, 230, 223, 0.65);
    --toggle-icon-fill: currentColor;
    --sleeve-outline: #dfe8e5;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 0.5em;
}
h1 { font-size: var(--step-3); letter-spacing: -0.01em; max-width: 11ch; }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }

p { margin: 0 0 1em; max-width: 62ch; }

a { color: var(--teal); }
a:hover { color: var(--teal-dark); }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px; top: -48px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--chalk);
  z-index: 10;
}
.skip-link:focus { top: 12px; }

/* ---------- Theme control ---------- */
.site-header { position: absolute; top: 6px; right: var(--gutter); z-index: 5; }
.theme-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 16px;
  border: 2px solid var(--slate); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font: 600 var(--step--1) / 1 var(--body);
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle__icon {
  width: 16px; height: 16px; flex: none;
  border: 2px solid currentColor; border-radius: 50%;
  background: var(--toggle-icon-fill);
}

.sprite { position: absolute; }

/* ---------- Fill scale (left rail) ---------- */

.scale {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  border-right: 1px solid var(--line);
  background: var(--chalk);
}

.scale__fill {
  position: absolute;
  left: 0; bottom: 0;
  width: 14px;
  height: 100%;
  background: var(--water);
  transform-origin: bottom;
  transform: scaleY(var(--level, 1));
}

.scale__marks {
  list-style: none;
  margin: 0;
  padding: 32px 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.scale__marks a {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: baseline;
  gap: 8px;
  padding: 4px 12px 4px 28px;
  color: var(--slate);
  text-decoration: none;
  position: relative;
}
.scale__marks a::before {
  content: "";
  position: absolute;
  left: 14px; top: 50%;
  width: 10px;
  border-top: 2px solid var(--ink);
}
.scale__ml {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--step-1);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.scale__name { font-size: var(--step--1); line-height: 1.2; }
.scale__marks a[aria-current="true"] .scale__name { color: var(--ink); font-weight: 600; }

/* ---------- Layout ---------- */

main, .footer {
  margin-left: var(--rail);
  padding: 0 var(--gutter);
}

main > section {
  max-width: 1120px;
  padding: clamp(56px, 9vw, 120px) 0;
  border-bottom: 1px solid var(--line);
}

.button {
  display: inline-block;
  padding: 14px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  color: var(--on-teal);
  font: 600 var(--step-0) / 1 var(--body);
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--teal-dark); color: var(--on-teal); }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: var(--gutter);
  min-height: min(92vh, 860px);
}

.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: 0.02em;
  color: var(--teal);
  margin-bottom: 1.25em;
}

.lede { font-size: var(--step-1); line-height: 1.45; color: var(--slate); }
.hero__price { font-weight: 600; }

.hero__bottle { margin: 0; justify-self: center; }
.hero__bottle .bottle { height: min(76vh, 640px); width: auto; }

/* ---------- Bottle drawing ---------- */

.bottle { display: block; overflow: visible; }
.b-lid { fill: #c9d1d3; stroke: var(--bottle-outline); stroke-width: 2; }
.b-lid-band { fill: #9fabaf; }
.b-loop { fill: none; stroke: var(--bottle-outline); stroke-width: 6; stroke-linecap: round; }
.b-water { fill: var(--water); opacity: 0.85; }
.b-water-top { fill: #bfe0d7; }
.b-glass { fill: var(--bottle-glass); stroke: var(--bottle-outline); stroke-width: 2.5; }
.b-shine { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; opacity: 0.8; }
.b-marks line { stroke: var(--bottle-mark); stroke-width: 2; }
.b-marks text {
  font: 700 15px var(--display);
  fill: var(--bottle-mark);
  text-anchor: end;
}
.b-sleeve { fill: var(--sleeve); stroke: var(--sleeve-outline); stroke-width: 3; }
.b-ribs line { stroke: rgba(0, 0, 0, 0.18); stroke-width: 3; }

/* ---------- Why glass ---------- */

.why__layout {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.why__figure { margin: 0; }
.why__figure img { width: 100%; height: auto; display: block; }
.why__figure figcaption { margin-top: 12px; font-size: var(--step--1); color: var(--slate); }

.why__points {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 40px;
}
.why__points div { border-top: 2px solid var(--ink); padding-top: 14px; }
.why__points dt {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--step-1);
  line-height: 1.15;
  margin-bottom: 8px;
}
.why__points dd { margin: 0; color: var(--slate); }

/* ---------- Choose ---------- */

.choose__layout {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 520px);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.choose__preview {
  margin: 0;
  background: var(--tint);
  border-radius: 24px;
  padding: 32px 24px 24px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 460px;
}
.choose__preview .bottle {
  height: calc(400px * var(--bottle-scale, 0.92));
  width: auto;
  transition: height 200ms ease;
}
@media (prefers-reduced-motion: reduce) {
  .choose__preview .bottle { transition: none; }
}

fieldset { border: 0; margin: 0 0 24px; padding: 0; }
legend, .field label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  padding: 0;
}

.options { display: flex; flex-wrap: wrap; gap: 10px; }

.option { position: relative; }
.option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.option > span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 2px solid var(--control-border);
  border-radius: 999px;
  background: var(--surface);
}
.option input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.option input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 3px; }
.option .swatch {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--swatch);
  border: 1px solid var(--swatch-border);
}
.option .option__price { color: var(--slate); }

.field { margin-bottom: 24px; }
.field input {
  width: 6.5rem;
  padding: 10px 12px;
  font: inherit;
  border: 2px solid var(--control-border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}
.field input[aria-invalid="true"] { border-color: var(--error); }
.field__error { color: var(--error); margin: 8px 0 0; font-size: var(--step--1); }

.total {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-weight: 600;
}
.total output {
  font-family: var(--display);
  font-size: var(--step-2);
  font-variant-numeric: tabular-nums;
}

.confirmation { margin-top: 16px; font-weight: 600; color: var(--teal-dark); min-height: 1.55em; }
.note { font-size: var(--step--1); color: var(--slate); }

/* ---------- Details ---------- */

.details__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  margin-bottom: 56px;
}

.specs { border-collapse: collapse; width: 100%; margin-bottom: 16px; font-variant-numeric: tabular-nums; }
.specs th, .specs td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.specs thead th { font-size: var(--step--1); color: var(--slate); font-weight: 600; }
.small { font-size: var(--step--1); color: var(--slate); }

.care { padding-left: 1.4em; margin: 0; }
.care li { margin-bottom: 10px; padding-left: 4px; }
.care li::marker { font-family: var(--display); font-weight: 700; }

.faq { max-width: 760px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 600;
  list-style-position: outside;
}
.faq details p { color: var(--slate); }

.footer { padding-top: 32px; padding-bottom: 48px; font-size: var(--step--1); color: var(--slate); }

/* ---------- Small screens ---------- */

@media (max-width: 900px) {
  :root { --rail: 0px; }
  .scale { display: none; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__bottle { order: -1; }
  .hero__bottle .bottle { height: 300px; }
  .why__layout, .choose__layout, .details__grid { grid-template-columns: 1fr; }
  .why__figure { max-width: 260px; }
  .choose__preview { min-height: 300px; }
  .choose__preview .bottle { height: calc(260px * var(--bottle-scale, 0.92)); }
}

@media (max-width: 560px) {
  .why__points { grid-template-columns: 1fr; }
  .specs th, .specs td { padding-right: 8px; font-size: var(--step--1); }
}

/* ---------- Compact fill scale (small screens) ---------- */
/* Decorative copy of the fill scale at the left edge, on screens 900 px wide or less. Hidden from
   assistive technology in the markup. js/scale.js sets --level, as on .scale. */

.scale-mini {
  display: none;
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  border-right: 1px solid var(--slate);
  background: var(--chalk);
}

.scale-mini__fill {
  position: absolute;
  left: 0; bottom: 0;
  width: 9px;
  height: 100%;
  background: var(--teal);
  transform-origin: bottom;
  transform: scaleY(var(--level, 1));
}

/* Reserve the strip's width, show it, and keep the FAQ disclosure markers out from under it: an
   outside marker hangs 0.66em + 8px left of the summary, so it sits inside (the HTML default). */
@media screen and (max-width: 900px) {
  :root { --rail: 12px; }
  .scale-mini { display: block; }
  .faq summary { list-style-position: inside; }
}
