:root {
  --wine-ink: #0d0b0a;
  --wine-cream: #f1eadc;
  --wine-gold: #b99a61;
  --wine-burgundy: #5a1425;
  --wine-muted: rgba(241, 234, 220, 0.62);
}

* { box-sizing: border-box; }
html { background: var(--wine-ink); color-scheme: dark; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }

.wine-experience {
  color: var(--wine-cream);
  background: #0c0909;
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

.wine-topbar {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  height: 76px;
  padding: 0 clamp(18px, 4vw, 64px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.09);
  background: linear-gradient(180deg, rgba(10,8,8,.93), rgba(10,8,8,.3));
  backdrop-filter: blur(12px);
}

.wine-topbar a { color: inherit; text-decoration: none; }
.wine-back, .wine-topbar-tag { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.wine-back { justify-self: start; }
.wine-back span { margin-right: 8px; color: var(--wine-gold); }
.wine-brand { font: 700 28px Georgia, serif; letter-spacing: .18em; }
.wine-topbar-tag { justify-self: end; color: var(--wine-muted); }

.wine-story { position: relative; height: 720vh; min-height: 5200px; }
.wine-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 54%, rgba(95, 22, 43, .26), transparent 36%),
    linear-gradient(140deg, #0b0909 0%, #17100f 48%, #080707 100%);
  touch-action: pan-y;
}

.wine-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .16;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
}

.wine-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  box-shadow: inset 0 0 150px rgba(0,0,0,.55);
  background: linear-gradient(90deg, rgba(0,0,0,.22), transparent 22%, transparent 78%, rgba(0,0,0,.22));
}

.wine-aura {
  position: absolute;
  z-index: 0;
  width: min(72vw, 760px);
  aspect-ratio: 1;
  left: 50%;
  top: 55%;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(113, 27, 49, .34), rgba(113, 27, 49, 0) 67%);
  filter: blur(10px);
  transition: background 600ms ease;
}

#wine-canvas { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; outline: none; }

.wine-intro {
  position: absolute;
  z-index: 4;
  top: 27%;
  left: clamp(72px, 8vw, 150px);
  width: min(34vw, 470px);
  text-align: left;
  pointer-events: none;
  transition: opacity .15s linear, transform .15s linear;
}

