/* Wilhelm — Friday Drop opt-in landing page (above-the-fold, height-aware) */
/* Fonts load via <link rel="preconnect"+stylesheet> in index.html — faster than
   @import, which serializes the font download behind this stylesheet. */

:root {
  --gold: #e8c24a;
  --gold-deep: #b8922f;
  --gold-soft: rgba(232,194,74,0.16);
  --ink: #0c0a08;
  --ink-2: #15100b;
  --parchment: #f6efda;
  --display: 'Bodoni Moda', serif;
  --body: 'Lora', serif;
  --mono: 'DM Mono', monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse at 50% 0%, #1a1308 0%, var(--ink) 60%),
    var(--ink);
  color: var(--parchment);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Opt-in hero — full first screen, centers the card (was on <body>). */
.optin-hero {
  position: relative; z-index: 1;
  min-height: 100dvh;
  display: flex; align-items: flex-start; justify-content: center;
  padding: calc(clamp(78px, 9vh, 100px) + env(safe-area-inset-top, 0px)) clamp(16px, 4vw, 48px) clamp(16px, 2.5vh, 36px);
}
/* corner logo, top-left */
.hero-logo {
  position: absolute; top: calc(clamp(10px, 1.6vh, 18px) + env(safe-area-inset-top, 0px)); left: clamp(16px, 4vw, 40px);
  z-index: 3; display: flex; align-items: center; gap: 10px; text-decoration: none;
}
.hero-logo img { height: 56px; width: 56px; border-radius: 50%; }
/* price, top-right */
.hero-price {
  position: absolute; top: calc(clamp(10px, 1.6vh, 18px) + env(safe-area-inset-top, 0px)); right: clamp(16px, 4vw, 40px); z-index: 3;
  display: flex; flex-direction: column; align-items: flex-end; line-height: 1;
  font-family: var(--mono); font-weight: 500; font-size: clamp(24px, 3.8vw, 32px); color: var(--gold);
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
}
.hero-price span { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: rgba(246,239,218,0.85); margin-top: 6px; white-space: nowrap; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  color: var(--gold); font-size: 28px; line-height: 1; text-decoration: none;
  opacity: 0.7; animation: bob 2s infinite; z-index: 2;
}
@keyframes bob { 0%,100%{transform:translate(-50%,0)} 50%{transform:translate(-50%,6px)} }

/* subtle film grain */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.04; mix-blend-mode: overlay;
}

.card {
  position: relative; z-index: 1;
  width: 100%; max-width: 540px;
  display: flex; flex-direction: column; align-items: center;
  background: none;
  border: none;
  padding: clamp(8px, 1.5vh, 18px) clamp(24px, 5vw, 52px) clamp(16px, 2.4vh, 30px);
  text-align: center;
}
.card::after { display: none; }

/* Desktop: drop the boxed frame — read as clean centered content on the black ground. */
@media (min-width: 760px) {
  .card {
    max-width: 600px;
    background: none;
    border: none;
    box-shadow: none;
    padding: clamp(24px, 3vh, 48px) 40px;
  }
  .card::after { display: none; }
}

/* Desktop: keep the single centered column, just make it compact so the whole
   thing (through the button) sits above the fold on shorter desktop windows. */
@media (min-width: 760px) {
  .optin-hero { align-items: center; padding-top: calc(clamp(40px, 6vh, 72px) + env(safe-area-inset-top, 0px)); padding-bottom: clamp(20px, 3vh, 40px); }
  .optin-image { margin: clamp(14px, 2vh, 22px) auto; }
  .optin-image img { max-height: 40vh; width: auto; max-width: 100%; }
  .sub-bullets { margin-bottom: clamp(12px, 2vh, 20px); }
}

/* state wrappers — mirror the card's own centered column so inner max-widths hold */
[hidden] { display: none !important; }
.optin { width: 100%; display: flex; flex-direction: column; align-items: center; }

/* inline error line under the input (gold-bordered, per handoff) */
.optin-error {
  width: 100%; max-width: 420px; margin: clamp(6px,1vh,10px) auto 0;
  font-family: var(--mono); font-size: clamp(10px,1.4vh,12px); letter-spacing: 1px;
  color: #f0c14a; border: 1px solid rgba(232,194,74,0.5);
  background: rgba(232,194,74,0.08); padding: 8px 12px; text-align: center;
}

