/* Sushi Bar Fuji: styles */

:root {
  /* ---------- Brand palette (exact values from the palette sheet) ---------- */
  --black-umber:    #1E1716;
  --light-pensive:  #D1CFD7;
  --escalope:       #CB8B63;
  --adobe-straw:    #C2A99A;
  --kariyasu-green: #6E7C58;
  --antique-brown:  #543E29;
  --falling-leaves: #A45C39;

  /* ---------- The three bases ---------- */
  --dark:   var(--black-umber);   /* deepest strong colour */
  --light:  var(--light-pensive); /* palest colour */
  --accent: var(--escalope);      /* brightest warm colour */

  /* ---------- Readability fixes (shades made from the palette) ----------
     Escalope on Light Pensive is only 1.84:1, so accent-coloured text on a
     light surface uses a deepened Falling Leaves instead.
     Kariyasu Green on Black Umber is 3.94:1, fine for big words but not for
     small text, so small green text uses a slightly lifted green.
     Neither base colour reads on plain Kariyasu Green (2.91 / 3.94), so a
     green surface that carries small text uses a deepened green. */
  --accent-deep: #814A30; /* on --light: 4.61:1 */
  --green-soft:  #7B8769; /* on --dark:  4.63:1 */
  --green-deep:  #555C43; /* under --light text: 4.54:1 */

  /* ---------- Fonts ---------- */
  /* Anton has Latin letters only. Bulgarian and Russian words fall through
     to Sofia Sans Extra Condensed (only its 800 weight is loaded, so that
     is what they get), which has the same tall, narrow, heavy build. */
  --font-display: 'Anton', 'Sofia Sans Extra Condensed', Impact, 'Arial Narrow', sans-serif;   /* giant words */
  --font-script:  'Caveat', 'Segoe Script', 'Bradley Hand', cursive;     /* small flourishes */
  --font-body:    'Montserrat', system-ui, 'Segoe UI', Arial, sans-serif; /* everything else */

  /* ---------- Surface in use (dark by default) ----------
     Text never picks a colour by itself: it reads --ink / --ink-soft / --mark
     from the surface it sits on, so every pairing below is a checked one. */
  --surface:  var(--dark);
  --ink:      var(--light);       /* 11.45:1 */
  --ink-soft: var(--adobe-straw); /*  7.93:1 */
  --mark:     var(--accent);      /*  6.23:1 */
}

/* In Bulgarian and Russian every giant word comes from the Cyrillic font,
   numbers and question marks included, so one word never mixes two fonts. */
html[lang="bg"],
html[lang="ru"] {
  --font-display: 'Sofia Sans Extra Condensed', 'Anton', Impact, 'Arial Narrow', sans-serif;
}

/* Surfaces. Put one of these on a section, card, ribbon or button. */
.on-dark,
.on-light,
.on-accent,
.on-brown,
.on-green,
.on-straw,
.on-rust {
  background: var(--surface);
  color: var(--ink);
}

.on-straw {
  --surface:  var(--adobe-straw);
  --ink:      var(--dark); /* 7.93:1 */
  --ink-soft: var(--dark);
  --mark:     var(--dark);
}

.on-rust {
  --surface:  var(--accent-deep);
  --ink:      var(--light); /* 4.61:1 */
  --ink-soft: var(--light);
  --mark:     var(--light);
}

.on-dark {
  --surface:  var(--dark);
  --ink:      var(--light);       /* 11.45:1 */
  --ink-soft: var(--adobe-straw); /*  7.93:1 */
  --mark:     var(--accent);      /*  6.23:1 */
}

.on-light {
  --surface:  var(--light);
  --ink:      var(--dark);          /* 11.45:1 */
  --ink-soft: var(--antique-brown); /*  6.49:1 */
  --mark:     var(--accent-deep);   /*  4.61:1 (plain accent would be 1.84) */
}

.on-accent {
  --surface:  var(--accent);
  --ink:      var(--dark); /* 6.23:1 (light text would be 1.84) */
  --ink-soft: var(--dark); /* brown would be 3.53, so stay on dark */
  --mark:     var(--dark);
}

.on-brown {
  --surface:  var(--antique-brown);
  --ink:      var(--light); /* 6.49:1 */
  --ink-soft: var(--light); /* straw would sit right on the 4.5 line */
  --mark:     var(--light); /* accent would be 3.53, big words only */
}

.on-green {
  --surface:  var(--green-deep);
  --ink:      var(--light); /* 4.54:1 */
  --ink-soft: var(--light);
  --mark:     var(--light);
}

/* Big words only (24px and up): these pass 3:1 but not 4.5:1.
   Falling Leaves on dark 3.50 · Kariyasu Green on dark 3.94 ·
   dark on Kariyasu Green 3.94 · dark on Falling Leaves 3.50 */

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

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  background: var(--dark);
  color-scheme: dark;
}

/* nothing may ever make the page scroll sideways */
html,
body {
  overflow-x: clip;
}

/* Lenis smooth scrolling: the few rules the library asks for */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
  overflow: clip;
}

body {
  min-height: 100vh;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: var(--dark);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* =====================================================================
   LOGO BUTTON + INTRO FILM
   The film plays on a black sheet over the whole page. Its last picture
   is the logo; .intro__logo is that same logo cut out of the film's own
   last frame and placed on the very same pixels, so swapping one for the
   other cannot be seen. main.js then flies the cut-out to .logo-btn.
   The numbers below are where the logo sits in the 1920 x 1080 film:
   left 741, top 315, 407 wide, 416 tall (its middle is 944.5, 523).
   ===================================================================== */
.logo-btn {
  --logo-w: clamp(46px, 4.4vw, 66px);
  --corner: clamp(12px, 1.6vw, 22px);
  /* the wheel's own numbers again (see .hero): the button lives outside
     the hero so it can stay on screen, and needs them to know how far the
     corner plate reaches in. Keep the two sets the same. */
  --hv: max(1vh, 5.4px);
  --R: min(74.5vw, calc(126 * var(--hv)));
  --plate-w: calc(var(--R) * 0.56);
  --peek: calc(50vw - var(--R) * 0.866 + var(--plate-w) * 0.5);
  position: fixed;               /* stays put while the page scrolls */
  z-index: 50;                   /* over every section, under the intro film */
  top: var(--corner);
  /* just right of the plate that peeks in at the corner */
  left: calc(var(--peek) + 10px);
  display: block;
  width: var(--logo-w);
  border-radius: 50%;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 700px) {
  .logo-btn {
    --logo-w: min(44px, 12.5vw);
    --R: 96vw;
    --plate-w: min(calc(var(--R) * 0.9), calc(60 * var(--hv)));
    left: calc(var(--peek) + 8px);
  }
}

/* Past the first screen there is no plate to avoid: the button tucks into
   the corner and gets a soft shadow so it reads on any section. */
.logo-btn.is-away {
  left: var(--corner);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

.logo-btn:active img {
  scale: 0.92;
}

.logo-btn img {
  transition: scale 0.15s ease;
}

.logo-btn img {
  display: block;
  width: 100%;
  height: auto;
}

.logo-btn:focus-visible {
  outline: 2px solid var(--light);
  outline-offset: 4px;
  box-shadow: 0 0 0 9px var(--dark);   /* a dark ring under the pale one: seen on any section */
}

/* ---------- Language switch: EN · BG · RU, top right, always on screen ---------- */
.lang {
  position: fixed;
  z-index: 50;
  top: clamp(12px, 1.6vw, 22px);
  right: clamp(12px, 1.6vw, 22px);
  display: none;               /* it needs scripts to do anything */
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(209, 207, 215, 0.28);
  border-radius: 999px;
  background: rgba(30, 23, 22, 0.86);   /* pale letters on this: 9:1 or better */
}

.js .lang { display: flex; }
.js.intro-on .lang { visibility: hidden; }

.lang button {
  min-width: 40px;
  height: 36px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--light);
  font: 700 12px/1 var(--font-body);
  letter-spacing: 0.1em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.lang button:hover { background: rgba(209, 207, 215, 0.16); }

.lang button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--dark);          /* 6.23:1 */
}

