/* ============================================================
   SebSugar Cinematic Story Scroll — homepage paradigm
   Loaded after style.css
   ============================================================ */

/* ---------- 0. TIKTOK-STYLE SCROLL SNAP (chapters only) ---------- */
/* Snap is applied ONLY to <html> (the actual scroll container). Tagged via
   inline script (.is-cinematic) so we don't need :has() and there's no
   conflicting snap-type on body. Snap targets are the title-card + chapters.
   Once user scrolls past Chapter 04, JS sets .snap-off on <html> to release.

   NOTE: no `scroll-behavior: smooth`, no `overscroll-behavior` here — they can
   interfere with snap timing in some browsers. Keep this rule minimal. */
html.is-cinematic {
  scroll-snap-type: y mandatory;
}

/* Snap targets — only the cinematic frames */
.page-cinematic .title-card,
.page-cinematic .chapter {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* Chapter 04 (finale) — let user scroll past in a single gesture */
.page-cinematic .chapter--finale {
  scroll-snap-stop: normal;
}

/* Suspend snap when past finale / form is focused / modal is open */
html.is-cinematic.snap-off { scroll-snap-type: none; }

@media (prefers-reduced-motion: reduce) {
  html.is-cinematic {
    scroll-snap-type: none;
    scroll-behavior: auto;
  }
  .page-cinematic .title-card,
  .page-cinematic .chapter {
    scroll-snap-align: none;
    scroll-snap-stop: normal;
  }
}

/* ---------- TITLE CARD (replaces .hero on cinematic homepage) ----------
   Two-column layout: text on the LEFT, chef image on the RIGHT.
   Collapses to a stacked layout (image on top, text below) on tablet/mobile. */
.title-card {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(4rem, 9vh, 6rem) clamp(1.5rem, 5vw, 4rem) clamp(5rem, 10vh, 7rem);
  overflow: hidden;
  isolation: isolate;
}

/* Subtle gold ambience behind both columns (sits beneath everything) */
.title-card::before,
.title-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.22;
  pointer-events: none;
  z-index: -2;
}
.title-card::before {
  top: 10%; left: -10%;
  width: 480px; height: 480px;
  background: radial-gradient(circle, var(--gold) 0%, transparent 70%);
  animation: blobFloat 18s var(--ease) infinite alternate;
}
.title-card::after {
  bottom: 5%; right: -10%;
  width: 560px; height: 560px;
  background: radial-gradient(circle, var(--gold-soft) 0%, transparent 70%);
  animation: blobFloat 22s var(--ease) infinite alternate-reverse;
}

/* ---------- Sucrose molecule drift (subtle background ambience) ----------
   Each .molecule renders the brand's sucrose-mark SVG, statically rotated and
   gently drifting in place. Sits between the gold-blob ambience (-2) and the
   image card (1), so the image hides the molecules where they overlap. */
.title-card__molecules {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}
.molecule {
  position: absolute;
  display: block;
  background-image: var(--molecular-mark);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.08;
  filter: drop-shadow(0 0 14px rgba(218, 180, 47, 0.18));
  will-change: transform;
}
.molecule--1 { width: 230px; height: 140px; top:  6%; left:  3%; animation: moleculeDrift1 28s ease-in-out infinite; }
.molecule--2 { width: 180px; height: 110px; top: 64%; left: 11%; animation: moleculeDrift2 36s ease-in-out infinite; opacity: 0.07; }
.molecule--3 { width: 260px; height: 160px; top: 22%; left: 32%; animation: moleculeDrift3 42s ease-in-out infinite; opacity: 0.05; }
.molecule--4 { width: 210px; height: 130px; bottom: 8%; left: 38%; animation: moleculeDrift4 32s ease-in-out infinite; opacity: 0.06; }
.molecule--5 { width: 150px; height:  92px; top: 38%; left:  6%; animation: moleculeDrift5 38s ease-in-out infinite; opacity: 0.09; }