/* button busy state */
.optin-form button[aria-busy="true"] { opacity: 0.72; cursor: progress; }

/* brand lockup — logo emblem */
.brand { display: flex; flex-direction: column; align-items: center; margin-bottom: clamp(14px, 2.6vh, 28px); }
.brand-logo {
  width: auto; height: clamp(118px, 20vh, 178px); display: block; border-radius: 50%;
  box-shadow:
    0 0 0 2px var(--gold-deep),
    0 0 0 5px var(--ink),
    0 0 0 6px var(--gold),
    0 12px 32px rgba(0,0,0,0.6);
}

/* drop tag — sits at the very top of the card */
.droptag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: clamp(9px, 1.3vh, 10px); letter-spacing: 3px;
  color: var(--gold); border: 1px solid rgba(232,194,74,0.4);
  padding: clamp(5px, 0.9vh, 7px) 14px; margin-bottom: clamp(12px, 2.2vh, 22px);
}
.droptag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(232,194,74,0.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(232,194,74,0.5)} 70%{box-shadow:0 0 0 8px rgba(232,194,74,0)} 100%{box-shadow:0 0 0 0 rgba(232,194,74,0)} }

h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(28px, 4.6vh, 50px); line-height: 1.02; letter-spacing: -1.2px;
  color: var(--parchment); margin: 0 0 clamp(8px, 1.4vh, 14px);
}
h1 em { font-style: italic; color: var(--gold); }

.sub {
  font-family: var(--body); font-style: italic;
  font-size: clamp(15px, 2.2vh, 21px); line-height: 1.45;
  color: rgba(246,239,218,0.95); margin: 0 auto clamp(14px, 2.4vh, 32px); max-width: 90%;
  text-wrap: balance;
}
/* subhead as compact bullets (space-saving) */
.sub-bullets { list-style: none; padding: 0; margin: 0 auto clamp(16px, 2.6vh, 30px);
  display: flex; flex-direction: column; gap: clamp(6px, 1vh, 11px); text-align: left; }
.sub-bullets li { display: flex; align-items: baseline; gap: 11px;
  font-family: var(--body); font-size: clamp(15px, 2vh, 18px); color: rgba(246,239,218,0.92); line-height: 1.3; }
.sub-bullets .mk { color: var(--gold); font-family: var(--display); font-style: italic; font-weight: 600; flex-shrink: 0; }

/* ── SPLIT TEST: bullets above vs below the photo ──
   'below' = natural DOM order (headline, photo, bullets, form).
   'above' = reorder so bullets sit between the headline and the photo. */
html[data-drink-variant="above"] .optin > h1 { order: 0; }
html[data-drink-variant="above"] .optin > .sub-bullets { order: 1; margin-bottom: clamp(20px, 3.4vh, 38px); }
html[data-drink-variant="above"] .optin > .optin-image { order: 2; margin-top: 0; }
html[data-drink-variant="above"] .optin > .optin-form { order: 3; }

/* image (variant) — height-capped so it never blows the fold */
.optin-image { display: block; width: 100%; max-width: 420px; margin: clamp(20px, 3.4vh, 38px) auto clamp(20px, 3.4vh, 38px); position: relative; }
.optin-image img { width: 100%; height: auto; display: block; border: 1px solid rgba(232,194,74,0.35); border-radius: 5px; box-shadow: 0 24px 60px rgba(0,0,0,0.5); }
.card[data-variant="image"] .optin-image,
.card[data-variant="bullets"] .optin-image { display: block; }
/* split-test gate (html attribute set pre-paint); no-JS falls back to full layout */
html[data-drink-variant="image"] .optin-image,
html[data-drink-variant="bullets"] .optin-image,
html:not([data-drink-variant]) .optin-image { display: block; }

/* form */
.optin-form { display: flex; flex-direction: column; gap: clamp(8px, 1.4vh, 12px); width: 100%; max-width: 420px; margin: 0 auto; }
.optin-form input[type="email"] {
  width: 100%; height: clamp(48px, 7vh, 58px); padding: 0 20px;
  background: rgba(232,217,181,0.06); border: 1px solid rgba(232,194,74,0.35);
  color: var(--parchment); font-family: var(--body); font-size: clamp(15px, 2vh, 17px); text-align: center;
  outline: none; transition: border-color .2s, background .2s;
}
.optin-form input[type="email"]::placeholder { color: rgba(246,239,218,0.78); font-style: normal; }
.optin-form input[type="email"]:focus { border-color: var(--gold); background: rgba(232,217,181,0.1); }

