/* ═══════════════════════════════════════════════════════════════════════
   Vinia — landing page.
   Loaded only by index.html; styles.css stays the light base for /privacy.

   The page is a descent: candlelit table → down into the cellar →
   back up to the table. Dark sections use candlelight gold as the accent,
   light sections use the brand oxblood.
   ═══════════════════════════════════════════════════════════════════════ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body.home {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  /* dark — the cellar */
  --void: #0D0607;
  --cellar: #150B0E;
  --cellar-2: #1C1013;
  --stone: #2A171C;
  --stone-lit: #3A2228;

  /* wine */
  --wine: #6B1E2B;
  --wine-lit: #8E2438;
  --glass: #77062F;
  --glass-dk: #4E0620;

  /* light in the room */
  --ember: #E3B278;
  --ember-hot: #F6DCB2;
  --cream: #F5DDBB;
  --leaf: #BC9D81;

  /* type on dark */
  --chalk: #EFE8DD;
  --chalk-2: #C9BDB0;
  --chalk-3: #94867C;

  /* light sections */
  --sage: #EFF1EA;
  --sage-2: #F7F8F3;
  --ink: #1C1F1A;
  --ink-2: #4A5045;
  --ink-3: #6A6F63;
  --hair: rgba(28, 31, 26, .13);
  --hair-d: rgba(245, 221, 187, .14);

  --wrap: 1240px;
  --gut: clamp(20px, 4.5vw, 60px);
  --serif: "Instrument Serif", "New York", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  background: var(--void);
  color: var(--chalk);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  /* clip, not hidden: `hidden` would make the body a scroll container and
     break the sticky cellar stage */
  overflow-x: clip;
}

body.home ::selection {
  background: var(--ember);
  color: var(--void);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

body.home h1,
body.home h2,
body.home h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.005em;
  color: inherit;
}

.display {
  font-family: var(--serif);
  font-size: clamp(34px, 4.6vw, 62px);
  line-height: 1.04;
  margin: 0;
}

.display em,
h1 em {
  font-style: italic;
  color: var(--ember);
}

/* film grain over everything — kills the flat-gradient look */
.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: .055;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── eyebrows ───────────────────────────────────────────────────────── */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--ember);
}

.eyebrow .pip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  flex: none;
}

.eyebrow-dark {
  color: var(--wine);
}

.eyebrow-dark .pip {
  box-shadow: none;
}

/* ── buttons ────────────────────────────────────────────────────────── */
.btn {
  --pad: 15px 24px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: var(--pad);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.15;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), background-color .3s, box-shadow .3s, border-color .3s, color .3s;
}

.btn .apple {
  width: 19px;
  height: 19px;
  fill: currentColor;
  flex: none;
}

.btn-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.btn-stack small {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .72;
  line-height: 1;
}

.btn-stack strong {
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.1;
}

.btn-primary {
  background: var(--cream);
  color: #23120F;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 14px 34px -14px rgba(227, 178, 120, .6);
}

.btn-primary:hover {
  background: var(--ember-hot);
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 20px 44px -14px rgba(227, 178, 120, .8);
}

.btn-lg {
  --pad: 18px 32px;
}

.btn-lg .btn-stack strong {
  font-size: 19px;
}

.btn-lg .apple {
  width: 22px;
  height: 22px;
}

.btn-ghost {
  color: var(--chalk-2);
  border: 1px solid var(--hair-d);
  background: rgba(245, 221, 187, .03);
}

.btn-ghost:hover {
  color: var(--chalk);
  border-color: rgba(245, 221, 187, .3);
  background: rgba(245, 221, 187, .07);
}

.btn-ghost .arr {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}

.btn-ghost:hover .arr {
  transform: translateY(3px);
}

.btn-sm {
  --pad: 10px 17px;
  font-size: 14px;
  background: rgba(245, 221, 187, .09);
  color: var(--chalk);
  border: 1px solid var(--hair-d);
}

.btn-sm .apple {
  width: 15px;
  height: 15px;
}

.btn-sm:hover {
  background: var(--cream);
  color: #23120F;
  border-color: transparent;
}