@keyframes moleculeDrift1 {
  0%, 100% { transform: translate(0, 0) rotate(-6deg); }
  50%      { transform: translate(22px, -18px) rotate(2deg); }
}
@keyframes moleculeDrift2 {
  0%, 100% { transform: translate(0, 0) rotate(18deg); }
  50%      { transform: translate(-20px, 14px) rotate(26deg); }
}
@keyframes moleculeDrift3 {
  0%, 100% { transform: translate(0, 0) rotate(-22deg); }
  50%      { transform: translate(16px, 20px) rotate(-15deg); }
}
@keyframes moleculeDrift4 {
  0%, 100% { transform: translate(0, 0) rotate(32deg); }
  50%      { transform: translate(-18px, -22px) rotate(38deg); }
}
@keyframes moleculeDrift5 {
  0%, 100% { transform: translate(0, 0) rotate(8deg); }
  50%      { transform: translate(24px, 12px) rotate(14deg); }
}

@media (prefers-reduced-motion: reduce) {
  .molecule { animation: none; }
}

/* RIGHT COLUMN — image card. Aspect is matched EXACTLY to the chef photo
   (880×1168) so the picture fills the card edge-to-edge with no gaps.
   max-width is derived from the desired max-height (rather than setting
   max-height directly) — that's the only way to cap the card's vertical
   size on short viewports without breaking the aspect ratio. */
.title-card__media {
  position: relative;
  order: 2;
  width: 100%;
  /* Card never exceeds 600px wide, and never tall enough to exceed ~80svh.
     1280/1920 = the chef image aspect (2:3 portrait), used here to convert
     "max height" -> "max width". */
  max-width: min(600px, calc(80svh * 1280 / 1920));
  aspect-ratio: 1280 / 1920;
  justify-self: center;
  border-radius: clamp(1rem, 1.6vw, 1.75rem);
  overflow: hidden;
  z-index: 1;
  background: var(--bg);
  box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(212, 175, 55, 0.08);
}

/* Animated gold shine sweeping slowly around the hero card outline.
   The highlight builds gently from gold → warm cream → white peak,
   tapers off through a long luminous tail, then disappears for the
   majority of the cycle. Two drop-shadow layers create a richer halo
   (close warm cream + far diffuse gold), giving a polished-metal feel. */
@property --hero-shine-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.title-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.8px;                                       /* outline thickness */
  pointer-events: none;
  z-index: 3;
  background: conic-gradient(
    from var(--hero-shine-angle),
    rgba(218, 180, 47, 0)     0deg,
    rgba(218, 180, 47, 0)   175deg,
    rgba(218, 180, 47, 0.08) 215deg,                     /* very soft warm-up */
    rgba(218, 180, 47, 0.22) 250deg,                     /* gentle gold build */
    rgba(232, 196, 90,  0.55) 285deg,                    /* warm gold ramp */
    rgba(250, 224, 152, 0.92) 308deg,                    /* champagne pre-peak */
    rgba(255, 246, 210, 1)   320deg,                     /* warm-white peak */
    rgba(250, 224, 152, 0.92) 332deg,                    /* champagne post-peak */
    rgba(232, 196, 90,  0.55) 340deg,                    /* warm gold fade */
    rgba(218, 180, 47, 0.22) 348deg,                     /* long luminous tail */
    rgba(218, 180, 47, 0)    360deg
  );
  /* Mask carves out the interior so only the outline ring remains */
  -webkit-mask:
    linear-gradient(#000, #000) content-box,
    linear-gradient(#000, #000);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  /* Layered halo — tight cream highlight over a softer diffuse gold */
  filter:
    drop-shadow(0 0 5px  rgba(255, 240, 190, 0.55))
    drop-shadow(0 0 14px rgba(218, 180, 47, 0.30));
  animation: heroShine 12s linear infinite;
  will-change: --hero-shine-angle;
}

@keyframes heroShine {
  to { --hero-shine-angle: 360deg; }
}

@media (prefers-reduced-motion: reduce) {
  .title-card__media::after { animation: none; }
}

.title-card__image {
  width: 100%;
  height: 100%;
  display: block;
  /* aspect of card == aspect of image, so cover and contain behave identically:
     the picture fills the card edge-to-edge with zero letterbox and zero crop. */
  object-fit: cover;
}

/* The vignette overlay used to darken the bottom for text readability when the
   image was a full-bleed background. With the new contained card + uncropped
   image, it just darkens the chef's legs / tray, so hide it. */
.title-card__overlay {
  display: none;
}

/* The two old blob divs (HTML still ships them) are no longer needed inside
   the media card — hide them so they don't bleed gold into the photo. */
.title-card__blob { display: none; }

/* LEFT COLUMN — text */
.title-card__content {
  position: relative;
  text-align: left;
  padding: 0;
  max-width: 620px;
  order: 1;
  z-index: 2;
  justify-self: end;          /* hug the centre gutter, not the page edge */
}

/* "A portfolio by …" — film-credit treatment, two-line:
     line 1: gold rules + "A portfolio by"
     line 2: full chef name (no rules, slightly softer) */
.title-card__chef {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  color: var(--gold);
  font-weight: 500;
  text-transform: uppercase;
  margin: 0 0 2rem;
  line-height: 1.4;
}
.title-card__chef-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.4em;
}
.title-card__chef-rule {
  display: block;
  width: 32px;
  height: 1px;
  background: var(--gold);
}
.title-card__chef-name {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--cream-soft);
}

