/* Slurp · the playful hero on the home page.
   Layout follows the owner's reference (fruit bowl site): a framed colour stage, a giant bubbly word with
   a top-down bowl in the middle, toppings around it, Buy pill bottom left, arrows right.
   Seen from straight above, the stage is a lit TABLE: a pool of light under the bowl, darker edges, giant kanji
   lying on the table, and every topping casting a shadow that tells how high it floats.
   --c0..--c3 (light pool, table, table edge, wall) are set from JS while a switch is moving, so the colour melts.
   Everything is scoped to .hero (plus a few page-level rules) so the sections under it are not touched. */
:root {
  --c0: oklch(0.73 0.12 74); --c1: oklch(0.66 0.11 70); --c2: oklch(0.46 0.09 62); --c3: oklch(0.36 0.07 58);
  --c0a: oklch(0.73 0.12 74 / 0);
  --page: oklch(0.17 0.012 55);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Poppins", system-ui, sans-serif; --display: "Titan One", "Poppins", system-ui, sans-serif;
  --pad: clamp(10px, 2.6vw, 44px);
  --line: rgb(255 255 255 / 0.42);
}
[hidden] { display: none !important; }
/* ---------------------------------------------------------------- page to page
   Cross-document view transitions (every page opts in): the logo, the links and the order icon keep their place
   (they slide the few pixels between the hero's bar and this one), the rest crossfades. Off for reduced motion. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 300ms; animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }
::view-transition-group(*) { animation-duration: 300ms; animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1); }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}
/* the hero bar's pieces pair with the calm header's (named only while the stage is on screen, see main.js) */
.hero .logo { view-transition-name: site-logo; }
.hero .pills { view-transition-name: site-links; }
.hero .order-btn { view-transition-name: site-bag; }
.hero.off .logo, .hero.off .pills, .hero.off .order-btn { view-transition-name: none; }
body { margin: 0; font-family: var(--font); background: var(--page); color: #fff; -webkit-font-smoothing: antialiased; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.hero, .hero * { box-sizing: border-box; margin: 0; padding: 0; }
.hero { position: relative; height: 300svh; background: var(--c3); --ink: #fff; color: var(--ink); }
.hero button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hero a { color: inherit; -webkit-tap-highlight-color: transparent; }

/* the stage stays pinned while the hero scrolls; svh so the mobile URL bar never resizes it mid-swipe */
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }

/* the wall round the frame: same hue, a little darker, like the reference. Its <i> fades it into the page
   colour as the stage leaves. */
.wall { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 30% in oklch, var(--c2), var(--c3)); }
.wall i { position: absolute; inset: 0; background: var(--page); opacity: 0; }

.frame {
  position: absolute; inset: var(--pad); border-radius: clamp(14px, 1.6vw, 26px); overflow: hidden; isolation: isolate;
  /* bottom to top: darker corners, the lamp's pool of light round the bowl, the table colour */
  /* bottom to top: the table colour; a wide pool of the lamp's light; a tighter, brighter hot spot just above
     the bowl (the lamp hangs a little toward the viewer, so the light is strongest at the top of the bowl); the
     falloff to darker edges and corners. Together they read as a lit surface, not a flat colour field. */
  background:
    radial-gradient(140% 125% at 50% 42%, transparent 44%, oklch(0.15 0.04 50 / 0.5) 100%),
    radial-gradient(calc(var(--bowl, 300px) * 1.05) calc(var(--bowl, 300px) * 0.85) at 50% calc(50% + var(--cy, 0px) - var(--bowl, 300px) * 0.12) in oklch,
      color-mix(in oklch, var(--c0) 82%, oklch(0.97 0.03 85) 18%), color-mix(in oklch, var(--c0a) 82%, oklch(0.97 0.03 85 / 0) 18%) 100%),
    radial-gradient(calc(var(--bowl, 300px) * 2) calc(var(--bowl, 300px) * 1.65) at 50% calc(50% + var(--cy, 0px)) in oklch, var(--c0), var(--c0a) 100%),
    radial-gradient(90% 95% at 50% 46% in oklch, var(--c1) 30%, var(--c2) 115%);
  box-shadow: 0 0 0 1.5px var(--line), inset 0 0 calc(var(--bowl, 300px) * 0.35) oklch(0.15 0.04 50 / 0.28), 0 30px 80px -30px rgb(0 0 0 / 0.55);
  container-type: size; user-select: none; -webkit-user-select: none; transform-origin: 50% 0;
}
.frame.leaving { will-change: transform; }
/* fine grain on the table only (z 0: under everything that moves, so moving layers never re-blend with it) */
.frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.2; mix-blend-mode: soft-light; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* the stage dims as it leaves (opacity only, set from JS) */
.dim { position: absolute; inset: 0; z-index: 9; background: var(--page); opacity: 0; pointer-events: none; }

