/* WineyWine — The Polisher
   Design tokens and styles recreated from the design handoff. */

:root {
  --paper: #efe7e4;
  --paper-tint: #e6dcda;
  --paper-stripe: #ded2d1;
  --ink: #3b2b34;
  --ink-dark-bg: #2b1f27;
  --ink-body: #5c4f56;
  --ink-muted: #7b6b73;
  --ink-strong-alt: #4a3d44;
  --accent-plum: #6e5573;
  --accent-clay: #c98b7a;
  --on-dark: #f2eae8;
  --on-dark-body: #c3b4bb;
  --on-dark-muted: #a89aa0;

  --rule-10: rgba(59, 43, 52, 0.10);
  --rule-12: rgba(59, 43, 52, 0.12);
  --rule-14: rgba(59, 43, 52, 0.14);
  --rule-16: rgba(59, 43, 52, 0.16);
  --rule-18: rgba(59, 43, 52, 0.18);
  --rule-20: rgba(59, 43, 52, 0.20);
  --rule-on-dark: rgba(242, 234, 232, 0.22);
  --header-scrim: rgba(239, 231, 228, 0.88);

  --font: 'Instrument Sans', Helvetica, Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 44px);
  --section-y: clamp(56px, 8vw, 104px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
}

body {
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent-plum); text-decoration: none; }
a:hover { color: var(--ink); }

img { display: block; max-width: 100%; }

input, textarea, button, select { font: inherit; color: inherit; }

button {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  text-align: inherit;
}

h1, h2, h3 { font-weight: 500; }

:focus-visible {
  outline: 2px solid var(--accent-plum);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; color: var(--paper); }

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

/* ---------- shared type helpers ---------- */

.eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.label {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.meta-caps {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.shell { max-width: 1320px; margin: 0 auto; }
.shell--narrow { max-width: 1040px; }
.shell--mid { max-width: 1100px; }

.section { padding: var(--section-y) var(--gutter); }

.back-link {
  display: inline-block;
  margin-bottom: clamp(20px, 3vw, 38px);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.back-link:hover { color: var(--ink); }

/* ---------- pills ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.pill--solid {
  background: var(--ink);
  color: var(--paper);
  padding: 16px 30px;
}
.pill--solid:hover {
  background: #2b1f27;
  color: var(--paper);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px -14px rgba(59, 43, 52, 0.6);
}
.pill--solid:active { transform: translateY(0); box-shadow: none; }

.pill--ghost {
  border: 1px solid var(--rule-20);
  color: var(--ink);
  padding: 16px 26px;
}
.pill--ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
  transform: translateY(-1px);
}

.pill--sm { padding: 10px 20px; font-size: 14.5px; }
.pill--block { display: flex; width: 100%; padding: 16px 28px; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--gutter);
  background: var(--header-scrim);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule-10);
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ink);
}
.wordmark:hover { color: var(--ink); }
.wordmark__name { font-size: 25px; font-weight: 400; letter-spacing: 0.005em; }
.wordmark__sub {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 28px);
  font-size: 14.5px;
}
.site-nav a { color: var(--ink-body); }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current='page'] { color: var(--ink); }

.cart-link { display: flex; align-items: center; gap: 7px; }
.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  line-height: 1;
}

@media (max-width: 420px) {
  .site-nav__text { display: none; }
  .wordmark__sub { display: none; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: clamp(56px, 9vw, 120px) var(--gutter) clamp(44px, 7vw, 96px);
  max-width: 1320px;
  margin: 0 auto;
}
.hero__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.hero__col { min-width: 0; }

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 13px;
  border: 1px solid var(--rule-18);
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-plum);
  margin-bottom: 26px;
}
.eyebrow-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-clay);
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(44px, 7.4vw, 86px);
  line-height: 1;
  letter-spacing: -0.018em;
  text-wrap: balance;
}
.hero h1 span { color: var(--accent-plum); }

.hero__body {
  margin: 0 0 32px;
  max-width: 44ch;
  font-size: clamp(17px, 1.9vw, 19.5px);
  line-height: 1.65;
  color: var(--ink-body);
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px;
}

.spec-strip {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 3.6vw, 38px);
  margin: 42px 0 0;
  padding: 26px 0 0;
  border-top: 1px solid var(--rule-12);
  list-style: none;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* disc motif */
.disc {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 3vw, 32px);
}
.disc__glow {
  position: absolute;
  width: min(88%, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(201, 139, 122, 0.30), rgba(201, 139, 122, 0) 68%);
  animation: om-breathe 7s ease-in-out infinite;
}
.disc__ring {
  position: relative;
  width: min(78%, 360px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--rule-16);
  display: flex;
  align-items: center;
  justify-content: center;
}
.disc__ring-inner {
  width: 74%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--rule-12);
  display: flex;
  align-items: center;
  justify-content: center;
}
.disc__core {
  width: 66%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(150deg, #f3e6e2, #dcbdb4 45%, #c2988f);
  box-shadow: inset 0 2px 10px rgba(255, 255, 255, 0.55), 0 22px 44px -22px rgba(59, 43, 52, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}
.disc__core span {
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(59, 43, 52, 0.55);
  text-align: center;
  padding: 0 12px;
}

@keyframes om-breathe {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.06); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .disc__glow { animation: none; }
  * { transition-duration: 0.001ms !important; }
}

/* ---------- dark band: the ritual ---------- */

.band-dark {
  background: var(--ink-dark-bg);
  color: var(--on-dark);
  padding: var(--section-y) var(--gutter);
}
.band-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(32px, 5vw, 58px);
}
.band-head h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.band-head .eyebrow { color: var(--on-dark-muted); }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(20px, 3vw, 40px);
}
.step { padding-top: 22px; border-top: 1px solid var(--rule-on-dark); }
.step__index {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent-clay);
  margin-bottom: 14px;
}
.step h3 { margin: 0 0 10px; font-weight: 400; font-size: 26px; }
.step p { margin: 0; color: var(--on-dark-body); text-wrap: pretty; }