@media (max-width: 600px) {
  /* Centre + tighten so both lines read as a clean stacked credit on phones */
  .title-card__chef {
    align-items: center;
    text-align: center;
    gap: 0.4rem;
  }
  .title-card__chef-eyebrow {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    gap: 0.55rem;
  }
  .title-card__chef-rule { width: 20px; }
  .title-card__chef-name {
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    line-height: 1.5;
  }
}

.title-card__title {
  font-family: var(--font-display);
  /* Cap reduced so the long second line ("in every bite") fits the narrower
     left column without overflowing or wrapping mid-word. */
  font-size: clamp(2.25rem, 5.2vw, 4.75rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--cream);
  margin: 0;
}

.title-card__line {
  display: block;
  white-space: nowrap;          /* keep "ARTISTRY" + "in every bite" each on one line */
}
.title-card__line--accent {
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}

.title-card__sub {
  color: var(--cream-soft);
  font-size: clamp(0.95rem, 1.2vw, 1.0625rem);
  margin-top: 2.25rem;
  letter-spacing: 0.02em;
  font-style: italic;
  font-family: var(--font-display);
}

/* "Begin" CTA — looks like a film "Press Start" */
.title-card__begin {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--cream-muted);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  transition: color var(--dur-base);
  animation: beginPulse 2.4s ease-in-out infinite;
  z-index: 3;
}
.title-card__begin:hover { color: var(--gold); }
.title-card__begin svg {
  transition: transform var(--dur-base) var(--ease-out);
}
.title-card__begin:hover svg { transform: translateY(4px); }

@keyframes beginPulse {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}

/* ---------- TITLE CARD: collapse 2-col -> stacked on tablet/mobile ---------- */
@media (max-width: 900px) {
  .title-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    gap: clamp(1.5rem, 4vh, 2.5rem);
    padding: clamp(2.5rem, 8vh, 5rem) clamp(1.25rem, 5vw, 2rem) clamp(4rem, 9vh, 5.5rem);
    place-items: center;
    text-align: center;
  }
  .title-card__media {
    order: 1;
    width: 100%;
    /* Same aspect-preserving cap as desktop, sized down for phones */
    max-width: min(380px, calc(55svh * 880 / 1168));
    aspect-ratio: 880 / 1168;
    height: auto;
    border-radius: clamp(0.875rem, 3vw, 1.25rem);
    margin: 0 auto;
  }
  .title-card__content {
    order: 2;
    text-align: center;
    justify-self: center;
    max-width: 100%;
  }
  .title-card__chef {
    justify-content: center;
  }
  .title-card__title {
    font-size: clamp(2.25rem, 9vw, 4rem);
  }
  .title-card__sub {
    margin-top: 1.5rem;
  }
  .title-card__begin {
    bottom: 1.25rem;
  }
}

/* ---------- STORY PROGRESS RAIL ---------- */
.story-progress {
  position: fixed;
  top: 50%;
  right: clamp(1rem, 3vw, 2.5rem);
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--ease-out);
}

.story-progress.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.story-progress__dot {
  position: relative;
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(218, 180, 47, 0.35);
  border: 1px solid transparent;
  transition: all var(--dur-base) var(--ease-out);
}

.story-progress__dot:hover {
  background: var(--gold);
  transform: scale(1.4);
}

.story-progress__dot.is-active {
  background: var(--gold);
  transform: scale(1.6);
  box-shadow: 0 0 16px var(--gold-glow);
}

