/* ============================================================================
   Delightful Path — TASTE Edition · core
   Editorial magazine system inspired by BC Liquor "taste" (paper, big serif
   headlines, running heads + folios, pill callouts, product cards, plates).
   Palette variable names kept compatible with booking.jsx / tweaks.
   ============================================================================ */

:root {
  /* Palette (overwritten by applyPalette at runtime) */
  --bg: #EFE7D6;
  --bg-soft: #E6DCC6;
  --bg-card: #FBF6EA;
  --sage: #647561;
  --sage-deep: #465642;
  --clay: #B99A66;
  --clay-deep: #9A7C4E;
  --ink: #222C25;
  --ink-soft: #4A5447;
  --muted: #8C8470;
  --line: rgba(34, 44, 37, 0.16);
  --line-soft: rgba(34, 44, 37, 0.08);

  /* Paper accents */
  --paper: var(--bg);
  --plate-fold: rgba(34, 44, 37, 0.10);

  /* Type */
  --display: "DM Serif Display", "Noto Serif SC", "Songti SC", Georgia, serif;
  --sans: "Manrope", "Noto Sans SC", "PingFang SC", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Headline scale (driven by Tweaks slider) */
  --hl: 1;

  --container: 1280px;
  --gutter: clamp(20px, 4.5vw, 72px);
  --section-y: clamp(72px, 9vw, 128px);

  --radius: 4px;
  --radius-lg: 10px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }

/* paper grain overlay */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    radial-gradient(rgba(34,44,37,0.035) 1px, transparent 1px),
    radial-gradient(rgba(34,44,37,0.025) 1px, transparent 1px);
  background-size: 3px 3px, 4px 4px;
  background-position: 0 0, 1px 2px;
  mix-blend-mode: multiply; opacity: .6;
}

/* ── Type primitives ─────────────────────────────────────────────────────── */
.serif { font-family: var(--display); font-weight: var(--display-weight, 400); line-height: 1.0; letter-spacing: -0.01em; }
.serif-it { font-family: var(--display); font-style: italic; }
.d1 { font-size: calc(clamp(56px, 9.5vw, 156px) * var(--hl)); line-height: 0.92; letter-spacing: -0.018em; text-wrap: balance; }
.d2 { font-size: calc(clamp(40px, 6vw, 92px) * var(--hl)); line-height: 0.98; letter-spacing: -0.015em; text-wrap: balance; }
.d3 { font-size: calc(clamp(28px, 3.4vw, 48px) * var(--hl)); line-height: 1.04; letter-spacing: -0.01em; text-wrap: balance; }
.d4 { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.12; }
.serif em, .d1 em, .d2 em, .d3 em { font-style: italic; }

.kicker {
  font-family: var(--sans); font-size: 11px; font-weight: 700;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-soft);
}
.lede {
  font-size: clamp(17px, 1.45vw, 21px); line-height: 1.62; color: var(--ink-soft);
  text-wrap: pretty;
}
.fine { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.code {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--muted);
}

/* drop cap for feature paragraphs */
.dropcap::first-letter {
  font-family: var(--display); float: left; font-size: 4.6em; line-height: 0.74;
  padding: 6px 12px 0 0; color: var(--ink);
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); position: relative; z-index: 2; }
.section { padding: var(--section-y) 0; position: relative; }
.section-soft { background: var(--bg-soft); }
.section-ink { background: var(--ink); color: var(--bg); }
.section-ink .kicker { color: var(--clay); }
.section-ink .lede { color: rgba(255,255,255,.72); }

.rule { height: 1px; background: var(--ink); opacity: .85; border: 0; margin: 0; }
.rule-soft { height: 1px; background: var(--line); border: 0; margin: 0; }
.rule-dot { height: 0; border: 0; border-top: 1.5px dotted var(--line); margin: 0; }

/* ── Running head + folio (the magazine signature) ───────────────────────── */
.runhead {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding-bottom: 12px; margin-bottom: clamp(36px, 5vw, 64px);
  border-bottom: 1.5px solid var(--ink);
}
.runhead .rh-l { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; white-space: nowrap; }
.runhead .rh-c { font-family: var(--display); font-style: italic; font-size: 15px; color: var(--ink-soft); }
.runhead .rh-r { font-family: var(--display); font-size: 20px; }
.section-ink .runhead { border-bottom-color: rgba(255,255,255,.5); }