.wine-kicker, .wine-index, .wine-detail-label {
  margin: 0 0 13px;
  color: var(--wine-gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .32em;
  text-transform: uppercase;
}

.wine-intro h1 {
  margin: 0;
  font: italic 400 clamp(42px, 5vw, 72px)/.88 Georgia, serif;
  letter-spacing: -.035em;
  text-wrap: balance;
  text-shadow: 0 8px 28px rgba(0,0,0,.55);
}

.wine-index { margin-top: 18px; color: var(--wine-muted); letter-spacing: .2em; }
.wine-index span { color: var(--wine-cream); }

.wine-arrow {
  position: absolute;
  z-index: 8;
  top: 52%;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(185,154,97,.55);
  border-radius: 50%;
  color: var(--wine-cream);
  background: rgba(12,9,9,.58);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 23px;
  transition: transform .25s ease, background .25s ease;
}
.wine-arrow:hover { transform: scale(1.08); background: rgba(90,20,37,.72); }
.wine-arrow-left { left: clamp(18px, 5vw, 78px); }
.wine-arrow-right { right: clamp(18px, 5vw, 78px); }

.wine-details {
  position: absolute;
  z-index: 5;
  top: 50%;
  right: clamp(38px, 8vw, 150px);
  width: min(36vw, 430px);
  translate: 25px -43%;
  opacity: 0;
  pointer-events: none;
}

.wine-details h2 {
  margin: 0 0 22px;
  font: italic 400 clamp(42px, 5.5vw, 78px)/.88 Georgia, serif;
  letter-spacing: -.04em;
}

.wine-details dl { display: flex; gap: 42px; margin: 0 0 24px; }
.wine-details dl div { min-width: 100px; border-top: 1px solid rgba(185,154,97,.5); padding-top: 11px; }
.wine-details dt { color: var(--wine-muted); font-size: 9px; letter-spacing: .18em; text-transform: uppercase; }
.wine-details dd { margin: 6px 0 0; font: 18px Georgia, serif; }
.wine-description { color: var(--wine-muted); font: 16px/1.7 Georgia, serif; }
.wine-menu-link {
  display: inline-block;
  margin-top: 14px;
  padding-bottom: 6px;
  color: var(--wine-cream);
  border-bottom: 1px solid var(--wine-gold);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.wine-navigation {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 42px;
  translate: -50% 0;
  text-align: center;
  color: var(--wine-muted);
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  transition: opacity .3s ease;
}
.wine-navigation p { margin: 0 0 12px; }
.wine-navigation span { color: var(--wine-gold); }

.wine-scene-status {
  position: absolute;
  z-index: 6;
  left: clamp(28px, 4vw, 68px);
  bottom: 38px;
  display: flex;
  align-items: center;
  gap: 13px;
  color: rgba(241,234,220,.48);
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.wine-scene-status > span:first-child { color: var(--wine-gold); }
.wine-scene-line { width: 42px; height: 1px; background: rgba(185,154,97,.48); }

.wine-progress { position: absolute; z-index: 10; right: 18px; top: 18%; height: 64%; width: 1px; background: rgba(255,255,255,.12); }
.wine-progress span { display: block; width: 100%; height: 0; background: var(--wine-gold); }

.wine-fallback { position: absolute; inset: 20% 0; z-index: 6; place-items: center; text-align: center; }
.fallback-bottle { width: 74px; height: 300px; border-radius: 28px 28px 18px 18px; background: linear-gradient(90deg, #1d352d, #54735e 42%, #152820); }

.wine-ending {
  min-height: 76vh;
  padding: 14vh 24px;
  display: grid;
  place-content: center;
  text-align: center;
  background: var(--wine-cream);
  color: #16110f;
}
.wine-ending p { margin: 0 0 16px; color: #806f5e; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
.wine-ending h2 { margin: 0; font: italic 400 clamp(44px, 8vw, 100px)/.95 Georgia, serif; }
.wine-ending div { margin-top: 42px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.wine-ending a { padding: 14px 24px; color: #16110f; border: 1px solid #16110f; text-decoration: none; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }

@media (max-width: 760px) {
  .wine-topbar { height: 64px; grid-template-columns: 1fr auto; }
  .wine-topbar-tag { display: none; }
  .wine-brand { font-size: 23px; }
  .wine-story { height: 650vh; }
  .wine-intro {
    top: 11%;
    left: 50%;
    width: 88vw;
    translate: -50% 0;
    text-align: center;
  }
  .wine-intro h1 { font-size: clamp(34px, 11vw, 54px); }
  .wine-arrow { top: 55%; width: 44px; height: 44px; font-size: 20px; }
  .wine-arrow-left { left: 12px; }
  .wine-arrow-right { right: 12px; }
  .wine-details {
    top: auto;
    right: 22px;
    bottom: 10%;
    left: 22px;
    width: auto;
    translate: 0 22px;
    text-align: left;
  }
  .wine-details h2 { font-size: clamp(38px, 12vw, 56px); }
  .wine-details dl { gap: 28px; }
  .wine-description { font-size: 14px; max-width: 520px; }
  .wine-navigation { bottom: 24px; width: 90%; }
  .wine-scene-status { left: 18px; bottom: 70px; }
  .wine-progress { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .wine-story { height: 260vh; }
  .wine-arrow, .wine-aura { transition: none; }
}

/* The final chapter sits beneath the back-facing bottle. */
.wine-reading-shade {
  position: absolute;
  inset: 55% 0 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(to bottom, transparent, rgba(9,7,7,.65) 40%, rgba(9,7,7,.94));
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 42%);
  mask-image: linear-gradient(to bottom, transparent, black 42%);
}
.wine-story { height: 460vh; min-height: 0; }
.wine-details {
  top: auto; bottom: 9%; left: 50%; right: auto;
  width: min(640px, 82vw); translate: -50% 0; text-align: center;
}
.wine-details h2 { font-size: clamp(25px, 3vw, 40px); line-height: 1.05; margin-bottom: 14px; }
.wine-details h2 br { display: none; }
.wine-details dl { justify-content: center; gap: 24px; margin-bottom: 10px; }
.wine-description { font-size: 15px; line-height: 1.55; margin: 10px 0; }
.wine-menu-link { margin-top: 5px; }
@media (max-width: 760px) {
  .wine-details { bottom: 12%; width: 86vw; }
  .wine-details dl { gap: 12px; }
  .wine-details dl div { min-width: 0; flex: 1; }
  .wine-details dd { font-size: 14px; }
  .wine-description { font-size: 13px; }
  .wine-details .wine-detail-label { display: none; }
}
