/* ==========================================================================
   Café Ciel × Khoury’s — Santa’s Flight
   Source of truth: Adobe XD artboard "Web 1920 – 2" (1920 × 6046).

   Desktop (≥1024px): the layout is the artboard, scaled. --u is one artboard
   pixel (1920u = page width, capped at --canvas-max), so every value below that is
   written as calc(N * var(--u)) is the XD spec value N.
   Below 1024px: a stacked, fluid adaptation (no mobile artboard exists).
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-var-latin.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-200-italic-latin.woff2") format("woff2");
  font-weight: 200;
  font-style: italic;
  font-display: swap;
}
/* Stand-in for Sloop Script Pro until the client's Adobe Fonts kit is available.
   size-adjust makes Pinyon Script set the same line length as Sloop at 120px
   (XD: "A Christmas Journey Like No Other" = 1381px wide). */
@font-face {
  font-family: "Script Fallback";
  src: url("../fonts/pinyon-script-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  size-adjust: 87%;
}

/* ---------- Tokens ---------- */
:root {
  --navy: #0B1C32;
  --navy-2: #113A59;
  --cream: #FFEDD3;
  --gold: #D4B47B;
  --gold-2: #CDA466;
  --white: #FFFFFF;
  --grey: #707070;

  /* ONE-LINE SWAP: when the Adobe Fonts kit is linked in index.html, Sloop
     Script Pro ("sloop-script-pro") is picked up automatically; the fallback
     only shows until then. To force the fallback, delete the first name. */
  --font-script: "sloop-script-pro", "Sloop Script Pro", "Script Fallback", cursive;
  --font-sans: "Montserrat", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-italic: "Poppins", var(--font-sans);

  --gutter: clamp(20px, 6vw, 48px);
  /* Desktop: widest the 1920 artboard is drawn. 1440px = 75% of XD size (XD 1:1 felt
     oversized on real screens). Set to 1920px for a literal 1:1 render. */
  --canvas-max: 1440px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--gold);
  font-family: var(--font-sans);
  font-weight: 300;
  background-color: var(--navy);
  /* faint --navy-2 swirl pattern: one 1920×3995 tile exported from XD (Group 29/40), repeats vertically */
  background-image: url("../img/bg-swirl.webp");
  background-image: image-set(url("../img/bg-swirl.avif") type("image/avif"), url("../img/bg-swirl.webp") type("image/webp"));
  background-repeat: repeat-y;
  background-position: 50% 0;
  background-size: max(100%, 1100px) auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, picture { display: block; max-width: 100%; }
h1, h2, p { margin: 0; }
strong { font-weight: 500; }

.page {
  container-type: inline-size;
  overflow-x: clip;
}

/* ---------- Script headings ---------- */
.script {
  font-family: var(--font-script);
  font-weight: 400;
  color: var(--cream);
  text-align: center;
  line-height: 1.2;
  font-size: clamp(32px, 8.4vw, 64px);
  text-wrap: balance;
}

/* ---------- Buttons ---------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 190px;
  padding: 0 32px;
  border-radius: 999px;
  background: var(--gold);
  /* XD: 1px #707070 inside stroke on the button rectangles; inset so it never affects layout */
  box-shadow: inset 0 0 0 1px var(--grey);
  color: var(--navy);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.btn:hover {
  background: var(--gold-2);
  transform: translateY(-3px);
  box-shadow: inset 0 0 0 1px var(--grey), 0 10px 24px -10px rgba(0, 0, 0, .6);
}
.btn:active { transform: translateY(-1px); }
.btn:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 4px;
}

/* ---------- Stars ---------- */
.star {
  position: absolute;
  z-index: 2; /* XD layer order: stars sit above photos and text */
  fill: var(--gold-2);
  pointer-events: none;
  /* mobile: x as share of width, y as share of section height (set per section via --h) */
  left: calc(var(--x) / 1920 * 100%);
  top: calc(var(--y) / var(--h) * 100%);
  width: max(calc(var(--s) * .32px), 3px);
  height: max(calc(var(--s) * .32px), 3px);
}
.star--inner { display: none; }
/* Sparkle on every star: a calm soft glow, then a short bright glint (~18% of the cycle).
   Staggered durations/delays so the glints land at seemingly random moments. */