.story-progress__label {
  position: absolute;
  right: calc(100% + 0.625rem);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  font-size: 0.5rem;              /* 8px — was 10px */
  letter-spacing: 0.1em;          /* tighter — was 0.14em */
  text-transform: uppercase;
  color: var(--cream);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-soft);
  padding: 0.22rem 0.5rem;        /* tighter pill */
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  transition: all var(--dur-fast) var(--ease-out);
  pointer-events: none;
}

.story-progress__dot:hover .story-progress__label,
.story-progress__dot.is-active .story-progress__label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

@media (max-width: 768px) {
  .story-progress { display: none; }
}

/* ---------- STORY / CHAPTERS ---------- */
.story {
  position: relative;
  background: var(--bg);
}

.chapter {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(6rem, 14vw, 10rem) 0;
}

.chapter__bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
  transform: scale(1.1);
  filter: brightness(0.55) saturate(0.92) contrast(1.05);
}

/* Subtle parallax via scroll-driven animations (where supported) */
@supports (animation-timeline: view()) {
  .chapter__bg {
    animation: chapterParallax linear;
    animation-timeline: view();
    animation-range: cover 0% cover 100%;
  }
}
@keyframes chapterParallax {
  from { transform: translateY(-8%) scale(1.18); }
  to   { transform: translateY(8%) scale(1.18); }
}

.chapter__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, var(--bg) 0%, transparent 18%, transparent 82%, var(--bg) 100%),
    radial-gradient(ellipse at center, rgba(10,10,9,0.35) 0%, rgba(10,10,9,0.7) 100%);
}

.chapter__overlay--strong {
  background:
    linear-gradient(180deg, var(--bg) 0%, transparent 12%, transparent 88%, var(--bg) 100%),
    radial-gradient(ellipse at center, rgba(10,10,9,0.55) 0%, rgba(10,10,9,0.85) 100%);
}

/* Watermark numeral */
.chapter__num {
  position: absolute;
  font-family: var(--font-display);
  font-size: clamp(14rem, 32vw, 30rem);
  font-weight: 400;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--gold);
  opacity: 0.28;
  line-height: 0.78;
  letter-spacing: -0.05em;
  pointer-events: none;
  user-select: none;
  z-index: -1;
}
.chapter[data-align="left"]   .chapter__num { right: -2%; bottom: 6%; }
.chapter[data-align="right"]  .chapter__num { left: -2%;  bottom: 6%; }
.chapter[data-align="center"] .chapter__num { left: 50%; bottom: 4%; transform: translateX(-50%); }

/* Chapter content */
.chapter__content {
  position: relative;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 3rem);
  display: flex;
  flex-direction: column;
}

.chapter[data-align="left"]   .chapter__content { align-items: flex-start; text-align: left; }
.chapter[data-align="right"]  .chapter__content { align-items: flex-end;   text-align: right; }
.chapter[data-align="center"] .chapter__content { align-items: center;     text-align: center; }

.chapter__location {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin: 0 0 1.75rem;
}

.chapter__location-line {
  display: block;
  width: clamp(40px, 6vw, 80px);
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
}

.chapter__title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1.75rem;
  max-width: 18ch;
}

.chapter__title em {
  font-style: italic;
  color: var(--gold);
}

.chapter__story {
  font-size: clamp(1rem, 1.2vw, 1.0625rem);
  line-height: 1.8;
  color: var(--cream-soft);
  max-width: 56ch;
  margin: 0 0 2.5rem;
}

.chapter[data-align="center"] .chapter__title,
.chapter[data-align="center"] .chapter__story { margin-left: auto; margin-right: auto; }

/* Inline credential / award badge */
.chapter__badge {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem 1rem 1rem;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all var(--dur-base) var(--ease-out);
}
.chapter__badge:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.chapter__badge img {
  width: 40px; height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  /* Source PNGs have a baked-in dark square — screen blend drops the black, leaves the gold */
  mix-blend-mode: screen;
}

.chapter__badge strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--cream);
  margin-bottom: 0.15rem;
}

.chapter__badge span {
  font-size: 0.78rem;
  color: var(--cream-muted);
  letter-spacing: 0.08em;
}

/* The "featured" award (Australia chapter) gets emphasis */
.chapter__badge--featured {
  background: linear-gradient(135deg, rgba(218, 180, 47, 0.18) 0%, rgba(202, 138, 4, 0.08) 100%);
  border-color: var(--gold);
  box-shadow: var(--shadow-glow);
}