/* ── nav ────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px var(--gut);
  transition: background-color .4s, backdrop-filter .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}

.nav.is-stuck {
  background: rgba(13, 6, 7, .72);
  backdrop-filter: saturate(150%) blur(18px);
  -webkit-backdrop-filter: saturate(150%) blur(18px);
  border-bottom-color: var(--hair-d);
}

.nav.is-light.is-stuck {
  background: rgba(239, 241, 234, .8);
  border-bottom-color: var(--hair);
}

.nav-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-right: auto;
  font-family: var(--serif);
  font-size: 25px;
  letter-spacing: .01em;
  text-decoration: none;
  color: var(--chalk);
  transition: color .4s;
}

.nav-mark-glyph {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: block;
  flex: none;
}

.nav-links {
  display: flex;
  gap: 26px;
}

.nav-links a {
  font-size: 14px;
  color: var(--chalk-3);
  text-decoration: none;
  transition: color .3s;
}

.nav-links a:hover {
  color: var(--chalk);
}

.nav.is-light .nav-mark {
  color: var(--ink);
}

.nav.is-light .nav-links a {
  color: var(--ink-3);
}

.nav.is-light .nav-links a:hover {
  color: var(--ink);
}

.nav.is-light .btn-sm {
  background: var(--wine);
  color: var(--sage-2);
  border-color: transparent;
}

.nav.is-light .btn-sm:hover {
  background: #57161f;
  color: #fff;
}

/* ── the cellar backdrop (arch, candlelight, dust) ──────────────────── */
.cellar-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 0%, #1E1114 0%, #150B0E 45%, #0D0607 100%);
}

.cellar-bg-deep {
  background:
    radial-gradient(100% 80% at 50% 40%, #1A0E11 0%, #110809 55%, #080405 100%);
}

.arch {
  position: absolute;
  left: 50%;
  bottom: -6%;
  width: min(1180px, 96vw);
  height: 116%;
  transform: translateX(-50%);
  border-radius: 50% 50% 0 0 / 42% 42% 0 0;
  background:
    repeating-linear-gradient(0deg, rgba(255, 226, 190, .022) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(90deg, rgba(255, 226, 190, .018) 0 1px, transparent 1px 92px),
    radial-gradient(80% 60% at 50% 78%, rgba(120, 62, 46, .3), transparent 70%);
  box-shadow: 0 0 200px 60px rgba(0, 0, 0, .55) inset;
  opacity: .85;
}

.arch-deep {
  opacity: .6;
  bottom: -20%;
}

.candle {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(1500px, 150vw);
  aspect-ratio: 1.5;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side,
      rgba(240, 186, 122, .2) 0%,
      rgba(190, 110, 70, .12) 34%,
      rgba(110, 40, 40, .06) 58%,
      transparent 75%);
  animation: flicker 7.5s ease-in-out infinite;
}

.candle-deep {
  top: 50%;
  width: min(1200px, 130vw);
  background: radial-gradient(closest-side,
      rgba(240, 186, 122, .17) 0%,
      rgba(160, 80, 60, .1) 38%,
      transparent 72%);
}

.candle-close {
  top: 54%;
}

@keyframes flicker {

  0%,
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  22% {
    opacity: .88;
    transform: translate(-50%, -50%) scale(1.02);
  }

  47% {
    opacity: 1.02;
    transform: translate(-50%, -50%) scale(.985);
  }

  71% {
    opacity: .92;
    transform: translate(-50%, -50%) scale(1.015);
  }
}

.motes {
  position: absolute;
  inset: -20% -10%;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 22%, rgba(246, 220, 178, .5), transparent),
    radial-gradient(1.3px 1.3px at 28% 68%, rgba(246, 220, 178, .38), transparent),
    radial-gradient(1.8px 1.8px at 45% 34%, rgba(246, 220, 178, .3), transparent),
    radial-gradient(1.2px 1.2px at 61% 79%, rgba(246, 220, 178, .42), transparent),
    radial-gradient(1.7px 1.7px at 74% 18%, rgba(246, 220, 178, .3), transparent),
    radial-gradient(1.4px 1.4px at 88% 56%, rgba(246, 220, 178, .4), transparent),
    radial-gradient(1.2px 1.2px at 36% 90%, rgba(246, 220, 178, .3), transparent),
    radial-gradient(1.5px 1.5px at 92% 88%, rgba(246, 220, 178, .28), transparent);
  animation: drift 26s linear infinite alternate;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-40px, -70px, 0);
  }
}

/* ── device ─────────────────────────────────────────────────────────────
   A real iPhone 16 Pro render (assets/img/iphone-frame.webp, 2060×4215,
   transparent screen aperture at 110,106 → 1840×4002, Dynamic Island
   included). It is painted over the screenshot by ::after, so the frame's
   own bezel hides the square corners of the image underneath. */