.optin-form button {
  width: 100%; height: clamp(48px, 7vh, 58px); border: none; cursor: pointer;
  background: var(--gold); color: var(--ink);
  font-family: var(--display); font-weight: 700; font-size: clamp(15px, 2.3vh, 18px); letter-spacing: 0.5px;
  transition: filter .2s, transform .08s;
}
.optin-form button:hover { filter: brightness(1.08); }
.optin-form button:active { transform: translateY(1px); }

.fineprint { font-family: var(--mono); font-size: clamp(10px, 1.3vh, 11px); letter-spacing: 1.5px; color: rgba(246,239,218,0.6); margin-top: clamp(10px, 1.8vh, 18px); line-height: 1.6; }

/* bullets (variant) */
.optin-bullets { display: none; list-style: none; padding: 0; margin: clamp(14px, 2.2vh, 30px) auto 0; width: 100%; max-width: 420px; text-align: left; }
.card[data-variant="bullets"] .optin-bullets { display: block; }
html[data-drink-variant="bullets"] .optin-bullets,
html:not([data-drink-variant]) .optin-bullets { display: block; }
.optin-bullets li {
  display: flex; align-items: flex-start; gap: 12px;
  font-family: var(--body); font-size: clamp(15px, 2vh, 18px); color: rgba(246,239,218,0.94);
  padding: clamp(7px, 1.1vh, 11px) 0; border-top: 1px solid rgba(232,194,74,0.16); line-height: 1.4;
}
.optin-bullets li:first-child { border-top: none; }
.optin-bullets li .mk { color: var(--gold); font-family: var(--display); font-style: italic; font-weight: 600; flex-shrink: 0; }