/* ---------------------------------------------------------------- kanji lying on the table
   Tone on tone: lighter than the table at the top, fading into it at the bottom, a faint glow. Static paint,
   moved by transform only. */
.kanjis { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.kanji {
  position: absolute; left: 50%; top: 50%; white-space: nowrap; line-height: 1; font-family: "Shippori Mincho", serif; font-weight: 800;
  letter-spacing: -0.02em; color: transparent; will-change: transform; padding: 0.05em 0;
  background: linear-gradient(180deg, rgb(255 250 240 / 0.13) 10%, rgb(255 250 240 / 0.05) 55%, rgb(255 250 240 / 0) 95%);
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 28px rgb(255 245 230 / 0.07));
}

/* ---------------------------------------------------------------- toppings + their shadows */
.layer { position: absolute; inset: 0; pointer-events: none; }
.layer-shadow { z-index: 2; }
.layer-back { z-index: 3; }
.layer-front { z-index: 6; }
/* each topping and each shadow is its own layer; filters are set once per size, so per-frame transforms
   never re-rasterise them */
.bit, .sh { position: absolute; left: 50%; top: 50%; will-change: transform; contain: layout style; }
.bit img, .sh img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.sh img { filter: brightness(0) blur(var(--b, 4px)); }
.sh { opacity: var(--a, 0.4); }
.bit.speck img { filter: drop-shadow(1px 2px 1.5px rgb(30 12 0 / 0.38)); }