.device {
  --dw: 300px;
  position: relative;
  width: var(--dw);
  aspect-ratio: 2060 / 4215;
  filter:
    drop-shadow(0 30px 44px rgba(0, 0, 0, .55))
    drop-shadow(0 5px 14px rgba(0, 0, 0, .4));
}

.device::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: url("/assets/img/iphone-frame.webp") center / 100% 100% no-repeat;
}

.device-screen {
  position: absolute;
  left: 5.3398%;
  top: 2.5148%;
  width: 89.3204%;
  height: 94.9466%;
  /* the aperture is a 287px-radius rounded rect in the 2060px-wide frame */
  border-radius: calc(var(--dw) * .1393);
  overflow: hidden;
  background: #EFF1EA;
  isolation: isolate;
}

.device-screen>img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* the red strike, drawn once when the page loads */
.crossout {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.crossout path {
  fill: none;
  stroke: #D64B43;
  stroke-width: 15;
  stroke-linecap: round;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: strike .5s cubic-bezier(.3, .75, .35, 1) forwards;
}

.crossout path:nth-child(1) {
  animation-delay: .9s;
}

.crossout path:nth-child(2) {
  animation-delay: 1.34s;
}

@keyframes strike {
  to {
    stroke-dashoffset: 0;
  }
}

/* ── Vinia the mascot ───────────────────────────────────────────────── */
/* Colours ride in on inherited custom properties (see the symbol markup).
   These animation rules are deliberately un-nested: a descendant selector
   would not match inside the <use> shadow tree, a plain class one does. */
.vinia {
  overflow: visible;
}

.v-body {
  animation: bob 4.2s ease-in-out infinite;
  transform-origin: 50% 100%;
  transform-box: fill-box;
}

.v-arm-wave {
  animation: wave 3.4s ease-in-out infinite;
  transform-origin: 0% 60%;
  transform-box: fill-box;
}

.v-eyes {
  animation: blink 6.4s infinite;
  transform-origin: 50% 50%;
  transform-box: fill-box;
}

@keyframes bob {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-6px) rotate(-.7deg);
  }
}

@keyframes wave {

  0%,
  62%,
  100% {
    transform: rotate(0deg);
  }

  72% {
    transform: rotate(-15deg);
  }

  84% {
    transform: rotate(9deg);
  }
}

@keyframes blink {

  0%,
  92%,
  100% {
    transform: scaleY(1);
  }

  95%,
  97% {
    transform: scaleY(.08);
  }
}

/* ═══ HERO ══════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 128px var(--gut) 96px;
  isolation: isolate;
  /* the glow and the candle are wider than the column they live in */
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: clamp(24px, 5vw, 76px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(46px, 6.6vw, 96px);
  line-height: .98;
  letter-spacing: -.018em;
  margin: 0 0 22px;
}

.lede {
  max-width: 33em;
  margin: 0 0 34px;
  font-size: clamp(16.5px, 1.25vw, 19px);
  line-height: 1.6;
  color: var(--chalk-2);
}

.lede strong {
  color: var(--chalk);
  font-weight: 600;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-bottom: 30px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--chalk-3);
}

.hero-meta li {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hero-meta li+li::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: .55;
  margin-left: -11px;
}

.hero-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 0;
}

.hero-glow {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 130%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(243, 205, 158, .17), rgba(140, 60, 50, .07) 45%, transparent 70%);
  filter: blur(6px);
}

.device-hero {
  /* height-aware, so the hero still fits a laptop viewport and the
     scroll cue stays above the fold */
  --dw: clamp(210px, min(24vw, 36svh), 330px);
  position: relative;
  z-index: 2;
  transform: rotate(-2.2deg);
  animation: float 9s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: rotate(-2.2deg) translateY(0);
  }

  50% {
    transform: rotate(-1.4deg) translateY(-14px);
  }
}

.vinia-hero {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: -2%;
  width: clamp(104px, 12vw, 164px);
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .65));
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--chalk-3);
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  transition: color .3s;
}

.scroll-cue:hover {
  color: var(--ember);
}

.scroll-cue-line {
  width: 1px;
  height: 46px;
  background: linear-gradient(to bottom, transparent, var(--ember));
  opacity: .55;
  animation: cue 2.6s ease-in-out infinite;
  transform-origin: top;
}

