@font-face { font-family: "Archivo"; src: url("../fonts/archivo-latin.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }

:root {
  --red: #e8452c;
  --red-deep: #c7351f;
  --gold: #f0a93b;
  --cream: #fbf5ec;
  --ink: #1b1310;
  --gut: clamp(14px, 3vw, 40px);
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --out: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: #120d0b; color: var(--cream); font-family: var(--sans); -webkit-font-smoothing: antialiased; touch-action: none; user-select: none; -webkit-user-select: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

#stage, .still { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.still { display: none; object-fit: cover; }
.no-gl .still { display: block; }
.no-gl #stage { display: none; }

/* ---------- top bar ---------- */
.top { position: fixed; z-index: 30; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 16px; padding: 14px var(--gut); background: linear-gradient(rgba(18, 13, 11, 0.55), transparent); }
.logo { width: 52px; height: 52px; }
.steps { list-style: none; display: flex; gap: 6px; margin: 0 auto; counter-reset: s; }
.steps li { counter-increment: s; display: flex; align-items: center; gap: 7px; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(18, 13, 11, 0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(251, 245, 236, 0.6); transition: background 0.3s, color 0.3s; }
.steps li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(251, 245, 236, 0.12); font-size: 11px; }
.steps li.on { background: var(--red); color: #fff; }
.steps li.on::before { background: #fff; color: var(--red); }
.steps li.done::before { content: "\2713"; background: var(--gold); color: var(--ink); }
.sound { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; gap: 3px; background: rgba(18, 13, 11, 0.55); }
.sound span { width: 3px; height: 4px; border-radius: 2px; background: var(--cream); transition: height 0.3s; }
.sound[aria-pressed="true"] span { animation: eq 0.9s ease-in-out infinite; }
.sound[aria-pressed="true"] span:nth-child(2) { animation-delay: -0.3s; }
.sound[aria-pressed="true"] span:nth-child(3) { animation-delay: -0.6s; }
@keyframes eq { 50% { height: 16px; } }

.vapor { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 16; pointer-events: none; }

/* ---------- hotspots ---------- */
.hotspots { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.hot { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; border-radius: 18px; transition: opacity 0.4s, transform 0.4s var(--spring); }
.hot::after, .hot::before { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; }
.hot::after { border: 3px solid #fff; background: rgba(232, 69, 44, 0.55); box-shadow: 0 0 24px rgba(255, 255, 255, 0.55), 0 2px 10px rgba(0, 0, 0, 0.4); }
.hot::before { border: 2px solid rgba(255, 255, 255, 0.9); animation: ping 1.8s var(--out) infinite; }
.hot.quiet::after, .hot.quiet::before { width: 30px; height: 30px; margin: -15px 0 0 -15px; }
.hot.quiet::after { background: rgba(232, 69, 44, 0.75); }
.hot.picked::after { background: var(--gold); }
@keyframes ping { 0% { transform: scale(0.9); opacity: 0.9; } 80%, 100% { transform: scale(2.1); opacity: 0; } }
.hot:hover, .hot:focus-visible { background: rgba(255, 255, 255, 0.1); }
.hot:active { transform: translate(-50%, -50%) scale(0.95); }
.hot .tag { position: absolute; left: 50%; bottom: -8px; transform: translate(-50%, 100%); white-space: nowrap; padding: 5px 10px; border-radius: 999px; background: rgba(18, 13, 11, 0.8); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0; transition: opacity 0.2s; }
.hot:hover .tag, .hot:focus-visible .tag, .hot.picked .tag { opacity: 1; }
.hot .count { position: absolute; right: 6px; top: 6px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 900; font-size: 13px; display: none; place-items: center; }
.hot.picked .count { display: grid; }
.hotspots.off .hot { opacity: 0; pointer-events: none; }

/* ---------- the bowl in your hands ---------- */
.hands { position: fixed; z-index: 15; left: 50%; bottom: 0; width: min(560px, 74vw, 62vh); aspect-ratio: 1; transform: translate(-50%, 105%); transition: transform 0.9s var(--spring); pointer-events: none; }
.hands.up { transform: translate(-50%, 16%); }
.hands.walking { animation: carry 0.55s ease-in-out infinite alternate; }
@keyframes carry { from { translate: 0 0; } to { translate: 0 10px; } }
.hands-img { width: 100%; height: 100%; display: block; }
.bowl-in { position: absolute; left: var(--bx, 51%); top: var(--by, 58%); width: var(--bw, 56%); height: var(--bh, 38%); transform: translate(-50%, -50%); border-radius: 50%; overflow: hidden; }
/* the broth is the real surface of that broth, cut from its bowl photo (the script sets --surface as a full URL: a
   relative one would resolve from this stylesheet's folder); it pours in from the middle and a soft glint drifts over it */
.broth-fill { position: absolute; inset: 3%; border-radius: 50%; opacity: 0; transform: scale(0.2); transition: opacity 0.6s, transform 1.2s var(--out); background: var(--surface, radial-gradient(closest-side, var(--b1, #c7351f), var(--b2, #8a1f10))) center / cover; box-shadow: inset 0 -8px 16px rgba(0, 0, 0, 0.4), inset 0 6px 10px rgba(0, 0, 0, 0.25); }
.broth-fill::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(40% 26% at 34% 30%, rgba(255, 244, 220, 0.16), rgba(255, 244, 220, 0) 70%); animation: glint 4s ease-in-out infinite alternate; }
@keyframes glint { to { transform: translate(14%, 8%); } }
.broth-fill.on { opacity: 1; transform: none; }
.items { position: absolute; inset: 0; }
.items img { position: absolute; width: var(--s); left: var(--x); top: var(--y); transform: translate(-50%, -50%) rotate(var(--r)) scaleY(0.62); filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.5)); animation: land 0.5s var(--spring) both; }
/* once the broth is in, everything sits in it: the lower part of each piece sinks under the surface */
.bowl-in.souped .items img { -webkit-mask-image: linear-gradient(to bottom, #000 40%, rgba(0, 0, 0, 0.3) 92%); mask-image: linear-gradient(to bottom, #000 40%, rgba(0, 0, 0, 0.3) 92%); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35)) brightness(0.96); transition: filter 0.8s; }
@keyframes land { from { opacity: 0; transform: translate(-50%, -220%) rotate(var(--r)) scaleY(0.62) scale(1.4); } }
.weight { position: absolute; right: 2%; top: 30%; padding: 8px 14px; border-radius: 999px; background: var(--cream); color: var(--ink); font-weight: 900; font-size: 14px; opacity: 0; transition: opacity 0.3s; }
.weight b { font-size: 20px; }
.hands.has .weight { opacity: 1; }
.fly { position: fixed; z-index: 16; pointer-events: none; width: 90px; transform: translate(-50%, -50%); filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.45)); }

/* ---------- prompt and buttons ---------- */
.bubble { position: fixed; z-index: 20; left: 50%; top: 86px; transform: translateX(-50%); max-width: min(560px, 92vw); padding: 12px 20px; border-radius: 16px; background: rgba(18, 13, 11, 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); text-align: center; font-weight: 700; font-size: 16px; line-height: 1.35; transition: opacity 0.4s, transform 0.5s var(--out); }
.bubble.hide { opacity: 0; transform: translate(-50%, -10px); }
.bubble b { color: var(--gold); }
.actions { position: fixed; z-index: 25; right: var(--gut); bottom: calc(var(--gut) + 30px); display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 24px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 900; font-size: 14px; letter-spacing: 0.03em; text-transform: uppercase; text-decoration: none; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); transition: background 0.2s, transform 0.3s var(--spring), opacity 0.3s; animation: pop 0.5s var(--spring) both; }
.btn:hover { background: var(--red-deep); transform: translateY(-2px); }
.btn:disabled { opacity: 0.4; pointer-events: none; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.9); } }
.link { font-weight: 800; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--red); }

.zoom-btn { position: fixed; z-index: 25; right: 12px; bottom: calc(46vw + 74px); padding: 8px 14px; border-radius: 999px; background: rgba(18, 13, 11, 0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.zoom-btn[hidden] { display: none; }

/* ---------- served at the table ---------- */
.served { position: fixed; z-index: 12; inset: 0; pointer-events: none; perspective: 900px; }
/* the bowl you filled, set down upright: its photo already has the angle, the sides and the shadow, so nothing is tilted in 3D */
.served-bowl { position: absolute; left: 50%; top: 74%; width: min(380px, 56vw, 50vh); aspect-ratio: 1; transform: translate(-50%, -62%) scale(0.9); opacity: 0; transition: transform 1.1s var(--spring), opacity 0.5s; filter: drop-shadow(0 24px 22px rgba(0, 0, 0, 0.45)); }
.served.on .served-bowl { opacity: 1; transform: translate(-50%, -50%); }
.served-bowl > img { width: 100%; height: 100%; display: block; }
/* the pieces you picked, inside the broth's surface (the surface ellipse in the bowl photo) */
.served-items { position: absolute; left: 20%; top: 30%; width: 60%; height: 42%; border-radius: 50%; overflow: hidden; }
.served-items img { position: absolute; width: var(--s); left: var(--x); top: var(--y); transform: translate(-50%, -50%) rotate(var(--r)) scaleY(0.78); filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.4)) brightness(0.94) saturate(1.08);
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, rgba(0, 0, 0, 0.3) 95%); mask-image: linear-gradient(to bottom, #000 45%, rgba(0, 0, 0, 0.3) 95%); }
.steam { position: absolute; left: 50%; top: 30%; width: min(520px, 80vw); height: 50%; transform: translateX(-50%); opacity: 0; transition: opacity 1.2s; }
.served.on .steam { opacity: 1; }

/* ---------- the end card ---------- */
.end { position: fixed; z-index: 28; left: var(--gut); bottom: 52px; transform: translateY(14px); max-width: 380px; padding: 26px 28px; border-radius: 22px; background: rgba(18, 13, 11, 0.78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); opacity: 0; pointer-events: none; transition: opacity 0.8s, transform 0.9s var(--out); }
.end.on { opacity: 1; transform: none; pointer-events: auto; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.end h1 { font-weight: 900; font-size: clamp(32px, 3.6vw, 48px); line-height: 0.95; text-transform: uppercase; letter-spacing: -0.02em; margin: 10px 0 12px; }
.end p:not(.eyebrow) { color: rgba(251, 245, 236, 0.78); line-height: 1.5; margin-bottom: 20px; }
.end-ctas { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

.credit { position: fixed; z-index: 30; right: var(--gut); bottom: 8px; font-size: 11px; color: rgba(251, 245, 236, 0.7); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); }

.loader { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; align-content: center; gap: 14px; background: #120d0b; transition: opacity 0.8s, visibility 0s linear 0.8s; }
.loader img { width: 110px; animation: pulse 1.6s ease-in-out infinite; }
.loader p { font-weight: 800; letter-spacing: 0.2em; font-size: 12px; color: rgba(251, 245, 236, 0.6); }
@keyframes pulse { 50% { transform: scale(1.06); } }
.loaded .loader { opacity: 0; visibility: hidden; }

@media (max-width: 760px) {
  .steps li { font-size: 0; padding: 4px; gap: 0; }
  .logo { width: 44px; height: 44px; }
  .bubble { top: 74px; font-size: 15px; }
  .actions { left: var(--gut); right: var(--gut); align-items: stretch; bottom: calc(46vw + 10px); }
  .bubble small { font-size: 12px; font-weight: 600; color: rgba(251, 245, 236, 0.7); }
  .hands { width: 82vw; }
  .hands.up { transform: translate(-50%, 24%); }
  .end { left: 12px; right: 12px; top: 74px; bottom: auto; transform: translateY(-12px); max-width: none; padding: 16px 18px; }
  .end.on { transform: none; }
  .end h1 { font-size: 30px; margin: 6px 0 8px; }
  .end p:not(.eyebrow) { display: none; }
  .end h1 { font-size: 26px; }
  .end .btn { height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* phones turned sideways: short screens get the compact end card */
@media (max-height: 500px) and (orientation: landscape) {
  .end { bottom: 14px; max-width: 280px; padding: 14px 16px; border-radius: 16px; }
  .end h1 { font-size: 22px; margin: 4px 0 8px; }
  .end p:not(.eyebrow) { display: none; }
  .end .btn { height: 40px; padding: 0 16px; font-size: 12px; }
  .end-ctas { gap: 14px; }
}