/* ── Kicker + section title cluster ──────────────────────────────────────── */
.sec-head { margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head .kicker { display: block; margin-bottom: 18px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  appearance: none; border: 0; cursor: pointer; text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 15px 26px; border-radius: var(--radius-pill);
  transition: background .2s, color .2s, box-shadow .2s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--sage); color: #fff; }
.btn-secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--ink); padding: 8px 0; letter-spacing: 0.1em; }
.btn-ghost:hover { color: var(--sage); }
.btn-lg { padding: 18px 34px; font-size: 13.5px; }
.section-ink .btn-primary { background: var(--bg); color: var(--ink); }
.section-ink .btn-primary:hover { background: var(--clay); color: var(--ink); }

/* ── Pill callout (TASTE "THE PERFECT ADD-ON") ───────────────────────────── */
.pill {
  background: var(--ink); color: var(--bg);
  border-radius: 30px;
  padding: 22px 30px 24px;
  display: inline-block;
}
.pill .pill-l { font-size: 10.5px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--clay); display: block; margin-bottom: 8px; }
.pill .pill-t { font-family: var(--display); font-size: clamp(18px, 1.8vw, 24px); line-height: 1.15; }

/* ── Circular badge (NEW / numbered) ─────────────────────────────────────── */
.badge {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--bg-card); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  box-shadow: inset 0 0 0 1.5px var(--ink);
  flex-shrink: 0;
}
.badge.solid { background: var(--ink); color: var(--bg); box-shadow: none; }

/* ── Dot-leader list ─────────────────────────────────────────────────────── */
.leaders { list-style: none; margin: 0; padding: 0; }
.leaders li { display: flex; align-items: baseline; gap: 8px; padding: 11px 0; border-bottom: 1px dotted var(--line); }
.leaders .nm { font-size: 15px; }
.leaders .dots { flex: 1; border-bottom: 1.5px dotted var(--line); transform: translateY(-3px); }
.leaders .pg { font-family: var(--display); font-size: 17px; color: var(--ink-soft); }

/* ── Oversized decorative glyph watermark ────────────────────────────────── */
.glyph-wm {
  position: absolute; font-family: var(--display); line-height: 0.8;
  color: var(--ink); opacity: 0.05; pointer-events: none; user-select: none; z-index: 0;
}

/* ── Decorative thin curve ───────────────────────────────────────────────── */
.curve { position: absolute; pointer-events: none; z-index: 0; }
.curve path { fill: none; stroke: var(--ink); stroke-width: 1; opacity: .35; }

/* ============================================================================
   NAV + masthead
   ============================================================================ */