@keyframes cue {

  0%,
  100% {
    transform: scaleY(.45);
    opacity: .3;
  }

  50% {
    transform: scaleY(1);
    opacity: .7;
  }
}

/* ═══ PROBLEM ═══════════════════════════════════════════════════════ */
.problem {
  position: relative;
  padding: clamp(90px, 13vh, 150px) 0;
  background: linear-gradient(to bottom, var(--void), #0A0405 60%, var(--void));
  overflow: hidden;
  scroll-margin-top: 80px;
}

.problem-menu {
  position: absolute;
  right: -4%;
  top: 50%;
  width: min(430px, 40vw);
  margin: 0;
  transform: translateY(-50%) rotate(6deg);
  opacity: .16;
  -webkit-mask-image: radial-gradient(closest-side, #000 40%, transparent 82%);
  mask-image: radial-gradient(closest-side, #000 40%, transparent 82%);
}

.problem-menu img {
  width: 100%;
  height: auto;
  display: block;
  filter: sepia(.35) contrast(1.05);
}

.problem-inner {
  position: relative;
  z-index: 2;
}

.problem h2 {
  font-size: clamp(26px, 3.5vw, 48px);
  line-height: 1.26;
  max-width: 20em;
  color: var(--chalk-2);
}

.problem h2 em {
  color: var(--chalk);
  font-style: italic;
}

.problem-note {
  margin: 38px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--hair-d);
  max-width: 34em;
  font-size: 16px;
  color: var(--chalk-3);
}

/* ═══ THE CELLAR — sticky sequence ══════════════════════════════════ */
.cellar {
  position: relative;
  background: var(--void);
  scroll-margin-top: 0;
}

.cellar-track {
  height: 400vh;
  position: relative;
}

.cellar-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.cellar-heading {
  position: absolute;
  z-index: 4;
  top: clamp(76px, 11vh, 112px);
  left: 50%;
  transform: translateX(-50%);
  width: min(var(--wrap), calc(100% - 2 * var(--gut)));
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cellar-heading .eyebrow {
  margin: 0;
}

.cellar-heading-main {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.1;
  color: var(--chalk-3);
}

/* the rack */
.rack {
  position: absolute;
  z-index: 2;
  left: max(var(--gut), calc(50% - var(--wrap) / 2));
  top: 50%;
  transform: translateY(-50%);
  /* height-aware so the rack never outgrows the sticky stage — the JS maps
     rack coordinates to page pixels, so it must never be distorted */
  width: clamp(140px, min(18vw, 27svh), 260px);
  aspect-ratio: 300 / 620;
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .8));
}

.rack svg {
  width: 100%;
  height: 100%;
  display: block;
}

.rack-back {
  --b-glass: #3E1720;
  --b-foil: #2A0D14;
  --b-band: #4A382C;
  --b-label: #503C2E;
}

/* a warm pool of candlelight behind the phone, so the stage has a source */
.cellar-pool {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: min(920px, 62vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side,
      rgba(243, 205, 158, .15) 0%,
      rgba(150, 70, 55, .09) 42%,
      transparent 72%);
  pointer-events: none;
}

/* the four travelling bottles */
.flight {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.fbottle {
  position: absolute;
  left: 0;
  top: 0;
  width: 46px;
  height: 161px;
  overflow: visible;
  will-change: transform, opacity;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .75));
}

.fbottle {
  --b-glass: var(--glass);
  --b-foil: var(--glass-dk);
  --b-band: var(--cream);
  --b-label: var(--cream);
  --b-shine: rgba(255, 232, 204, .32);
}

/* the phone */
.cellar-device {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.cellar-device .device {
  --dw: clamp(180px, min(21vw, 32svh), 310px);
}

/* the phone is dark until the first bottle reaches it */
.cellar-device .device-screen {
  background: #0A0607;
}

.scr {
  opacity: 0;
  transform: scale(1.035);
  transition: opacity .55s ease, transform .8s cubic-bezier(.2, .8, .2, 1);
}

.scr.is-on {
  opacity: 1;
  transform: scale(1);
}

.flash {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 226, 184, .75), transparent 72%);
  opacity: 0;
}

.flash.is-lit {
  animation: pop .62s ease-out;
}

@keyframes pop {
  0% {
    opacity: 0;
  }

  18% {
    opacity: .85;
  }

  100% {
    opacity: 0;
  }
}

