/* DARK CAVE · version 2: "light in the cave" */
:root {
  --bg: #070605;
  --surface: #110e0b;
  --line: rgba(241, 233, 219, .12);
  --text: #f1e9db;
  --muted: #b1a591;
  --amber: #e3a335;          /* label gold of the bottle */
  --amber-hover: #f0b955;
  --serif: "Noto Serif Display", Georgia, serif;
  --sans: "Commissioner", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1200px;
  --gutter: clamp(16px, 5vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 300 17px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--amber); }
h1, h2, h3 { font-family: var(--serif); font-weight: 300; line-height: 1.1; margin: 0; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.chapter-no, .kicker {
  font: 500 12px/1 var(--sans);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 22px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 32px;
  font: 500 15px/1 var(--sans); letter-spacing: .04em;
  border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background .25s, color .25s, border-color .25s, box-shadow .25s;
}
.btn-amber { background: var(--amber); color: #1a1206; box-shadow: 0 0 0 0 rgba(227, 163, 53, 0); }
.btn-amber:hover { background: var(--amber-hover); box-shadow: 0 0 40px 4px rgba(227, 163, 53, .28); }
.btn-line { background: transparent; color: var(--text); border-color: rgba(241, 233, 219, .3); }
.btn-line:hover { border-color: var(--amber); color: var(--amber); }

/* Torch: darkness with a soft hole of light at --x/--y */
.torch {
  --x: 50%; --y: 45%;
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at var(--x) var(--y),
    rgba(7, 6, 5, 0) 0, rgba(7, 6, 5, .5) 170px, rgba(7, 6, 5, .96) 360px);
}
.torch-soft {
  background: radial-gradient(circle at var(--x) var(--y),
    rgba(7, 6, 5, 0) 0, rgba(7, 6, 5, .25) 280px, rgba(7, 6, 5, .8) 680px);
}

/* Age gate */
.is-gated { overflow: hidden; }
.gate {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
  padding: var(--gutter) var(--gutter) clamp(32px, 9vh, 96px);
  background: #070605;
  transition: opacity .9s ease, visibility .9s;
}
.gate::before { /* bottle in the upper half, text below it; edges fade out */
  content: ""; position: absolute; inset: 0;
  background: url(img/header-darkcave-1500.webp) center -7vh / auto 74vh no-repeat;
  -webkit-mask-image: radial-gradient(ellipse 34vh 36vh at 50% 30vh, #000 60%, transparent 100%);
          mask-image: radial-gradient(ellipse 34vh 36vh at 50% 30vh, #000 60%, transparent 100%);
}
.gate .torch { --y: 30%; }
.gate.is-open { opacity: 0; visibility: hidden; }
.gate[hidden], [hidden] { display: none !important; }
.gate-content {
  position: relative; z-index: 1;
  width: 100%; max-width: 520px; text-align: center;
}
.gate h2 { font-size: clamp(40px, 6vw, 64px); margin-bottom: 14px; }
.gate-note { color: var(--muted); font-size: 15px; max-width: 26em; margin: 0 auto 28px; }
.gate-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.gate-actions .btn { min-width: 170px; }
.gate-remember { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); cursor: pointer; }
.gate-remember input { accent-color: var(--amber); width: 16px; height: 16px; }

/* Top bar */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  height: 68px; padding: 0 var(--gutter);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.bar.is-solid { background: rgba(7, 6, 5, .85); border-color: var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.bar-brand { display: block; }
.bar-brand img { height: 42px; width: auto; }
.bar-sub { font-size: 13px; color: var(--muted); padding-left: 18px; border-left: 1px solid var(--line); }

/* Chapter navigation (desktop) */
.chapters { position: fixed; right: 24px; top: 50%; transform: translateY(-50%); z-index: 40; }
.chapters ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.chapters a {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  min-height: 32px; color: var(--muted); text-decoration: none; font-size: 13px;
}
.chapters a::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  border: 1px solid var(--muted); transition: background .3s, border-color .3s, box-shadow .3s;
}
.chapters span { opacity: 0; transform: translateX(6px); transition: opacity .25s, transform .25s; }
.chapters a:hover span, .chapters a:focus-visible span, .chapters a[aria-current] span { opacity: 1; transform: none; }
.chapters a[aria-current] { color: var(--text); }
.chapters a[aria-current]::after { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 12px var(--amber); }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  background: #141210;
}
.hero-img img { /* bottle on the right, its left edge fades into the dark */
  position: absolute; top: 0; right: 0; width: 64%; height: 100%;
  object-fit: cover; object-position: 50% 42%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%);
          mask-image: linear-gradient(90deg, transparent, #000 30%);
}
.hero .torch { --x: 66%; }
.hero .torch { z-index: 2; }
.hero-copy {
  position: relative; z-index: 3;
  width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 120px var(--gutter) 160px;
}
.hero h1 { font-size: clamp(38px, 4.6vw, 66px); max-width: min(8.5em, 40vw); margin-bottom: 36px; }

/* I. Cave */
.cave { position: relative; min-height: 100vh; display: flex; align-items: flex-end; overflow: hidden; }
.cave-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cave::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(7, 6, 5, .1) 28%, rgba(7, 6, 5, .5) 60%, var(--bg) 100%);
}
.cave-copy { position: relative; z-index: 1; width: 100%; padding-bottom: 120px; }
.cave h2 { font-size: clamp(36px, 5vw, 72px); max-width: 11em; margin-bottom: 30px; }
.cave .big { font: 300 clamp(20px, 2vw, 26px)/1.5 var(--serif); max-width: 30em; }
.cave-copy > p:last-child { color: var(--muted); max-width: 34em; }