/* Final chapter CTAs */
.chapter__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .chapter__num { opacity: 0.18; }
  .chapter[data-align="right"] .chapter__content { align-items: flex-start; text-align: left; }
  .chapter[data-align="right"] .chapter__location { flex-direction: row; }
}

@media (max-width: 600px) {
  /* Hide the gold horizontal rule in chapter location labels — they wrap awkwardly
     on narrow screens and break the visual flow */
  .chapter__location-line { display: none; }
  .chapter__location {
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    gap: 0;
    margin-bottom: 1.25rem;
  }
  .chapter[data-align="center"] .chapter__location { justify-content: center; }

  /* Smaller chapter watermark numerals so they don't bleed off-screen edges */
  .chapter__num {
    font-size: clamp(7rem, 22vw, 14rem);
    opacity: 0.14;
  }
  .chapter[data-align="left"]  .chapter__num { right: 0; bottom: 4%; }
  .chapter[data-align="right"] .chapter__num { left: 0; bottom: 4%; }

  /* TikTok-feel: chapters compressed so they fit in one viewport.
     (title-card has its own mobile rules in the @900px breakpoint above.) */
  .chapter {
    padding: 4.5rem 0;             /* was clamp(6rem, 14vw, 10rem) — too tall on mobile */
  }
  .chapter__title {
    font-size: clamp(1.85rem, 7vw, 3rem);
    margin-bottom: 1.25rem;
  }
  .chapter__story {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.75rem;
  }
  .chapter__badge {
    padding: 0.75rem 1.25rem 0.75rem 0.75rem;
    gap: 0.75rem;
  }
  .chapter__badge img { width: 32px; height: 32px; }
  .chapter__badge strong { font-size: 0.875rem; }
  .chapter__badge span { font-size: 0.7rem; }
}

@media (max-width: 480px) {
  /* Tighter buttons so chapter 04 CTAs fit side-by-side on tiny mobile */
  .chapter__cta .btn { padding: 0.8rem 1.1rem; font-size: 0.85rem; }
  .chapter__cta { gap: 0.5rem; width: 100%; }
}

/* ---------- SIGNATURE CREATIONS PREVIEW ---------- */
.preview {
  background: var(--bg);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
/* Faded sucrose lattice — brand watermark behind the cards */
.preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--molecular-tile);
  background-size: 360px 240px;
  background-repeat: repeat;
  opacity: 0.035;
  pointer-events: none;
  z-index: 0;
}
.preview > * { position: relative; z-index: 1; }

.preview__head { text-align: left; max-width: var(--container); margin: 0 0 3rem; }
.preview__head .display { margin: 0.5rem 0 0; }

.preview__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}

.preview__card {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: block;
  background: var(--bg-elev);
  transition: transform var(--dur-base) var(--ease-out);
}
.preview__card:hover { transform: translateY(-6px); }

.preview__card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out), filter 0.4s;
  filter: brightness(0.92);
}
.preview__card:hover img {
  transform: scale(1.06);
  filter: brightness(1.05);
}

/* Stronger gradient at bottom of card so caption is always readable */
.preview__caption {
  background: linear-gradient(to top, rgba(10,10,9,0.97) 0%, rgba(10,10,9,0.7) 60%, transparent 100%);
  padding: 5rem 0 0;
}

.preview__caption {
  position: absolute;
  left: 1.5rem;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2;
  background: linear-gradient(to top, rgba(10,10,9,0.95), transparent);
  padding: 4rem 0 0;
}

.preview__caption h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0 0 0.25rem;
  color: var(--cream);
}
.preview__caption span {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- LATEST STRIP ---------- */
.latest { background: var(--bg-elev); padding: clamp(3rem, 6vw, 5rem) 0; }

.latest__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.latest__head .display { margin: 0.5rem 0 0; font-size: clamp(1.75rem, 3.5vw, 2.5rem); }

.latest__strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}

.latest__tile {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg);
}

.latest__tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out), filter 0.4s;
  filter: brightness(0.95);
}
.latest__tile:hover img { transform: scale(1.08); filter: brightness(1.05); }