.lang button:focus-visible {
  outline: 2px solid var(--light);
  outline-offset: 2px;
}

/* With scripts on, the button waits and then fades in with the page... */
.js .logo-btn {
  opacity: 0;
  transition: opacity 0.6s ease 0.9s;
}

/* ...and once it is in, only its slide to the corner is animated */
.js .logo-btn.is-in {
  opacity: 1;
  transition: opacity 0.6s ease 0.9s, left 0.45s var(--ease-out), filter 0.45s ease;
}

@media (prefers-reduced-motion: reduce) {
  .js .logo-btn.is-in { transition: none; }
}

/* ...but while the film runs it stays hidden: the flying logo becomes it. */
.js.intro-on .logo-btn {
  opacity: 0;
  transition: none;
}

.intro {
  display: none;
}

.intro-on .intro {
  --film-w: max(104vw, 185vh);   /* the film always covers the screen, with a little to spare */
  display: block;
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  cursor: pointer;               /* a click or tap skips the film */
  /* safety net: if the script never takes over, the sheet lifts by itself */
  animation: intro-give-up 0.01s linear 12s forwards;
}

@keyframes intro-give-up {
  to { visibility: hidden; }
}

.intro__black {
  position: absolute;
  inset: 0;
  background: #000;
  transition: opacity 0.9s ease;
}

.intro__film {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--film-w);
  height: calc(var(--film-w) * 0.5625);
  max-width: none;
  /* pulls the film so its logo, not its own middle, sits mid-screen */
  translate: -49.193% -48.426%;
}

.intro__logo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--film-w) * 0.211979);
  height: calc(var(--film-w) * 0.216667);
  max-width: none;
  margin: calc(var(--film-w) * -0.108333) 0 0 calc(var(--film-w) * -0.10599);
  transform-origin: 0 0;
  visibility: hidden;
}

.intro.is-swapped .intro__film { visibility: hidden; }
.intro.is-swapped .intro__logo { visibility: visible; }

.intro.is-leaving {
  pointer-events: none;
  animation: none;
}

.intro.is-leaving .intro__black {
  opacity: 0;
}

/* =====================================================================
   HERO
   One screen tall. Layers, back to front:
   cloth · word (back copy) · ribbons · word (front copy) · handwriting ·
   wheel of plates · table pieces
   ===================================================================== */

/* Numbers the entrance animates. Registering them lets the browser
   blend them smoothly instead of jumping. */
@property --turn {
  syntax: '<angle>';
  inherits: true;
  initial-value: 0deg;
}

@property --grow {
  syntax: '<number>';
  inherits: false;
  initial-value: 1;
}

:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

.hero {
  position: relative;
  z-index: 3;            /* above the menu's own layers (0 to 2), so the pieces hanging off its bottom edge lie over the menu's top */
  height: 100vh;
  height: 100svh;
  min-height: 540px;
  overflow: hidden;
  isolation: isolate;
  background: var(--dark);

  /* The wheel's measurements live here so the little pieces can keep
     their distance from the front plate with the same numbers. */
  /* ONE ruler for the whole first screen: 1% of its height. The screen is
     never shorter than 540px (min-height above), so the ruler is never
     shorter than 5.4px: on a phone held sideways or a zoomed-in laptop the
     plates keep the same place under the name as everywhere else. */
  --hv: max(1vh, 5.4px);
  --R: min(74.5vw, calc(126 * var(--hv)));   /* the radius: everything below comes from it */
  --plate-w: calc(var(--R) * 0.56);      /* a plate's width (its height is about 0.43 of that).
                                            As big as it can be while the dish name above it stays readable. */
  --peek: calc(50vw - var(--R) * 0.866 + var(--plate-w) * 0.5);   /* how far a neighbour plate reaches in from the side */
  --front-y: calc(75.5 * var(--hv));     /* where the front plate's middle sits: under the dish name */

  /* sideways drags turn the wheel; up-and-down still scrolls the page */
  touch-action: pan-y pinch-zoom;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.hero.is-dragging {
  cursor: grabbing;
}

/* The napkin and the menu cover hang off the bottom of the first screen.
   Cut only at the sides, they are whole: the part below the edge lies on
   the top of the menu and scrolls away with the page, instead of being
   sliced off in a straight line. */
@supports (overflow: clip) {
  .hero {
    overflow-x: clip;
    overflow-y: visible;
  }
}

/* phones with a sliding address bar: measure from the small screen */
@supports (height: 1svh) {
  .hero, .logo-btn { --hv: max(1svh, 5.4px); }
}

/* ---------- Cloth ---------- */
.hero__cloth {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
  pointer-events: none;   /* or the browser tries to drag the picture away */
}

/* The cloth sinks into the page colour at the bottom of the screen. */
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  height: 24%;
  background: linear-gradient(to bottom, rgba(30, 23, 22, 0), var(--dark));
  pointer-events: none;
}