/* success state */
.success { display: flex; flex-direction: column; align-items: center; gap: clamp(12px, 2vh, 18px); padding: clamp(8px, 2vh, 24px) 0; animation: rise .5s cubic-bezier(.2,.7,.3,1); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.success .seal {
  width: clamp(64px, 11vh, 84px); height: clamp(64px, 11vh, 84px); border-radius: 50%; border: 1px solid var(--gold);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.success .seal::after { content: ''; position: absolute; inset: 6px; border: 1px solid rgba(232,194,74,0.3); border-radius: 50%; }
.success .seal svg { width: clamp(30px, 5vh, 38px); height: clamp(30px, 5vh, 38px); }
.success h2 { font-family: var(--display); font-weight: 700; font-style: italic; font-size: clamp(28px, 5.5vh, 42px); color: var(--gold); margin: 0; letter-spacing: -0.5px; }
.success p { font-family: var(--body); font-size: clamp(15px, 2.2vh, 19px); line-height: 1.5; color: rgba(232,217,181,0.8); margin: 0; max-width: 380px; }
.success .meta { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: rgba(232,217,181,0.5); margin-top: 6px; }

@media (prefers-reduced-motion: reduce) {
  .droptag .dot { animation: none; }
  .success { animation: none; }
  .scroll-cue { animation: none; }
  html { scroll-behavior: auto; }
}

/* ───────── SCROLL SECTIONS (proof / family / bottles) ───────── */
.sec { position: relative; z-index: 1; padding: clamp(64px, 12vh, 140px) clamp(20px, 5vw, 48px); }
.sec-inner { max-width: 820px; margin: 0 auto; text-align: center; }
.sec .eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 4px; color: var(--gold); margin-bottom: 22px; text-transform: uppercase; }
.sec .eyebrow.dark { color: var(--gold-deep); }

/* proof — dark, stat-forward */
.proof { border-top: 1px solid rgba(232,194,74,0.16); }
.proof-inner { display: grid; grid-template-columns: minmax(0, 0.82fr) 1fr; gap: clamp(28px, 5vw, 60px); align-items: center; text-align: left; max-width: 1000px; }
.proof-photo { margin: 0; }
.proof-photo img { width: 100%; height: auto; display: block; border: 1px solid rgba(232,194,74,0.35); box-shadow: 0 24px 60px rgba(0,0,0,0.5); }
.proof .eyebrow { margin-bottom: 18px; }
.proof-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.proof-stat .big { font-family: var(--display); font-weight: 800; font-size: clamp(56px, 11vw, 108px); line-height: 0.92; color: var(--parchment); letter-spacing: -3px; }
.proof-stat .big .plus { color: var(--gold); }
.proof-stat .unit { font-family: var(--display); font-style: italic; font-weight: 500; font-size: clamp(56px, 11vw, 108px); line-height: 0.96; color: var(--gold); letter-spacing: -1px; }
.proof-line { font-family: var(--body); font-size: clamp(16px, 2vw, 20px); line-height: 1.7; color: rgba(246,239,218,0.86); margin: 18px 0 0; }
@media (max-width: 760px) {
  .proof-inner { grid-template-columns: 1fr; text-align: center; }
  .proof-stat { align-items: center; }
  .proof-photo { max-width: 340px; margin: 0 auto; }
}

/* family — parchment, like the heritage story */
.family { background: var(--parchment); color: var(--ink); }
.family-figure { width: clamp(220px, 34vw, 320px); margin: 0 auto 36px; padding: clamp(18px, 3vw, 28px);
  background: radial-gradient(ellipse at 50% 38%, #1b1510 0%, #0c0a08 100%);
  border: 1px solid var(--gold-deep); box-shadow: 0 24px 60px rgba(0,0,0,0.28), inset 0 0 0 4px rgba(200,154,85,0.18); position: relative; }
.family-figure::after { content: ''; position: absolute; inset: 8px; border: 1px solid rgba(200,154,85,0.25); pointer-events: none; }
.family-figure img { width: 100%; height: auto; display: block; }
.family h2 { font-family: var(--display); font-weight: 700; font-style: italic; font-size: clamp(48px, 9vw, 88px); line-height: 0.95; color: var(--ink); margin: 0 0 12px; letter-spacing: -2.5px; }
.family h2 .yr { color: var(--gold-deep); }
.family-tag { font-family: var(--display); font-style: italic; font-size: clamp(16px, 2.4vw, 22px); color: rgba(12,10,8,0.7); margin-bottom: 36px; }
.family p { font-family: var(--body); font-size: clamp(16px, 1.9vw, 21px); line-height: 1.75; color: rgba(12,10,8,0.82); max-width: 680px; margin: 0 auto 24px; }
.family p.muted { color: rgba(12,10,8,0.62); }
.family .pull { font-family: var(--display); font-style: italic; font-weight: 500; font-size: clamp(22px, 4vw, 32px); color: var(--ink); margin-top: 32px; }
.family-wide { margin: clamp(32px, 6vh, 56px) auto 0; max-width: 620px; }
.family-wide img { width: 100%; height: auto; display: block; border: 1px solid var(--gold-deep); box-shadow: 0 18px 48px rgba(0,0,0,0.22); }
.family-wide figcaption { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: rgba(12,10,8,0.55); margin-top: 12px; }
.family-wide figcaption span { color: var(--gold-deep); }

/* bottles — dark gallery */
.bottles { background: var(--parchment); color: var(--ink); }
.bottles .eyebrow { color: var(--gold-deep); }
.bottles-h { font-family: var(--display); font-weight: 700; font-style: italic; font-size: clamp(30px, 5vw, 52px); color: var(--ink); margin: 0 0 14px; letter-spacing: -1px; }
.bottles-lede { font-family: var(--body); font-style: italic; font-size: clamp(15px, 1.8vw, 18px); color: rgba(12,10,8,0.7); max-width: 520px; margin: 0 auto 40px; line-height: 1.6; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 2.6vw, 30px); }
.plate { margin: 0; }
.plate-img { overflow: hidden; border: 1px solid rgba(232,194,74,0.3); background: #0c0a08; }
.plate-img img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 3/2; transition: transform .5s ease; }
.plate:hover .plate-img img { transform: scale(1.05); }
.plate figcaption { font-family: var(--mono); font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--gold-deep); margin-top: 12px; text-align: left; }
.swipe-cue { display: none; }
.proof-cta { display: inline-block; margin-top: 40px; background: var(--gold); color: var(--ink); text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: clamp(15px, 2vw, 18px); padding: 16px 34px; transition: filter .2s, transform .1s; }
.proof-cta:hover { filter: brightness(1.08); }
.proof-cta:active { transform: translateY(1px); }