@media (max-width: 1024px) {
  .latest__strip { grid-template-columns: repeat(3, 1fr); }
  .preview__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .latest__strip { grid-template-columns: repeat(2, 1fr); }
  /* Hide 5th tile so 2x2 grid stays balanced (no orphan row) */
  .latest__tile:nth-child(5) { display: none; }
  .preview__grid { grid-template-columns: 1fr; }
  .preview__card { aspect-ratio: 16/10; }   /* shorter cards on mobile */
}

/* ---------- RECIPE BOOK COMING SOON ---------- */
.book {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-elev) 100%);
  position: relative;
  overflow: hidden;
}
.book::before {
  content: "";
  position: absolute;
  top: 50%; left: 30%;
  transform: translate(-50%, -50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 60%);
  filter: blur(100px);
  opacity: 0.35;
  pointer-events: none;
}
/* Sucrose lattice — subtle brand watermark behind the book mockup + copy */
.book::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--molecular-tile);
  background-size: 360px 240px;
  background-repeat: repeat;
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

.book__inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  position: relative;
  z-index: 1; /* above .book::after watermark */
}

/* ----- 3D book mockup wrapper (book-3d component itself lives in style.css since shop reuses it) ----- */
.book__visual {
  display: grid;
  place-items: center;
  perspective: 1400px;
  perspective-origin: 70% 50%;
  padding: 2rem 0;
}

/* ----- Copy column ----- */
.book__copy .display { margin: 0.75rem 0 1.25rem; }
.book__copy .display em {
  font-style: italic;
  color: var(--gold);
}
.book__copy .prose p {
  color: var(--cream-soft);
  margin: 0 0 1.75rem;
  max-width: 56ch;
}

.book__list {
  display: grid;
  gap: 0.875rem;
  margin: 0 0 2rem;
  padding: 0;
}
.book__list li {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  color: var(--cream-soft);
  font-size: 0.95rem;
  list-style: none;
}
.book__list svg { color: var(--gold); flex-shrink: 0; }

/* Inline pill-style email form */
.book__form {
  display: flex;
  align-items: stretch;
  background: rgba(10, 10, 9, 0.6);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 5px 5px 5px 1.25rem;
  max-width: 480px;
  transition: all var(--dur-fast) var(--ease);
}
.book__form:focus-within {
  border-color: var(--gold);
  background: rgba(10, 10, 9, 0.85);
  box-shadow: 0 0 0 3px rgba(218, 180, 47, 0.15);
}
.book__form input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  padding: 0.5rem 0;
}
.book__form input::placeholder { color: var(--cream-muted); }
.book__form .btn { flex-shrink: 0; }

.book__form-note {
  font-size: 0.78rem;
  color: var(--cream-muted);
  margin: 0.875rem 0 0;
}
.book__form-note strong { color: var(--gold); font-weight: 500; }

/* Success state (replaces form contents in JS) */
.book__form-success {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: rgba(218, 180, 47, 0.08);
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--cream);
  font-size: 0.95rem;
  max-width: 480px;
  animation: fadeUp 0.5s var(--ease-out);
}
.book__form-success svg { color: var(--gold); flex-shrink: 0; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
  .book__inner { grid-template-columns: 1fr; text-align: center; }
  .book__list { justify-content: center; }
  .book__list li { justify-content: center; }
  .book__form { margin: 0 auto; }
  .book__copy .prose p { margin-left: auto; margin-right: auto; }
}
@media (max-width: 600px) {
  .book__form {
    flex-direction: column;
    padding: 6px;
    border-radius: 18px;
    gap: 6px;
  }
  .book__form input { padding: 0.85rem 1rem; text-align: center; }
  .book__form .btn { width: 100%; justify-content: center; }
}

/* ---------- KEYBOARD HINT ---------- */
.kb-hint {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translate(-50%, 20px);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.55rem 1rem;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream-muted);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.kb-hint.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.kb-hint__keys {
  display: inline-flex;
  gap: 4px;
}
.kb-hint kbd {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  background: rgba(218, 180, 47, 0.1);
  border: 1px solid var(--border);
  border-radius: 6px;
  line-height: 1;
}
.kb-hint__label { color: var(--cream-soft); }

@media (max-width: 768px) {
  .kb-hint { display: none; }   /* mobile users swipe; keys aren't relevant */
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  .title-card__image { animation: none; transform: scale(1); }
  .title-card__blob { animation: none; }
  .title-card__begin { animation: none; }
  .chapter__bg { animation: none; }
  .kb-hint { display: none; }
}
