@font-face { font-family: 'Inter Tight'; font-weight: 400; font-display: swap; src: url('/fonts/inter-tight-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter Tight'; font-weight: 500; font-display: swap; src: url('/fonts/inter-tight-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter Tight'; font-weight: 600; font-display: swap; src: url('/fonts/inter-tight-600.woff2') format('woff2'); }

/* Registered so the gradient colours interpolate during the flow */
@property --c1 { syntax: '<color>'; inherits: true; initial-value: #c2635a; }
@property --c2 { syntax: '<color>'; inherits: true; initial-value: #1b8d9c; }
@property --c3 { syntax: '<color>'; inherits: true; initial-value: #203a7a; }

:root {
  --flow: 2200ms;
  --ease: cubic-bezier(.45, .05, .25, 1);
  --bg: #0a0b10;
  --text: #f4f2ef;
  --muted: rgba(244, 242, 239, .85);
  --ink: #0d0f14;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
/* Background on html only: a body background would paint over the z-index:-1 .stage */
html { background: var(--bg); }
body {
  font-family: 'Inter Tight', system-ui, sans-serif; color: var(--text); overflow: hidden;
  -webkit-font-smoothing: antialiased;
  transition: --c1 var(--flow) var(--ease), --c2 var(--flow) var(--ease), --c3 var(--flow) var(--ease);
}
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Background */
.stage { position: fixed; inset: 0; overflow: hidden; isolation: isolate; z-index: -1; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); transition: transform var(--flow) var(--ease); animation: drift 18s ease-in-out infinite alternate; }
.b1 { width: 70vmax; height: 70vmax; left: -25vmax; top: 4vh; background: var(--c1); opacity: .6; }
.b2 { width: 85vmax; height: 85vmax; right: -40vmax; top: 18vh; background: var(--c2); opacity: .7; animation-delay: -6s; }
.b3 { width: 70vmax; height: 70vmax; left: -5vmax; bottom: -10vh; background: var(--c3); opacity: .65; animation-delay: -12s; }
@keyframes drift { from { translate: 0 0; } to { translate: 4vw -3vh; } }
.grain { position: absolute; inset: 0; opacity: .05; background-image: radial-gradient(rgba(255,255,255,.4) .5px, transparent .6px); background-size: 3px 3px; }
.vig { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(5,6,10,.85)); }

/* Header */
.top { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: max(18px, env(safe-area-inset-top)) 22px 0; z-index: 5; }
.mark { font-size: 12px; letter-spacing: .14em; }
.link { background: none; border: 0; color: var(--muted); font-size: 13px; min-height: 44px; padding: 0 4px; }

/* Shared controls */
.glass { position: relative; background: rgba(255,255,255,.05); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 0; box-shadow: 0 10px 34px rgba(0,0,0,.35); }
.glass::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(120deg, color-mix(in srgb, var(--c1) 80%, white), rgba(255,255,255,.12) 50%, color-mix(in srgb, var(--c2) 75%, white));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.solid { background: rgba(255,255,255,.92); color: var(--ink); border: 0; font-weight: 600; }
.solid:disabled { opacity: .5; cursor: default; }
.btn { min-height: 52px; border-radius: 999px; font-size: 15px; font-weight: 500; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
/* A flex column: the card flows from the top, the actions sit at the bottom, and the card
   scrolls rather than ever running underneath the buttons on a short screen. */
main { position: fixed; inset: 0; display: flex; flex-direction: column; padding: 0 22px max(28px, env(safe-area-inset-bottom)); }
.actions { position: relative; flex: none; width: 100%; max-width: 520px; margin: auto auto 0; display: flex; flex-direction: column; gap: 10px; }
.text-link { background: none; border: 0; color: var(--muted); font-size: 13px; min-height: 44px; }

/* Stack card */
.copy { position: relative; flex: 0 1 auto; min-height: 0; overflow-y: auto; width: 100%; max-width: 528px; margin: 112px auto 20px; padding: 0 4px; transition: opacity 450ms ease, transform 450ms ease; touch-action: pan-y; }
.copy.out-left { opacity: 0; transform: translateX(-40px); }
.copy.out-up { opacity: 0; transform: translateY(-24px); }
.copy.in { opacity: 0; transform: translateY(18px); transition: none; }
.copy.dim { opacity: .45; }
.kick { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.syn { margin: 0; font-size: clamp(22px, 6.6vw, 30px); line-height: 1.22; letter-spacing: -.01em; font-weight: 400; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.meta { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* Services (S1) */
.services { position: absolute; left: 22px; right: 22px; top: 96px; max-width: 520px; margin: 0 auto; }
h1 { font-size: clamp(28px, 8vw, 38px); line-height: 1.08; font-weight: 500; letter-spacing: -.02em; margin: 0; }
.sub { color: var(--muted); font-size: 14px; line-height: 1.45; margin: 10px 0 0; }
.cloud { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.pill { border-radius: 999px; min-height: 44px; padding: 0 16px; font-size: 14px; }
.pill[aria-pressed="true"] { background: rgba(255,255,255,.92); color: var(--ink); }
.pill[aria-pressed="true"]::before { display: none; }

/* Message screens */
.message { position: absolute; left: 26px; right: 26px; bottom: 210px; max-width: 520px; margin: 0 auto; }
.message h2 { font-size: 26px; font-weight: 500; letter-spacing: -.01em; margin: 0; }

/* Guess form */
.guess-form { display: flex; flex-direction: column; gap: 12px; }
.guess-form input { min-height: 52px; border-radius: 16px; border: 0; padding: 0 16px; font: inherit; font-size: 16px; color: var(--text); background: rgba(255,255,255,.08); }

/* Reveal sheet (R3) */
.scrim { position: fixed; inset: 0; background: rgba(5,6,10,.25); z-index: 8; }
.sheet { position: fixed; left: 8px; right: 8px; bottom: 8px; max-width: 560px; margin: 0 auto; z-index: 9; border-radius: 28px; padding: 14px 20px max(20px, env(safe-area-inset-bottom));
  background: rgba(20,22,30,.55); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  max-height: calc(100dvh - 16px); overflow-y: auto; overscroll-behavior: contain;
  transform: translateY(110%); transition: transform 380ms var(--ease); touch-action: pan-y; }
.sheet.open { transform: translateY(0); }
.sheet::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(120deg, color-mix(in srgb, var(--c1) 70%, white), rgba(255,255,255,.08) 50%, color-mix(in srgb, var(--c2) 65%, white));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.grab { width: 40px; height: 5px; border-radius: 9px; background: rgba(255,255,255,.3); margin: 0 auto 14px; }
.sheet h2 { font-size: clamp(26px, 7vw, 34px); line-height: 1.05; font-weight: 500; letter-spacing: -.02em; margin: 6px 0; }
.sheet .by { font-size: 13px; color: var(--muted); }
.sheet .stack { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.rating { display: flex; gap: 8px; }
.rating button { flex: 1; min-height: 52px; border-radius: 16px; font-size: 17px; }

@media (prefers-reduced-motion: reduce) {
  :root { --flow: 600ms; }
  .blob { animation: none; }
  .copy { transition: opacity 200ms ease; }
  .copy.out-left, .copy.out-up, .copy.in { transform: none; }
  .sheet { transition: opacity 200ms ease; transform: none; opacity: 0; }
  .sheet.open { opacity: 1; }
}