.star {
  overflow: visible;
  transform-origin: 50% 50%;
  filter: drop-shadow(0 0 2px rgba(255, 237, 211, .55)) drop-shadow(0 0 6px rgba(212, 180, 123, .45));
  animation: star-sparkle 4.6s ease-in-out infinite;
  will-change: opacity, transform, filter;
}
.star:nth-of-type(2n)  { animation-duration: 6.1s; animation-delay: -1.7s; }
.star:nth-of-type(3n)  { animation-duration: 3.4s; animation-delay: -2.9s; }
.star:nth-of-type(4n)  { animation-duration: 7s;   animation-delay: -4.4s; }
.star:nth-of-type(5n)  { animation-delay: -3.6s; }
.star:nth-of-type(7n)  { animation-duration: 3.4s; animation-delay: -1.1s; }
@keyframes star-sparkle {
  0%, 100% {
    opacity: .8;
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 0 2px rgba(255, 237, 211, .55)) drop-shadow(0 0 6px rgba(212, 180, 123, .45));
  }
  40% {
    opacity: .65;
    transform: scale(.94) rotate(0deg);
    filter: drop-shadow(0 0 1px rgba(255, 237, 211, .4)) drop-shadow(0 0 4px rgba(212, 180, 123, .35));
  }
  78% {
    opacity: .8;
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 0 2px rgba(255, 237, 211, .55)) drop-shadow(0 0 6px rgba(212, 180, 123, .45));
  }
  84% {
    opacity: 1;
    transform: scale(1.25) rotate(15deg);
    filter: drop-shadow(0 0 3px rgba(255, 237, 211, .9)) drop-shadow(0 0 14px rgba(212, 180, 123, .8));
  }
  90% {
    opacity: .95;
    transform: scale(1.06) rotate(-15deg);
    filter: drop-shadow(0 0 2px rgba(255, 237, 211, .75)) drop-shadow(0 0 9px rgba(212, 180, 123, .6));
  }
  96% {
    opacity: .8;
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 0 2px rgba(255, 237, 211, .55)) drop-shadow(0 0 6px rgba(212, 180, 123, .45));
  }
}
/* Original soft pulse, still used by .fb-star / .menu-dialog__star */
@keyframes star-glow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 0 2px rgba(255, 237, 211, .7)) drop-shadow(0 0 9px rgba(212, 180, 123, .65));
  }
  50% {
    opacity: .45;
    transform: scale(.8);
    filter: drop-shadow(0 0 1px rgba(255, 237, 211, .25)) drop-shadow(0 0 3px rgba(212, 180, 123, .2));
  }
}

/* ---------- Sections (mobile / tablet) ---------- */
.masthead, .hero, .journey, .omakase, .festive, .closing { position: relative; }
.masthead > :not(.star), .journey > :not(.star), .omakase > :not(.star),
.festive > :not(.star), .closing > :not(.star) { position: relative; z-index: 1; }

.masthead { --h: 626; padding: 36px var(--gutter) 32px; }
.masthead__logo { width: min(48vw, 260px); height: auto; margin: 0 auto; }

.hero {
  isolation: isolate;
  overflow: hidden;
  min-height: min(118vw, 560px);
  display: grid;
}
.hero picture, .hero__photo { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__photo { object-fit: cover; object-position: 50% 97.6%; }
.hero::after {
  /* XD "Rectangle 22": #0B1C32 at 70.6%, blend mode hard-light */
  content: "";
  position: absolute;
  inset: 0;
  background: var(--navy);
  opacity: .706;
  mix-blend-mode: hard-light;
  z-index: 1;
}
.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 7vw, 48px);
  padding: 56px var(--gutter);
}
.hero__title { width: min(56vw, 320px); }
.hero__title img { width: 100%; height: auto; }

.journey { --h: 1541; padding: 56px var(--gutter) 20px; text-align: center; }
.journey__sub {
  margin-top: 12px;
  font-family: var(--font-italic);
  font-style: italic;
  font-weight: 200;
  font-size: clamp(16px, 3.9vw, 24px);
  line-height: 1.49;
  text-wrap: balance;
}
.journey__sleigh { width: min(100%, 680px); height: auto; margin: 48px auto 40px; }
.journey__intro {
  max-width: 34em;
  margin: 0 auto;
  font-size: clamp(16.5px, 4.1vw, 24px);
  line-height: 1.222;
}