/* II. Craft */
.craft { padding: 140px 0; }
.craft-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.craft-media { position: sticky; top: 110px; border-radius: 24px; overflow: hidden; }
.craft-media img { width: 100%; height: min(72vh, 680px); object-fit: cover; object-position: 38% center; }
.craft h2 { font-size: clamp(34px, 4vw, 56px); margin-bottom: 56px; }
.step { position: relative; padding: 0 0 56px 64px; border-left: 1px solid var(--line); margin-left: 20px; }
.step:last-child { padding-bottom: 0; }
.step-no {
  position: absolute; left: -21px; top: 0;
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font: 500 13px var(--sans); color: var(--amber);
  background: var(--bg); border: 1px solid rgba(227, 163, 53, .5);
}
.step h3 { font-size: 30px; margin: 4px 0 14px; }
.step p { color: var(--muted); }


.years { margin: 28px 0 0; }
.years-track { position: relative; height: 6px; border-radius: 6px; background: var(--line); }
.years-fill {
  position: absolute; top: 0; bottom: 0; left: 41.667%; right: 0; border-radius: 6px;
  background: linear-gradient(90deg, #8a5a17, var(--amber));
  transform-origin: left; transform: scaleX(0); transition: transform 1.4s cubic-bezier(.2, .7, .2, 1) .2s;
}
.years.is-in .years-fill { transform: scaleX(1); }
.years-scale { position: relative; height: 22px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.years-scale span { position: absolute; top: 0; }
.years-scale span:nth-child(1) { left: 0; }
.years-scale span:nth-child(2) { left: 41.667%; transform: translateX(-50%); color: var(--amber); }
.years-scale span:nth-child(3) { right: 0; color: var(--amber); }

/* III. Taste */
.taste { padding: 140px 0; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.taste-head { max-width: 720px; margin-bottom: 72px; }
.taste h2 { font-size: clamp(34px, 4vw, 56px); }
.journey { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; position: relative; }
.journey::before { /* the line that links the four stages */
  content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1px;
  background: linear-gradient(90deg, var(--amber), rgba(227, 163, 53, .1));
}
.journey > li { position: relative; padding-top: 44px; }
.journey > li::before {
  content: ""; position: absolute; left: 0; top: 0; width: 15px; height: 15px; border-radius: 50%;
  background: var(--amber); box-shadow: 0 0 0 5px var(--surface), 0 0 18px rgba(227, 163, 53, .6);
}
.journey h3 { font-size: 30px; margin-bottom: 12px; }
.journey p { color: var(--muted); font-size: 16px; margin: 0; }

/* Quote */
.quote { padding: 150px 0; }
.quote-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.quote-img { margin: 0; border-radius: 24px; overflow: hidden; }
.quote-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 45% center; }
.quote blockquote { margin: 0; }
.quote p { font: italic 300 clamp(26px, 3.2vw, 42px)/1.35 var(--serif); margin: 0; }
.quote p::before { content: "“"; display: block; font: 400 90px/0.7 var(--serif); color: var(--amber); margin-bottom: 18px; font-style: normal; }

/* IV. Gift */
.gift { padding: 0 0 150px; }
.gift-inner {
  display: flex; align-items: center; justify-content: center; gap: clamp(32px, 6vw, 96px);
  padding-top: 80px; padding-bottom: 80px; border-radius: 28px;
  width: calc(100% - 2 * var(--gutter)); max-width: calc(var(--wrap) - 2 * var(--gutter));
  background: radial-gradient(ellipse at 50% 120%, rgba(227, 163, 53, .22), transparent 65%), var(--surface);
  border: 1px solid var(--line);
}
.gift-text { font: 300 clamp(28px, 3.4vw, 46px)/1.25 var(--serif); max-width: 14em; margin: 0; }
.gift-bottle { height: 300px; width: auto; filter: drop-shadow(0 24px 40px rgba(227, 163, 53, .25)); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 56px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer p { margin: 0; }
.footer-logo { width: 96px; }
.footer a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--amber); padding-bottom: 2px; }
.footer .copy { font-size: 13px; color: var(--muted); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s ease, transform 1s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* Tablet */
@media (max-width: 1100px) {
  .chapters { display: none; }
}
@media (max-width: 900px) {
  .craft-grid { grid-template-columns: 1fr; gap: 48px; }
  .craft-media { position: relative; top: 0; }
  .quote-grid { grid-template-columns: 1fr; gap: 40px; }
  .quote-img img { aspect-ratio: 16 / 10; }
  .craft-media img { height: auto; aspect-ratio: 16 / 10; }
  .journey { grid-template-columns: 1fr 1fr; row-gap: 56px; }
  .journey::before { display: none; }
}

/* Phone: the bottle sits on top, the text below it */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .bar-sub { display: none; }
  .gate::before {
    background-image: url(img/header-darkcave-750.webp); background-size: auto 62vh; background-position: center -4vh;
    -webkit-mask-image: radial-gradient(ellipse 30vh 30vh at 50% 27vh, #000 60%, transparent 100%);
            mask-image: radial-gradient(ellipse 30vh 30vh at 50% 27vh, #000 60%, transparent 100%);
  }
  .gate-actions .btn { flex: 1 1 100%; }
  .hero { flex-direction: column; align-items: stretch; }
  .hero-img { position: relative; display: block; aspect-ratio: 1 / 1.05; overflow: hidden; }
  .hero { background: var(--bg); }
  .hero-img img { /* bottom edge fades into the page; no torch on touch screens */
    width: 100%;
    -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
            mask-image: linear-gradient(180deg, #000 70%, transparent);
  }
  .hero .torch { display: none; }
  .hero-copy { padding: 0 var(--gutter) 120px; margin-top: -40px; }
  .hero h1 { font-size: 36px; max-width: none; }
  .hero-copy .btn { width: 100%; }
  .cave { min-height: 0; padding-top: 62vw; }
  .cave-copy { padding-bottom: 88px; }
  .craft, .taste { padding: 96px 0; }
  .step { padding-left: 44px; margin-left: 20px; }
  .journey { grid-template-columns: 1fr; row-gap: 0; }
  .journey > li { padding: 0 0 40px 40px; border-left: 1px solid rgba(227, 163, 53, .35); margin-left: 7px; }
  .journey > li:last-child { padding-bottom: 0; border-left-color: transparent; }
  .journey > li::before { left: -8px; }
  .quote { padding: 100px 0; }
  .gift { padding-bottom: 100px; }
  .gift-inner { flex-direction: column; text-align: center; padding-top: 56px; padding-bottom: 56px; }
  .gift-bottle { height: 220px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .years-fill { transform: none; transition: none; }
  .gate { transition: none; }
}
