@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #faf5ed;
  --white: #fffaf4;
  --panel: #f1e7d9;
  --ink: #301e23;
  --muted: #66514e;
  --wine: #702136;
  --line: #decebc;
  --gold: #ead2a7;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
body:has(dialog[open]) { overflow: hidden; }
button, input, select, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: var(--wine); }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 4px; }
h1, h2, h3, p, figure, ul, dl, dd { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
ul { list-style: none; padding: 0; }

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

.shell { width: min(1190px, calc(100% - 72px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner {
  min-height: 74px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 400 30px/1 var(--serif);
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--wine);
  color: var(--paper);
}
.brand-mark svg { width: 21px; height: 21px; }
.nav { display: flex; gap: 6px; }
.nav-button, .currency-button, .button, .icon-button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 100px;
  background: transparent;
  font-size: .875rem;
  font-weight: 600;
}
.nav-button { color: var(--muted); }
.nav-button:hover, .nav-button[aria-pressed="true"] { background: var(--panel); color: var(--wine); }
.currency-button, .button, .icon-button { border-color: var(--line); background: var(--white); }
.currency-button { justify-self: end; white-space: nowrap; }
.currency-button:hover, .button:hover, .icon-button:hover { border-color: var(--wine); color: var(--wine); }
.caret { margin-inline-start: 5px; color: var(--wine); }
.primary { background: var(--wine); color: var(--white); border-color: var(--wine); }
.primary:hover { background: #542030; color: var(--white); }

main { padding-block: 42px 64px; }
.intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 26px;
}
h1 { font-size: clamp(3rem, 5vw, 4.65rem); line-height: .99; letter-spacing: -.022em; }
.intro p { margin-top: 12px; font-size: .95rem; color: var(--muted); }
.filters { display: flex; gap: 10px; }
.search-field, select, textarea, .dialog-form input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
}
.search-field {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-inline: 12px;
  min-width: 0;
}
.search-field:focus-within { outline: 2px solid var(--wine); outline-offset: 2px; }
.search-field svg { width: 20px; height: 20px; flex: none; color: var(--wine); }
.search-field input {
  min-width: 0;
  width: 188px;
  padding-block: 10px;
  border: 0;
  outline: none;
  background: transparent;
  font-size: .88rem;
}
select { padding: 0 30px 0 12px; max-width: 100%; }
.filters select { font-size: .875rem; }
.notice { padding: 20px 0; color: var(--muted); }

.featured {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--white);
}
.label-stage {
  --label-height: 310px;
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  background:
    repeating-radial-gradient(circle at center, transparent 0 23px, #ead2a718 24px 25px, transparent 26px 46px),
    radial-gradient(ellipse at 28% 18%, #713043, #2d1823 78%);
  color: var(--gold);
}
.label-stage::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid #ead2a736;
  border-radius: 8px;
  pointer-events: none;
}
.label-stage-image {
  position: absolute;
  inset: 38px 52px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
}
.label-stage-image:focus-visible, .arrow:focus-visible { outline-color: var(--gold); }
.label-frame {
  display: block;
  width: min(100%, calc(var(--label-height, 310px) * var(--label-ratio, 1)));
  aspect-ratio: var(--label-ratio, 1);
  overflow: hidden;
}
.label-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(var(--label-scale, 1));
}
.label-stage .label-frame { filter: drop-shadow(0 14px 22px #180d1580); }
.arrow {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #ead2a75c;
  border-radius: 50%;
  background: #2d18236e;
  color: inherit;
  font: 400 1.75rem/1 var(--sans);
  padding: 0 0 4px;
}
.arrow:hover { background: #2d1823; }
.previous { left: 22px; }
.next { right: 22px; }
.stage-caption {
  position: absolute;
  inset: auto 26px 26px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 5px;
  pointer-events: none;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.stage-caption span:last-child { justify-self: end; font-size: 1rem; line-height: 1; }

.wine-detail { min-width: 0; padding: clamp(22px, 3.2vw, 38px); }
.wine-title { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.origin { color: var(--wine); font-weight: 700; font-size: .74rem; letter-spacing: .09em; text-transform: uppercase; }
.wine-title h2 { font-size: clamp(2.2rem, 4vw, 3.5rem); line-height: .98; margin-block: 8px; letter-spacing: -.01em; }
.grape { color: var(--muted); font-size: .88rem; }
.icon-button { display: grid; place-items: center; width: 44px; min-width: 44px; padding: 0; }
.icon-button svg { width: 20px; height: 20px; }
.bookmark { color: var(--wine); }
.bookmark[aria-pressed="true"] { background: var(--wine); color: var(--white); border-color: var(--wine); }
.bookmark[aria-pressed="true"] svg { fill: currentColor; }
.price-guide {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  margin-block: 22px 17px;
  padding: 11px 14px;
  text-align: start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.price-guide:hover { border-color: var(--wine); }
.price-guide strong { font-size: .91rem; }
.price-guide small { display: block; color: var(--muted); font-size: .79rem; margin-top: 3px; }
.tier { background: var(--panel); color: var(--wine); border-radius: 100px; padding: 5px 12px; font-weight: 700; letter-spacing: .04em; }
.price-arrow { color: var(--wine); font-size: 1.25rem; line-height: 1; }
.tasting { padding-block: 10px; }
.tasting h3 { font-size: 1.68rem; line-height: 1.12; }
.note-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.note-heading span { font-size: .76rem; color: var(--muted); text-align: end; }
.tasting p, .personal-review p { margin-top: 6px; color: var(--muted); font-size: .9rem; line-height: 1.57; }
.aromas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.aromas li { border: 1px solid var(--line); border-radius: 100px; padding: 4px 9px; color: var(--muted); font-size: .73rem; }
.personal-review {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0 12px;
  border-block: 1px solid var(--line);
  margin-top: 9px;
  padding-block: 3px;
}
.personal-review p { flex-basis: 100%; white-space: pre-wrap; overflow-wrap: anywhere; padding-bottom: 10px; }
.review-label { font-size: .87rem; font-weight: 600; }
.stars { color: var(--wine); white-space: nowrap; }
.text-button {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--wine);
  font-size: .86rem;
  font-weight: 700;
  text-align: start;
}
.text-button:hover, .source-links a:hover { text-decoration: underline; }
.source-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; }
.source-links a { font-size: .78rem; font-weight: 600; text-decoration: none; }

.collection { margin-top: 36px; }
.collection-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.collection-heading h2 { font-size: clamp(1.9rem, 3.2vw, 2.65rem); }
.collection-heading span { font-size: .8rem; color: var(--muted); }
.wine-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.wine-card {
  display: grid;
  grid-template-rows: auto 1fr;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  background: var(--white);
  text-align: start;
}
.wine-card:hover, .wine-card[aria-current="true"] { border-color: var(--wine); }
.wine-card[aria-current="true"] .card-art { background-color: #e7d4c4; }
.card-art {
  --label-height: 116px;
  display: grid;
  place-items: center;
  height: 150px;
  padding: 12px;
  background: radial-gradient(ellipse, #fff5e459, transparent 78%), var(--panel);
}
.card-art .label-frame { filter: drop-shadow(0 4px 6px #45232a3d); }
.card-copy { display: grid; gap: 4px; align-content: start; padding: 13px 14px 15px; }
.card-name { font: 400 1.48rem/1.08 var(--serif); overflow-wrap: anywhere; }
.card-origin { color: var(--muted); font-size: .77rem; line-height: 1.35; }

dialog {
  width: min(550px, calc(100% - 30px));
  max-height: calc(100% - 30px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  color: var(--ink);
}
dialog::backdrop { background: #28171ddd; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.dialog-heading h2 { font-size: 2.3rem; line-height: 1.05; }
.dialog-heading .origin { margin-bottom: 6px; }
.close-button { font-size: 1.55rem; line-height: 1; }
.label-dialog { width: min(740px, calc(100% - 30px)); }
.dialog-figure { --label-height: min(66svh, 780px); display: grid; justify-items: center; gap: 14px; }
figcaption, .dialog-meta { color: var(--muted); font-size: .82rem; line-height: 1.5; }
.price-median {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-block: 14px 10px;
  padding: 11px;
  border-radius: 10px;
  background: var(--paper);
  font-weight: 600;
}
.price-median > span:last-child, .listing-price { text-align: end; font-variant-numeric: tabular-nums; }
.price-list { margin-bottom: 13px; }
.price-list li + li { border-top: 1px solid var(--line); }
.listing {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 3px;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
}
.listing:hover { color: var(--wine); }
.price-median small, .listing small { display: block; margin-top: 2px; color: var(--muted); font-size: .76rem; font-weight: 400; }
.listing-price { margin-inline-start: auto; }
.listing-arrow { color: var(--wine); }
.tier-guide { margin-top: 14px; color: var(--muted); font-size: .82rem; }
.tier-guide summary { cursor: pointer; color: var(--wine); font-weight: 600; }
.tier-guide p { margin-block: 10px; }
.tier-guide dl div { display: flex; justify-content: space-between; gap: 10px; padding-block: 3px; }
.tier-guide dt { color: var(--wine); font-weight: 600; }
.dialog-form { display: grid; gap: 9px; }
.dialog-form label { margin-top: 5px; font-size: .89rem; font-weight: 600; }
.dialog-form textarea, .dialog-form input { padding: 10px 12px; width: 100%; }
.dialog-form textarea { resize: vertical; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 14px; margin-top: 8px; }
.form-error { color: var(--wine); font-size: .84rem; }

@media (max-width: 900px) {
  .shell { width: calc(100% - 42px); }
  .intro { align-items: start; flex-direction: column; gap: 18px; }
  .label-stage { --label-height: 260px; }
  .wine-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
  .shell { width: calc(100% - 28px); }
  .header-inner { min-height: 62px; gap: 6px; }
  .wordmark { gap: 5px; font-size: 23px; }
  .brand-mark { width: 27px; height: 27px; }
  .brand-mark svg { width: 16px; height: 16px; }
  .nav { gap: 1px; }
  .nav-button, .currency-button { min-height: 40px; padding-inline: 9px; font-size: .76rem; }
  .caret { margin-inline-start: 2px; }
  main { padding-block: 27px 40px; }
  .intro { margin-bottom: 17px; }
  .intro p { margin-top: 8px; font-size: .88rem; }
  .filters { width: 100%; gap: 7px; }
  .search-field { flex: 1; padding-inline: 9px; }
  .search-field input { width: 100%; }
  .filters select { max-width: 132px; padding-inline: 8px; }
  .featured { grid-template-columns: 1fr; border-radius: 15px; }
  .label-stage { --label-height: 220px; min-height: 306px; }
  .label-stage-image { inset-inline: 48px; }
  .previous { left: 14px; }
  .next { right: 14px; }
  .stage-caption { inset: auto 23px 23px; }
  .wine-detail { padding: 20px 17px; }
  .price-guide { margin-top: 16px; }
  .collection { margin-top: 24px; }
  .wine-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-art { --label-height: 92px; height: 122px; }
  .card-name { font-size: 1.28rem; }
  .card-copy { padding: 10px; }
  dialog { padding: 17px; }
}

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