/* ---------- The weave ---------- */
.weave {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;

  /* What the fit is allowed to use. main.js reads these four.
     Together they describe the BAND: the tallest box a word may fill.
     A short word (FUJI) fills it. A long word (PHILADELPHIA) comes out
     smaller and is centred in it, so the ribbons always cross its middle. */
  --word-side: 0.035;     /* empty margin each side, as a share of the page width */
  --word-max-h: 0.56;     /* tallest the letters may get, as a share of the screen height */
  --word-max-hw: 0.42;    /* and as a share of the page width (the smaller one wins) */
  --word-cap-top: 0.13;   /* where the top of the band sits, as a share of the screen */
  --word-max-gap: 0.3;    /* most air between the letters of a short name, as a share of the letter size */

  /* What the fit writes back. These are only the pre-measure fallbacks. */
  --word-size: 34vw;
  --word-gap: 0px;
  --word-top: 6vh;
  --cap-top: 13vh;        /* top of the letters now on show */
  --cap-h: 24vw;          /* their height */
  --band-top: 13vh;       /* top of the band */
  --band-h: 24vw;         /* its height */
}

/* BOTH copies of the word take their place from this one rule and these
   same variables. Never give either copy a position of its own. */
.word {
  position: absolute;
  top: var(--word-top);
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: var(--word-gap);
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--word-size);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--light);
  user-select: none;
}

.word--back { z-index: 1; }
.ribbons    { z-index: 2; }
.word--front { z-index: 3; }
.scribble   { z-index: 4; }

.word__l {
  display: block;
  flex: none;
}

/* The weave itself. The front copy shows letters 1, 3, 5…; the back copy
   shows exactly the ones the front hides. A hidden letter keeps its
   space, so the two copies can never slide apart. */
.word--front .word__l:nth-child(even),
.word--back .word__l:nth-child(odd) {
  visibility: hidden;
}

/* ---------- Ribbons ---------- */
.ribbons {
  position: absolute;
  inset: 0;
}