/* footer */
.drink-footer { position: relative; z-index: 1; text-align: center; padding: 40px 20px 48px; border-top: 1px solid rgba(232,194,74,0.2);
  font-family: var(--display); font-weight: 700; letter-spacing: 4px; color: var(--gold); font-size: 18px; }
.drink-footer .fnote { font-family: var(--mono); font-weight: 400; letter-spacing: 2px; font-size: 10px; color: rgba(246,239,218,0.45); margin-top: 10px; }

/* Mobile: a swipeable, full-bleed carousel instead of a tall stack. */
@media (max-width: 700px) {
  .gallery {
    display: flex; gap: 12px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    /* full-bleed to the screen edges */
    margin: 0 calc(-1 * clamp(20px, 5vw, 48px));
    /* ~12% side inset so the FIRST slide loads centered with the next one peeking */
    padding: 4px 12% 2px;
    scroll-padding-inline: 12%;
  }
  .gallery::-webkit-scrollbar { display: none; }
  .plate { flex: 0 0 76%; scroll-snap-align: center; }
  .plate figcaption { text-align: center; }
  .swipe-cue { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 4px; text-transform: uppercase; color: rgba(12,10,8,0.5); margin-top: 18px; }
}

/* ───────── COUNTDOWN ───────── */
.countdown { font-family: var(--mono); text-align: center; }
/* compact (in the hero form, above the input) */
.cd-compact { display: flex; gap: 8px; align-items: baseline; justify-content: center; margin-bottom: 2px; font-size: clamp(12px, 1.7vh, 14px); }
.cd-compact .cd-label { color: rgba(246,239,218,0.65); text-transform: uppercase; letter-spacing: 2px; font-size: 0.82em; }
.cd-compact .cd-value { color: var(--gold); font-weight: 500; letter-spacing: 0.5px; }
/* large (bottom final CTA) */
.finalcta .countdown { margin: 0 auto clamp(18px, 3vh, 28px); }
.finalcta .cd-label { display: block; font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: rgba(246,239,218,0.6); margin-bottom: 8px; }
.finalcta .cd-value { display: block; font-family: var(--mono); font-weight: 500; font-size: clamp(28px, 6vw, 42px); color: var(--gold); letter-spacing: 1px; }
.finalcta .cd-sub { display: block; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: rgba(246,239,218,0.45); margin-top: 8px; }

/* ───────── FINAL CTA (dark, closes the page) ───────── */
.finalcta { border-top: 1px solid rgba(232,194,74,0.16); text-align: center; }
.finalcta .sec-inner { max-width: 540px; }
.finalcta-h { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 5vw, 46px); line-height: 1.05; color: var(--parchment); letter-spacing: -1px; margin: 0 0 clamp(16px, 2.6vh, 24px); }
.finalcta-h em { font-style: italic; color: var(--gold); }
.finalcta .fineprint { text-align: center; }

/* ───────── STICKY JOIN BUTTON ───────── */
.sticky-join {
  position: fixed; left: 50%; bottom: clamp(14px, 3vh, 22px); transform: translate(-50%, 160%);
  z-index: 40; border: none; cursor: pointer; white-space: nowrap;
  background: var(--gold); color: var(--ink);
  font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.5px;
  padding: 14px 28px; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  opacity: 0; transition: transform .35s cubic-bezier(.2,.7,.3,1), opacity .35s, filter .2s;
}
.sticky-join.show { transform: translate(-50%, 0); opacity: 1; }
.sticky-join:hover { filter: brightness(1.08); }
.sticky-join:active { filter: brightness(1.04); }

/* ───────── TIMED NUDGE (slide-down) ───────── */
.nudge {
  position: fixed; top: 0; left: 0; right: 0; z-index: 45;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0)) 16px 10px;
  background: rgba(12,10,8,0.96); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(232,194,74,0.3);
  transform: translateY(-110%); transition: transform .4s cubic-bezier(.2,.7,.3,1);
}
.nudge.show { transform: translateY(0); }
.nudge-text { font-family: var(--body); font-size: clamp(13px, 1.7vh, 15px); color: var(--parchment); }
.nudge-join { background: var(--gold); color: var(--ink); border: none; cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 13px; padding: 8px 16px; white-space: nowrap; }
.nudge-close { background: none; border: none; color: rgba(246,239,218,0.6); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; }
@media (max-width: 520px) { .nudge { gap: 8px; } .nudge-text { font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { .sticky-join, .nudge { transition: opacity .2s; } }