.omakase { --h: 920; padding: 40px var(--gutter); display: grid; gap: 32px; justify-items: center; }
.omakase__text, .festive__text {
  max-width: 34em;
  font-size: clamp(14.5px, 3.75vw, 19px);
  line-height: 1.43;
}
.br-d { display: none; }
.stamp { position: relative; width: min(100%, 560px); aspect-ratio: 1; }
/* mobile/tablet: stamp photo first, then the omakase text (desktop places both absolutely) */
.omakase .stamp { order: -1; }
.stamp__frame, .stamp picture, .stamp__photo { position: absolute; inset: 0; width: 100%; height: 100%; }

.festive { --h: 1300; padding: 32px var(--gutter) 56px; display: grid; gap: 28px; justify-items: center; }
.festive__collage { position: relative; width: min(100%, 560px); aspect-ratio: 1023 / 1089; }
.festive__tall, .festive__small { position: absolute; overflow: hidden; }
.festive__tall { left: 0; top: 0; width: 68.6%; height: 100%; }
.festive__small { left: 54.6%; top: 40.3%; width: 45.4%; height: 51.7%; }
.festive__tall img, .festive__small img { width: 100%; height: 100%; object-fit: cover; }
/* XD: Caféciel19 is mirrored and cropped from its left edge (after flipping) */
.festive__tall img { object-position: 100% 50%; transform: scaleX(-1); }

/* Photo hover: slow zoom, one diagonal light sheen, soft gold glow; stamp tilts and lifts.
   Desktop pointers only. Transforms/filters only, so nothing shifts the layout. */
@media (hover: hover) and (pointer: fine) {
  .festive__tall, .festive__small { transition: box-shadow .8s ease; }
  .festive__tall img, .festive__small img { transition: transform .8s ease; }
  .festive__tall::after, .festive__small::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(115deg,
      rgba(255, 237, 211, 0) 35%,
      rgba(255, 237, 211, .32) 47%,
      rgba(212, 180, 123, .22) 53%,
      rgba(212, 180, 123, 0) 65%);
    transform: translateX(-120%);
    transition: transform 0s; /* snap back unseen, so the sheen only sweeps forward */
  }
  .festive__tall:hover, .festive__small:hover { box-shadow: 0 0 28px rgba(212, 180, 123, .35); }
  .festive__small:hover img { transform: scale(1.05); }
  .festive__tall:hover img { transform: scaleX(-1) scale(1.05); }
  .festive__tall:hover::after, .festive__small:hover::after { transform: translateX(120%); transition: transform 1.1s ease; }

  .stamp { transition: transform .5s ease, filter .5s ease; }
  .stamp:hover {
    transform: translateY(-6px) rotate(-2deg);
    filter: drop-shadow(0 12px 18px rgba(205, 164, 102, .45));
  }
}

.closing { --h: 566; padding: 32px var(--gutter) 80px; display: grid; gap: 28px; }

@media (max-width: 519px) {
  .actions { flex-direction: column; align-items: center; gap: 12px; }
  .btn { width: auto; min-width: 200px; min-height: 40px; padding: 0 24px; font-size: 13.5px; }
}
/* phones: calmer header + hero (desktop untouched) */
@media (max-width: 719px) {
  .masthead { padding: 52px var(--gutter); }
  .masthead__logo { width: min(44vw, 240px); }
  .masthead .star[style*="--x:880;"], .masthead .star[style*="--x:570;"] { display: none; }
  .hero { min-height: min(140vw, 640px); }
  .hero::after { opacity: .8; }
  .actions--hero { flex-direction: row; flex-wrap: nowrap; justify-content: center; gap: 10px; }
  .actions--hero .btn { min-width: 0; min-height: 36px; padding: 0 15px; font-size: 12.5px; }
  /* buttons sit near the bottom of the photo; title centred in the space above */
  .hero__content { justify-content: flex-start; padding-bottom: 44px; }
  .hero__title { margin-top: auto; }
  .actions--hero { margin-top: auto; }
}

@media (min-width: 640px) and (max-width: 1023.98px) {
  .omakase__text, .festive__text { text-align: left; }
}

/* ---------- Sleigh scene: flying in place ---------- */
/* Team = the same artwork 4x, each clipped to one animal (cuts only cross thin reins)
   and rocked around the point where its incoming rein attaches. Generated from XD geometry. */