/* the copy */
.chapters {
  position: absolute;
  z-index: 4;
  right: max(var(--gut), calc(50% - var(--wrap) / 2));
  top: 50%;
  transform: translateY(-50%);
  width: clamp(280px, 27vw, 400px);
  min-height: 320px;
}

.chapter {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .5s ease, transform .7s cubic-bezier(.2, .8, .2, 1);
  pointer-events: none;
}

.chapter.is-on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.numeral {
  display: block;
  font-family: var(--serif);
  font-size: 46px;
  line-height: 1;
  color: var(--ember);
  opacity: .55;
  margin-bottom: 14px;
}

.chapter h3 {
  font-size: clamp(28px, 2.9vw, 42px);
  line-height: 1.06;
  margin: 0 0 16px;
  color: var(--chalk);
}

.chapter p {
  margin: 0;
  font-size: 16px;
  line-height: 1.62;
  color: var(--chalk-2);
}

.chapter p em {
  font-family: var(--serif);
  font-size: 1.12em;
  font-style: italic;
  color: var(--chalk);
}

.chapter-tag {
  margin-top: 18px !important;
  padding-top: 16px;
  border-top: 1px solid var(--hair-d);
  font-size: 12.5px !important;
  letter-spacing: .04em;
  color: var(--chalk-3) !important;
}

.cellar-dots {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: clamp(24px, 5vh, 48px);
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cellar-dots li {
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: rgba(245, 221, 187, .18);
  transition: background-color .4s, width .4s;
}

.cellar-dots li.is-on {
  background: var(--ember);
  width: 40px;
}

/* stacked fallback (small screens / reduced motion) */
.cellar-stack {
  display: none;
  padding-top: clamp(70px, 10vh, 110px);
  padding-bottom: clamp(70px, 10vh, 110px);
}

.stack-title {
  margin-bottom: 54px;
  max-width: 12em;
}

.stack-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: clamp(56px, 9vw, 96px);
}

.stack-item {
  display: grid;
  /* minmax(0,1fr) rather than the default auto: an auto track sizes to the
     copy's max-content width and blows the page out sideways on a phone */
  grid-template-columns: minmax(0, 1fr);
  gap: 30px;
}

.stack-copy .numeral {
  opacity: .8;
}

.stack-copy h3 {
  font-size: clamp(27px, 6.4vw, 36px);
  line-height: 1.06;
  margin: 0 0 14px;
}

.stack-copy p {
  margin: 0;
  color: var(--chalk-2);
  font-size: 16px;
  max-width: 34em;
}

.device-stack {
  --dw: min(280px, 72vw);
  justify-self: center;
}

/* on the sage sections the cellar's heavy shadow reads as dirt */
.device-stack,
.device-sm {
  filter:
    drop-shadow(0 20px 30px rgba(28, 31, 26, .26))
    drop-shadow(0 3px 8px rgba(28, 31, 26, .16));
}

/* ═══ MEET VINIA — back up to the table ═════════════════════════════ */
.meet {
  position: relative;
  background: var(--sage);
  color: var(--ink);
  padding: clamp(80px, 12vh, 150px) 0;
  scroll-margin-top: 70px;
}

.meet::before {
  content: "";
  position: absolute;
  inset: -90px 0 auto;
  height: 180px;
  background: linear-gradient(to bottom, var(--void), transparent 42%, var(--sage) 82%);
  pointer-events: none;
}

.meet-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(30px, 6vw, 84px);
  align-items: center;
}

.meet-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 300px;
}

.vinia-big {
  position: relative;
  z-index: 2;
  width: clamp(160px, 20vw, 250px);
  filter: drop-shadow(0 26px 30px rgba(28, 31, 26, .2));
}

.meet-pool {
  position: absolute;
  left: 50%;
  bottom: 4%;
  width: 90%;
  aspect-ratio: 2.6;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(107, 30, 43, .1), transparent 72%);
}

.meet-copy h2 {
  color: var(--ink);
  margin-bottom: 22px;
  max-width: 16em;
}

.meet-copy h2 em {
  color: var(--wine);
}

.meet-copy p {
  margin: 0 0 18px;
  color: var(--ink-2);
  max-width: 38em;
}

.pull {
  margin: 32px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--hair);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(21px, 2.3vw, 29px);
  line-height: 1.28;
  color: var(--wine);
}