.ribbon {
  position: absolute;
  left: 50%;
  top: var(--y);
  width: 130vw;
  margin-left: -65vw;
  padding: 0.85em 0;
  overflow: hidden;
  translate: 0 -50%;
  rotate: var(--tilt);
  font-size: clamp(12px, 1.25vw, 20px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* The ribbons hang on the band, not on the word, so they stay put while
   the word changes. */
.ribbon--a {
  --tilt: -4deg;
  --y: calc(var(--band-top) + var(--band-h) * 0.46);
}

.ribbon--b {
  --tilt: 3deg;
  --y: calc(var(--band-top) + var(--band-h) * 0.55);
}

.ribbon__track {
  display: flex;
  width: max-content;
  animation: ribbon-run var(--dur, 60s) linear infinite;
}

.ribbon--b .ribbon__track {
  animation-direction: reverse;
}

.ribbon__set {
  display: flex;
  flex: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ribbon__set li {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

/* The dot belongs to the phrase before it, so every set is the same
   width and the loop has no seam. */
.ribbon__set li::after {
  content: "";
  flex: none;
  width: 0.42em;
  height: 0.42em;
  margin: 0 1.5em;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

@keyframes ribbon-run {
  to { transform: translateX(-50%); }
}

/* ---------- Handwritten line ---------- */
.scribble {
  position: absolute;
  /* On an ordinary dish name: centred, just above the letters and clear
     of them. main.js works out the height. */
  --sx: -50%;
  left: 50%;
  top: var(--scribble-top, calc(var(--cap-top) + var(--cap-h) * 0.13));
  margin: 0;
  font-family: var(--font-script);
  font-size: var(--scribble-size, calc(var(--cap-h) * 0.2));
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  translate: var(--sx) 0;
  rotate: -6deg;
  color: var(--light);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

/* On the one big word (FUJI) the line lies across the letters. It crosses
   both pale letters and dark cloth, so no single colour reads on both.
   "difference" against the word's own colour turns it black where it lies
   on a letter and leaves it pale everywhere else. */
.weave.is-big .scribble {
  --sx: 0%;
  left: 27%;
  text-shadow: none;
  mix-blend-mode: difference;
}

/* ---------- Wheel ---------- */
.wheel {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;

  --hub-y: calc(var(--front-y) - var(--R));   /* the centre, far above the screen */
  --turn: 0deg;                               /* how far the whole wheel is turned */

  /* main.js only ever sets --turn to a whole number of plates (60deg each),
     so the wheel can only come to rest on a plate. This glides it there. */
  transition: --turn 0.9s var(--ease-out);
}

/* while a finger or the mouse is holding the wheel it follows at once */
.wheel.is-held {
  transition: none;
}

/* ONE formula for all six plates: start at the hub, swing to the plate's
   own angle, step out by the radius, then swing back so the plate stays
   level. Only --i differs from plate to plate. */
.plate {
  --a: calc(var(--i) * 60deg + var(--turn));
  position: absolute;
  left: 50%;
  top: var(--hub-y);
  width: var(--plate-w);
  margin: 0;
  transform:
    translate(-50%, -50%)
    rotate(var(--a))
    translateY(var(--R))
    rotate(calc(var(--a) * -1))
    scale(var(--grow, 1));
  will-change: transform;
}

.plate img {
  display: block;
  width: 100%;
  height: auto;
}

/* The shadow is a soft gradient, not a blur filter: nothing has to be
   redrawn while the wheel moves. */
.plate::before,
.card__plate::before {
  /* The board is seen at an angle, so its shadow is a soft pool under its
     lower half, a little wider than the board. One gradient, no blur. */
  content: "";
  position: absolute;
  z-index: -1;
  inset: 34% -4% -16% -4%;
  translate: 1% 0;
  background: radial-gradient(closest-side,
    rgba(0, 0, 0, 0.62) 0%,
    rgba(0, 0, 0, 0.5) 55%,
    rgba(0, 0, 0, 0) 100%);
}

/* ---------- The little kitchen things ----------
   Small pieces scattered on the table, under the plates. Each keeps clear
   of every resting plate and table piece by more than its own reach.
   The figure is moved by the mouse (main.js); the picture inside does the
   slow float. Two separate movers, so they never fight. */
.bits {
  position: absolute;
  inset: 0;
  z-index: 3;            /* same level as the wheel, earlier in the page: under the plates */
  pointer-events: none;
}

.bit {
  position: absolute;
  left: calc(var(--x) * 1%);
  /* --cap is an optional ceiling ("never lower than this"), worked out from
     the table piece below, so wide or short screens cannot push them together */
  top: min(calc(var(--y) * 1%), var(--cap, 200vh));
  width: calc(var(--w) * 1vw);
  margin: 0;
  will-change: translate;
}

.bit--narrow {
  display: none;
}

/* A piece under the front plate takes its place from the plate itself:
   the plate's middle, plus half its height, plus a clear gap. So it stays
   clear of the plate on every screen shape. --d nudges it lower (vh). */
.bit--under {
  top: calc(var(--front-y) + var(--plate-w) * 0.31 + 22px + var(--d, 0) * 1vh);
}

.bit img {
  display: block;
  width: 100%;
  height: auto;
  rotate: calc(var(--r, 0) * 1deg);
  animation: bit-float var(--ft, 7s) ease-in-out var(--fd, 0s) infinite alternate;
}

/* each piece's own slow float: its own speed (--ft) and head start (--fd) */
@keyframes bit-float {
  from { translate: 0 -5px; rotate: calc(var(--r, 0) * 1deg - 3deg); }
  to   { translate: 0 5px;  rotate: calc(var(--r, 0) * 1deg + 3deg); }
}

/* No float on phones or when less motion is asked for.
   (The mouse-follow is switched off for the same two in main.js.) */
@media (max-width: 700px), (hover: none) and (pointer: coarse) {
  .bit img { animation: none; }
}

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

/* ---------- Table pieces (cutlery, napkin, cover, teapot) ---------- */
.prop {
  position: absolute;
  z-index: 4;
  margin: 0;
  pointer-events: none;
}

.prop img {
  display: block;
  width: 100%;
  height: auto;
}

/* Shadows. Everything is seen from directly above with the light at the
   upper left, so each shadow is the piece's own outline, pushed a little
   down and right. No blur filters anywhere. */

/* round pieces: teapot, cups, soy dish */
.prop--round::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -7%;
  translate: 4% 6%;
  border-radius: 50%;
  background: radial-gradient(closest-side,
    rgba(0, 0, 0, 0.6) 62%,
    rgba(0, 0, 0, 0.28) 82%,
    rgba(0, 0, 0, 0) 100%);
}

/* flat rectangles: napkin, menu cover */
.prop--box::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 5%;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 8px 12px 26px 10px rgba(0, 0, 0, 0.45);
}

/* thin sticks: chopsticks */
.prop--thin::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 1% 22%;
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 4px 6px 9px 2px rgba(0, 0, 0, 0.4);
}

/* the spoon: a round bowl and a thin handle */
.prop--spoon::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -8%;
  right: -8%;
  top: -1%;
  height: 38%;
  translate: 5% 4%;
  border-radius: 50%;
  background: radial-gradient(closest-side,
    rgba(0, 0, 0, 0.55) 60%,
    rgba(0, 0, 0, 0) 100%);
}

.prop--spoon::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 40%;
  right: 40%;
  top: 34%;
  bottom: 3%;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 4px 5px 8px 2px rgba(0, 0, 0, 0.38);
}

/* ---- Where each piece sits ----
   Left of the front plate: the chopsticks, standing upright.
   Right of it: the spoon and the soy dish.
   Top right: the teapot and two cups.
   Bottom corners: napkin (left) and menu cover (right), turned a little
   and partly off the edge.
   The pieces beside the plate take their place from the plate itself
   (--R, --front-y), so they keep their distance on every screen shape. */

.prop--chopsticks {
  --cw: min(2.2vw, 3.4vh);                                  /* the picture is 13.5x as tall as wide */
  left: calc(50vw - var(--plate-w) * 0.5 - 4vw - var(--cw));
  top: calc(var(--front-y) - var(--cw) * 6.76);
  width: var(--cw);
}

.prop--spoon {
  --sw: min(5vw, 7.6vh);
  left: calc(50vw + var(--plate-w) * 0.5 + 3.5vw);
  top: calc(var(--front-y) - var(--sw) * 1.6);
  width: var(--sw);
}

.prop--soy {
  left: calc(50vw + var(--plate-w) * 0.5 + 10vw);
  top: calc(var(--front-y) - min(9vw, 14vh));
  width: min(6.5vw, 10vh);
}

.prop--teapot {
  /* clear of the plate peeking in at the corner, and never under the
     language switch (about 160px from the right edge) */
  --tea-r: max(calc(var(--peek) + 4.5vw), 164px);
  right: var(--tea-r);
  top: 2.5vh;
  width: 10.5vw;
}

.prop--cup {
  width: 4.6vw;
}

/* both cups stand in the top strip beside the teapot, above the dish
   name, so neither sits on a letter */
.prop--cup-a {
  right: calc(max(calc(var(--peek) + 4.5vw), 164px) + 12vw);
  top: 5vh;
}

.prop--cup-b {
  right: calc(max(calc(var(--peek) + 4.5vw), 164px) + 17.5vw);
  top: 3.5vh;
}

/* "min(…)" is how much of the piece shows above the bottom edge.
   On wide screens the order card has the bottom left corner, so the
   napkin is only laid on phones. */
.prop--napkin {
  display: none;
  left: -3vw;
  bottom: calc(min(12vw, 17vh) - 28vw);
  width: 15vw;
  rotate: -12deg;
}

.prop--cover {
  right: -3vw;
  bottom: calc(min(13vw, 17vh) - 24vw);
  width: 17vw;
  rotate: 8deg;
}

/* ---------- The order card ----------
   Bottom left on a wide screen: a pale card with the front plate's name,
   what is in it, the price and the Order button. On narrow screens there
   is no room for a card, so it shrinks to a small dark bar under the
   plate with just the price and the button. */
.pick {
  position: absolute;
  z-index: 7;                  /* over the wheel's edge buttons: it has a button of its own */
  left: clamp(14px, 2vw, 36px);
  bottom: clamp(14px, 3.2vh, 36px);
  /* never wider than the room left of the chopsticks */
  width: max(230px, min(390px, 23vw, calc(50vw - var(--plate-w) * 0.5 - 9.5vw)));
  margin: 0;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(30, 23, 22, 0.4), 0 0 30px 4px rgba(0, 0, 0, 0.55), 0 18px 40px -12px rgba(0, 0, 0, 0.7);
  cursor: auto;
  user-select: text;
  -webkit-user-select: text;
}

.pick__in {
  padding: clamp(18px, 1.7vw, 28px) clamp(18px, 1.8vw, 30px) clamp(18px, 1.8vw, 28px);
}

/* each new plate's words come in with a small lift */
.pick__in.is-new { animation: pick-new 0.5s var(--ease-out) 0.18s backwards; }
@keyframes pick-new { from { opacity: 0.01; translate: 0 12px; } }

.pick__name {
  margin: 0;
  font-family: var(--font-script);
  font-size: clamp(30px, 2.5vw, 42px);
  font-weight: 700;
  line-height: 1;
  color: var(--mark);
}

.pick__kind {
  margin: 0.7em 0 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.pick__line {
  margin: 0.5em 0 0;
  font-size: clamp(14px, 1.05vw, 16px);
  font-weight: 500;
  line-height: 1.5;
}

.pick__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  margin-top: clamp(14px, 1.5vw, 22px);
}

.pick__price {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 3.1vw, 52px);
  line-height: 1;
  white-space: nowrap;
}