/* ---------- a field, not a machine ---------- */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(28px, 5vw, 64px);
}
.split__col { min-width: 0; }

.tasting h2 {
  margin: 16px 0 20px;
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.tasting p { color: var(--ink-body); max-width: 48ch; text-wrap: pretty; }
.tasting p + p { margin-top: 18px; }
.disclaimer {
  margin: 18px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-muted);
  max-width: 44ch;
}

.meters { display: grid; gap: 14px; align-content: start; min-width: 0; }
.meter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 20px 22px;
  background: var(--paper-tint);
  border-radius: 14px;
}
.meter__name { font-size: 22px; }
.meter__shift { font-size: 14.5px; color: var(--ink-body); }
.meter__track {
  width: clamp(70px, 16vw, 130px);
  height: 6px;
  border-radius: 999px;
  background: rgba(59, 43, 52, 0.14);
  position: relative;
}
.meter__fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 999px;
  background: var(--accent-plum);
}
.card-outline {
  padding: 20px 22px;
  border: 1px solid var(--rule-14);
  border-radius: 14px;
}
.card-outline .label { margin-bottom: 8px; }
.card-outline p { margin: 0; color: var(--ink-body); }

/* ---------- testimonials ---------- */

.band-tint {
  background: var(--paper-tint);
  padding: clamp(48px, 7vw, 96px) var(--gutter);
}
.band-tint h2 {
  margin: 0 0 clamp(28px, 4vw, 48px);
  font-size: clamp(30px, 4.2vw, 48px);
  letter-spacing: -0.015em;
}
.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: clamp(18px, 3vw, 32px);
}
.quote {
  padding: 26px;
  background: var(--paper);
  border-radius: 16px;
  margin: 0;
}
.quote blockquote {
  margin: 0 0 18px;
  font-size: 20px;
  line-height: 1.45;
  text-wrap: pretty;
}
.quote figcaption {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ---------- buy + policies ---------- */

.buy__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.buy h2 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.buy h2 span { color: var(--accent-plum); }
.buy__body { margin: 0 0 28px; max-width: 44ch; color: var(--ink-body); text-wrap: pretty; }

.policies {
  min-width: 0;
  margin: 0;
  border-top: 1px solid var(--rule-14);
}
.policy {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule-14);
}
.policy dt { padding-top: 4px; }
.policy dd { margin: 0; color: var(--ink-strong-alt); }