/* ═══ FEATURES ══════════════════════════════════════════════════════ */
.features-sec {
  background: var(--sage);
  color: var(--ink);
  padding: clamp(20px, 4vh, 40px) 0 clamp(80px, 12vh, 140px);
  scroll-margin-top: 70px;
}

.sec-head {
  margin-bottom: clamp(34px, 5vw, 56px);
  max-width: 22em;
}

.sec-head h2 {
  color: var(--ink);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(0, auto);
  gap: 16px;
}

.f-card {
  position: relative;
  background: var(--sage-2);
  border: 1px solid var(--hair);
  border-radius: 20px;
  padding: 28px 26px 30px;
  transition: transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .4s, border-color .4s;
}

.f-card:hover {
  transform: translateY(-3px);
  border-color: rgba(107, 30, 43, .28);
  box-shadow: 0 22px 44px -26px rgba(28, 31, 26, .35);
}

/* the photo card owns a 2×2 block, so its height is paid for by two
   stacked cards beside it rather than by one very empty neighbour */
.f-wide {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
}

.f-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(107, 30, 43, .08);
  margin-bottom: 18px;
}

.f-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: var(--wine);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.f-card h3 {
  font-size: 25px;
  line-height: 1.12;
  margin: 0 0 10px;
  color: var(--ink);
}

.f-card p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-3);
}

.f-card a {
  color: var(--wine);
  text-decoration: none;
  border-bottom: 1px solid rgba(107, 30, 43, .3);
  white-space: nowrap;
}

.f-card a:hover {
  border-bottom-color: var(--wine);
}

.f-photo {
  margin: 22px 0 0;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  flex: 1;
  min-height: 150px;
}

.f-photo img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  display: block;
  filter: saturate(.85) contrast(1.02);
}

.f-photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(12, 6, 7, .8), transparent);
  pointer-events: none;
}

.f-photo figcaption {
  position: absolute;
  z-index: 2;
  left: 16px;
  bottom: 13px;
  font-size: 12.5px;
  letter-spacing: .03em;
  color: #F6EDE0;
}

/* ═══ GALLERY ═══════════════════════════════════════════════════════ */
.gallery-sec {
  background: var(--sage);
  color: var(--ink);
  padding-bottom: clamp(80px, 12vh, 140px);
  overflow: hidden;
}

.gallery {
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 4px var(--gut) 26px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(107, 30, 43, .3) transparent;
}

.gallery::-webkit-scrollbar {
  height: 6px;
}

.gallery::-webkit-scrollbar-thumb {
  background: rgba(107, 30, 43, .25);
  border-radius: 6px;
}

.gallery li {
  flex: none;
  scroll-snap-align: center;
  text-align: center;
}

.gallery li p {
  margin: 16px 0 0;
  font-size: 13px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.device-sm {
  --dw: min(240px, 62vw);
}

/* ═══ FAQ ═══════════════════════════════════════════════════════════ */
.faq-sec {
  background: var(--sage);
  color: var(--ink);
  padding: 0 0 clamp(90px, 13vh, 150px);
  scroll-margin-top: 70px;
}

.faq-inner {
  display: grid;
  grid-template-columns: minmax(0, .68fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: start;
}

.faq-inner .sec-head {
  margin-bottom: 0;
  position: sticky;
  top: 96px;
}

.faq details {
  border-bottom: 1px solid var(--hair);
}

.faq details:first-child {
  border-top: 1px solid var(--hair);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 40px 22px 0;
  position: relative;
  font-family: var(--serif);
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.24;
  color: var(--ink);
  transition: color .25s;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary:hover {
  color: var(--wine);
}

.faq summary::after,
.faq summary::before {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 15px;
  height: 1.5px;
  background: var(--wine);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}

.faq summary::before {
  transform: translateY(-50%) rotate(90deg);
}

.faq summary::after {
  transform: translateY(-50%);
}

.faq details[open] summary::before {
  transform: translateY(-50%) rotate(0deg);
}

.faq details p {
  margin: 0;
  padding: 0 12% 26px 0;
  font-size: 16px;
  line-height: 1.66;
  color: var(--ink-3);
}

.faq details a {
  color: var(--wine);
}

/* ═══ CLOSE ═════════════════════════════════════════════════════════ */
.close {
  position: relative;
  padding: clamp(96px, 15vh, 170px) 0 clamp(90px, 13vh, 150px);
  background: var(--void);
  overflow: hidden;
  isolation: isolate;
  scroll-margin-top: 70px;
}

.close::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 200px;
  background: linear-gradient(to bottom, var(--sage), transparent 72%);
  z-index: 1;
  pointer-events: none;
}

.close-inner {
  position: relative;
  z-index: 3;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vinia-close {
  width: clamp(96px, 11vw, 140px);
  margin-bottom: 26px;
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, .7));
}

.close h2 {
  font-size: clamp(38px, 5.6vw, 76px);
  line-height: 1.02;
  margin: 0 0 20px;
}

.close-lede {
  margin: 0 0 32px;
  max-width: 30em;
  color: var(--chalk-2);
  font-size: 16.5px;
}

.close-meta {
  margin: 26px 0 0;
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--chalk-3);
}