.scene-part--sleigh { clip-path: polygon(-0.42% -0.80%, 48.58% -0.80%, 48.58% 74.43%, 42.55% 79.71%, 42.55% 100.80%, -0.42% 100.80%); transform-origin: 40.80% 72.82%; }
.scene-part--deer1 { clip-path: polygon(48.58% -0.80%, 48.58% 74.43%, 42.55% 79.71%, 42.55% 100.80%, 61.38% 100.80%, 61.38% 86.92%, 63.05% 82.12%, 65.06% 78.11%, 65.06% 75.07%, 61.63% 73.79%, 61.63% 68.66%, 65.90% 67.38%, 65.90% -0.80%); transform-origin: 48.75% 72.50%; }
.scene-part--deer2 { clip-path: polygon(65.90% -0.80%, 65.90% 67.38%, 61.63% 68.66%, 61.63% 73.79%, 65.06% 75.07%, 65.06% 78.11%, 63.05% 82.12%, 61.38% 86.92%, 61.38% 100.80%, 78.86% 100.80%, 78.86% 84.52%, 79.95% 80.83%, 82.63% 76.51%, 83.46% 70.90%, 83.13% 69.62%, 79.78% 68.34%, 79.78% 64.49%, 83.46% 63.53%, 83.46% -0.80%); transform-origin: 67.74% 69.94%; }
.scene-part--deer3 { clip-path: polygon(83.46% -0.80%, 83.46% 63.53%, 79.78% 64.49%, 79.78% 68.34%, 83.13% 69.62%, 83.46% 70.90%, 82.63% 76.51%, 79.95% 80.83%, 78.86% 84.52%, 78.86% 100.80%, 100.42% 100.80%, 100.42% -0.80%); transform-origin: 85.81% 66.10%; }
.sleigh-scene {
  position: relative;
  aspect-ratio: 1195.3 / 624.3;
  height: auto;
  pointer-events: none;
}
.sleigh-scene > *, .scene-team > .scene-part { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-team { position: absolute; inset: 0; animation: scene-fly 3.8s ease-in-out infinite; transform-origin: 40% 70%; will-change: transform; }
.scene-part { will-change: transform; }
.scene-part--sleigh { animation: scene-rock-sleigh 3.8s ease-in-out infinite; }
.scene-part--deer1 { animation: scene-gallop 1.15s ease-in-out infinite; animation-delay: -.0s; }
.scene-part--deer2 { animation: scene-gallop 1.15s ease-in-out infinite; animation-delay: -.38s; }
.scene-part--deer3 { animation: scene-gallop 1.15s ease-in-out infinite; animation-delay: -.76s; }

/* the whole team rides a slow swell of air */
@keyframes scene-fly {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  25%      { transform: translate3d(.3%, -1.6%, 0) rotate(-.6deg); }
  50%      { transform: translate3d(0, -2.4%, 0) rotate(.15deg); }
  75%      { transform: translate3d(-.3%, -.8%, 0) rotate(.55deg); }
}
/* each reindeer: gallop beat = head dips then lifts, around its harness */
@keyframes scene-gallop {
  0%, 100% { transform: rotate(0deg); }
  35%      { transform: rotate(.6deg); }
  70%      { transform: rotate(-.55deg); }
}
@keyframes scene-rock-sleigh {
  0%, 100% { transform: rotate(0deg); }
  50%      { transform: rotate(-.35deg); }
}

/* stars streaming past = forward motion (3 parallax depths) */
.scene-passing {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.scene-passing i {
  position: absolute;
  top: var(--y);
  left: 100%;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: #E8CB95;
  box-shadow: 0 0 6px 1px rgba(212, 180, 123, .55);
  opacity: var(--o);
  animation: scene-pass var(--t) linear infinite;
  animation-delay: var(--d);
}
.scene-passing i.pl0 { box-shadow: none; }
@keyframes scene-pass { from { transform: translateX(0); } to { transform: translateX(-118cqw); } }
.sleigh-scene { container-type: inline-size; }

/* comet glint running along the arc, right to left (the direction of travel) */
.scene-glint {
  -webkit-mask: url("../svg/sleigh-arc.svg") center / 100% 100% no-repeat;
  mask: url("../svg/sleigh-arc.svg") center / 100% 100% no-repeat;
  background: linear-gradient(90deg, transparent 0 40%, rgba(255, 247, 230, .95) 47%, rgba(255, 237, 211, .2) 54%, transparent 60%) 0 0 / 300% 100% no-repeat;
  animation: scene-glint 4.6s ease-in-out infinite;
  filter: drop-shadow(0 0 4px rgba(255, 237, 211, .8));
}
@keyframes scene-glint {
  0%   { background-position: 0% 0; opacity: 0; }
  12%  { opacity: 1; }
  60%  { background-position: 100% 0; opacity: 1; }
  70%, 100% { background-position: 100% 0; opacity: 0; }
}

/* air streaks sliding back under the team */
.scene-streaks i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--l);
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, rgba(232, 203, 149, 1) 30%, rgba(212, 180, 123, .95) 70%, transparent);
  box-shadow: 0 0 6px rgba(212, 180, 123, .5);
  animation: scene-streak 1.1s linear infinite;
  animation-delay: var(--d);
}
@keyframes scene-streak {
  0%   { transform: translateX(10%); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translateX(-160%); opacity: 0; }
}