.pick__price s {
  margin-left: 0.45em;
  font-family: var(--font-body);
  font-size: 0.34em;
  font-weight: 600;
}

.pick__btn {
  display: inline-block;
  padding: 1.25em 2.2em;         /* 45px tall: a comfortable tap */
  border-radius: 999px;
  background: var(--mark);       /* pale letters on this: 4.61:1 */
  color: var(--surface);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
  transition: translate 0.3s var(--ease-out), background-color 0.3s;
}

.pick__btn:hover {
  translate: 0 -3px;
  background: var(--ink);
}

.pick__btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* a short screen: the one-line description is left out so the card stays low */
@media (max-height: 720px) {
  .pick__line { display: none; }
}

/* narrow screens: the small dark bar under the plate */
@media (max-width: 1100px) {
  .pick {
    --surface: var(--dark);
    --ink: var(--light);
    left: 50%;
    bottom: auto;
    top: calc(var(--front-y) + var(--plate-w) * 0.22 + 16px);
    width: auto;
    translate: -50% 0;
    border: 1px solid rgba(209, 207, 215, 0.28);
    border-radius: 999px;
    background: rgba(30, 23, 22, 0.9);
    color: var(--light);
    box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.8);
  }

  .pick__in { padding: 5px 5px 5px 20px; }
  .pick__name, .pick__kind, .pick__line { display: none; }
  .pick__foot { flex-wrap: nowrap; margin: 0; gap: 16px; }
  .pick__price { font-size: 24px; }
  .pick__price s { font-size: 0.5em; }      /* 12px: still readable in the small bar */
  .pick__btn { padding: 1.2em 1.7em; background: var(--accent); color: var(--dark); }   /* 6.23:1 */
  .pick__btn:hover { background: var(--light); }
}

/* ---------- Edges: click to turn the wheel one plate ---------- */
.hero__edge {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 6;
  width: 16%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--light);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y pinch-zoom;
}

.hero__edge--prev { left: 0; }
.hero__edge--next { right: 0; }

.hero__edge span {
  position: absolute;
  top: 50%;              /* half way up: clear of the order card in the bottom corner */
  width: 44px;
  height: 44px;
  border: 1px solid rgba(209, 207, 215, 0.4);
  border-radius: 50%;
  background: rgba(30, 23, 22, 0.66);   /* light arrow on this: 8:1 or better */
  transition: scale 0.3s var(--ease-out), background-color 0.3s, color 0.3s;
}

.hero__edge--prev span { left: clamp(10px, 1.6vw, 24px); }
.hero__edge--next span { right: clamp(10px, 1.6vw, 24px); }

.hero__edge span::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 10px;
  height: 10px;
  margin: auto;
  border-left: 2px solid;
  border-bottom: 2px solid;
  rotate: 45deg;
  translate: 2px 0;
}

.hero__edge--next span::before {
  rotate: -135deg;
  translate: -2px 0;
}

.hero__edge:hover span {
  scale: 1.1;
  background: var(--accent);
  color: var(--dark);
}

.hero__edge:focus-visible {
  outline: none;
}

.hero__edge:focus-visible span {
  outline: 2px solid var(--light);
  outline-offset: 3px;
}

/* ---------- Entrance, once, on load ----------
   Before it starts, every piece is already on the page at 1% opacity
   (never 0), so the browser has drawn it before it has to move it. */
.js .hero:not(.is-in) .ribbon,
.js .hero:not(.is-in) .plate,
.js .hero:not(.is-in) .word__l,
.js .hero:not(.is-in) .scribble,
.js .hero:not(.is-in) .prop,
.js .hero:not(.is-in) .pick,
.js .hero:not(.is-in) .bit {
  opacity: 0.01;
}

.hero.is-in .pick { animation: pick-in 0.9s var(--ease-out) 1.15s backwards; }
@keyframes pick-in { from { opacity: 0.01; translate: var(--pick-x, 0) 40px; } }
@media (max-width: 1100px) { .pick { --pick-x: -50%; } }

.hero.is-in .bit {
  animation: bit-in 0.9s var(--ease-out) backwards;
  animation-delay: calc(0.9s + var(--k, 0) * 0.05s);
}

@keyframes bit-in { from { opacity: 0.01; scale: 0.5; } }

.hero.is-in .ribbon--a { animation: race-from-left 1.1s var(--ease-out) 0.05s backwards; }
.hero.is-in .ribbon--b { animation: race-from-right 1.1s var(--ease-out) 0.15s backwards; }

.hero.is-in .wheel { animation: wheel-turn 1.7s var(--ease-out) 0.1s backwards; }

.hero.is-in .plate {
  animation: plate-grow 1.3s var(--ease-out) backwards;
  animation-delay: calc(0.15s + var(--i) * 0.05s);
}

.hero.is-in .word__l {
  animation: letter-rise var(--rise-time, 1s) var(--ease-out) backwards;
  animation-delay: calc(var(--rise-wait, 0.45s) + var(--n) * var(--rise-step, 0.12s));
}

/* After the entrance, a new word's letters rise the same way, only quicker.
   Fresh letters are born inside .hero.is-in, so they animate by themselves. */
.weave.is-live {
  --rise-time: 0.6s;
  --rise-wait: 0s;
  --rise-step: 0.045s;
}

/* The old word leaves letter by letter before the new one is written. */
.hero.is-in .weave.is-leaving .word__l {
  animation: letter-fall 0.22s cubic-bezier(0.5, 0, 0.75, 0) forwards;
  animation-delay: calc(var(--n) * 0.02s);
}

.hero.is-in .scribble { animation: scribble-in 0.8s var(--ease-out) var(--scribble-wait, 1.25s) backwards; }
/* after the entrance, when it is written in again at a new place */
.weave.is-live .scribble { --scribble-wait: 0.15s; }

.hero.is-in .prop { animation: 1.1s var(--ease-out) 0.7s backwards; }
.hero.is-in .prop[data-edge="left"]   { animation-name: slide-from-left; }
.hero.is-in .prop[data-edge="right"]  { animation-name: slide-from-right; }
.hero.is-in .prop[data-edge="top"]    { animation-name: slide-from-top; }
.hero.is-in .prop[data-edge="bottom"] { animation-name: slide-from-bottom; }

@keyframes race-from-left  { from { opacity: 0.01; translate: -115vw -50%; } }
@keyframes race-from-right { from { opacity: 0.01; translate: 115vw -50%; } }
@keyframes wheel-turn      { from { --turn: -75deg; } }
@keyframes plate-grow      { from { opacity: 0.01; --grow: 0.55; } }
@keyframes letter-rise     { from { opacity: 0.01; translate: 0 34%; } }
@keyframes letter-fall     { to   { opacity: 0.01; translate: 0 -26%; } }
@keyframes scribble-in     { from { opacity: 0.01; translate: var(--sx, 0%) 40%; rotate: -12deg; } }
/* distances are in screen units, so even a thin piece comes all the way
   in from its edge */