/* ---------- product ---------- */

.page-top { padding: clamp(36px, 6vw, 76px) var(--gutter) clamp(56px, 8vw, 100px); }

.gallery { display: grid; gap: 14px; min-width: 0; }
.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  aspect-ratio: 1;
  background: repeating-linear-gradient(135deg, var(--paper-tint) 0 10px, var(--paper-stripe) 10px 20px);
  border-radius: 18px;
}
.ph span {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.gallery__thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery__thumbs .ph {
  border-radius: 12px;
  background: repeating-linear-gradient(135deg, var(--paper-tint) 0 8px, var(--paper-stripe) 8px 16px);
}
.gallery__thumbs .ph span { font-size: 9px; letter-spacing: 0.14em; }

.product__eyebrow { color: var(--accent-plum); }
.product h1 {
  margin: 14px 0 10px;
  font-size: clamp(38px, 5.6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.018em;
}
.product__price { font-size: 28px; color: var(--accent-plum); margin-bottom: 24px; }
.product__body { margin: 0 0 26px; color: var(--ink-body); max-width: 46ch; text-wrap: pretty; }
.product__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.product__availability {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 34px;
}

.stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--rule-20);
  border-radius: 999px;
  overflow: hidden;
}
.stepper button { padding: 12px 18px; user-select: none; color: var(--ink); }
.stepper button:hover { background: rgba(59, 43, 52, 0.06); }
.stepper button:disabled { opacity: 0.32; cursor: default; }
.stepper button:disabled:hover { background: none; }
.stepper output { min-width: 36px; text-align: center; }
.stepper--sm button { padding: 7px 14px; }
.stepper--sm output { min-width: 28px; font-size: 14px; }

.accordions { border-top: 1px solid var(--rule-14); }
.accordions details > summary { list-style: none; cursor: pointer; }
.accordions details > summary::-webkit-details-marker { display: none; }
.accordions summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule-14);
  font-size: 21px;
}
.accordions summary .plus {
  color: var(--ink-muted);
  transition: transform 180ms ease;
}
.accordions details[open] summary .plus { transform: rotate(45deg); }
.accordions__body {
  padding: 6px 0 20px;
  color: var(--ink-body);
  border-bottom: 1px solid var(--rule-14);
}
.accordions__body--spec { font-size: 13.5px; line-height: 2; }

/* ---------- cart ---------- */

.cart h1 {
  margin: 0 0 clamp(26px, 4vw, 44px);
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.015em;
}
.cart-empty { padding: 44px 0; border-top: 1px solid var(--rule-14); color: var(--ink-body); }
.cart-empty p { margin: 0 0 22px; }

