@font-face { font-family: "GB Sign"; src: url(/fonts/archivo-black.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "GB Hand"; src: url(/fonts/kalam-bold.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "GB Text"; src: url(/fonts/barlow-semibold.woff2) format("woff2"); font-weight: 600; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #111317; color: #e9edf3; }
body { font-family: "GB Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-weight: 600; }

.scene { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; isolation: isolate;
  display: grid; grid-template-rows: auto 1fr auto; }
.bg, .bg img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.bg img { object-fit: cover; object-position: 50% 45%; transform: scale(1.03); }
.shade { position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255,250,235,.10), transparent 55%),
    linear-gradient(180deg, rgba(10,12,16,.55) 0%, rgba(10,12,16,.25) 40%, rgba(10,12,16,.78) 100%); }

.top { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: clamp(20px, 5vh, 56px) 20px 0; text-align: center; }
.brand { margin: 0; line-height: 0; }
.brand img { width: clamp(200px, 30vw, 400px); height: auto; filter: drop-shadow(0 4px 18px rgba(0,0,0,.55)); }
.sign { margin: 0; font-family: "GB Sign", Impact, sans-serif; text-transform: uppercase; letter-spacing: .12em;
  font-size: clamp(15px, 1.7vw, 22px); color: #ffd9ef; padding: .45em 1em; border: 2px solid #ff69b4; border-radius: 10px;
  text-shadow: 0 0 6px #ff4fa8, 0 0 18px rgba(255,79,168,.6); box-shadow: 0 0 14px rgba(255,79,168,.45), inset 0 0 12px rgba(255,79,168,.3);
  background: rgba(20,10,18,.45); animation: frame-buzz 9.3s steps(1) infinite; }
.sign .rewind { display: inline-block; animation: flick-pink 5.7s steps(1) infinite; }
.sign .closed { display: inline-block; color: #9fb6ff; text-shadow: 0 0 6px #4f7dff, 0 0 16px rgba(79,125,255,.6); margin-left: .5em;
  animation: flick-blue 3.9s steps(1) infinite; }
/* Neon flicker: uneven step timings, a different rhythm per word and for the
   tube frame, so the pattern never lines up and reads as a failing sign. */
@keyframes flick-pink {
  0%, 100% { opacity: 1; }
  7% { opacity: 0; } 8% { opacity: 1; } 9.5% { opacity: 0; } 11% { opacity: 1; }
  38% { opacity: 0; } 39% { opacity: 1; }
  61% { opacity: 0; } 62.5% { opacity: 1; } 63% { opacity: 0; } 65% { opacity: 1; }
  88% { opacity: 0; } 88.8% { opacity: 1; } }
@keyframes flick-blue {
  0%, 100% { opacity: 1; }
  14% { opacity: 0; } 15% { opacity: 1; } 16% { opacity: 0; } 19% { opacity: 0; } 21% { opacity: 1; }
  47% { opacity: 0; } 48.5% { opacity: 1; }
  72% { opacity: 0; } 80% { opacity: 0; } 81% { opacity: 1; } 82% { opacity: 0; } 83.5% { opacity: 1; } }
@keyframes frame-buzz {
  0%, 100% { border-color: #ff69b4; box-shadow: 0 0 14px rgba(255,79,168,.45), inset 0 0 12px rgba(255,79,168,.3); }
  23% { border-color: #7a3a5c; box-shadow: none; } 24% { border-color: #ff69b4; box-shadow: 0 0 14px rgba(255,79,168,.45), inset 0 0 12px rgba(255,79,168,.3); }
  57% { border-color: #7a3a5c; box-shadow: none; } 58.2% { border-color: #ff69b4; box-shadow: 0 0 14px rgba(255,79,168,.45), inset 0 0 12px rgba(255,79,168,.3); } }

.tagline { margin: 0; max-width: 34em; font-size: clamp(12px, 1.1vw, 16px); color: rgba(233,237,243,.85); letter-spacing: .02em; text-shadow: 0 1px 4px rgba(0,0,0,.85); }

/* Ellie: full-body art (union crop of every pose, soles at 99.6% of the
   image), anchored to the bottom edge of the screen with her feet just below
   it. To swap a pose or crop, change only these variables:
     --ellie-ratio  width / height of the trimmed image (1040 x 2270)
     --ellie-h      how tall she is on screen
     --ellie-drop   how far below the screen edge her image extends
   The bubble is a plain rounded box (no tail) placed in her own container
   units, clear of her head and body. In the crop her head spans roughly
   31-67% of the width and 2-17% of the height. */
.scene { --ellie-ratio: 0.4581; --ellie-drop: calc(var(--ellie-h) * .02);
  /* as tall as fits under the centred header (~140px + 4.8vw tall) */
  --ellie-h: min(calc((100svh - 140px - 4.8vw) / .98), 1500px); }
.clerk { position: absolute; left: 0; right: 0; bottom: calc(-1 * var(--ellie-drop)); z-index: 0;
  display: flex; justify-content: center; align-items: flex-end; pointer-events: none; }
.ellie-wrap { --w: calc(var(--ellie-h) * var(--ellie-ratio)); position: relative; width: var(--w);
  margin-left: calc(var(--w) * 0.74); container-type: inline-size; }
/* Shadow on the wrapper, not the <img>, so the bitmap itself is never resampled by a filter. */
.ellie { display: block; line-height: 0; filter: drop-shadow(0 10px 30px rgba(0,0,0,.6)); }
.ellie img { display: block; width: 100%; height: auto; }

/* Wide and medium landscape screens: bubble to her left, its right edge just
   left of her hair (28% of her width), top level with her eyes. */
.bubble { position: absolute; z-index: 1; margin: 0; pointer-events: auto;
  right: calc(100% - 26cqw); top: 5.5%; width: 96cqw;
  font-family: "GB Hand", "Comic Sans MS", cursive; font-size: 6.6cqw; line-height: 1.2; color: #18161c;
  background: #fdf6e4; border: max(2px, .5cqw) solid #141418; border-radius: 5cqw; padding: 3.8cqw 4.8cqw;
  box-shadow: 0 2cqw 6cqw rgba(0,0,0,.45); }

/* Portrait screens (phones, tablets) and narrow windows: bubble above her
   head, centred on her, never wider than the screen. */
@media (max-aspect-ratio: 1/1), (max-width: 760px) {
  .scene { --ellie-h: min(68svh, calc(78vw / var(--ellie-ratio)), 1300px); }
  .ellie-wrap { margin-left: 0; }
  .bubble { right: auto; left: 50%; top: auto; bottom: calc(100% + 1.5cqw); transform: translateX(-50%);
    width: min(150cqw, calc(100vw - 32px)); font-size: max(17px, 8.4cqw); text-align: center; padding: 4cqw 6cqw; border-radius: 7cqw; }
}
/* Very short landscape windows: keep her and the header apart. */
@media (min-aspect-ratio: 1/1) and (max-height: 520px) { .scene { --ellie-h: max(62svh, calc((100svh - 120px) / .98)); } }

@media (prefers-reduced-motion: reduce) { .sign, .sign .rewind, .sign .closed { animation: none; opacity: 1; } }
.scene.lost .bubble a { color: #b0367a; }