/* stardust shed by the runners, drifting back */
.scene-dust i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: #F3DDB0;
  box-shadow: 0 0 8px 3px rgba(212, 180, 123, .7);
  opacity: 0;
  animation: scene-dust var(--t) ease-out infinite;
  animation-delay: var(--d);
}
@keyframes scene-dust {
  0%   { transform: translate(0, 0) scale(1); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translate(calc(var(--dx) * 1cqw), calc(var(--dy) * .52cqw)) scale(.2); opacity: 0; }
}

/* big star breathes slowly (far away, so it barely moves) */
.scene-sky { animation: scene-sky 5s ease-in-out infinite; }
@keyframes scene-sky { 0%, 100% { filter: drop-shadow(0 0 0 rgba(212, 180, 123, 0)); } 50% { filter: drop-shadow(0 0 5px rgba(212, 180, 123, .55)); } }

@media (prefers-reduced-motion: reduce) {
  .scene-team, .scene-part, .scene-sky, .scene-glint { animation: none; }
  .scene-passing, .scene-streaks, .scene-dust, .scene-glint { display: none; }
}

/* ==========================================================================
   Desktop: the XD artboard, scaled. All numbers are artboard px.
   ========================================================================== */
@media (min-width: 1024px) {
  /* children of .page resolve --u against the .page container */
  .masthead, .hero, .journey, .omakase, .festive, .closing {
    --u: calc(min(100cqw, var(--canvas-max)) / 1920);
    width: calc(1920 * var(--u));
    margin-inline: auto;
    padding: 0;
  }
  .masthead > :not(.star), .journey > :not(.star), .omakase > :not(.star),
  .festive > :not(.star), .closing > :not(.star) { position: absolute; }

  body { background-size: max(100%, 1100px) auto; }

  .star, .star--inner {
    display: block;
    left: calc(var(--x) * var(--u));
    top: calc(var(--y) * var(--u));
    width: calc(var(--s) * var(--u));
    height: calc(var(--s) * var(--u));
  }

  .btn {
    min-width: 0;
    min-height: 0;
    padding: 0;
    width: calc(411 * var(--u));
    height: calc(99 * var(--u));
    font-size: calc(34 * var(--u));
    border-radius: calc(57 * var(--u));
  }
  .btn--lg {
    width: calc(474 * var(--u));
    height: calc(114 * var(--u));
    font-size: calc(40 * var(--u));
  }
  .btn:hover { transform: translateY(calc(-4 * var(--u))); }

  .script { font-size: calc(120 * var(--u)); line-height: calc(144 * var(--u)); white-space: nowrap; text-wrap: nowrap; }

  /* 1. Header band 0–626 */
  .masthead { height: calc(626 * var(--u)); }
  .masthead__logo { left: calc(735 * var(--u)); top: calc(206 * var(--u)); width: calc(449.5 * var(--u)); margin: 0; }

  /* 2. Hero 626–1719 */
  .hero { display: block; height: calc(1093 * var(--u)); min-height: 0; overflow: visible; }
  /* photo + overlay bleed to the viewport edge on screens wider than 1920 */
  .hero picture, .hero::after { left: 50%; right: auto; width: max(100vw, 100%); max-width: none; transform: translateX(-50%); }
  .hero__content { position: absolute; inset: 0; display: block; padding: 0; }
  .hero__title { position: absolute; left: calc(684.7 * var(--u)); top: calc(392 * var(--u)); width: calc(550.5 * var(--u)); }
  .actions { flex-wrap: nowrap; }
  .actions--hero { position: absolute; left: 0; right: 0; top: calc(881 * var(--u)); gap: calc(84 * var(--u)); }

  /* 3–4. Title, subtitle, sleigh, intro 1719–3260 */
  .journey { height: calc(1541 * var(--u)); }
  .journey__title { left: 0; right: 0; top: calc(94 * var(--u)); }
  .journey__sub { left: 0; right: 0; top: calc(236.95 * var(--u)); margin: 0; font-size: calc(43 * var(--u)); line-height: calc(64 * var(--u)); white-space: nowrap; }
  .journey__sleigh { left: calc(362.4 * var(--u)); top: calc(528.4 * var(--u)); width: calc(1195.3 * var(--u)); margin: 0; }
  .journey__intro { left: calc(236 * var(--u)); top: calc(1300.4 * var(--u)); width: calc(1448 * var(--u)); max-width: none; font-size: calc(45 * var(--u)); line-height: calc(55 * var(--u)); }

  /* 5. Dessert omakase 3260–4180 */
  .omakase { display: block; height: calc(920 * var(--u)); }
  .omakase__text { left: calc(199 * var(--u)); top: calc(201.45 * var(--u)); width: calc(691 * var(--u)); max-width: none; }
  .omakase__text, .festive__text { font-size: calc(35 * var(--u)); line-height: calc(50 * var(--u)); text-align: left; }
  .br-d { display: inline; }
  .stamp { left: calc(875.7 * var(--u)); top: calc(18.5 * var(--u)); width: calc(882 * var(--u)); }

  /* 6. Festive collage 4180–5480 */
  .festive { display: block; height: calc(1300 * var(--u)); }
  .festive__collage { left: 0; top: 0; width: 100%; height: 100%; aspect-ratio: auto; }
  .festive__tall { left: calc(154 * var(--u)); top: calc(106 * var(--u)); width: calc(702 * var(--u)); height: calc(1089 * var(--u)); }
  .festive__small { left: calc(713 * var(--u)); top: calc(545 * var(--u)); width: calc(464 * var(--u)); height: calc(563 * var(--u)); }
  .festive__text { max-width: none; }
  .festive__text--a { left: calc(945 * var(--u)); top: calc(212.45 * var(--u)); width: calc(738 * var(--u)); }
  .festive__text--b { left: calc(1229 * var(--u)); top: calc(763.45 * var(--u)); width: calc(482 * var(--u)); }

  /* 7. Closing 5480–6046 */
  .closing { display: block; height: calc(566 * var(--u)); }
  .closing__title { left: 0; right: 0; top: calc(28 * var(--u)); }
  .actions--closing { left: 0; right: 0; top: calc(259 * var(--u)); gap: calc(97 * var(--u)); }
}

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
/* ---------- Menu viewer (scrollable menu pages) ---------- */
html:has(.menu-viewer[open]) { overflow: hidden; }

