:root {
  --ink: #f4efe6;
  --muted: #b8ad9f;
  --paper: #f2eadf;
  --night: #11100f;
  --night-2: #191714;
  --wine: #712f3c;
  --gold: #c9a867;
  --line: rgba(242, 234, 223, 0.14);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 5%, rgba(113, 47, 60, .27), transparent 35rem),
    radial-gradient(circle at 88% 22%, rgba(201, 168, 103, .10), transparent 32rem),
    linear-gradient(180deg, #151310 0%, #0e0e0d 70%);
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; }

.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(17, 16, 15, .88);
  backdrop-filter: blur(18px);
}
.nav { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { font-family: var(--serif); text-decoration: none; font-size: 1.08rem; letter-spacing: .01em; }
.back-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(201,168,103,.12);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 700;
}
.back-link:hover { border-color: rgba(201,168,103,.55); color: var(--gold); }
.back-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.nav-links { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: .86rem; }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--ink); }

.hero { padding: 86px 0 62px; min-height: 64vh; display: grid; align-items: end; }
.eyebrow { margin: 0 0 14px; color: var(--gold); text-transform: uppercase; letter-spacing: .2em; font-size: .78rem; font-weight: 700; }
.hero h1, .wine-hero h1 { margin: 0; max-width: 980px; font-family: var(--serif); font-size: clamp(3.5rem, 10vw, 8.8rem); line-height: .88; font-weight: 500; letter-spacing: -.055em; }
.hero-copy { margin-top: 32px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 48px; align-items: end; }
.hero-copy > p { margin: 0; max-width: 700px; color: #d7cfc4; font-family: var(--serif); font-size: clamp(1.25rem, 2.3vw, 1.9rem); line-height: 1.32; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); padding-top: 16px; }
.hero-stat strong { display: block; font-family: var(--serif); font-size: 1.65rem; color: var(--gold); }
.hero-stat span { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }

.section { padding: 54px 0 88px; }
#weine { scroll-margin-top: 5.5rem; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.section-head h2 { margin: 0; font-family: var(--serif); font-size: clamp(2.1rem, 5vw, 4.6rem); line-height: .95; font-weight: 500; letter-spacing: -.035em; }
.section-head p { margin: 0; max-width: 480px; color: var(--muted); }
.section-head-secondary { margin-top: 78px; }

.wine-list { display: grid; }
.wine-row {
  --accent: var(--gold);
  display: grid;
  grid-template-columns: 78px minmax(220px, .62fr) minmax(0, 1.38fr) 64px;
  gap: 28px;
  align-items: center;
  min-height: 218px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: color .25s ease, padding .25s ease;
}
.wine-row:hover { padding-left: 10px; color: #fff; }
.wine-number { align-self: start; color: var(--accent); font-family: var(--serif); font-size: 1.35rem; }
.wine-thumb { aspect-ratio: 4/3; overflow: hidden; border-radius: 4px; background: #24211e; }
.wine-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.wine-row:hover .wine-thumb img { transform: scale(1.035); }
.wine-meta { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.wine-kicker { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; }
.wine-meta h3 { margin: 8px 0 10px; font-family: var(--serif); font-size: clamp(1.7rem, 3.1vw, 3rem); line-height: 1; font-weight: 500; letter-spacing: -.025em; }
.wine-meta p { margin: 0; max-width: 680px; color: #c8bfb4; }
.wine-badges { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 99px; color: #d8cfc3; font-size: .78rem; }
.row-detail { color: var(--accent); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }

.editorial-note { margin: 70px 0 0; padding: 36px; border: 1px solid var(--line); background: rgba(255,255,255,.025); display: grid; grid-template-columns: .55fr 1fr; gap: 40px; }
.editorial-note h3 { margin: 0; font-family: var(--serif); font-size: 2rem; font-weight: 500; }
.editorial-note p { margin: 0; color: var(--muted); }

.wine-hero { padding: 64px 0 54px; }
.wine-hero-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr); gap: 58px; align-items: stretch; }
.wine-hero-image { min-height: 620px; overflow: hidden; border-radius: 6px; background: #24211e; }
.wine-hero-image img { width: 100%; height: 100%; object-fit: cover; }
.wine-hero-copy { display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 10px; }
.wine-hero h1 { font-size: clamp(2.65rem, 7.6vw, 7.5rem); overflow-wrap: anywhere; }
.producer { margin: 14px 0 0; color: var(--gold); font-family: var(--serif); font-size: clamp(1.4rem, 2vw, 2rem); }
.wine-lead { margin: 30px 0 0; max-width: 730px; color: #d8cfc3; font-family: var(--serif); font-size: clamp(1.18rem, 2vw, 1.55rem); line-height: 1.38; }
.fact-strip { margin-top: 34px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fact { padding: 16px 14px 16px 0; }
.fact + .fact { padding-left: 14px; border-left: 1px solid var(--line); }
.fact span { display: block; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; }
.fact strong { display: block; margin-top: 6px; font-family: var(--serif); font-size: 1rem; font-weight: 500; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, .55fr); gap: 64px; }
.content-section { padding: 48px 0; border-top: 1px solid var(--line); }
.content-section:first-child { border-top: 0; }
.content-section h2 { margin: 0 0 24px; font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 4vw, 3.6rem); letter-spacing: -.025em; }
.tasting-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tasting-card { padding-top: 14px; border-top: 2px solid var(--gold); }
.tasting-card h3 { margin: 0 0 10px; color: var(--gold); font-size: .76rem; text-transform: uppercase; letter-spacing: .16em; }
.tasting-card p, .prose { margin: 0; color: #cec5ba; }
.score-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 24px; }
.score { padding: 18px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.score strong { display: block; font-family: var(--serif); font-size: 1.85rem; color: var(--gold); font-weight: 500; }
.score span { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; }
.service-list { display: grid; gap: 0; }
.service-item { display: grid; grid-template-columns: 120px 1fr; gap: 18px; padding: 15px 0; border-top: 1px solid var(--line); }
.service-item dt { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; }
.service-item dd { margin: 0; }
.pairing-list { display: flex; flex-wrap: wrap; gap: 8px; }

.sidebar { padding-top: 48px; }
.side-card { position: sticky; top: 96px; border: 1px solid var(--line); background: rgba(255,255,255,.025); padding: 25px; }
.side-card h2 { margin: 0 0 20px; font-family: var(--serif); font-size: 1.7rem; font-weight: 500; }
.shop-list, .source-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.shop-list li { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.shop-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.shop-list a, .source-list a { text-decoration-color: rgba(201,168,103,.5); text-underline-offset: 3px; }
.shop-list strong { display: block; color: var(--gold); }
.shop-list span { display: block; margin-top: 5px; color: var(--muted); font-size: .82rem; }
.as-of { margin: 18px 0 0; color: #8f857a; font-size: .76rem; }
.source-list { gap: 10px; font-size: .84rem; color: var(--muted); }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.gallery button { border: 0; padding: 0; background: none; cursor: zoom-in; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 4px; }
.next-wine { margin-top: 50px; padding: 36px 0 80px; border-top: 1px solid var(--line); }
.next-wine a { display: flex; justify-content: space-between; gap: 24px; align-items: end; text-decoration: none; }
.next-wine span { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .14em; }
.next-wine strong { display: block; margin-top: 10px; font-family: var(--serif); font-size: clamp(2rem, 5vw, 4.5rem); font-weight: 500; line-height: 1; }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: #8f857a; font-size: .78rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; }

.lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; padding: 24px; border: 0; background: transparent; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(0,0,0,.92); }
.lightbox img { max-height: 90vh; object-fit: contain; border-radius: 4px; }
.lightbox button { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; color: #fff; background: rgba(0,0,0,.4); cursor: pointer; }

.qr-page { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: var(--paper); color: #1b1815; }
.qr-card { width: min(680px, 100%); aspect-ratio: 5 / 7; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px; border: 1px solid #c9bda9; text-align: center; background: #faf7f1; }
.qr-card .eyebrow { color: #71303c; }
.qr-card h1 { margin: 0; font-family: var(--serif); font-size: clamp(3.1rem, 8vw, 6rem); line-height: .93; font-weight: 500; letter-spacing: -.045em; }
.qr-card p { max-width: 430px; color: #625b53; }
.qr-card img { width: min(300px, 70vw); margin: 34px auto 26px; image-rendering: pixelated; }
.qr-card .url { font-size: .76rem; overflow-wrap: anywhere; }
.print-button { position: fixed; right: 20px; bottom: 20px; border: 0; border-radius: 99px; padding: 12px 18px; background: #1b1815; color: #fff; cursor: pointer; }

@media (max-width: 850px) {
  .nav-links a:not(:last-child) { display: none; }
  .hero { min-height: auto; padding-top: 64px; }
  .hero-copy, .editorial-note, .wine-hero-grid, .content-grid { grid-template-columns: 1fr; }
  .hero-copy { gap: 30px; }
  .section-head { align-items: start; flex-direction: column; }
  .wine-row { grid-template-columns: 44px 122px minmax(0, 1fr); gap: 15px; min-height: 178px; }
  .wine-row .row-detail { display: none; }
  .wine-meta p { display: none; }
  .wine-badges { margin-top: 10px; }
  .wine-hero-grid { gap: 34px; }
  .wine-hero-image { min-height: 0; aspect-ratio: 4/3; }
  .wine-hero-copy { order: -1; }
  .content-grid { gap: 0; }
  .sidebar { padding-top: 0; padding-bottom: 60px; }
  .side-card { position: static; }
}

@media (max-width: 590px) {
  .shell { width: min(100% - 22px, 1180px); }
  .hero h1 { font-size: clamp(3.4rem, 20vw, 6rem); }
  .hero-copy { margin-top: 24px; }
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stat { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .section { padding-top: 36px; }
  .wine-row { grid-template-columns: 36px 92px minmax(0, 1fr); gap: 10px; min-height: 142px; }
  .wine-meta h3 { font-size: 1.4rem; }
  .wine-kicker { font-size: .72rem; }
  .wine-badges .pill:not(:first-child) { display: none; }
  .editorial-note { margin-top: 45px; padding: 24px; gap: 18px; }
  .wine-hero { padding-top: 36px; }
  .fact-strip { grid-template-columns: 1fr; }
  .fact + .fact { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .tasting-grid, .score-grid { grid-template-columns: 1fr; }
  .service-item { grid-template-columns: 92px 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .qr-card { padding: 32px 24px; }
}

@media print {
  @page { size: A5 portrait; margin: 0; }
  .qr-page { padding: 0; }
  .qr-card { width: 148mm; height: 210mm; border: 0; }
  .print-button { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
