/* =========================================================
   STOEFFEL-MEDIA PLAY: styles for the hub and both game pages
   Tokens match the main website (css/style.css): dark #202020, orange #f08932, Outfit.
   ========================================================= */

/* --- Fonts (self-hosted, same files as the website) --- */
@font-face {
  font-family: 'Outfit'; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url('../fonts/outfit-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit'; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url('../fonts/outfit-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Tokens & base --- */
:root {
  --bg: #202020; --bg-deep: #181818; --bg-deeper: #141414;
  --accent: #f08932; --accent-dim: rgba(240, 137, 50, .14); --accent-glow: rgba(240, 137, 50, .25);
  --text: #ffffff; --muted: #8e8e8e; --border: rgba(255, 255, 255, .08);
  --radius: 14px;
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--bg); }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }

/* --- Buttons --- */
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; font-size: 15px; border: 0; border-radius: 99px; padding: 11px 20px; cursor: pointer; background: var(--accent); color: var(--bg); transition: transform .2s ease, background .2s ease; }
.btn:hover { color: var(--bg); background: #f59a4d; transform: translateY(-1px); }
.btn.ghost { background: none; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { border-color: var(--accent); }

/* =========================================================
   CHOOSER (index.html): compact, made to sit inside the website popup
   ========================================================= */
.chooser { background: var(--bg-deep); }
.pick { max-width: 1040px; min-height: 100%; margin: 0 auto; padding: 18px var(--gutter-r) 22px var(--gutter-l); display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.pick-line { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 400; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; gap: 12px; } }

.gcard { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; color: var(--text); transition: border-color .25s ease, transform .25s ease; }
.gcard:hover, .gcard:focus-visible { color: var(--text); border-color: rgba(240, 137, 50, .55); transform: translateY(-2px); }
.gcard .shot { display: block; aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden; background: var(--bg-deeper); border-bottom: 1px solid var(--border); }
@media (max-width: 640px) { .gcard .shot { aspect-ratio: 2 / 1; } }
.gcard .shot picture { display: contents; }
.gcard .shot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.25, 1, .5, 1); }
.gcard:hover .shot img { transform: scale(1.04); }
.gc-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.gc-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.gc-title strong { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.chip { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.gc-text { font-size: 14.5px; line-height: 1.5; color: var(--text); }
.gc-how { font-size: 13px; line-height: 1.5; color: var(--muted); }
.gc-how b { color: var(--accent); font-weight: 600; }
.gc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 6px; }
.gc-foot .btn { padding: 9px 18px; font-size: 14px; }
.gcard:hover .gc-foot .btn { background: #f59a4d; }
.gc-foot .best { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gc-foot .best b { color: var(--text); }
.pick-site { margin: 0; font-size: 13px; }
.secret { margin: 0; padding: 12px 16px; border-radius: 12px; font-size: 14px; color: var(--text); background: linear-gradient(135deg, rgba(255, 216, 107, .18), rgba(240, 137, 50, .12)); border: 1px solid rgba(255, 216, 107, .5); animation: tip-in .5s cubic-bezier(.25, 1, .5, 1) both; }
.secret b { color: #ffd86b; }

/* =========================================================
   GAME PAGES (scope-creep.html, pixel-perfect.html)
   ========================================================= */
.game-page { overflow: hidden; overscroll-behavior: none; }
.stage { position: fixed; inset: 0; background: var(--bg-deeper); display: flex; flex-direction: column; }
.bar { display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top, 0px)) var(--gutter-r) 10px var(--gutter-l); border-bottom: 1px solid var(--border); background: var(--bg-deep); }
.back { font-size: 14px; color: var(--text); border: 1px solid var(--border); border-radius: 99px; padding: 6px 12px; white-space: nowrap; }
.back:hover { border-color: var(--accent); color: var(--text); }
.gname { margin: 0; font-size: inherit; line-height: inherit; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud { display: flex; gap: 12px; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); white-space: nowrap; }
.hud b { color: var(--text); font-weight: 600; }
.snd { flex: none; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border-radius: 99px; border: 1px solid var(--border); background: none; color: var(--muted); cursor: pointer; transition: color .2s ease, border-color .2s ease; }
.snd:hover { color: var(--text); border-color: var(--accent); }
.snd[aria-pressed="true"] { color: var(--accent); border-color: rgba(240, 137, 50, .5); }
.snd svg { width: 16px; height: 16px; }
/* attention: pulse + wiggle until the visitor has tried sound once */
.bar { position: relative; z-index: 2; }
.snd.nudge { color: var(--accent); border-color: var(--accent); animation: snd-pulse 1.8s ease-out infinite; }
.snd.nudge svg { animation: snd-wiggle 1.8s ease-in-out infinite; }
@keyframes snd-pulse { 0% { box-shadow: 0 0 0 0 rgba(240, 137, 50, .65); } 70% { box-shadow: 0 0 0 14px rgba(240, 137, 50, 0); } 100% { box-shadow: 0 0 0 0 rgba(240, 137, 50, 0); } }
@keyframes snd-wiggle { 0%, 55%, 100% { transform: none; } 65% { transform: scale(1.3) rotate(-14deg); } 75% { transform: scale(1.3) rotate(12deg); } 85% { transform: scale(1.15); } }
.snd-tip { position: absolute; top: calc(100% + 10px); right: var(--gutter-r); background: var(--accent); color: var(--bg); font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 10px; white-space: nowrap; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); pointer-events: none; animation: tip-in .45s cubic-bezier(.25, 1, .5, 1) both, tip-bob 2s ease-in-out .5s infinite; transition: opacity .35s ease; }
.snd-tip::before { content: ''; position: absolute; top: -6px; right: 12px; width: 12px; height: 12px; background: var(--accent); transform: rotate(45deg); border-radius: 2px; }
.snd-tip.out { opacity: 0; }
@keyframes tip-in { from { opacity: 0; transform: translateY(-8px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes tip-bob { 0%, 100% { transform: none; } 50% { transform: translateY(3px); } }
.snd-card svg { width: 17px; height: 17px; }
.span-link { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: rgba(31, 158, 143, .12); border: 1px solid rgba(31, 158, 143, .45); color: var(--text) !important; font-size: 14px !important; }
.span-link img { flex: none; border-radius: 5px; margin-top: 1px; }
.span-link b { color: #5fd0c2; }
.span-link a { color: #5fd0c2; font-weight: 600; white-space: nowrap; }
.span-link a:hover { color: var(--text); }
.linkish { align-self: flex-start; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; color: var(--muted); text-decoration: none; cursor: pointer; }
.linkish:hover { color: var(--accent); }
.goal { line-height: 1.55; }
.goal .goal-t { display: block; margin-bottom: 2px; color: var(--accent); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 520px) { .bar { gap: 8px; } .snd { width: 32px; height: 32px; } }
.snd-card.is-on { color: var(--accent); border-color: rgba(240, 137, 50, .5); }
@media (max-width: 520px) { .gname { display: none; } .hud { margin-left: auto; gap: 10px; font-size: 12px; } .back .t { display: none; } }
.wrap { position: relative; flex: 1; min-height: 0; margin-bottom: env(safe-area-inset-bottom, 0px); }
canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }
.no-cursor canvas { cursor: none; } /* Scope Creep: the orange blob is the cursor */

.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(20, 20, 20, .5); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); overflow-y: auto; }
.overlay.bottom { align-items: flex-end; background: linear-gradient(rgba(20, 20, 20, 0) 45%, rgba(20, 20, 20, .92)); }
.card { background: var(--bg-deep); border: 1px solid var(--border); border-radius: 16px; padding: 24px; max-width: 380px; width: 100%; display: flex; flex-direction: column; gap: 12px; }
.card h1, .card h3 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
/* no single words alone on the last line (supported in current Chrome, Edge and Safari) */
p, dd, .ctrls, .gc-text, .gc-how, .toast { text-wrap: pretty; }
h1, h2, h3, .card h1, .card h3, .gc-title strong { text-wrap: balance; }
/* cursor skins on the Scope Creep start card */
.skins-label { margin-bottom: -4px !important; }
.skins { display: flex; flex-wrap: wrap; gap: 6px; }
.skin { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 5px; border-radius: 99px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.skin .sw { width: 18px; height: 18px; border-radius: 50%; flex: none; }
.skin.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.skin:disabled { cursor: default; color: var(--muted); }
.skin:disabled .sw { filter: grayscale(1) brightness(.5); }
/* badge / unlock pop-up */
.toast { position: absolute; top: 66px; left: 50%; z-index: 5; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); padding: 10px 16px 10px 12px; border-radius: 14px; background: rgba(24, 24, 24, .96); border: 1px solid rgba(240, 137, 50, .6); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); font-size: 13px; color: var(--muted); transform: translateX(-50%); animation: toast-in .45s cubic-bezier(.25, 1, .5, 1) both; transition: opacity .35s ease, transform .35s ease; pointer-events: none; }
.toast b { display: block; color: var(--accent); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.toast span:last-child { color: var(--text); font-weight: 600; }
.toast-dot { width: 26px; height: 26px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 35%, #ffb877, #e0701a); box-shadow: 0 0 14px rgba(240, 137, 50, .6); }
.toast.out { opacity: 0; transform: translateX(-50%) translateY(-10px); }
@keyframes toast-in { from { opacity: 0; transform: translateX(-50%) translateY(-14px) scale(.95); } to { opacity: 1; transform: translateX(-50%); } }
.card .big { font-size: 52px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1; }
.card .cta { color: var(--text); font-weight: 600; }
.card .small { font-size: 13px; }
.card .stars { font-size: 28px; color: var(--accent); letter-spacing: 4px; line-height: 1; }
.ctrls { font-size: 13px; color: var(--text); background: var(--bg); border-radius: 10px; padding: 10px 12px; line-height: 1.6; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  .snd.nudge, .snd.nudge svg, .snd-tip { animation: none; }
  .gcard, .gcard .shot img, .btn { transition: none; }
  .gcard:hover, .gcard:hover .shot img { transform: none; }
}

/* offer: branded mini-game (overview box, one line on the start, pause and game-over cards) */
.mg { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-radius: 16px; border: 1px solid rgba(240, 137, 50, .5); background: rgba(240, 137, 50, .09); }
.mg-title { display: block; font-size: 18px; font-weight: 700; color: var(--text); line-height: 1.3; }
.mg-sub { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); line-height: 1.45; }
.mg .btn { flex: none; }
.mg-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mg-ic { flex: none; width: 24px; height: 24px; color: var(--accent); }
.mg-ic-lg { width: 38px; height: 38px; padding: 8px; border-radius: 50%; background: rgba(240, 137, 50, .16); box-sizing: border-box; }
@media (max-width: 640px) { .mg { flex-direction: column; align-items: stretch; gap: 12px; } .mg .btn { justify-content: center; } }
.mg-line, .card .mg-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(240, 137, 50, .45); background: rgba(240, 137, 50, .09); font-size: 13px; line-height: 1.45; color: var(--text); }
.mg-line strong, .card .mg-line strong { color: var(--text); }
.mg-line a, .card .mg-line a { color: var(--accent); font-weight: 600; white-space: nowrap; }
.mg-line a:hover, .card .mg-line a:hover { color: var(--text); }
.mg-line > span { flex: 1 1 auto; min-width: 0; }