.menu-viewer {
  width: min(100% - 24px, 900px);
  max-width: none;
  height: min(100dvh - 24px, 1100px);
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cream);
  overflow: visible;
  opacity: 0;
  transform: translateY(16px) scale(.97);
  transition: opacity .28s ease, transform .32s cubic-bezier(.2, .8, .2, 1), overlay .32s allow-discrete, display .32s allow-discrete;
}
.menu-viewer[open] { opacity: 1; transform: none; }
@starting-style { .menu-viewer[open] { opacity: 0; transform: translateY(16px) scale(.97); } }
.menu-viewer::backdrop {
  background: rgba(6, 21, 37, .6);
  -webkit-backdrop-filter: blur(10px) saturate(.9);
  backdrop-filter: blur(10px) saturate(.9);
  opacity: 0;
  transition: opacity .28s ease, overlay .32s allow-discrete, display .32s allow-discrete;
}
.menu-viewer[open]::backdrop { opacity: 1; }
@starting-style { .menu-viewer[open]::backdrop { opacity: 0; } }

.menu-viewer__panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(205, 164, 102, .55);
  border-radius: 26px;
  overflow: hidden;
  background: #0B1C32 url("../img/bg-swirl.webp") 50% 0 / 1100px auto;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .85), inset 0 0 0 6px rgba(11, 28, 50, .9), inset 0 0 0 7px rgba(205, 164, 102, .28);
}
.menu-viewer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 14px 20px;
  border-bottom: 1px solid rgba(205, 164, 102, .25);
  background: rgba(11, 28, 50, .85);
}
.menu-viewer__title {
  margin: 0;
  min-width: 0;
  color: var(--gold);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 18px;
  line-height: 1;
  letter-spacing: .02em;
}
.menu-viewer__tools { display: flex; gap: 8px; flex: none; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid rgba(212, 180, 123, .5);
  border-radius: 50%;
  background: rgba(11, 28, 50, .7);
  color: var(--gold);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { background: var(--gold); color: var(--navy); }
.icon-btn:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }

.menu-viewer__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: rgba(212, 180, 123, .6) transparent;
  scrollbar-width: thin;
  padding: 20px;
}
.menu-viewer__scroll:focus-visible { outline: 2px solid var(--gold); outline-offset: -4px; }
.menu-viewer__pages { display: grid; gap: 18px; justify-items: center; }
.menu-viewer__pages[hidden] { display: none; }
.menu-viewer__page {
  width: 100%;
  max-width: 820px;
  height: auto;
  border-radius: 12px;
  background: #DDF3F8;
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .8);
}

@media (max-width: 559px) {
  .menu-viewer { width: calc(100% - 16px); height: calc(100dvh - 16px); }
  .menu-viewer__panel { border-radius: 20px; }
  .menu-viewer__bar { padding: 12px 12px 10px; gap: 8px; }
  .menu-viewer__title { font-size: 16px; }
  .icon-btn { width: 40px; height: 40px; }
  .menu-viewer__tools { gap: 6px; }
  .menu-viewer__scroll { padding: 12px; }
  .menu-viewer__pages { gap: 12px; }
}

/* ---------- Flipbook ("Menu Demo") ---------- */
html:has(.flipbook[open]) { overflow: hidden; }

.flipbook {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cream);
  overflow: hidden;
  opacity: 0;
  transition: opacity .3s ease, overlay .3s allow-discrete, display .3s allow-discrete;
}
.flipbook[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); opacity: 1; }
@starting-style { .flipbook[open] { opacity: 0; } }
.flipbook::backdrop {
  background: rgba(6, 21, 37, .7);
  -webkit-backdrop-filter: blur(12px) saturate(.9);
  backdrop-filter: blur(12px) saturate(.9);
  opacity: 0;
  transition: opacity .3s ease, overlay .3s allow-discrete, display .3s allow-discrete;
}
.flipbook[open]::backdrop { opacity: 1; }
@starting-style { .flipbook[open]::backdrop { opacity: 0; } }

.flipbook__close { position: absolute; top: 16px; right: 16px; z-index: 5; }
.flipbook__stage {
  display: grid;
  place-items: center;
  min-height: 0;
  min-width: 0;
  padding: 64px 16px 8px;
}

.flipbook__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 10px 16px 22px;
}
.flipbook__count {
  min-width: 7ch;
  text-align: center;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .06em;
  color: var(--gold);
}
.flipbook__controls .icon-btn[disabled] { opacity: .35; cursor: default; pointer-events: none; }

/* pages */
.fb-page { overflow: hidden; background: #EEF7F9; user-select: none; -webkit-user-select: none; }
.fb-page img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

.fb-cover, .fb-endpaper {
  background: #0B1C32 url("../img/bg-swirl.webp") 50% 30% / 260% auto;
}
.fb-cover__frame {
  position: absolute;
  inset: 5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 10% 8% 9%;
  border: 1px solid rgba(205, 164, 102, .7);
  border-radius: 4px;
  box-shadow: inset 0 0 0 5px #0B1C32, inset 0 0 0 6px rgba(205, 164, 102, .35);
}
.fb-cover .fb-cover__frame img { height: auto; object-fit: contain; }
.fb-cover__logo { width: 62% !important; }
.fb-cover__title { width: 74% !important; }
.fb-cover__sleigh { width: 92% !important; }
.fb-cover--back .fb-cover__frame { justify-content: center; }
.fb-cover--back .fb-cover__logo { width: 46% !important; opacity: .9; }
/* spine edge shading on the hard covers */
.fb-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0) 7%, rgba(255, 255, 255, .04) 9%, rgba(0, 0, 0, 0) 14%);
}
.fb-cover--back::after { background: linear-gradient(270deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0) 7%); }

.fb-endpaper__inner { position: absolute; inset: 0; display: grid; place-items: center; }
.fb-endpaper .fb-endpaper__stamp { grid-area: 1 / 1; width: 78%; height: auto; object-fit: contain; }

.fb-star { position: absolute; z-index: 1; width: 7%; aspect-ratio: 1; height: auto; fill: var(--gold-2);
  filter: drop-shadow(0 0 2px rgba(255, 237, 211, .7)) drop-shadow(0 0 6px rgba(212, 180, 123, .6));
  animation: star-glow 5s ease-in-out infinite; }