/* ═══ FOOTER ════════════════════════════════════════════════════════ */
.site-foot {
  background: var(--void);
  border-top: 1px solid var(--hair-d);
  padding: clamp(48px, 7vh, 76px) 0 44px;
  color: var(--chalk-3);
  font-size: 14px;
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 36px;
  padding-bottom: 40px;
}

.foot-brand p {
  margin: 14px 0 0;
  max-width: 26em;
  line-height: 1.6;
}

.foot-nav {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding-top: 6px;
}

.foot-nav a {
  color: var(--chalk-3);
  text-decoration: none;
  transition: color .25s;
  width: fit-content;
}

.foot-nav a:hover {
  color: var(--ember);
}

.foot-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 30px;
  padding-top: 26px;
  border-top: 1px solid var(--hair-d);
  font-size: 12.5px;
  color: #6E625B;
}

.foot-legal p {
  margin: 0;
}

/* ═══ RESPONSIVE ════════════════════════════════════════════════════ */
/* ═══ REVEAL ON SCROLL ══════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
}

.reveal.in {
  opacity: 1;
  transform: none;
  transition:
    opacity .7s cubic-bezier(.2, .8, .2, 1) var(--rd, 0ms),
    transform .8s cubic-bezier(.2, .8, .2, 1) var(--rd, 0ms);
}

/* the sticky stage manages its own copy — never hide it behind a reveal */
.cellar-stage .reveal {
  opacity: 1;
  transform: none;
}

/* ═══ RESPONSIVE ════════════════════════════════════════════════════ */
@media (max-width: 1080px) {
  .chapters {
    width: clamp(250px, 30vw, 330px);
  }
}

@media (max-width: 960px) {
  .hero {
    padding-top: 112px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 44px;
    text-align: left;
  }

  .hero-stage {
    justify-content: flex-start;
    padding-top: 8px;
  }

  .device-hero {
    --dw: 220px;
  }

  .vinia-hero {
    right: auto;
    left: 190px;
    bottom: 2%;
    width: 84px;
  }

  .scroll-cue {
    display: none;
  }

  /* the sticky cellar becomes a normal stack */
  .cellar-track {
    display: none;
  }

  .cellar-stack {
    display: block;
  }

  .meet-inner {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .meet-art {
    min-height: 0;
    justify-content: flex-start;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .f-wide {
    grid-column: span 2;
  }

  .faq-inner {
    grid-template-columns: 1fr;
  }

  .faq-inner .sec-head {
    position: static;
  }

  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }

  .foot-brand {
    grid-column: span 2;
  }
}

@media (min-width: 640px) and (max-width: 960px) {
  .stack-item {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 44px;
  }

  .stack-list>li:nth-child(even) .device-stack {
    order: -1;
  }
}

@media (max-width: 640px) {
  body.home {
    font-size: 16px;
  }

  .nav {
    gap: 14px;
    padding-block: 11px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding-top: 100px;
    padding-bottom: 70px;
    min-height: 0;
  }

  .hero h1 {
    font-size: clamp(38px, 11.5vw, 58px);
  }

  .cta-row {
    gap: 10px;
  }

  .btn {
    --pad: 14px 20px;
  }

  .problem-menu {
    width: 62vw;
    right: -14%;
    opacity: .1;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .f-wide {
    grid-column: span 1;
  }

  .foot-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .foot-brand {
    grid-column: span 1;
  }
}

/* ═══ REDUCED MOTION ════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {

  body.home *,
  body.home *::before,
  body.home *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .cellar-track {
    display: none;
  }

  .cellar-stack {
    display: block;
  }

  .device-hero {
    transform: none;
  }
}