/* ---------------------------------------------------------------- giant word */
.words { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.word {
  position: absolute; left: 50%; top: 50%; white-space: nowrap; font-family: var(--display); line-height: 1; color: #fff;
  letter-spacing: 0.015em; will-change: transform; text-transform: uppercase; filter: url(#puff);
}

/* ---------------------------------------------------------------- bowl
   .bowls is moved to the bowl centre (JS). #bowl is the bowl CIRCLE, which is also the drag-to-spin hit area.
   The photo inside can be bigger than the circle (nori overhang): --bs is the manifest bowlScale. */
.bowls { position: absolute; left: 50%; top: 50%; z-index: 5; width: 0; height: 0; will-change: transform; }
.bowl-spin { position: absolute; left: 0; top: 0; width: var(--bowl, 300px); height: var(--bowl, 300px); margin: calc(var(--bowl, 300px) / -2) 0 0 calc(var(--bowl, 300px) / -2); border-radius: 50%; cursor: grab; touch-action: none; }
.bowl-spin:active { cursor: grabbing; }
.bowl-spin:focus-visible { outline: 3px solid #fff; outline-offset: 6px; }
.bowl { position: absolute; inset: 0; will-change: transform; pointer-events: none; }
.bowl .rot { position: absolute; inset: 0; will-change: transform; }
.bowl img { position: absolute; left: 50%; top: 50%; width: calc(var(--bs, 1) * 100%); height: auto; aspect-ratio: 1; translate: -50% -50%; display: block; user-select: none; -webkit-user-drag: none; }
/* three shadows under the bowl, all falling down and a little right like every topping's:
   a tight dark contact line where the foot meets the table, the bowl's body shadow, and a wide ambient darkening */
.bowl .shade {
  position: absolute; inset: 1.5%; border-radius: 50%; will-change: transform;
  box-shadow:
    calc(var(--bowl, 300px) * 0.004) calc(var(--bowl, 300px) * 0.012) calc(var(--bowl, 300px) * 0.018) oklch(0.15 0.04 45 / 0.6),
    calc(var(--bowl, 300px) * 0.022) calc(var(--bowl, 300px) * 0.055) calc(var(--bowl, 300px) * 0.07) oklch(0.15 0.04 45 / 0.42),
    calc(var(--bowl, 300px) * 0.05) calc(var(--bowl, 300px) * 0.13) calc(var(--bowl, 300px) * 0.22) calc(var(--bowl, 300px) * 0.03) oklch(0.15 0.04 45 / 0.3);
}
/* steam: three soft wisps drifting off the broth (static blur, moved by transform and opacity only) */
.steam { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
.steam i {
  position: absolute; left: calc(var(--bowl, 300px) * -0.22); top: calc(var(--bowl, 300px) * -0.3); width: calc(var(--bowl, 300px) * 0.44); height: calc(var(--bowl, 300px) * 0.5);
  border-radius: 50%; background: radial-gradient(closest-side, rgb(255 255 255 / 0.2), rgb(255 255 255 / 0)); filter: blur(14px);
  animation: steam 7s linear infinite; opacity: 0; will-change: transform, opacity;
}
.steam i:nth-child(2) { animation-delay: -2.4s; left: calc(var(--bowl, 300px) * -0.05); }
.steam i:nth-child(3) { animation-delay: -4.7s; left: calc(var(--bowl, 300px) * -0.34); }
@keyframes steam {
  0% { transform: translate(0, 12%) scale(0.6) rotate(0deg); opacity: 0; }
  25% { opacity: 0.9; }
  100% { transform: translate(18%, -70%) scale(1.5) rotate(40deg); opacity: 0; }
}

/* ---------------------------------------------------------------- top bar */
.nav { position: absolute; left: 0; right: 0; top: 0; z-index: 8; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: clamp(8px, 2.4cqh, 24px) clamp(18px, 6cqw, 70px); }
.logo { font-family: var(--display); font-size: clamp(20px, 2.4cqw, 28px); text-decoration: none; justify-self: start; letter-spacing: 0.02em; min-height: 44px; display: inline-flex; align-items: center; }
.pills { display: flex; align-items: center; gap: clamp(2px, 0.8cqw, 8px); font-size: clamp(11px, 1.15cqw, 14px); font-weight: 500; }
/* the link is a 44px tap target; the white pill drawn behind the current page is shorter, like the reference */
.pills a { position: relative; isolation: isolate; min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; text-decoration: none; opacity: 0.9; transition: opacity 150ms, transform 150ms var(--ease-out); white-space: nowrap; }
.pills a:hover { opacity: 1; }
.pills a:active { transform: scale(0.97); }
.pills a[aria-current="page"] { color: var(--pill-ink, #5a3a14); opacity: 1; font-weight: 600; }
.pills a[aria-current="page"]::before { content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 50%; height: 2.3em; margin-top: -1.15em; border-radius: 999px; background: #fff; }
.order-btn { justify-self: end; position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; transition: transform 150ms var(--ease-out); }
.order-btn:active { transform: scale(0.94); }
.order-btn .bag-ico { display: block; transition: translate 180ms var(--ease-out); }
.order-btn:hover .bag-ico { translate: 0 -1.5px; }
/* the count sits on the bag's top right corner, clear of the handle: a dark chip (a white one would melt into the
   white bag) with a ring in the wall colour so it reads as cut out of the bag */
.order-count { position: absolute; right: 1px; top: 7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--pill-ink, #5a3a14); color: #fff; font-size: 10px; font-weight: 700; line-height: 1; display: grid; place-items: center; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 1.5px color-mix(in oklch, var(--c1) 35%, var(--c2)); }
.order-count.pulse { animation: pulse 420ms var(--ease-out); }
@keyframes pulse { 35% { transform: scale(1.35); } }
:is(.logo, .pills a, .order-btn, .arrows button, .buy, .added a):focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 999px; }

/* "added" line under the order icon: a small dark sheet, grows from the icon, not a white card */
.added {
  position: absolute; right: clamp(10px, 5cqw, 60px); top: calc(100% - 6px); display: flex; align-items: center; gap: 4px; white-space: nowrap;
  padding: 4px 6px 4px 16px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: oklch(0.2 0.03 50 / 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12), 0 0 0 1px rgb(255 255 255 / 0.1), 0 18px 40px -18px rgb(0 0 0 / 0.6);
  transform-origin: calc(100% - 22px) 0; animation: pop 200ms var(--ease-out);
}
.added.closing { animation: pop-out 160ms ease-in forwards; pointer-events: none; }
.added a { min-height: 36px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 999px; background: #fff; color: var(--pill-ink, #5a3a14); font-weight: 600; text-decoration: none; transition: transform 150ms var(--ease-out); }
.added a:active { transform: scale(0.97); }
@keyframes pop { from { opacity: 0; transform: scale(0.95); } }
@keyframes pop-out { to { opacity: 0; transform: scale(0.95); } }

/* ---------------------------------------------------------------- buy + copy (bottom left) */
.info { position: absolute; z-index: 8; left: clamp(18px, 9.5cqw, 110px); bottom: clamp(56px, 11cqh, 96px); width: min(290px, 24cqw); }
.buy-row { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(14px, 5cqh, 44px); }
.hero .buy { height: 44px; padding: 0 22px; border-radius: 999px; background: #fff; color: var(--pill-ink, #5a3a14); font-weight: 600; font-size: 13px; transition: transform 150ms var(--ease-out); box-shadow: 0 8px 20px -10px rgb(0 0 0 / 0.5); white-space: nowrap; }
.hero .buy:active { transform: scale(0.97); }
.hero .buy.done { animation: pulse 420ms var(--ease-out); }
.price { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.desc { font-size: clamp(11px, 1.05cqw, 13px); font-weight: 500; line-height: 1.7; text-wrap: pretty; min-height: 5.1em; }
.desc span { display: inline-block; }

/* ---------------------------------------------------------------- arrows (right) */
.arrows { position: absolute; z-index: 8; right: clamp(18px, 7.5cqw, 90px); bottom: clamp(70px, 16cqh, 120px); display: grid; justify-items: center; gap: 8px; }
.arrows button { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgb(255 255 255 / 0.8); display: grid; place-items: center; transition: transform 150ms var(--ease-out), background-color 150ms, color 150ms, opacity 200ms; }
.arrows button:active { transform: scale(0.94); }
.arrows button:disabled { opacity: 0.32; cursor: default; transform: none; }
@media (hover: hover) { .arrows button:not(:disabled):hover { background: #fff; color: var(--pill-ink, #5a3a14); } }
.ix { font-size: 11px; font-weight: 500; opacity: 0.8; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.ix b { font-weight: 700; opacity: 1; }

.hint { position: absolute; z-index: 8; left: 50%; bottom: clamp(18px, 5cqh, 44px); transform: translateX(-50%); font-size: 12px; font-weight: 500; white-space: nowrap; transition: opacity 500ms; pointer-events: none; }
.hint.gone { opacity: 0; }

/* the loader only appears when the bowls take a while (a cold first visit); coming back from another page they
   are cached and ready first, so it never flashes: until then the bare lit table shows, and the bowls drop in */
.loading { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: oklch(0.36 0.07 58); font-family: var(--display); font-size: 40px; color: #fff; text-align: center; padding: 20px;
  opacity: 0; visibility: hidden; animation: loader-in 300ms var(--ease-out) 450ms both; transition: opacity 500ms var(--ease-out), visibility 500ms; }
@keyframes loader-in { from { opacity: 0; visibility: hidden; } to { opacity: 1; visibility: visible; } }
.loading.done { animation: none; opacity: 0; visibility: hidden; }
.loading.error { animation: none; opacity: 1; visibility: visible; }
.loading.error { font-family: var(--font); font-size: 16px; }

/* ---------------------------------------------------------------- portrait (phones, tablets upright):
   word and bowl in the upper middle, copy and Buy Now under them, arrows at the bottom right by the thumb */
@container (max-aspect-ratio: 1/1) {
  .nav { grid-template-columns: auto 1fr auto; padding: 6px 8px 6px 14px; }
  .pills { justify-self: center; font-size: 11.5px; gap: 0; }
  .pills a { padding: 0 9px; }
  .info { left: 20px; right: 82px; width: auto; bottom: 30px; }
  .buy-row { margin-bottom: 12px; }
  .desc { font-size: 12px; line-height: 1.6; min-height: 4.8em; }
  .arrows { right: 16px; bottom: 26px; gap: 6px; }
  .hint { display: none; }
  .added { right: 8px; }
}
@container (max-aspect-ratio: 1/1) and (min-width: 600px) {
  .nav { padding: 18px 28px; }
  .pills { font-size: 13px; gap: 6px; }
  .pills a { padding: 0 14px; }
  .info { left: 40px; right: auto; width: min(340px, 55cqw); bottom: 60px; }
  .desc { font-size: 13px; }
  .arrows { right: 36px; bottom: 60px; }
}
/* very narrow phones: the logo would push the links into the order button */
@container (max-aspect-ratio: 1/1) and (max-width: 359px) {
  .logo { font-size: 18px; }
  .pills a { padding: 0 6px; }
  .pills { font-size: 10.5px; }
}
/* short landscape (phone on its side): hide the hint, tighten the copy */
@container (min-aspect-ratio: 1/1) and (max-height: 480px) {
  .hint { display: none; }
  .info { bottom: 24px; }
  .buy-row { margin-bottom: 8px; }
  .desc { line-height: 1.5; min-height: 4.5em; }
  .arrows { bottom: 24px; gap: 4px; }
  .ix { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .steam i { animation: none; opacity: 0.5; transform: translate(9%, -30%); }
  .buy, .arrows button, .pills a, .hint { transition: none; }
  .added, .added.closing, .order-count.pulse, .hero .buy.done, .bag-ico.catch { animation: none; }
  .order-btn:hover .bag-ico { translate: none; }
}