.fb-star { top: 7%; right: 9%; }
.fb-star--8 { top: auto; right: auto; bottom: 8%; left: 9%; width: 9%; animation-duration: 6.3s; animation-delay: -2s; }

@media (max-width: 719px) {
  .flipbook__stage { padding-top: 68px; }
}

/* ---------- Flipbook engine (3D strips) ---------- */
.flipbook__book {
  position: relative;
  width: calc(var(--fb-w, 400px) * 2);
  height: var(--fb-h, 566px);
  perspective: 2600px;
  perspective-origin: 50% 40%;
  transition: transform .7s cubic-bezier(.3, .7, .2, 1);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.flipbook__book:active { cursor: grabbing; }
.flipbook__book.is-cover { transform: translateX(calc(var(--fb-w) / -2)); }
.flipbook__book.is-back  { transform: translateX(calc(var(--fb-w) / 2)); }
/* soft shadow the book casts on the backdrop (separate layer: filters would flatten the 3D) */
.flipbook__book::before {
  content: "";
  position: absolute;
  left: 50%; right: 0; top: 4%; bottom: -3%;
  border-radius: 6px;
  background: rgba(0, 0, 0, .5);
  filter: blur(22px);
  transform: translateZ(-1px);
  transition: left .7s cubic-bezier(.3, .7, .2, 1), right .7s cubic-bezier(.3, .7, .2, 1);
}
.flipbook__book:not(.is-cover):not(.is-portrait)::before { left: 0; }
.flipbook__book.is-back::before { left: 0; right: 50%; }

.fb-leaf {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--fb-w);
  height: 100%;
  transform-style: preserve-3d;
  transition: opacity .25s ease;
}
.fb-strip {
  position: absolute;
  top: 0;
  height: 100%;
  transform-origin: 0 50%;
  transform-style: preserve-3d;
}
.fb-side {
  position: absolute;
  inset: 0;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.fb-side--back { transform: rotateY(180deg); }
.fb-side > .fb-page { position: absolute; top: 0; height: 100%; }
.fb-shade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
/* spine shading on the strip next to the binding */
.fb-side.is-spine::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, .28), rgba(0, 0, 0, 0) 60%);
}
.fb-side--back.is-spine::after { background: linear-gradient(270deg, rgba(0, 0, 0, .28), rgba(0, 0, 0, 0) 60%); }
.fb-leaf--hard .fb-side.is-spine::after { background: linear-gradient(90deg, rgba(0, 0, 0, .3), rgba(0, 0, 0, 0) 8%); }
.fb-leaf--hard .fb-side--back.is-spine::after { background: linear-gradient(270deg, rgba(0, 0, 0, .3), rgba(0, 0, 0, 0) 8%); }

/* phones: one page wide; the spine is the page's left edge */
.flipbook__book.is-portrait { width: var(--fb-w); }
.flipbook__book.is-portrait .fb-leaf { left: 0; }
.flipbook__book.is-portrait::before { left: 0; right: 0; }

/* extra pages: closing spread */
.fb-closing, .fb-inside-back { background: #0B1C32 url("../img/bg-swirl.webp") 50% 70% / 260% auto; }
.fb-closing__inner, .fb-inside-back__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8%;
  padding: 12% 9%;
  text-align: center;
}
.fb-closing__sleigh { width: 92% !important; height: auto !important; object-fit: contain !important; }
.fb-closing__line {
  margin: 0;
  font-family: var(--font-script);
  color: var(--cream);
  font-size: calc(var(--fb-w, 400px) * .105);
  line-height: 1.25;
}
.fb-inside-back__logo { width: 58% !important; height: auto !important; object-fit: contain !important; }
.fb-inside-back .btn {
  min-width: 0;
  min-height: 0;
  height: calc(var(--fb-w, 400px) * .13);
  padding: 0 calc(var(--fb-w, 400px) * .08);
  font-size: calc(var(--fb-w, 400px) * .045);
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .star { animation: none; }
  .btn, .btn:hover, .btn:active { transition: none; transform: none; }
  .menu-viewer, .menu-viewer::backdrop { transition: none; transform: none; }
  .flipbook, .flipbook::backdrop, .flipbook__book { transition: none; }
  .fb-star { animation: none; }
  .festive__tall, .festive__small, .festive__tall img, .festive__small img,
  .festive__tall::after, .festive__small::after, .stamp { animation: none; transition: none; }
  .festive__tall:hover::after, .festive__small:hover::after { transition: none !important; }
}