.line-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(16px, 3vw, 28px);
  align-items: center;
  padding: 24px 0;
  border-top: 1px solid var(--rule-14);
  border-bottom: 1px solid var(--rule-14);
}
.line-item__thumb {
  width: clamp(64px, 10vw, 92px);
  aspect-ratio: 1;
  border-radius: 12px;
  background: repeating-linear-gradient(135deg, var(--paper-tint) 0 8px, var(--paper-stripe) 8px 16px);
}
.line-item__title { font-size: 23px; }
.line-item__meta { font-size: 14.5px; color: var(--ink-muted); letter-spacing: 0.08em; }
.line-item__controls { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.line-item__remove { font-size: 14px; color: var(--ink-muted); text-decoration: underline; }
.line-item__remove:hover { color: var(--ink); }
.line-item__total { font-size: 23px; white-space: nowrap; }

.cart__foot {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(24px, 4vw, 48px);
  margin-top: clamp(26px, 4vw, 40px);
}
.cart__note { min-width: 0; font-size: 15px; color: var(--ink-body); }
.cart__note .label { margin-bottom: 10px; }
.cart__note p { margin: 0; }
.summary { min-width: 0; }
.summary__row {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  color: var(--ink-body);
}
.summary__row--rule { border-bottom: 1px solid var(--rule-14); }
/* display:flex above would otherwise beat the hidden attribute */
.summary__row[hidden] { display: none; }
.summary__total {
  display: flex;
  justify-content: space-between;
  padding: 16px 0 22px;
  font-size: 24px;
}
/* the cart's own fields — same rhythm as .form-card's grid */
.summary__fields {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}
.field__row { display: flex; gap: 8px; align-items: center; }
.field__row input { flex: 1 1 auto; min-width: 0; }
.field__row .pill { flex: 0 0 auto; }
/* while a fresh quote is on its way, the figures simply fade a little */
.summary[data-quote='loading'] .summary__row span + span,
.summary[data-quote='loading'] .summary__total span + span { opacity: 0.45; }
.summary__row span + span,
.summary__total span + span { transition: opacity 120ms ease; }
.summary__reassure {
  margin-top: 14px;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ---------- contact ---------- */

.contact h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.015em;
}
.contact__body { margin: 0 0 30px; color: var(--ink-body); max-width: 40ch; text-wrap: pretty; }
.contact__details { display: grid; gap: 18px; font-size: 15px; }
.contact__details .label { margin-bottom: 5px; }
.contact__details p { margin: 0; color: var(--ink-strong-alt); }

.form-card {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: clamp(22px, 3vw, 32px);
  background: var(--paper-tint);
  border-radius: 18px;
}
.field label {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 7px;
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--rule-18);
  border-radius: 10px;
  background: var(--paper);
  outline: none;
}
.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible { border-color: var(--accent-plum); }
.field select { cursor: pointer; }
.field textarea { resize: vertical; }
.field[data-invalid='true'] input,
.field[data-invalid='true'] textarea { border-color: #a4514a; }
.field__error {
  display: none;
  margin: 6px 0 0;
  font-size: 13px;
  color: #8d443e;
}
.field[data-invalid='true'] .field__error { display: block; }

.form-status { margin: 0; font-size: 15px; color: var(--ink-body); }
.form-status[data-state='error'] { color: #8d443e; }
.form-status[data-state='success'] { color: var(--accent-plum); }
.form-status:empty { display: none; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink-dark-bg);
  color: var(--on-dark-body);
  padding: clamp(40px, 6vw, 72px) var(--gutter) 32px;
}
.site-footer__grid {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.site-footer__col { min-width: 0; display: grid; gap: 9px; font-size: 15px; align-content: start; }
.site-footer__brand { font-size: 27px; color: var(--on-dark); }
.site-footer__col p { margin: 10px 0 0; max-width: 32ch; font-size: 15px; }
.site-footer a { color: var(--on-dark-body); }
.site-footer a:hover { color: var(--on-dark); }
.site-footer .label { color: var(--ink-muted); }
.site-footer__legal { font-size: 11px; line-height: 1.9; color: var(--ink-muted); }

/* ---------- 404 ---------- */

.notfound {
  display: grid;
  gap: 18px;
  justify-items: start;
  padding: clamp(60px, 12vw, 140px) var(--gutter);
  max-width: 1100px;
  margin: 0 auto;
}
.notfound h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.018em;
}
.notfound p { margin: 0; color: var(--ink-body); max-width: 44ch; }