@keyframes slide-from-left   { from { opacity: 0.01; translate: -45vw 0; } }
@keyframes slide-from-right  { from { opacity: 0.01; translate: 45vw 0; } }
@keyframes slide-from-top    { from { opacity: 0.01; translate: 0 -40vh; } }
@keyframes slide-from-bottom { from { opacity: 0.01; translate: 0 40vh; } }

/* ---------- Phones ---------- */
@media (max-width: 700px) {
  .weave {
    --word-side: 0.05;
    --word-max-hw: 0.5;
    --word-cap-top: 0.14;
  }

  .bit {
    left: calc(var(--mx) * 1%);
    top: min(calc(var(--my) * 1%), var(--mcap, 200vh));
    width: calc(var(--mw) * 1vw);
  }

  .bit--wide   { display: none; }
  .bit--narrow { display: block; }

  .bit--m-under {
    top: calc(var(--front-y) + var(--plate-w) * 0.31 + 24px + var(--md, 0) * 1vh);
  }
}

/* On a phone screen that is not tall, the table pieces reach right up to
   the plate and there is no room under it, so those pieces are left out. */
@media (max-width: 700px) and (min-aspect-ratio: 1/2) {
  .bit--m-under { display: none; }
}

@media (max-width: 700px) {

  .hero__edge { width: 20%; }
  .hero__edge span { top: 78%; width: 40px; height: 40px; }

  .hero {
    --R: 96vw;
    --plate-w: min(calc(var(--R) * 0.9), calc(60 * var(--hv)));   /* the second number only matters on a phone held sideways */
    --front-y: calc(62 * var(--hv));
  }

  .ribbon {
    width: 150vw;
    margin-left: -75vw;
    padding: 0.7em 0;
    font-size: 10.5px;
  }

  /* The front plate fills the width on a phone, so nothing fits beside
     it: the chopsticks, spoon and soy dish move to the bottom edge. */
  .prop--napkin     { display: block; left: -6vw; bottom: calc(min(26vw, 13vh) - 63.4vw); width: 34vw; rotate: -10deg; }
  .prop--cover      { right: -7vw; bottom: calc(min(27vw, 13vh) - 53.6vw); width: 38vw; rotate: 8deg; }
  .prop--chopsticks { --cw: 3.4vw; left: 34vw; top: auto; bottom: calc(min(27vw, 13.5vh) - 46vw); rotate: 6deg; }
  .prop--spoon      { --sw: 9vw; left: 41.5vw; top: auto; bottom: calc(min(22vw, 11vh) - 28.7vw); rotate: -8deg; }
  .prop--soy        { left: 51.5vw; top: auto; bottom: 2vh; width: 13vw; }
  /* the teapot and its cup stand between the logo and the language switch */
  .prop--teapot     { right: max(38vw, 150px); top: 1.5vh; width: min(26vw, 12.5vh); }
  .prop--cup        { width: min(8.5vw, 4.2vh); }   /* never bigger than the teapot on a phone held sideways */
  .prop--cup-a      { right: calc(max(38vw, 150px) + min(26vw, 12.5vh) + 1vw); top: 3vh; }
  .prop--cup-b      { display: none; }
}

/* ---------- People who asked for less motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero.is-in .ribbon,
  .hero.is-in .wheel,
  .hero.is-in .plate,
  .hero.is-in .word__l,
  .hero.is-in .scribble,
  .hero.is-in .prop,
  .hero.is-in .pick,
  .pick__in.is-new,
  .hero.is-in .bit,
  .hero.is-in .weave.is-leaving .word__l {
    animation: none;
  }

  .ribbon__track {
    animation-play-state: paused;
  }

  .wheel,
  .scribble,
  .hero__edge span {
    transition: none;
  }
}

/* =====================================================================
   MENU
   A still table (the cloth stays put) with six cards scrolling over it.
   ===================================================================== */
.menu {
  position: relative;
  padding-bottom: clamp(48px, 10vh, 130px);
  background: var(--dark);
  color: var(--light);
}

/* The cloth sticks to the screen for as long as the menu is on it. */
.menu__back {
  position: sticky;
  top: 0;
  z-index: 0;
  height: 100vh;
  height: 100lvh;
  margin-bottom: -100vh;
  margin-bottom: -100lvh;
  overflow: hidden;
}

.menu__back img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  scale: 1 -1;   /* the hero cloth upside down, so it does not repeat the hero */
}

/* Darkened so pale text reads anywhere on it: 7:1 or better at the
   brightest part of the wood. */
.menu__back::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(30, 23, 22, 0.64);
}

/* the menu grows out of the hero's dark bottom edge */
.menu::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 1;
  height: 36vh;
  background: linear-gradient(to bottom, var(--dark), rgba(30, 23, 22, 0));
  pointer-events: none;
}

.menu__head,
.cards {
  position: relative;
  z-index: 2;
}

.menu__head {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(72px, 15vh, 160px) 24px clamp(40px, 8vh, 90px);
  text-align: center;
}

.menu__small {
  margin: 0 0 -0.1em;
  font-family: var(--font-script);
  font-size: clamp(28px, 2.8vw, 42px);
  font-weight: 700;
  line-height: 1;
  color: var(--adobe-straw);
  rotate: -3deg;
}

.menu__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(56px, 9.5vw, 156px);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
}

.menu__lead {
  max-width: 44ch;
  margin: 1.1em auto 0;
  font-size: clamp(16px, 1.25vw, 19px);
  font-weight: 500;
}

/* ---------- Cards ---------- */
.cards {
  --gutter: clamp(10px, 2.2vw, 32px);
  display: grid;
  gap: clamp(14px, 2.2vw, 32px);
  margin: 0;
  padding: 0 var(--gutter);
  list-style: none;
}

/* --p is how far the card's entrance has run: 0 = plate still inside the
   edge and text still outside, 1 = both in place. main.js ties it to the
   scroll position. Without scripts it stays 1, so the card is complete.
   --dir is +1 when the plate is on the right, -1 when it is on the left. */
.card {
  --p: 1;
  --dir: 1;
  --card-h: clamp(300px, 46vh, 460px);
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--card-h);
  overflow: hidden;   /* THE CLIP: the plate can only be seen inside the card, */
  overflow: clip;     /* so it seems to come out of the rectangle's own edge   */
  isolation: isolate;
}

.card--flip {
  --dir: -1;
  justify-content: flex-end;
}