.promo {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  background: var(--ink); color: var(--bg); height: 38px; overflow: hidden;
  display: flex; align-items: center;
}
.promo .container { display: flex; align-items: center; gap: 16px; width: 100%; }
.promo-track {
  flex: 1; display: flex; gap: 26px; align-items: center; white-space: nowrap; overflow: hidden;
  font-size: 12px; letter-spacing: 0.04em;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  animation: promoSlide 30s linear infinite;
}
.promo-track .star { color: var(--clay); }
@keyframes promoSlide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.promo-cta {
  appearance: none; border: 0; background: var(--clay); color: var(--ink);
  font-family: inherit; font-weight: 700; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 6px 14px; border-radius: var(--radius-pill); cursor: pointer; white-space: nowrap;
}
.promo-cta:hover { background: #fff; }
.promo-x { appearance: none; border: 0; background: transparent; color: rgba(255,255,255,.6); font-size: 17px; cursor: pointer; padding: 4px 6px; }
.promo-x:hover { color: #fff; }

.nav {
  position: fixed; top: 38px; left: 0; right: 0; z-index: 50;
  transition: background .3s, box-shadow .3s, padding .3s, border-color .3s;
  border-bottom: 1.5px solid transparent;
  padding: 16px 0;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(150%); backdrop-filter: blur(12px) saturate(150%);
  border-bottom-color: var(--ink);
  padding: 11px 0;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; flex-direction: column; gap: 1px; text-decoration: none; color: var(--ink); }
.brand .bn { font-family: var(--display); font-size: 26px; line-height: 0.9; letter-spacing: -0.01em; }
.brand .bs { font-size: 9.5px; font-weight: 700; letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted); }
.nav-links { display: flex; gap: 26px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--ink); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.nav-links a:hover { color: var(--sage); }
.nav-cta { display: flex; align-items: center; gap: 14px; }

.lang { display: inline-flex; border: 1.5px solid var(--ink); border-radius: var(--radius-pill); overflow: hidden; }
.lang button {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  padding: 7px 11px; color: var(--ink-soft); min-width: 34px;
}
.lang button.active { background: var(--ink); color: var(--bg); }

/* ============================================================================
   HERO — three art directions
   ============================================================================ */
.hero { position: relative; overflow: hidden; }

/* shared hero head bits */
.hero-kicker { display: flex; align-items: center; gap: 12px; }
.hero-kicker .ln { width: 38px; height: 1.5px; background: var(--ink); }
.hero-stats {
  display: flex; flex-wrap: wrap; gap: clamp(20px, 4vw, 56px);
  border-top: 1.5px solid var(--ink); padding-top: 22px;
}
.hero-stat .k { font-family: var(--display); font-size: clamp(28px, 3vw, 42px); line-height: 1; }
.hero-stat .v { font-size: 11.5px; color: var(--ink-soft); margin-top: 6px; max-width: 150px; letter-spacing: 0.01em; }

/* --- A. GREENHOUSE: framed editorial plate --- */
.hero-greenhouse { padding: calc(38px + 96px) 0 var(--section-y); }
.hero-greenhouse .hero-grid {
  display: grid; grid-template-columns: 1.04fr 0.96fr; gap: clamp(32px, 5vw, 72px); align-items: end;
}
.hero-greenhouse .glyph-wm { font-size: clamp(280px, 42vw, 620px); top: -6%; right: -4%; }
.hero-greenhouse .hero-kicker { margin-bottom: 26px; }
.hero-greenhouse h1 { margin: 0 0 26px; }
.hero-greenhouse .hero-sub { max-width: 480px; margin: 0 0 34px; }
.hero-greenhouse .hero-cta { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 44px; }

.plate { position: relative; width: 100%; }
.plate .plate-frame {
  position: relative; aspect-ratio: 4/5; overflow: hidden;
  background: linear-gradient(160deg, #E2D8C0, #B9C0A6);
  box-shadow: 0 36px 70px -40px rgba(20,28,20,.6);
}
.plate .plate-frame image-slot { display: block; width: 100%; height: 100%; --is-empty-bg: linear-gradient(160deg, #E2D8C0, #B9C0A6); }
.plate image-slot::part(frame) { background: var(--is-empty-bg); }
.plate image-slot::part(empty) { color: rgba(255,255,255,.9); text-shadow: 0 1px 2px rgba(0,0,0,.25); font-family: var(--mono); }
.plate .plate-fold { position: absolute; top: 0; right: 0; width: 46px; height: 46px;
  background: linear-gradient(225deg, var(--bg) 50%, transparent 50%); box-shadow: -2px 2px 5px rgba(0,0,0,.12); }
.plate .plate-cap {
  display: flex; align-items: baseline; gap: 10px; margin-top: 12px;
  font-family: var(--display); font-style: italic; font-size: 14px; color: var(--ink-soft);
}
.plate .plate-cap .n { font-family: var(--mono); font-style: normal; font-size: 10px; letter-spacing: .1em; color: var(--muted); }
.plate .plate-badge { position: absolute; top: -18px; left: -18px; z-index: 3; }

/* --- B. SPREAD: full-bleed dramatic --- */
.hero-spread { min-height: 100vh; display: flex; align-items: flex-end; color: #fff; }
.hero-spread .hero-bg { position: absolute; inset: 0; z-index: 0; background: linear-gradient(150deg, #3a463a 0%, #222c25 55%, #161d18 100%); }
.hero-spread .hero-bg image-slot { display: block; width: 100%; height: 100%; --is-empty-bg: linear-gradient(150deg, #3a463a 0%, #222c25 55%, #161d18 100%); }
.hero-spread .hero-bg image-slot::part(frame) { background: var(--is-empty-bg); }
.hero-spread .hero-bg image-slot::part(empty) { color: rgba(255,255,255,.5); font-family: var(--mono); }
.hero-spread .scrim { position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(15,20,16,.55) 0%, rgba(15,20,16,.15) 32%, rgba(15,20,16,.25) 62%, rgba(15,20,16,.85) 100%); }
.hero-spread .container { z-index: 2; padding-top: 140px; padding-bottom: clamp(48px, 7vw, 96px); width: 100%; }
.hero-spread .hero-kicker { color: #fff; margin-bottom: 24px; }
.hero-spread .hero-kicker .ln { background: var(--clay); }
.hero-spread .hero-kicker .kicker { color: #fff; }
.hero-spread h1 { margin: 0 0 22px; color: #fff; max-width: 16ch; }
.hero-spread .hero-sub { max-width: 540px; margin: 0 0 34px; color: rgba(255,255,255,.85); }
.hero-spread .hero-cta { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 48px; }
.hero-spread .btn-primary { background: var(--bg); color: var(--ink); }
.hero-spread .btn-primary:hover { background: var(--clay); }
.hero-spread .btn-ghost { color: #fff; }
.hero-spread .hero-stats { border-top-color: rgba(255,255,255,.4); }
.hero-spread .hero-stat .v { color: rgba(255,255,255,.7); }
.hero-spread .est { font-family: var(--display); font-style: italic; font-size: 16px; color: rgba(255,255,255,.7);
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.hero-spread .est .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--clay); }

/* --- C. CATALOGUE: rotated masthead + index --- */
.hero-catalogue { padding: calc(38px + 96px) 0 var(--section-y); }
.hero-catalogue .hero-grid { display: grid; grid-template-columns: auto 1fr; gap: clamp(28px, 4vw, 60px); align-items: start; }
.hero-catalogue .mast-rot { writing-mode: vertical-rl; transform: rotate(180deg); align-self: start;
  font-family: var(--display); font-size: clamp(34px, 4.4vw, 62px); line-height: 0.9; letter-spacing: -0.01em; }
.hero-catalogue .hero-kicker { margin-bottom: 22px; }
.hero-catalogue h1 { margin: 0 0 22px; }
.hero-catalogue .hero-sub { max-width: 520px; margin: 0 0 30px; }
.hero-catalogue .hero-cta { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 40px; }
.hero-catalogue .cat-plate { aspect-ratio: 16/7; margin-bottom: 34px; overflow: hidden; background: linear-gradient(140deg, #E3D9C2, #BCC2A8); }
.hero-catalogue .cat-plate image-slot { display: block; width: 100%; height: 100%; --is-empty-bg: linear-gradient(140deg, #E3D9C2, #BCC2A8); }
.hero-catalogue .cat-plate image-slot::part(frame) { background: var(--is-empty-bg); }
.hero-catalogue .cat-plate image-slot::part(empty) { color: rgba(255,255,255,.9); font-family: var(--mono); }

/* ============================================================================
   MARQUEE / ticker
   ============================================================================ */
.ticker {
  border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
  overflow: hidden; padding: 16px 0; background: var(--bg);
}
.ticker .track { display: flex; gap: 0; align-items: center; white-space: nowrap; animation: tick 34s linear infinite; }
.ticker .it { font-family: var(--display); font-style: italic; font-size: clamp(20px, 2.2vw, 30px); color: var(--ink); padding: 0 4px; }
.ticker .star { color: var(--clay); padding: 0 26px; font-style: normal; font-size: 16px; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================================
   ABOUT — feature opener
   ============================================================================ */
.about { position: relative; }
.about .glyph-wm { font-size: clamp(220px, 30vw, 460px); bottom: -8%; left: -3%; }
.about-grid { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: clamp(40px, 7vw, 110px); align-items: start; }
.about-head h2 { margin: 0; }
.about-head .est { margin-top: 26px; }
.about-body .lede { margin: 0 0 18px; }
.about-body .bodytext { color: var(--ink-soft); font-size: 15.5px; margin: 0; }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); margin-top: 44px; border: 1px solid var(--line); }
.pillar { background: var(--bg); padding: 26px 24px; }
.pillar .gl { font-family: var(--display); font-size: 36px; line-height: 1; color: var(--sage); }
.pillar .pn { font-family: var(--mono); font-size: 10px; color: var(--muted); float: right; }
.pillar h4 { margin: 16px 0 6px; font-size: 15px; font-weight: 700; letter-spacing: 0.01em; }
.pillar p { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; }

/* reveal */
/* Content is visible by default — never gated behind a time-based animation
   (which can freeze at opacity:0 in throttled/background render contexts). */
.reveal { opacity: 1; transform: none; }
.reveal.is-visible { opacity: 1; transform: none; }

/* density */
body[data-density="compact"] { --section-y: clamp(52px, 6vw, 92px); }
body[data-density="comfy"] { --section-y: clamp(92px, 13vw, 184px); }
