/* Back to basics (27 Nov 2026): the table fills the first screen and the only thing on it is your hand holding the
   phone. The phone follows the pointer (or a drag) and its screen shows a live camera view of the table under it.
   No labels, no app UI, nothing happens on scroll yet. */

.scene-stage { position: relative; height: 100vh; height: 100lvh; /* the largest window: on a phone the page runs under Safari's toolbar, so the first screen is all picture */ overflow: hidden; background: #f3ead9; touch-action: pan-y; }
/* iPhone Safari: the page paints to the bottom of the screen, but 100lvh stops about 58pt short of it (measured on an iPhone 18 Pro,
   iOS 26: lvh 754, svh 714, screen 874 with a 62pt status bar). The stage grows by that strip, so the picture reaches the bottom edge. */
@supports (-webkit-touch-callout: none) { .scene-stage { --under: 58px; height: calc(100lvh + var(--under)); } }
.cam { position: absolute; left: 0; top: 0; width: calc(max(100vw, 100lvh) * 1.2); /* 1.0 would be the table just covering the screen (as far out as it goes without showing an edge); 1.2 zooms in a fifth, and the table slides a little every way */ aspect-ratio: 1; transform: translate(var(--cx, 0px), var(--cy, 0px)); will-change: transform; }
.cam .table { display: block; width: 100%; height: 100%; max-width: none; }

.hand-layer {
  /* hand-*.webp: the arm runs off the bottom-right corner. The screen centre (35.7% across, 39.4% down) rests at the
     middle of the stage, two thirds down. */
  --hw: min(65vw, 82lvh);
  position: absolute; z-index: 2; width: var(--hw); aspect-ratio: 1536 / 2720;
  left: calc(50% - 0.357 * var(--hw)); top: calc(66lvh - 0.6977 * var(--hw));
  translate: var(--hx, 0px) var(--hy, 0px); pointer-events: none;
}
.screen { position: absolute; left: 20.83%; top: 23.13%; width: 29.63%; height: 32.57%; border-radius: 14% / 6.5%; overflow: hidden; background: #111; }
.screen .vf-img { position: absolute; left: 0; top: 0; max-width: none; height: auto; transform-origin: 0 0; } /* height: auto, or the height attribute stretches it */
.hand { position: absolute; inset: 0; width: 100%; height: 100%; }
/* The logo at the top centre, as a sticker: the white outline is drawn in the svg (a rounded outline, see logo-sticker.svg), the soft shadow here. */
.logo-sticker { position: absolute; z-index: 8; left: 50%; top: max(14px, calc(env(safe-area-inset-top, 0px) + 10px)); width: clamp(72px, 16vw, 112px); height: auto; translate: -50% 0; /* the svg carries 6 units of room round the logo for its outline */ pointer-events: none;
  filter: drop-shadow(0 4px 7px rgba(0, 0, 0, 0.32)); }
.arm-ext { display: none; } /* phones only, see the max-width rule below */

/* The phone shows the app's own camera (app/src/components/CameraCard.tsx): glass close button top right, library
   bottom left, shutter bottom centre. Sizes are the app's, as a share of its 402 pt screen (cqw). */
.screen { container-type: inline-size; }
.glass { position: absolute; display: grid; place-items: center; width: 11.9cqw; height: 11.9cqw; border-radius: 50%; background: rgba(255, 255, 255, 0.55); }
.glass svg { fill: #000; }
.glass-close { top: 5cqw; right: 5cqw; }
.glass-close svg { width: 5.5cqw; height: 5.5cqw; }
.glass-library { bottom: 24.2cqw; left: 8cqw; } /* level with the shutter */
.glass-library svg { width: 6cqw; height: 6cqw; }
.shutter { position: absolute; left: 50%; bottom: 20.2cqw; /* centred, underneath the thumb (measured on hand-*.webp) */ width: 19.9cqw; height: 19.9cqw; translate: -50% 0; padding: 0; border-radius: 50%; border: 1cqw solid rgba(255, 255, 255, 0.55); background: transparent; display: grid; place-items: center; cursor: pointer; pointer-events: auto; }
.shutter span { width: 15.9cqw; height: 15.9cqw; border-radius: 50%; background: #fff; transition: scale 0.12s ease; }
.shutter span { transition: scale 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.16s ease; }
.shutter.pressed span { scale: 0.8; background-color: #e9e9e9; transition-duration: 0.08s; }
/* The hand and phone dip together as the thumb presses (transform adds to the aiming translate). */
.hand-layer { transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1); }
.hand-layer.pressing { transform: translateY(3px) scale(0.996); transition-duration: 0.08s; }
.shutter::after { content: ""; position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 100%; height: 100%; min-width: 44px; min-height: 44px; } /* hit area of at least 44 by 44, the drawn button is unchanged */
.shutter:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.flash.on { opacity: 0.85; transition: none; }

/* Photos land in a stack at the bottom middle, like the app's PhotoStack: the newest
   on top, two more fanned out behind. The button waits for the first photo. */
.shots { position: absolute; z-index: 3; left: 50%; translate: -50% 0; bottom: calc(max(24px, env(safe-area-inset-bottom, 0px)) + 100lvh - 100svh + var(--under, 0px)); /* lvh minus svh is the height of Safari's toolbar: stay above it */ display: grid; justify-items: center; gap: 16px; cursor: auto; }
/* Each photo has the phone screen's shape (455 by 886). */
.shot-stack { position: relative; width: var(--tile); height: calc(var(--tile) / 0.5137); --tile: 72px; }
.shot-stack:empty { display: none; }
.tile { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 10px; background: #fff; box-shadow: 0 10px 22px rgba(0, 0, 0, 0.32), 0 2px 6px rgba(0, 0, 0, 0.22); transition: translate 0.35s cubic-bezier(0.22, 1, 0.36, 1), rotate 0.35s cubic-bezier(0.22, 1, 0.36, 1), scale 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease; }
.tile.flying { position: fixed; z-index: 10; transition: none; pointer-events: none; }
.shot-box { position: relative; }
/* Clear the stack and start over: a small round X on the stack's top right corner, with a 44 px tap target. */
.clear-shots { position: absolute; z-index: 2; top: -22px; right: -26px; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; }
.clear-shots::before { content: ""; position: absolute; width: 26px; height: 26px; border-radius: 50%; background: #000; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.clear-shots svg { position: relative; width: 12px; height: 12px; fill: #fff; }
.clear-shots:focus-visible { outline: 3px solid #000; outline-offset: -4px; border-radius: 50%; }
.clear-shots[hidden] { display: none; }
.analyze[hidden] { display: none; }
.analyze { cursor: pointer; }
.analyze { animation: rise 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes rise { from { opacity: 0; translate: 0 12px; } }
@media (max-width: 899px) { .shot-stack { --tile: 52px; } .shots { gap: 12px; } }
@media (prefers-reduced-motion: reduce) { .tile, .shutter span, .flash { transition: none; } .analyze { animation: none; } }

/* With a mouse the phone is the pointer. */
/* The mouse cursor stays visible over the table (Georgina, 2 Dec 2026); it was hidden so only the phone showed. */

@media (max-width: 899px) {
  .hand-layer { --hw: min(105vw, 71lvh); top: calc(64lvh - 0.6977 * var(--hw)); --arm-m: 14; }
  /* The arm photo ends in two cut edges, which stop the phone rising on a phone. Two copies of the photo's bottom 12.5% (rows
     2379 to 2720, sleeve only, from where the right cut starts) sit behind the hand, stretched along the sleeve (slope 0.502,
     measured on hand-1536.webp) so the arm carries on past the bottom of the window. matrix(1, 0, c, m, 0, 0) stretches by m
     and shears by c. The front copy has c = 0.502 * (m - 1), which keeps the sleeve's left edge straight. The back copy has
     c = 0.502 * m, which keeps the right edge on the true line and fills the sliver the front copy leaves there (the photo's
     right cut). reachUp (scene-logic.mjs) is told how far it reaches. */
  .arm-ext { display: block; position: absolute; left: 0; top: 87.46%; width: 100%; height: 12.54%; pointer-events: none; background: url(assets/hero/hand-900.webp) 0 100% / 100% 797.4% no-repeat; transform-origin: 0 0; transform: matrix(1, 0, calc(0.502 * (var(--arm-m) - 1)), var(--arm-m), 0, 0); }
  /* The photo's last 12.5% (the sleeve from where the right cut starts) fades into the copies behind it, so its bottom edge is not a seam. */
  .hand { -webkit-mask-image: linear-gradient(to bottom, #000 87.5%, transparent); mask-image: linear-gradient(to bottom, #000 87.5%, transparent); }
  .arm-ext-r { transform: matrix(1, 0, calc(0.502 * var(--arm-m)), var(--arm-m), 0, 0); }

  /* Touch: drag the phone itself in any direction. */
  .screen { pointer-events: auto; touch-action: none; }
  .shutter { pointer-events: auto; }
}

/* Analyze: the table blurs and the hand brings the phone up close to the middle, then the app runs in it. */
.cam { transition: filter 0.7s ease, scale 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.scene-stage.analyzing .cam { scale: 1.04; }
/* A radial blur: the table stays sharp around the phone and blurs and darkens toward the edges, so the eye goes to the
   phone without losing the scene. */
.focus-blur { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity 0.7s ease;
  -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
  -webkit-mask-image: radial-gradient(ellipse 42% 52% at 50% 50%, transparent 35%, #000 100%); mask-image: radial-gradient(ellipse 42% 52% at 50% 50%, transparent 35%, #000 100%);
  background: radial-gradient(ellipse 60% 70% at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.28) 100%); }
.scene-stage.analyzing .focus-blur { opacity: 1; }
.scene-stage.analyzing .hand-layer { opacity: 0; transition: opacity 0.35s ease; }
.scene-stage.analyzing .shots { opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.scene-stage.analyzing { cursor: auto; }
.app-phone { position: absolute; z-index: 6; left: var(--px); top: var(--py); width: var(--pw); height: var(--ph); transform-origin: 0 0; }
.app-phone[hidden] { display: none; }
/* A plain iPhone: a black bezel 2.6% of the screen width, the same corner shape as the screen in the hand photo. */
/* The hand keeps holding the phone (thumb on the edge so the app stays clear): hand-side-*.webp, placed so its screen
   hole (20.83% across, 23.13% down, 29.63% of its width) lands on the zoomed screen. */
.app-hand { position: absolute; z-index: 2; pointer-events: none; max-width: none; height: auto; /* or the height attribute stretches it */ width: calc(var(--pw) / 0.2963); left: calc(var(--pw) / 0.2963 * -0.2083); top: calc(var(--pw) / 0.2963 * 1.7708 * -0.2313); }
.app-screen { position: absolute; inset: 0; overflow: hidden; border-radius: 14% / 6.5%; background: #000; container-type: inline-size; box-shadow: 0 0 0 4px #000; /* the photo's glass edge is antialiased, so the pixel past the screen is part see-through; this ring sits under the frame and fills it */ }
/* Screens are drawn at the app's own size, 402 points wide, and scaled to the phone. */
.app-canvas { position: absolute; left: 0; top: 0; width: 402px; height: calc(402px / 0.5137); transform-origin: 0 0; scale: var(--app-scale, 1); } /* --app-scale set by scene.js */
/* Served: the phone is put down, the blur clears and the view settles on your plate (plate-patch: the same table after
   you served yourself, with a portion taken from each dish). scene.js sets the zoom (plateView). */
.cam .plate { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; opacity: 0; transition: opacity 0.7s ease; }
.scene-stage.served .cam .plate { opacity: 1; }
/* The plate at full resolution over the patch (build-hero.py PLATE_BOX), so the zoom stays sharp. */
.cam .plate-hd { left: 29.67%; top: 35.29%; right: auto; bottom: auto; width: 40.66%; height: auto; } /* the place setting in the middle of the table (build-table.py prints these) */
.scene-stage.served .cam { transition: transform 1.6s cubic-bezier(0.65, 0, 0.35, 1), scale 1.6s cubic-bezier(0.65, 0, 0.35, 1); }
.scene-stage.served .focus-blur { opacity: 0; transition-duration: 1s; }
/* On the plate: a glass card on each portion with its food icon, name and calories. scene.js places them (plateSpot);
   they come in one after another once the zoom has settled. */
.plate-labels { position: absolute; inset: 0; z-index: 5; margin: 0; padding: 0; list-style: none; pointer-events: none; font-family: ui-rounded, "SF Pro Rounded", "Inter", sans-serif; }
.plate-label { position: absolute; translate: -50% -50%; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 16px; background: rgba(40, 24, 10, 0.34); border: 1px solid rgba(255, 255, 255, 0.55); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22); -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6); color: #fff; white-space: nowrap; opacity: 0; scale: 0.9; transition: opacity 0.35s ease, scale 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
.scene-stage.served .plate-label { opacity: 1; scale: 1; transition-delay: calc(1.5s + var(--i) * 0.15s); }
.plate-icon { flex: none; width: 30px; height: 30px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.plate-icon img { width: 72%; height: 72%; object-fit: contain; }
.plate-label > span:last-child { display: grid; gap: 1px; }
.plate-label b { font-size: 14px; font-weight: 600; }
.plate-label b + span { font-size: 12.5px; font-weight: 500; color: rgba(255, 255, 255, 0.92); }
@media (max-width: 599px) {
  .plate-label { gap: 6px; padding: 5px 10px 5px 5px; border-radius: 14px; }
  .plate-icon { width: 26px; height: 26px; }
  .plate-label b { font-size: 13px; }
  .plate-label b + span { font-size: 12px; }
}
/* A fresh start: the view zooms back out to the table and the hand and phone come back. */
.scene-stage.resetting .cam { transition: transform 1.1s cubic-bezier(0.65, 0, 0.35, 1), scale 1.1s cubic-bezier(0.65, 0, 0.35, 1); }
.scene-stage.resetting .hand-layer { transition: opacity 0.5s ease 0.6s; }
.scene-stage.returning .hand-layer { transition: opacity 0.2s ease 0.25s; } /* back to the camera: the hand takes the phone as it lands */
.scene-stage .shots { transition: opacity 0.3s ease; }
@media (prefers-reduced-motion: reduce) { .cam, .scene-stage.analyzing .hand-layer, .scene-stage.served .cam, .cam .plate, .scene-stage.resetting .cam, .plate-label { transition: none; } }
/* Pulling down at the top of the page while the app plays takes it back to the camera: no rubber band, which would move the page under it. */
html:has(.scene-stage.analyzing) { overscroll-behavior-y: none; }
/* No pull-to-refresh or rubber band while the hero is on screen: dragging the phone down from the top reloaded the page on iOS (2 Dec 2026). */
html:has(.scene-stage), html:has(.scene-stage) body { overscroll-behavior-y: none; }

/* The hero tongue: the title and the waitlist form on a glass lip hanging from the top edge, the logo sticker over it. */
.tongue { position: absolute; z-index: 7; top: 0; left: 50%; translate: -50% 0; width: min(96%, 44rem); pointer-events: none; padding: calc(max(14px, env(safe-area-inset-top, 0px) + 10px) + clamp(88px, 22vw, 150px) * 0.8 + 20px) clamp(8px, 4vw, 28px) clamp(22px, 4.5vw, 34px); text-align: center; transition: translate 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.tongue { animation: tongue-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.15s backwards; }
@keyframes tongue-in { from { translate: -50% calc(-100% - 60px); } }
.tongue.away, .scene-stage.analyzing:not(.served) .tongue { translate: -50% calc(-100% - 60px); }
.tongue::before { content: ""; position: absolute; z-index: -1; inset: -20px -45% -100px; pointer-events: none; background: radial-gradient(closest-side, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.25) 55%, rgba(255, 255, 255, 0) 100%); backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px); -webkit-mask-image: radial-gradient(closest-side, #000 25%, rgba(0, 0, 0, 0.6) 55%, rgba(0, 0, 0, 0.2) 80%, transparent 100%); mask-image: radial-gradient(closest-side, #000 25%, rgba(0, 0, 0, 0.6) 55%, rgba(0, 0, 0, 0.2) 80%, transparent 100%); } /* a radial blur of the table behind the text, no box */
.tongue-title, .tongue-sub { text-shadow: 0 0 22px rgba(255, 255, 255, 0.9), 0 2px 8px rgba(255, 255, 255, 0.65); }
.tongue-title { margin: 0; font-size: clamp(1.3rem, min(7.4vw, 5.6vh), 2.9rem); line-height: 1.06; font-weight: 700; letter-spacing: -0.03em; color: #000; }
.tongue-title span:not(.sr) { display: block; white-space: nowrap; }
/* Cally at the bottom middle of the hero, under the phone, with a narrow speech bubble above him. He steps aside once photos are taken. */
.hero-cally { position: absolute; z-index: 5; left: 50%; translate: -50% 0; bottom: calc(max(14px, env(safe-area-inset-bottom, 0px)) + 100lvh - 100svh + var(--under, 0px)); display: flex; flex-direction: column; align-items: center; gap: 9px; pointer-events: none; transition: opacity 0.3s ease; }
.scene-stage:has(.shot-stack:not(:empty)) .hero-cally:not(.hero-cally-2), .scene-stage.analyzing .hero-cally:not(.hero-cally-2), .scene-stage.served .hero-cally:not(.hero-cally-2) { opacity: 0; }
.cally { flex: none; width: clamp(60px, 16vw, 76px); height: auto; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)); }
.cally-say { position: relative; margin: 0; padding: 9px 14px; border-radius: 16px; background: #fff; color: #000; font-size: clamp(0.9375rem, 3.9vw, 1.0625rem); font-weight: 600; line-height: 1.3; text-align: center; max-width: 12.5rem; text-wrap: balance; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.3); }
.cally-say::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 12px; height: 12px; margin-left: -6px; border-radius: 2px; background: #fff; rotate: 45deg; }
/* Send it to Cally, the analyze button (Georgina, 2 Dec 2026): white with black text, lifted on a deep shadow so it stands off the table, with a shimmer sweeping across
   and Cally peeking up from the bottom left with her fork and spoon (the grip loop). Her ledge sits on the button's bottom edge
   and her hands below it are trimmed; the top of her hair pokes out over the button. The shimmer is clipped by its own rounded
   box, so the button itself does not clip her. */
.analyze { position: relative; isolation: isolate; min-height: 48px; padding: 0 20px 0 74px; background: var(--white); color: var(--black); box-shadow: 0 16px 30px -10px rgba(0, 0, 0, 0.6), 0 4px 10px rgba(0, 0, 0, 0.2); }
.analyze:hover { background: var(--white); filter: brightness(0.97); }
.analyze-cally { position: absolute; z-index: 1; left: 0; bottom: 0; width: 74px; translate: 0 calc(0.166 * 100%); clip-path: inset(-40px -40px calc(0.166 * 100%) -40px); }
.analyze::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(105deg, transparent 35%, rgba(0, 0, 0, 0.07) 50%, transparent 65%) no-repeat; /* a soft grey sheen: white would not show on white */ background-size: 200% 100%; animation: analyze-shimmer 2.4s ease-in-out 0.4s infinite; pointer-events: none; }
@keyframes analyze-shimmer { 0% { background-position: 200% 0; } 45%, 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .analyze::after { animation: none; display: none; } .tongue { transition: none; animation: none; } }

.untyped { visibility: hidden; }
.tongue-sub { margin: 10px 0 0; font-size: clamp(0.9375rem, 3.6vw, 1.125rem); line-height: 1.35; font-weight: 500; color: #1f1f1f; text-wrap: balance; }

/* Cally's entrance after the tongue drops in: he comes up from the bottom edge, the bubble pops, then the line types (scene.js). */
.cally { animation: cally-up 0.6s cubic-bezier(0.34, 1.4, 0.64, 1) 1s backwards; }
.cally-say { transform-origin: 50% 100%; animation: bubble-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 1.55s backwards; }
@keyframes cally-up { from { translate: 0 130%; } }
@keyframes bubble-pop { from { opacity: 0; scale: 0.6; } }
@media (prefers-reduced-motion: reduce) { .cally, .cally-say { animation: none; } }

/* The plate scene: the title is back, and Cally returns at the bottom with a second bubble that points down the page. */
.hero-cally-2 { opacity: 0; z-index: 6; } /* above the plate labels */
.scene-stage.served .hero-cally-2 { opacity: 1; }
.hero-cally-2 .cally, .hero-cally-2 .cally-say { animation: none; }
.hero-cally-2 .cally-say { width: max-content; } /* the box is sized by the full line, so it cannot change shape while the line types */
.scene-stage.served .hero-cally-2 .cally { animation: cally-up 0.6s cubic-bezier(0.34, 1.4, 0.64, 1) 1.1s backwards; }
.scene-stage.served .hero-cally-2 .cally-say { animation: bubble-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 1.65s backwards; }
@media (prefers-reduced-motion: reduce) { .scene-stage.served .hero-cally-2 .cally, .scene-stage.served .hero-cally-2 .cally-say { animation: none; } }

/* In the plate scene the title moves to the middle of the table, on top of the chillis, and gets bigger (scene.js sets --sx and --sy);
   the second Cally sits at the bottom right. */
.tongue { transition: translate 0.6s cubic-bezier(0.22, 1, 0.36, 1), top 0.9s cubic-bezier(0.22, 1, 0.36, 1), padding 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.scene-stage.served .tongue { top: var(--sy, 56%); translate: -50% -50%; width: min(96%, 80rem); padding-top: 24px; padding-bottom: 24px; } /* wide enough for the big nowrap title lines, so the text stays centred on the box */
.scene-stage.served .tongue::before { inset: -50px -14% -60px; opacity: 1; }
.scene-stage.served .tongue-title { font-size: clamp(2.1rem, min(8.4vw, 9vh), 4.6rem); transition: font-size 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.scene-stage.served .tongue-sub { font-size: clamp(1.0625rem, min(3.8vw, 3vh), 1.5rem); }
@media (max-width: 1000px) { .scene-stage.served .tongue-title span:not(.sr) { display: inline; white-space: normal; } }
.scene-stage.served .hero-cally-2 { left: auto; right: max(14px, env(safe-area-inset-right, 0px)); translate: 0; align-items: flex-end; }
.scene-stage.served .hero-cally-2 .cally { margin-right: 6px; }
.scene-stage.served .hero-cally-2 .cally-say::after { left: auto; right: 26px; margin-left: 0; }

/* The food cards on the plate match the page's floating cards: white, soft deep shadow, the kcal in the app's blue with a bar for its share of the meal. */
.plate-label { background: #fff; color: #000; border: 1px solid rgba(0, 0, 0, 0.06); box-shadow: 0 18px 34px -16px rgba(0, 0, 0, 0.45), 0 3px 10px rgba(0, 0, 0, 0.08); -webkit-backdrop-filter: none; backdrop-filter: none; }
.plate-icon { background: #eef5fd; }
.plate-label > span:last-child { min-width: 64px; }
.plate-label b + span { color: #1f7fd6; font-weight: 700; font-variant-numeric: tabular-nums; }
.plate-bar { display: block; width: 100%; height: 4px; margin-top: 4px; border-radius: 2px; background: #e8eaed; overflow: hidden; }
.plate-bar u { display: block; width: var(--w); height: 100%; border-radius: 2px; background: #1f7fd6; transform-origin: left; scale: 0 1; transition: scale 0.8s cubic-bezier(0.22, 1, 0.36, 1) calc(1.9s + var(--i, 0) * 0.15s); }
.scene-stage.served .plate-bar u { scale: 1 1; }
@media (prefers-reduced-motion: reduce) { .plate-bar u { transition: none; } }

/* Smaller cards, placed round the outside of the plate (scene.js placeLabels) so the plate stays in view. No text shadow: dark text on white. */
.plate-label { gap: 6px; padding: 4px 10px 4px 4px; border-radius: 13px; box-shadow: 0 12px 24px -14px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.08); }
.plate-icon { width: 24px; height: 24px; }
.plate-label b { font-size: 13px; }
.plate-label b + span { font-size: 12px; }
.plate-bar { height: 3px; margin-top: 3px; }
@media (max-width: 599px) {
  .plate-label { gap: 5px; padding: 3px 8px 3px 3px; border-radius: 12px; }
  .plate-icon { width: 22px; height: 22px; }
  .plate-label b { font-size: 12.5px; }
}

/* The hero title sits on the left. It fades out while the phone is over it and back in once the phone has moved away (scene.js sets --fade from how close the phone is). */
.tongue { width: 100%; text-align: left; padding-left: clamp(20px, 5vw, 72px); padding-right: clamp(20px, 5vw, 72px); }
.tongue::before { inset: -40px calc(100% - var(--gw, 62%)) -80px -40px; opacity: var(--glow, 1); transition: opacity 0.45s ease; }
.tongue-title, .tongue-sub { width: fit-content; max-width: 100%; opacity: var(--fade, 1); transition: opacity 0.45s ease; }
.tongue-sub { text-wrap: wrap; }
/* Wide windows: a narrow column on the left, so the phone at rest in the middle does not cover it. */
@media (min-width: 900px) {
  .tongue-title, .tongue-sub { max-width: min(42vw, 40rem); }
  .scene-stage:not(.served) .tongue-title span:not(.sr) { display: inline; white-space: normal; }
  .scene-stage:not(.served) .tongue-title { font-size: clamp(2.4rem, min(5.2vw, 8vh), 5rem); }
}
@media (max-width: 899px) { .tongue::before { inset: -40px -10% -80px -10%; } }
.scene-stage.served .tongue { text-align: center; padding-left: 8px; padding-right: 8px; }
.scene-stage.served .tongue-title, .scene-stage.served .tongue-sub { margin-inline: auto; max-width: none; opacity: 1; }
.scene-stage.served .tongue-title { transition: font-size 0.9s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease; }
@media (prefers-reduced-motion: reduce) { .tongue-title, .tongue-sub { transition: none; } }

/* The title is a plate on the table (Georgina, 28 Nov): it is part of the picture, so it never fades or hides, and it is placed by scene.js
   (placeTitle) where the table has a clear space. Sized in --d, the plate's diameter. */
.table-title { position: absolute; z-index: 1; left: 0; top: 0; width: var(--d, 300px); aspect-ratio: 1; display: grid; place-content: center; justify-items: center; padding: calc(var(--d, 300px) * 0.07) calc(var(--d, 300px) * 0.15) calc(var(--d, 300px) * 0.17); text-align: center; pointer-events: none; }
/* The place setting is a generated picture (title-place.webp, Higgsfield: plate with the fork and spoon either side and their soft shadows), centred on the plate, so it is wider than the plate. */
.table-title::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 150.6%; aspect-ratio: 1800 / 1302; translate: -50% -50%; background: url(assets/hero/title-place.webp) center / 100% 100% no-repeat; }
.plate-logo { width: calc(var(--d, 300px) * 0.26 * var(--k, 1)); height: auto; margin: 0 0 calc(var(--d, 300px) * 0.04 * var(--k, 1)); }
.tt-h { margin: 0; font-size: calc(var(--d, 300px) * 0.09 * var(--k, 1)); line-height: 1.04; font-weight: 700; letter-spacing: -0.03em; color: #000; text-wrap: balance; }
.tt-h .tt-cally { display: inline-block; position: relative; width: 1.9em; height: 0.8em; margin: 0 0.02em; vertical-align: baseline; } /* sits low on the line, her ledge just under the baseline (Georgina, 2 Dec 2026) */
.tt-h .tt-cally img, .tt-h .tt-cally video { position: absolute; inset: auto; left: 0; bottom: -0.52em; width: 100%; height: 1.48em; } /* drawn over the line, so she never stretches the line spacing (Georgina, 2 Dec 2026) */
.tt-s { white-space: nowrap; margin: calc(var(--d, 300px) * 0.04 * var(--k, 1)) 0 0; font-size: max(12px, calc(var(--d, 300px) * 0.04 * var(--k, 1))); line-height: 1.3; font-weight: 500; color: #3d3d3d; text-wrap: balance; }
.scene-stage.served .table-title, .scene-stage.analyzing .table-title { opacity: 0; }
/* The big title only shows once the plate is served (the plate scene); before that the plate on the table carries it. */
.tongue { opacity: 0; transition: opacity 0.6s ease; }
/* no big title in the plate scene any more: the served plate stands alone */
.tongue::before { display: none; }
.scene-stage.served .tongue::before { display: block; }
/* The logo lives on the plate until the plate scene, then returns to the top centre. It stays put. */
.logo-sticker { left: 50%; translate: -50% 0; }
@media (prefers-reduced-motion: reduce) { .logo-sticker, .tongue { transition: none; } }
.logo-sticker { opacity: 0; transition: translate 0.25s ease-out, opacity 0.4s ease; }
.scene-stage.served .logo-sticker, .scene-stage.analyzing .logo-sticker { opacity: 1; }

/* The plate as the phone's camera sees it: the same plate, drawn over the camera view (scene.js keeps it on the table). */
.screen .table-title { z-index: 0; transition: none; }
.screen .table-title::before { background-image: url(assets/hero/title-place.webp); }

/* Cally at the bottom loops: up, bubble pops and types, holds, then the bubble pops away and he ducks down, and again (scene.js). */
.hero-cally.is-out .cally { animation: cally-down 0.45s cubic-bezier(0.5, 0, 0.75, 0) forwards; }
.hero-cally.is-out .cally-say { animation: bubble-out 0.3s ease-in forwards; }
.hero-cally.again .cally { animation-delay: 0.05s; }
.hero-cally.again .cally-say { animation-delay: 0.5s; }
@keyframes cally-down { to { translate: 0 130%; } }
@keyframes bubble-out { to { opacity: 0; scale: 0.6; } }
@media (prefers-reduced-motion: reduce) { .hero-cally.is-out .cally, .hero-cally.is-out .cally-say { animation: none; } }

/* Cally's bubble sits on the mascot in the title (its own layer on the table, under the hand and phone; scene.js places it) and pops in, types, then pops out, on a loop. The mascot itself stays still. */
.plate-say { position: absolute; z-index: 1; /* on the table, under the hand and phone */ left: 0; top: 0; width: 10.5em; max-width: none; text-wrap: balance; padding: 0.5em 0.8em; border-radius: 1em; font-size: clamp(15px, calc(var(--d, 300px) * 0.052 * var(--k, 1)), 17px); font-weight: 600; line-height: 1.3; text-align: left; opacity: 0; animation: none; pointer-events: none; transform-origin: 50% 100%; }
.plate-say.in { opacity: 1; animation: bubble-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) backwards; }
.plate-say.out { opacity: 0; animation: bubble-out 0.3s ease-in backwards; }
.scene-stage.served .plate-say, .scene-stage.analyzing .plate-say, .scene-stage.served .cam-say { display: none; }
.screen .cam-say { z-index: 1; width: 10.5em; max-width: none; font-size: max(11px, calc(var(--d, 300px) * 0.052 * var(--k, 1))); }
.screen .cam-say::after { width: 8px; height: 8px; margin-left: -4px; bottom: -3px; }
@keyframes bubble-out { from { opacity: 1; scale: 1; } to { opacity: 0; scale: 0.6; } }
@media (prefers-reduced-motion: reduce) { .plate-say.in, .plate-say.out { animation: none; } }

/* More room inside the bubbles and the food cards. */
.hero-cally-2 .cally-say { padding: 14px 26px; border-radius: 22px; }
.plate-say { padding: 0.6em 1em; }
.plate-label { padding: 7px 18px 7px 9px; gap: 9px; border-radius: 15px; }
@media (max-width: 599px) { .plate-label { padding: 6px 15px 6px 8px; gap: 8px; } .hero-cally-2 .cally-say { padding: 12px 22px; } }

/* Each table picture comes in three layouts (wide, 4:3, phone), chosen in the markup by the window's shape. */
.cam picture, .screen picture { display: contents; }

/* On a phone the table is zoomed in more (1.5 times the longer side), so the dishes and the title plate are bigger on the small screen. */
@media (max-width: 899px) { .cam { width: calc(max(100vw, 100lvh) * 1.5); } }
/* On a phone the table rises past its bottom edge so the phone can sit on the bottom row of dishes (scene.js, placeAim over). Under the
   table the cloth carries on: the same cloth, flipped, so its lines meet the table's at the edge. */
@media (max-width: 899px) { .cam::after { content: ""; position: absolute; left: 0; top: calc(100% - 1px); /* 1 px under the table, so no hairline shows at the join */ width: 100%; height: 40%; background: url(assets/hero/layers/cloth.webp) 0 100% / 100% 250%; transform: scaleY(-1); pointer-events: none; } }

/* The intro: only the cloth to start with, the title plate slides in, then the dishes one after another from the sides, then the phone comes in where the pointer is
   (scene.js intro). The finished table picture takes over the moment the last dish has landed. */
.intro .cam { background: #f3ead9 url(assets/hero/layers/cloth.webp) 0 0 / 100% 100%; }
.intro .cam picture, .intro .cam .plate-hd { visibility: hidden; }
.intro .hand-layer, .intro .shots, .intro .table-title, .intro .plate-say { visibility: hidden; }
.intro-layers { position: absolute; inset: 0; pointer-events: none; }
.intro-item { position: absolute; will-change: translate; }
.intro-item img { display: block; width: 100%; height: auto; }

/* The last thing to arrive on the served plate: a strip like the app's summary strip (black, Cally peeking over its right end), saying what Cally does. scene.js places it in the middle of the plate. */
.plate-strip { position: absolute; z-index: 6; left: 0; top: 0; translate: -50% -50%; display: flex; align-items: center; min-height: 68px; padding: 14px 92px 14px 22px; border-radius: 16px; background: #000; color: #fff; font-size: clamp(19px, 1.7vw, 26px); font-weight: 600; line-height: 1.3; letter-spacing: -0.005em; box-shadow: 0 14px 28px -12px rgba(0, 0, 0, 0.5); pointer-events: none; opacity: 0; scale: 0.8; transition: opacity 0.3s ease, scale 0.2s ease; }
.plate-strip { width: max-content; max-width: calc(100vw - 24px); }
.plate-strip .strip-text { white-space: nowrap; text-align: left; }
@media (max-width: 599px) { .plate-strip { font-size: clamp(17px, 5.2vw, 21px); padding: 12px 82px 12px 18px; } /* bigger on phones (Georgina, 2 Dec 2026: was 16px), as large as the width allows */ .plate-strip .strip-cally { width: 80px; } }
.plate-strip .strip-cally { position: absolute; right: -4px; bottom: -6px; width: 92px; }
.scene-stage.served .plate-strip { opacity: 1; scale: 1; transition: opacity 0.3s ease 2.4s, scale 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 2.4s; }
/* Cally's other line, on that mascot: pops in, types, pops out, again (scene.js). */
.scroll-say { display: none; position: absolute; z-index: 7; left: 0; top: 0; width: 9.9em; max-width: none; padding: 0.6em 1em; border-radius: 1em; font-size: 16px; font-weight: 600; line-height: 1.3; text-align: left; text-wrap: balance; opacity: 0; animation: none; pointer-events: none; transform-origin: 50% 100%; }
.scene-stage.served .scroll-say { display: block; }
.scroll-say.in { opacity: 1; animation: bubble-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) backwards; }
.scroll-say.out { opacity: 0; animation: bubble-out 0.3s ease-in backwards; }
.scroll-say { transform-origin: 80% 0; }
.scroll-say::after { right: 24px; left: auto; margin-left: 0; top: -5px; bottom: auto; }
@media (prefers-reduced-motion: reduce) { .plate-strip { transition: none; } .scene-stage.served .plate-strip { transition: none; } .scroll-say.in, .scroll-say.out { animation: none; } }

.strip-eyebrow { display: block; margin-bottom: 4px; font-size: 0.72em; font-weight: 700; letter-spacing: 0.04em; color: #2f92e8; }

/* After the intro the phone waits for Cally's first line to finish typing (scene.js enterPhone). */
.phone-wait .hand-layer, .phone-wait .shots { visibility: hidden; }

/* Until the pointer has moved a little the page does not scroll (scene.js). The gutter stays so nothing shifts when it lets go. */
html.hold-scroll { overflow-y: hidden; scrollbar-gutter: stable; }

/* Dragging the camera around the table must not select the title or other text (Georgina, 2 Dec 2026). The email field and
   buttons are outside the scene, and taps still work. */
.scene { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.scene img { -webkit-user-drag: none; }

/* Served plate: one shimmer sweeps across your plate after the phone goes down, before the strip pops in (Georgina, 2 Dec 2026).
   Masked by the plate picture, so only the plate and its food shine, not the cloth. Same box as .plate-hd. */
.cam .plate-shine { position: absolute; left: 29.67%; top: 35.29%; width: 40.66%; aspect-ratio: 1500 / 1085; pointer-events: none; opacity: 0;
  background: linear-gradient(110deg, transparent 38%, rgba(255, 255, 255, 0.6) 50%, transparent 62%) 160% 0 / 260% 100% no-repeat;
  -webkit-mask: url(assets/hero/plate-hd.webp) center / 100% 100% no-repeat; mask: url(assets/hero/plate-hd.webp) center / 100% 100% no-repeat; }
.scene-stage.served .cam .plate-shine { animation: plate-shine 1s ease-in-out 1.35s both; }
@keyframes plate-shine { 0% { opacity: 0; background-position: 160% 0; } 15%, 80% { opacity: 1; } 100% { opacity: 0; background-position: -60% 0; } }
@media (prefers-reduced-motion: reduce) { .scene-stage.served .cam .plate-shine { animation: none; } }