.card__text {
  position: relative;
  z-index: 2;
  width: min(52%, 660px);
  padding: clamp(28px, 4vw, 56px) clamp(22px, 5vw, 84px);
  /* slides in from the side opposite the plate */
  translate: calc((1 - var(--p)) * var(--dir) * -115%) 0;
  opacity: calc(0.01 + var(--p) * 0.99);
  will-change: translate;
}

.card__kind {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.card__name {
  margin: 0.12em 0 0.16em;
  font-family: var(--font-display);
  font-size: clamp(46px, 6.6vw, 108px);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
}

.card__line {
  max-width: 34ch;
  margin: 0;
  font-size: clamp(15px, 1.2vw, 18px);
  font-weight: 500;
  line-height: 1.5;
}

.card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  margin-top: clamp(18px, 2.4vw, 30px);
}

.card__price {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 2.8vw, 42px);
  line-height: 1;
  white-space: nowrap;
}

.card__price s {
  margin-left: 0.5em;
  font-family: var(--font-body);
  font-size: 0.42em;
  font-weight: 600;
}

/* Button: the card's own two colours swapped, so it has the same checked
   contrast as the text. */
.card__btn,
.btn {
  display: inline-block;
  padding: 1.25em 2.1em;         /* 45px tall: a comfortable tap */
  background: var(--ink);
  color: var(--surface);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
  transition: translate 0.3s var(--ease-out);
}

.card__btn:hover,
.btn:hover {
  translate: 0 -3px;
}

.card__btn:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* The plate comes out of the card's own edge (the card's clip hides it
   until then) and ends up WHOLE on the card: nothing of the board is
   cut off once it has arrived. */
.card__plate {
  --inset: clamp(14px, 3vw, 56px);
  position: absolute;
  z-index: 1;
  top: 50%;
  right: var(--inset);
  width: min(45%, 780px);
  margin: 0;
  translate: calc(var(--dir) * (1 - var(--p)) * 125%) -50%;
  will-change: translate;
}

.card--flip .card__plate {
  right: auto;
  left: var(--inset);
}

.card__plate img {
  display: block;
  width: 100%;
  height: auto;
}

/* (its shadow is set together with the wheel plates' shadow, above) */

/* =====================================================================
   ENDING
   On the pale colour. From the top: a ribbon with the useful facts, the
   big word with a handwritten line across its foot, one row with the
   address, hours, phone and the Book a table button, then a thin line
   and the small last line. Chopsticks and a spoon fly in from the sides
   and the emblem turns very slowly in the corner.
   Everything waits (at 1% opacity) until the big word is on screen, then
   comes in one after another: .ending.is-seen is set by main.js.
   ===================================================================== */
.ending {
  position: relative;
  overflow: hidden;
  overflow: clip;
  padding: 0 0 clamp(18px, 3vh, 30px);
}

/* the emblem, large and quiet, in the top right corner */
.ending__mark {
  position: absolute;
  z-index: 0;
  right: clamp(-40px, 3vw, 80px);
  top: clamp(70px, 12vh, 130px);
  width: clamp(150px, 19vw, 320px);
  height: auto;
  opacity: 0.09;
  pointer-events: none;
  animation: mark-turn 90s linear infinite;
}

@keyframes mark-turn { to { rotate: 360deg; } }

/* the hero's ribbon, here a straight band across the top of the ending */
.ribbon--end {
  position: relative;
  z-index: 2;
  left: auto;
  top: auto;
  width: 100%;
  margin-left: 0;
  translate: none;
  rotate: none;
}

.ending__in {
  position: relative;
  z-index: 1;
  max-width: 1360px;
  margin: 0 auto;
  padding: clamp(34px, 7vh, 80px) clamp(22px, 5vw, 72px) 0;
}

.ending__shout {
  width: fit-content;
  margin: 0 auto;
  text-align: center;
}

/* Falling Leaves on the pale colour is 3.3:1: fine for a word this size */
.ending__word {
  margin: 0;
  font-family: var(--font-display);
  font-size: min(clamp(84px, 21vw, 330px), 34vh);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
  color: var(--falling-leaves);
}

/* lies across the foot of the word, in the dark ink */
.ending__scribble {
  position: relative;
  margin: -0.42em 0 0;
  padding-right: 2%;
  font-family: var(--font-script);
  font-size: clamp(30px, 5.4vw, 86px);
  font-weight: 700;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
  color: var(--ink);
  rotate: -4deg;
}

/* address · hours · phone, in one row */
.ending__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, auto));
  justify-content: center;
  align-items: start;
  column-gap: clamp(36px, 9vw, 170px);
  margin-top: clamp(28px, 5vh, 60px);
}

.ending__col h3 {
  margin: 0 0 0.9em;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mark);
}

.ending__col p {
  margin: 0;
  font-size: clamp(15px, 1.2vw, 17px);
  font-weight: 500;
  line-height: 1.6;
}

.ending__col a {
  display: inline-block;
  padding: 7px 0;                /* a taller tap area for the address and the number */
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--mark);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.ending__col a:hover {
  color: var(--mark);
}

.ending__col a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.btn {
  padding: 1.25em 2.8em;
  font-size: clamp(14px, 1.1vw, 17px);
}

/* chopsticks · button · chopsticks. They share one row, so the chopsticks
   can never lie on top of the button or the columns. */
.ending__cta {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(14px, 3vw, 48px);
  margin-top: clamp(28px, 5vh, 60px);
}

.ending__btn {
  border-radius: 999px;
  background: var(--mark);      /* pale letters on this: 4.61:1 */
  box-shadow: 0 14px 26px -12px rgba(84, 62, 41, 0.75);
}

.ending__btn:hover { background: var(--ink); }

/* the two pairs of chopsticks that fly in to the button */
.fly {
  width: min(26vw, 360px);
  margin: 0;
  pointer-events: none;
  transition: translate 1.2s var(--ease-out), opacity 0.5s linear;
}

.fly img {
  display: block;
  width: 100%;
  height: auto;
  animation: fly-float 7s ease-in-out infinite alternate;
}

@keyframes fly-float {
  from { translate: 0 -6px; rotate: -1.2deg; }
  to   { translate: 0 6px;  rotate: 1.2deg; }
}

.fly--left {
  justify-self: end;
  rotate: -7deg;
}

.fly--right {
  justify-self: start;
  rotate: 7deg;
}

.fly--right img { scale: -1 1; animation-duration: 8.5s; animation-delay: -3s; }

/* the thin line and the small last line */
.ending__last {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: clamp(26px, 4.5vh, 52px) 0 0;
  padding-top: clamp(14px, 2.2vh, 24px);
  border-top: 1px solid rgba(84, 62, 41, 0.22);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.ending__last img {
  flex: none;
  width: 26px;
  height: auto;
}

/* ---- waiting, then coming in one after another ---- */
.ending__word,
.ending__scribble,
.ending__col,
.ending__btn,
.ending__last {
  transition: opacity 0.7s ease, translate 0.9s var(--ease-out), scale 0.9s var(--ease-out);
}

.ending__scribble { transition-delay: 0.35s; }
.ending__col:nth-child(1) { transition-delay: 0.5s; }
.ending__col:nth-child(2) { transition-delay: 0.6s; }
.ending__col:nth-child(3) { transition-delay: 0.7s; }
.ending__btn { transition-delay: 0.25s, 0s, 0.25s; }
.ending__last { transition-delay: 0.9s; }

.js .ending:not(.is-seen) .ending__word,
.js .ending:not(.is-seen) .ending__scribble,
.js .ending:not(.is-seen) .ending__col,
.js .ending:not(.is-seen) .ending__last,
.js .ending:not(.is-cta) .ending__btn,
.js .ending:not(.is-cta) .fly {
  opacity: 0.01;
}

.js .ending:not(.is-seen) .ending__word     { translate: 0 22%; }
.js .ending:not(.is-seen) .ending__scribble { translate: -6% 30%; }
.js .ending:not(.is-seen) .ending__col      { translate: 0 26px; }
/* the button's row has its own moment (.is-cta): the chopsticks fly in
   from the two sides when that row itself is on screen */
.js .ending:not(.is-cta) .ending__btn       { scale: 0.86; }
.js .ending:not(.is-cta) .fly--left         { translate: -70vw 0; }
.js .ending:not(.is-cta) .fly--right        { translate: 70vw 0; }

/* ---------- Phones: menu and ending ---------- */
@media (max-width: 700px) {
  /* text on top, the plate under it, still coming out of the side edge */
  .card {
    display: block;
    min-height: 0;
    padding-bottom: calc(41% + 38px);   /* room for the plate: it is 92% wide and about 0.44 as tall */
  }

  .card__text {
    width: auto;
    padding: 26px 22px 12px;
  }

  .card__plate {
    --inset: 4%;
    top: auto;
    bottom: 22px;
    width: 92%;
    translate: calc(var(--dir) * (1 - var(--p)) * 125%) 0;
  }

  /* the pieces hanging off the first screen reach a little further on a
     phone: the menu's first words start below them */
  .menu__head { padding-top: clamp(150px, 46vw, 200px); }

  /* the row becomes a short list */
  .ending__row {
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
    row-gap: 26px;
    column-gap: 20px;
  }

  .ending__col:first-child { grid-column: 1 / -1; }

  /* chopsticks above and below the button, each from its own side */
  .ending__cta {
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: 20px;
  }

  .fly { width: 62vw; }
  .fly--left  { justify-self: start; margin-left: -12vw; }
  .fly--right { justify-self: end;   margin-right: -12vw; }

  .ending__scribble { margin-top: -0.3em; }
  .ending__mark { opacity: 0.07; }

  .ending__last {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* ---------- The order window ---------- */
.order {
  width: min(92vw, 440px);
  max-height: 92vh;
  margin: auto;
  padding: 38px 30px 28px;
  border: 0;
  border-radius: 12px;
  overflow: auto;
  text-align: center;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.8);
}

.order::backdrop {
  background: rgba(30, 23, 22, 0.78);
}

.order[open] { animation: order-in 0.4s var(--ease-out); }
.order[open]::backdrop { animation: order-dim 0.3s ease; }
@keyframes order-in  { from { opacity: 0; translate: 0 24px; scale: 0.96; } }
@keyframes order-dim { from { opacity: 0; } }

.order__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  font: 400 30px/1 var(--font-body);
  cursor: pointer;
}

.order__close:hover { background: rgba(30, 23, 22, 0.1); }

.order__close:focus-visible,
.order__copy:focus-visible,
.order__phone:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.order__small {
  margin: 0;
  font-family: var(--font-script);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  color: var(--mark);
  rotate: -3deg;
}

.order__title {
  margin: 0.1em 0 0;
  font-family: var(--font-display);
  font-size: clamp(40px, 11vw, 60px);
  font-weight: 400;
  line-height: 1.05;
  text-transform: uppercase;
}

.order__kind {
  margin: 0.8em 0 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.order__price {
  margin: 0.25em 0 0;
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1.1;
}

.order__price s {
  margin-left: 0.45em;
  font-family: var(--font-body);
  font-size: 0.42em;
  font-weight: 600;
}

.order__how {
  max-width: 30ch;
  margin: 1.3em auto 0;
  padding-top: 1.3em;
  border-top: 1px solid rgba(84, 62, 41, 0.22);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
}

.order__phone {
  margin: 0.3em 0 0;
  font-family: var(--font-display);
  font-size: clamp(38px, 11vw, 52px);
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--mark);
  text-decoration: none;
  user-select: all;
  -webkit-user-select: all;
}

.order__acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
  margin-top: 1.1em;
}

.order__call { border-radius: 999px; }

.order__copy {
  padding: 0.6em 0.2em;
  border: 0;
  background: none;
  color: var(--ink);
  font: 600 14px/1 var(--font-body);
  text-decoration: underline;
  text-decoration-color: var(--mark);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  cursor: pointer;
}

.order__copy:hover { color: var(--mark); }

.order__hours {
  margin: 1.4em 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}

/* ---------- Less motion: menu, ending and order window ---------- */
@media (prefers-reduced-motion: reduce) {
  .fly,
  .card__btn,
  .btn,
  .pick__btn,
  .ending__word,
  .ending__scribble,
  .ending__col,
  .ending__btn,
  .ending__last {
    transition: none;
  }

  .fly img,
  .ending__mark,
  .order[open],
  .order[open]::backdrop {
    animation: none;
  }
}

/* =====================================================================
   REVIEW FIXES (28 Nov 2026)
   ===================================================================== */

/* a card whose button has the keyboard's focus is shown complete, even
   if the page has not been scrolled far enough to bring it in */
.card:focus-within { --p: 1 !important; }

/* the order window: hidden until opened even where the browser has no
   built-in window of this kind, and the page behind it stays still */
dialog:not([open]) { display: none; }
html:has(dialog[open]) { overflow: hidden; }

/* a tablet held upright: the plate may be wider, so the first screen is
   not mostly empty wood */
@media (min-width: 701px) and (max-aspect-ratio: 1/1) {
  .hero,
  .logo-btn {
    --R: 90vw;
    --plate-w: calc(var(--R) * 0.72);
  }

  .hero { --front-y: calc(68 * var(--hv)); }
}

/* the narrowest phones: no room for the cup between the logo and the teapot */
@media (max-width: 350px) {
  .prop--cup-a { display: none; }
}
