/* Betketing — studio site. Same lettering, keys and bars as the games. */
@font-face { font-family: "Titan One"; src: url("/assets/fonts/titan-one-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lilita One"; src: url("/assets/fonts/lilita-one-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("/assets/fonts/fredoka-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("/assets/fonts/fredoka-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("/assets/fonts/fredoka-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --night: #150a1c;
  --panel: #25132e;
  --panel-2: #321a3d;
  --well: #120818;
  --edge: #0b0510; /* the dark outline and bottom edge of every piece */
  --ink: #2a0a1c;  /* outline of keys and lettering */
  --text: #fff7fb;
  --muted: #c9b6d1;
  --faint: #8f7c98;
  --pink: #ff5ebe;
  --pink-hi: #ff7fcc;
  --pink-lo: #f038a4;
  --ok: #46d98a;
  --bad: #ff8fa6;
  --display: "Titan One", "Fredoka", system-ui, sans-serif;
  --num: "Lilita One", "Fredoka", system-ui, sans-serif;
  --body: "Fredoka", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1200px;
  --gutter: 24px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-gutter: stable; scroll-behavior: smooth; scroll-padding-top: 100px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--night); color: var(--text); font: 500 17px/1.55 var(--body); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: calc(640px + var(--gutter) * 2); }

/* ---------- Lettering ---------- */
/* Game lettering: a dark outline with depth underneath, the white fill on top (data-ink repeats the text). */
.ink {
  position: relative; font: 400 clamp(40px, 6.2vw, 84px) / 1.04 var(--display); letter-spacing: 0.01em;
  color: var(--ink); -webkit-text-stroke: 0.17em var(--ink); paint-order: stroke fill;
  text-shadow: 0 0.09em 0 var(--ink), 0 0.16em 0 rgba(0, 0, 0, 0.35);
}
.ink::after { content: attr(data-ink); content: attr(data-ink) / ""; position: absolute; left: 0; top: 0; width: 100%; color: #fff; -webkit-text-stroke: 0; text-shadow: none; }
.title { font: 400 clamp(30px, 3.6vw, 44px) / 1.1 var(--display); letter-spacing: 0.01em; text-shadow: 0 0.08em 0 rgba(0, 0, 0, 0.4); }

/* ---------- Keys ---------- */
.key {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 26px 2px; border-radius: 16px; border: 3px solid var(--ink);
  font: 400 19px/1 var(--num); letter-spacing: 0.02em; color: #fff; white-space: nowrap; text-shadow: 0 2px 0 rgba(120, 10, 75, 0.55);
  background: linear-gradient(180deg, var(--pink-hi), var(--pink-lo));
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.45), inset 0 -5px 0 rgba(0, 0, 0, 0.14), 0 5px 0 var(--ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.key:hover { filter: brightness(1.07); }
.key:active { transform: translateY(4px); box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.45), inset 0 -5px 0 rgba(0, 0, 0, 0.14), 0 1px 0 var(--ink); }
.key[disabled] { filter: saturate(0.35) brightness(0.8); cursor: not-allowed; }
.key[disabled]:active { transform: none; }
.key[disabled]::after { display: none; }
.key-2 { background: linear-gradient(180deg, #55316a, #3c2050); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.16), inset 0 -5px 0 rgba(0, 0, 0, 0.18), 0 5px 0 var(--ink); }
.key-2:active { box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.16), inset 0 -5px 0 rgba(0, 0, 0, 0.18), 0 1px 0 var(--ink); }
.key-sm { height: 42px; padding: 0 18px 2px; border-radius: 13px; font-size: 16px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), inset 0 -4px 0 rgba(0, 0, 0, 0.14), 0 4px 0 var(--ink); }
.key-sm:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), inset 0 -4px 0 rgba(0, 0, 0, 0.14), 0 1px 0 var(--ink); }
.key-wide { width: 100%; height: 58px; font-size: 21px; }

/* ---------- Panels ---------- */
.panel { background: var(--panel); border: 3px solid var(--edge); border-radius: 22px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.07), 0 6px 0 var(--edge); }

/* ---------- HUD (top bar) ---------- */
.hud { position: fixed; z-index: 30; top: 12px; left: 0; right: 0; padding: 0 12px; pointer-events: none; }
.hud-bar, .drawer { pointer-events: auto; max-width: var(--wrap); margin: 0 auto; background: rgba(20, 10, 28, 0.94); box-shadow: 0 5px 0 rgba(0, 0, 0, 0.35); }
.hud-bar { display: flex; align-items: center; gap: 28px; height: 64px; padding: 0 12px 0 20px; border-radius: 18px; }
.brand img { height: 24px; width: auto; }
.links { display: flex; gap: 6px; margin-left: auto; }
.links a { padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 16px; color: rgba(255, 247, 251, 0.72); transition: color 0.15s ease, background-color 0.15s ease; }
.links a:hover, .links a[aria-current] { color: #fff; background: rgba(255, 255, 255, 0.08); }
.menu { display: none; position: relative; width: 44px; height: 44px; margin-left: auto; border-radius: 12px; }
.menu:hover { background: rgba(255, 255, 255, 0.08); }
.menu span { position: absolute; left: 11px; right: 11px; height: 3px; border-radius: 2px; background: #fff; transition: transform 0.2s ease; }
.menu span:first-child { top: 16px; }
.menu span:last-child { top: 25px; }
.menu[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
.menu[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
.drawer { display: grid; margin-top: 8px; padding: 8px; border-radius: 18px; }
.drawer[hidden] { display: none; }
.drawer a { padding: 14px 14px; border-radius: 12px; font-weight: 600; font-size: 18px; }
.drawer a:active { background: rgba(255, 255, 255, 0.08); }

/* ---------- Hero ---------- */
.hero-copy p { margin-top: 26px; max-width: 520px; font-size: 20px; line-height: 1.5; color: #f3e6f1; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-sm .ink { font-size: clamp(36px, 5vw, 64px); }
.hero-sm .hero-copy { max-width: 720px; }
.hero-sm .hero-copy p { max-width: 600px; }

/* ---------- Sections ---------- */
.sec { padding: 112px 0 0; }
.sec-tight { padding-top: 64px; }
.sec > .wrap > .title { margin-bottom: 32px; }

/* ---------- Games (lobby + modal): see the end of the file ---------- */

/* ---------- Studio ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { padding: 28px 28px 32px; background: var(--panel); border: 3px solid var(--edge); border-radius: 22px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.07), 0 6px 0 var(--edge); }
.steps h3 { font: 400 26px/1.1 var(--display); letter-spacing: 0.01em; }
.steps h3::after { content: ""; display: block; width: 36px; height: 5px; margin-top: 14px; border-radius: 3px; background: var(--pink-hi); }
.steps p { margin-top: 14px; font-size: 17px; color: var(--muted); }

/* ---------- Band ---------- */
.band { display: flex; align-items: center; justify-content: space-between; gap: 28px 48px; flex-wrap: wrap; padding: 40px 44px 44px; border: 4px solid var(--ink); border-radius: 26px; background: linear-gradient(180deg, #ff74c7, #ee37a2); box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.4), inset 0 -6px 0 rgba(0, 0, 0, 0.12), 0 7px 0 var(--edge); }
.band > div { flex: 1 1 420px; }
.band .title { text-shadow: 0 0.08em 0 rgba(120, 10, 75, 0.6); }
.band p { margin-top: 12px; max-width: 560px; font-size: 18px; color: #fff; text-shadow: 0 1px 0 rgba(120, 10, 75, 0.45); }
.band .key { color: var(--ink); text-shadow: none; background: linear-gradient(180deg, #ffffff, #f6e3ee); box-shadow: inset 0 -5px 0 rgba(42, 10, 28, 0.12), 0 5px 0 var(--ink); }
.band .key:active { box-shadow: inset 0 -5px 0 rgba(42, 10, 28, 0.12), 0 1px 0 var(--ink); }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; padding-bottom: 120px; }
.contact > div > p { margin-top: 16px; max-width: 440px; font-size: 18px; color: var(--muted); }
.contact-card { padding: 10px 26px 12px; }
.mail { display: block; padding: 18px 0; font: 400 clamp(22px, 2.6vw, 30px) / 1.2 var(--num); letter-spacing: 0.01em; color: var(--pink-hi); transition: color 0.15s ease; overflow-wrap: anywhere; }
.mail:hover { color: #fff; }
.contact-card li { display: flex; justify-content: space-between; gap: 16px; padding: 15px 0; border-top: 2px solid rgba(255, 255, 255, 0.07); font-size: 16px; }
.contact-card li b { font-weight: 600; }
.contact-card li span { color: var(--muted); text-align: right; }

/* ---------- Form ---------- */
.form, .done { padding: 36px 36px 32px; }
.form-lede { margin-top: 10px; color: var(--muted); }
.field { margin-top: 22px; min-width: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 15px; }
.opt { margin-left: 6px; font-weight: 500; color: var(--faint); }
input, select {
  display: block; width: 100%; height: 52px; padding: 0 16px; border-radius: 14px;
  background: var(--well); border: 3px solid var(--edge); box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.35);
  font-weight: 500; font-size: 17px; color: var(--text); outline: 0; transition: border-color 0.15s ease;
  -webkit-appearance: none; appearance: none;
}
input::placeholder { color: var(--faint); opacity: 1; }
input:hover, select:hover { border-color: #3a2147; }
input:focus, select:focus { border-color: var(--pink); }
select { padding-right: 44px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff7fb' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; }
.field.bad input, .field.bad select { border-color: var(--bad); }
.err { display: none; margin-top: 7px; font-size: 14px; line-height: 1.35; color: var(--bad); }
.err:not(:empty) { display: block; }
.form-err { margin-top: 22px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.captcha { margin-top: 22px; }
.form .key-wide { margin-top: 26px; }
.form-err:not(:empty) + .key-wide { margin-top: 12px; }
.fine { margin-top: 18px; font-size: 14px; line-height: 1.45; color: var(--faint); text-align: center; }
.done { text-align: center; padding-top: 44px; padding-bottom: 40px; outline: 0; }
.done[hidden], .form[hidden] { display: none; }
.done p { margin: 12px auto 0; max-width: 440px; color: var(--muted); }
.done p b { color: var(--text); font-weight: 600; }
.done .key { margin-top: 26px; }
.tick { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 50%; color: #06371d; border: 3px solid var(--ink); background: linear-gradient(180deg, #6df0a8, #2fc878); box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.45), inset 0 -5px 0 rgba(0, 0, 0, 0.12), 0 5px 0 var(--ink); animation: pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1); }
.tick svg { width: 32px; height: 32px; }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Footer ---------- */
.foot-site { margin-top: 0; padding: 44px 0 56px; background: #0f0715; }
.page-creators .foot-site { margin-top: 112px; }
.foot-top { display: flex; align-items: center; justify-content: space-between; gap: 20px 24px; flex-wrap: wrap; }
.foot-top nav { display: flex; flex-wrap: wrap; gap: 6px 24px; font-weight: 600; font-size: 15px; color: var(--muted); }
.foot-top nav a:hover { color: #fff; }
.rg { display: flex; gap: 16px; align-items: flex-start; margin-top: 32px; padding-top: 28px; border-top: 2px solid rgba(255, 255, 255, 0.07); }
.age { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--muted); font: 400 14px/1 var(--num); }
.rg p { font-size: 14px; color: var(--muted); max-width: 760px; }
.rg a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.3); text-underline-offset: 3px; }
.legal { margin-top: 14px; font-size: 13px; color: var(--faint); max-width: 760px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 16px; }
  .links, .hud-bar > .key-sm { display: none; }
  .menu { display: block; }
  .hud-bar { padding-right: 10px; }
  .contact { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .hud { top: 8px; padding: 0 8px; }
  .hud-bar { height: 58px; padding-left: 16px; }
  .brand img { height: 21px; }
  .hero-copy p { font-size: 18px; margin-top: 22px; }
  .cta { margin-top: 28px; gap: 12px; }
  .cta .key { flex: 1 1 auto; padding: 0 18px 2px; }
  .sec { padding-top: 80px; }
  .sec-tight { padding-top: 40px; }
  .sec > .wrap > .title { margin-bottom: 22px; }
  .steps li { padding: 22px 22px 26px; }
  .steps h3 { font-size: 23px; }
  .band { padding: 28px 22px 32px; border-radius: 22px; }
  .band .key { width: 100%; }
  .band p { font-size: 17px; }
  .contact { padding-bottom: 88px; }
  .contact-card { padding: 6px 20px 8px; }
  .contact-card li { flex-direction: column; gap: 2px; }
  .contact-card li span { text-align: left; }
  .form, .done { padding: 26px 20px 24px; }
  .row { grid-template-columns: 1fr; }
  .page-creators .foot-site { margin-top: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ================= Stage, deck and motion (v3) ================= */

/* Lettering split in words: each word carries its own white fill */
.ink .w { position: relative; display: inline-block; }
.ink .w::after { content: attr(data-ink); position: absolute; left: 0; top: 0; color: #fff; -webkit-text-stroke: 0; text-shadow: none; }
.ink:has(.w)::after { content: none; }

/* Studio stage: the background of every hero, owned by the studio, not by one game */
.hero { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(180deg, #2a1236 0%, #1c0c26 55%, var(--night) 100%); }
.stage { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.pattern {
  position: absolute; inset: -240px 0 -240px 0; opacity: 0.05;
  background: url("/assets/brand/pattern.svg") 0 0 / 260px 220px repeat;
  transform: translate3d(0, var(--py, 0px), 0) rotate(-8deg) scale(1.25);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
}
.beam {
  position: absolute; top: -120px; width: 46vw; max-width: 640px; height: 130%;
  background: linear-gradient(180deg, rgba(255, 210, 238, 0.16), rgba(255, 210, 238, 0) 78%);
  clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%);
  transform-origin: 50% 0;
}
.b1 { left: 4%; transform: rotate(-16deg); animation: sway 9s ease-in-out infinite alternate; }
.b2 { right: 6%; transform: rotate(18deg); animation: sway2 11s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-20deg); } to { transform: rotate(-8deg); } }
@keyframes sway2 { from { transform: rotate(22deg); } to { transform: rotate(10deg); } }

/* Marquee bulbs along the bottom edge: a fast chase, one lit bulb in three running sideways */
.bulbs {
  position: absolute; left: 0; right: 0; bottom: 0; height: 30px; z-index: 1; border-top: 3px solid var(--edge);
  --s: 18px; /* bulb spacing */
  background: radial-gradient(circle at 50% 50%, #6b4a2a 0 3px, rgba(107, 74, 42, 0) 4px) 0 50% / var(--s) 100% repeat-x, #0e0714;
}
.bulbs::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at calc(var(--s) / 2) 50%, #fff3cf 0 3px, #ffb84d 4px, rgba(255, 184, 77, 0) 8px) 0 50% / calc(var(--s) * 3) 100% repeat-x;
}
.motion .bulbs::before { animation: chase 0.42s steps(3) infinite; }
@keyframes chase { to { background-position: calc(var(--s) * 3) 50%; } }

.hero-in { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 48px; min-height: min(780px, 94vh); padding-top: 132px; padding-bottom: 110px; }
.hero-copy { position: relative; z-index: 2; max-width: 600px; }
.hero-sm .hero-in { min-height: 0; padding-top: 150px; padding-bottom: 104px; }

/* Deck: the game covers, dealt like cards; tilts towards the pointer */
.deck { position: relative; flex: none; width: min(380px, 32vw); aspect-ratio: 3 / 4; margin-right: 40px; perspective: 1200px; transform: translate3d(0, var(--dy, 0px), 0); }
.card {
  position: absolute; inset: 0; display: block; overflow: hidden; border-radius: 26px; border: 4px solid var(--edge);
  background: var(--panel); box-shadow: 0 8px 0 var(--edge), 0 30px 60px -20px rgba(0, 0, 0, 0.7);
  transform-style: preserve-3d; will-change: transform;
}
.card img { width: 100%; height: 100%; object-fit: cover; }
.card-game { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotate(4deg); transition: transform 0.25s ease-out; }
.card-next {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 0 0 0 9%;
  background: repeating-linear-gradient(135deg, #2b1636 0 14px, #251230 14px 28px);
  transform: translate3d(-44%, 5%, -40px) rotate(-10deg);
}
.card-next img { width: 30%; height: auto; opacity: 0.35; margin-bottom: 12px; }
.card-next b { font: 400 22px/1.05 var(--display); letter-spacing: 0.01em; color: rgba(255, 247, 251, 0.75); }
.card-next span { font-size: 15px; color: var(--faint); }
.glare { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--gx, 30%) var(--gy, 20%), rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 45%); opacity: 0; transition: opacity 0.25s ease; mix-blend-mode: soft-light; }
.deck.hot .glare { opacity: 1; }

/* Intro: words pop in, the cards are dealt */
.motion .pop .w { animation: pop-in 0.6s cubic-bezier(0.2, 1.5, 0.4, 1) both; animation-delay: calc(0.08s + var(--i, 0) * 0.07s); }
.motion .rise { animation: rise 0.6s cubic-bezier(0.2, 1, 0.3, 1) both 0.55s; }
.motion .cta.rise { animation-delay: 0.68s; }
.motion .deck .card-game { animation: deal 0.75s cubic-bezier(0.2, 1.25, 0.35, 1) both 0.35s; }
.motion .deck .card-next { animation: deal-back 0.75s cubic-bezier(0.2, 1.25, 0.35, 1) both 0.2s; }
@keyframes pop-in { from { opacity: 0; transform: translateY(0.35em) scale(0.6); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes deal { from { opacity: 0; transform: translate3d(60%, 30%, 0) rotate(28deg) scale(0.8); } }
@keyframes deal-back { from { opacity: 0; transform: translate3d(30%, 40%, 0) rotate(30deg) scale(0.8); } }

/* HUD: tightens after the first scroll, a pill follows the section in view, and an XP bar fills */
.hud-bar { position: relative; overflow: hidden; transition: height 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease; }
.hud.scrolled .hud-bar { height: 56px; background: rgba(16, 8, 22, 0.98); box-shadow: 0 5px 0 rgba(0, 0, 0, 0.45); }
.links { position: relative; }
.links a { position: relative; z-index: 1; }
.links a[aria-current] { background: transparent; }
.spy { position: absolute; z-index: 0; top: 0; left: 0; height: 100%; border-radius: 10px; background: rgba(255, 255, 255, 0.1); opacity: 0; transition: transform 0.35s cubic-bezier(0.2, 1.2, 0.4, 1), width 0.35s cubic-bezier(0.2, 1.2, 0.4, 1), opacity 0.2s ease; pointer-events: none; }
.xp { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--pink-lo), var(--pink-hi)); }

/* Keys: a quick shine on hover */
.key { overflow: hidden; }
.key::after { content: ""; position: absolute; top: -10%; bottom: -10%; left: -60%; width: 40%; background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0)); transform: skewX(-18deg) translateX(0); pointer-events: none; }
.key:hover::after { transition: transform 0.55s ease; transform: skewX(-18deg) translateX(420%); }

/* Scroll reveals: pieces pop up when they reach the screen */
.motion .reveal { opacity: 0; transform: translateY(28px) scale(0.97); }
.motion .reveal.in { opacity: 1; transform: none; transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.2, 1.3, 0.4, 1); transition-delay: calc(var(--i, 0) * 0.08s); }

/* Studio cards lift on hover */
.steps li { transition: transform 0.2s cubic-bezier(0.2, 1.4, 0.4, 1), box-shadow 0.2s ease; }
.steps li:hover { transform: translateY(-6px) rotate(-0.6deg); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.07), 0 12px 0 var(--edge); }
.motion .steps li.reveal.in:hover { transform: translateY(-6px) rotate(-0.6deg); transition-delay: 0s; }

/* Counters land with a small bump, like a win counter */
.gm-stats dd.bump { animation: bump 0.35s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes bump { 50% { transform: scale(1.12); color: #ffe7a8; } }

/* Clip sent: sparks burst from the tick */
.spark { position: absolute; z-index: 2; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; pointer-events: none; background: var(--c, #ff7fcc); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.tick { position: relative; overflow: visible; }

@media (max-width: 1080px) {
  .deck { width: min(320px, 34vw); margin-right: 24px; }
}
@media (max-width: 860px) {
  .hero-in { flex-direction: column; align-items: flex-start; gap: 0; min-height: 0; padding-top: 124px; padding-bottom: 96px; }
  .deck { align-self: center; width: min(62vw, 300px); margin: 56px 0 0 18%; }
  .beam { width: 80vw; }
  .hero-sm .hero-in { padding-top: 124px; padding-bottom: 80px; }
}
@media (max-width: 600px) {
  .hero-in { padding-bottom: 80px; }
  .deck { width: 58vw; margin: 44px 0 0 20%; }
  .card { border-radius: 20px; }
  .card-next b { font-size: 18px; }
  .card-next span { font-size: 13px; }
  .bulbs { height: 24px; --s: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .motion .reveal { opacity: 1; transform: none; }
  .card-game { transform: rotate(4deg); }
}

/* ================= Games: lobby of covers + game modal ================= */

/* Lobby: one cover per game, built to hold many side by side */
.lobby { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 22px; }
.lobby > li { min-width: 0; }
.tile { display: block; width: 100%; padding: 0; text-align: left; border-radius: 22px; -webkit-tap-highlight-color: transparent; }
.tile-art {
  position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 22px; border: 4px solid var(--edge);
  background: var(--panel); box-shadow: 0 6px 0 var(--edge);
  transition: transform 0.25s cubic-bezier(0.2, 1.4, 0.4, 1), box-shadow 0.25s ease, border-color 0.2s ease;
}
.tile-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.tile-name { display: block; margin-top: 16px; font: 400 21px/1.15 var(--display); letter-spacing: 0.01em; transition: color 0.15s ease; }
.tile:hover .tile-name { color: var(--pink-hi); }
.tile-meta { display: block; margin-top: 3px; font-size: 14px; font-weight: 600; color: var(--muted); }
.gm-where.only { color: var(--pink-hi); }

/* "Only on Stake" sticker on the cover: same ink outline and pressed edge as the keys */
.tile-badge {
  position: absolute; z-index: 1; top: 12px; left: 12px; display: flex; flex-direction: column; align-items: center;
  padding: 6px 13px 8px; border-radius: 13px; border: 3px solid var(--edge); color: #fff; text-align: center;
  background: linear-gradient(180deg, #213743, #0f212e);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.14), inset 0 -4px 0 rgba(0, 0, 0, 0.25), 0 4px 0 var(--edge);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45); transform: rotate(-6deg); transform-origin: 30% 50%;
  transition: transform 0.25s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.tile-badge small { font: 700 10px/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: #b1bad3; }
/* Stake's own colours (navy, white, a bold italic word) without copying its logo */
.tile-badge b { margin-top: 2px; font: italic 400 22px/1 var(--num); letter-spacing: 0.01em; }
.tile:hover .tile-badge { transform: rotate(-10deg) scale(1.08); }
.lobby > li[hidden] { display: none; }

/* Games header: title with the game count, and filters once there are both kinds */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 18px 24px; flex-wrap: wrap; margin-bottom: 32px; }
.sec-head .title { display: flex; align-items: center; gap: 16px; }
.count {
  display: inline-grid; place-items: center; min-width: 46px; height: 46px; padding: 0 12px 3px; border-radius: 14px; border: 3px solid var(--ink);
  font: 400 24px/1 var(--num); color: #fff; text-shadow: 0 2px 0 rgba(120, 10, 75, 0.55); font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, var(--pink-hi), var(--pink-lo)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), inset 0 -4px 0 rgba(0, 0, 0, 0.14), 0 4px 0 var(--ink);
}
.count:empty { display: none; }
.filters { display: flex; gap: 8px; padding: 6px; border-radius: 18px; background: #0e0714; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.4); }
.filters[hidden] { display: none; }
.filters button { height: 40px; padding: 0 16px 1px; border-radius: 12px; border: 3px solid transparent; font-weight: 600; font-size: 15px; color: rgba(255, 247, 251, 0.72); white-space: nowrap; transition: color 0.15s ease, background-color 0.15s ease; }
.filters button:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.filters button[aria-pressed="true"] { color: #fff; border-color: var(--ink); background: linear-gradient(180deg, var(--pink-hi), var(--pink-lo)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), inset 0 -3px 0 rgba(0, 0, 0, 0.12); text-shadow: 0 1px 0 rgba(120, 10, 75, 0.5); }
.tile:hover .tile-art, .tile:focus-visible .tile-art { transform: translateY(-6px) rotate(-1deg); border-color: var(--pink); box-shadow: 0 12px 0 var(--edge), 0 18px 40px -12px rgba(255, 94, 190, 0.45); }
.tile:hover .tile-art img { transform: scale(1.04); }
.tile:active .tile-art { transform: translateY(-2px); box-shadow: 0 6px 0 var(--edge); }
.tile:focus-visible { outline: 0; }
.tile:focus-visible .tile-art { outline: 3px solid #fff; outline-offset: 3px; }

.tile-next .tile-art {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
  border: 3px dashed rgba(255, 255, 255, 0.16); background: repeating-linear-gradient(135deg, #1d0e26 0 14px, #1a0c22 14px 28px); box-shadow: none;
}
.tile-next img { width: 26%; height: auto; opacity: 0.4; margin-bottom: 14px; }
.tile-next b { font: 400 21px/1.15 var(--display); letter-spacing: 0.01em; color: rgba(255, 247, 251, 0.8); }
.tile-next span { font-size: 14px; color: var(--faint); }

/* Modal */
html:has(.gm[open]) { overflow: hidden; }
.gm { width: min(1140px, calc(100% - 48px)); max-width: none; max-height: calc(100dvh - 48px); margin: auto; padding: 0; border: 0; background: transparent; color: var(--text); overflow: visible; }
.gm::backdrop { background: rgba(8, 3, 12, 0.8); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.gm-box {
  position: relative; display: grid; grid-template-columns: 1.55fr 1fr; gap: 28px; max-height: calc(100dvh - 48px); padding: 24px;
  overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #3a2147 transparent;
  background: var(--panel); border: 4px solid var(--edge); border-radius: 28px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.07), 0 8px 0 var(--edge), 0 40px 90px -20px rgba(0, 0, 0, 0.8);
}
.gm-media { min-width: 0; }
.gm-screen { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 4px solid var(--edge); border-radius: 20px; background: var(--well); box-shadow: 0 5px 0 var(--edge); }
.gm-screen img { width: 100%; height: 100%; object-fit: cover; }
.motion .gm-screen img.swap { animation: shot 0.3s ease; }
/* A game with no screenshots: the cover takes the big frame and the small one in the heading goes away. */
.gm.noshots .gm-screen { aspect-ratio: 3 / 4; }
.gm.noshots .gm-cover { display: none; }
@media (min-width: 601px) {
  .gm.noshots { width: min(900px, calc(100% - 48px)); }
  .gm.noshots .gm-box { grid-template-columns: minmax(0, 0.8fr) 1fr; align-items: start; }
}
@media (max-width: 600px) {
  .gm.noshots .gm-screen { width: min(230px, 62%); margin: 0 auto; }
}
@keyframes shot { from { opacity: 0; transform: scale(1.015); } to { opacity: 1; transform: none; } }
.gm-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.gm-thumbs[hidden] { display: none; }
.gm-thumbs button { padding: 0; text-align: left; }
.gm-thumbs .t { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; border: 3px solid var(--edge); opacity: 0.6; transition: opacity 0.15s ease, border-color 0.15s ease, transform 0.15s ease; }
.gm-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gm-thumbs .l { display: block; margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--muted); transition: color 0.15s ease; }
.gm-thumbs button:hover .t { opacity: 0.9; }
.gm-thumbs button[aria-pressed="true"] .t { opacity: 1; border-color: var(--pink); transform: translateY(-2px); }
.gm-thumbs button[aria-pressed="true"] .l { color: #fff; }
.gm-thumbs button:focus-visible { outline: 0; }
.gm-thumbs button:focus-visible .t { outline: 3px solid #fff; outline-offset: 2px; }

.gm-info { display: flex; flex-direction: column; min-width: 0; padding: 6px 4px 2px 0; }
.gm-head { display: flex; align-items: center; gap: 18px; padding-right: 56px; }
.gm-cover { flex: none; width: 76px; border-radius: 14px; border: 3px solid var(--edge); box-shadow: 0 4px 0 var(--edge); }
.gm-name { font-size: clamp(32px, 3.4vw, 44px); }
.gm-by { margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
.gm-tag { margin-top: 20px; font-size: 17px; line-height: 1.5; color: #f3e6f1; }
.gm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 22px; border-radius: 18px; background: var(--well); box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.35); }
.gm-stats div { display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 15px; }
.gm-stats div:nth-child(n + 4) { border-top: 2px solid rgba(255, 255, 255, 0.06); }
.gm-stats div:not(:nth-child(3n + 1)) { border-left: 2px solid rgba(255, 255, 255, 0.06); }
.gm-stats dt { font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: 0.07em; text-transform: uppercase; color: rgba(255, 255, 255, 0.58); }
.gm-stats dd { font: 400 23px/1 var(--num); letter-spacing: 0.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gm-feats { display: grid; gap: 10px; margin-top: 22px; }
.gm-feats li { position: relative; padding-left: 28px; font-size: 16px; line-height: 1.4; color: var(--muted); }
.gm-feats li::before { content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; background: var(--pink); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.gm-foot { display: flex; align-items: center; gap: 16px; margin-top: auto; padding-top: 24px; }
.gm-foot .gm-play { flex: 1; }
.gm-play[hidden] { display: none; }
.gm-nav { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.gm-nav[hidden] { display: none; }
.gm-step { width: 46px; padding: 0 0 2px; }
.gm-step svg { width: 20px; height: 20px; }
.gm-count { min-width: 48px; text-align: center; font: 400 17px/1 var(--num); color: var(--muted); font-variant-numeric: tabular-nums; }
.gm-x { position: absolute; z-index: 2; top: 26px; right: 26px; width: 50px; height: 50px; padding: 0 0 2px; border-radius: 15px; }
.gm-x svg { width: 20px; height: 20px; }

/* Modal motion: pops up like a game panel, drops away on close */
.motion .gm[open] .gm-box, .motion .gm[open] .gm-x { animation: gm-in 0.45s cubic-bezier(0.2, 1.25, 0.35, 1); }
.motion .gm[open]::backdrop { animation: gm-fade 0.25s ease; }
.motion .gm.closing .gm-box, .motion .gm.closing .gm-x { animation: gm-out 0.2s ease forwards; }
.motion .gm.closing::backdrop { animation: gm-fade 0.2s ease reverse forwards; }
.motion .gm-info.swap > * { animation: rise 0.35s cubic-bezier(0.2, 1, 0.3, 1) both; }
@keyframes gm-in { from { opacity: 0; transform: translateY(40px) scale(0.94); } }
@keyframes gm-out { to { opacity: 0; transform: translateY(24px) scale(0.97); } }
@keyframes gm-fade { from { opacity: 0; } }

@media (max-width: 1080px) {
  .lobby { grid-template-columns: repeat(3, 1fr); }
  .gm-box { grid-template-columns: 1fr; gap: 24px; }
  .gm-info { padding: 0; }
  .gm-head { padding-right: 0; }
  .gm-x { top: 36px; right: 36px; }
}
@media (max-width: 600px) {
  .lobby { grid-template-columns: 1fr 1fr; gap: 24px 14px; }
  .tile-art, .tile-next .tile-art { border-radius: 18px; }
  .tile-name { margin-top: 12px; font-size: 18px; }
  .tile-meta { font-size: 13px; }
  .tile-badge { top: 8px; left: 8px; padding: 4px 9px 6px; border-radius: 11px; }
  .tile-badge small { font-size: 8px; }
  .tile-badge b { font-size: 16px; }
  .sec-head { margin-bottom: 22px; }
  .count { min-width: 40px; height: 40px; font-size: 21px; border-radius: 12px; }
  .filters { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .tile-next b { font-size: 17px; }
  .tile-next span { font-size: 13px; }
  /* The modal becomes a sheet from the bottom */
  .gm { width: 100%; max-height: 94dvh; margin: auto 0 0; }
  .gm-box { max-height: 94dvh; padding: 12px 12px 20px; gap: 20px; border-width: 3px 0 0; border-radius: 24px 24px 0 0; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.07); }
  .gm-screen { border-radius: 16px; border-width: 3px; }
  .gm-thumbs { gap: 8px; margin-top: 12px; }
  .gm-thumbs .t { border-radius: 10px; }
  .gm-thumbs .l { font-size: 12px; margin-top: 6px; }
  .gm-info { padding: 0 6px; }
  .gm-head { gap: 14px; }
  .gm-cover { width: 60px; border-radius: 12px; }
  .gm-name { font-size: 32px; }
  .gm-tag { font-size: 16px; margin-top: 16px; }
  .gm-stats div { padding: 13px 12px 12px; }
  .gm-stats dd { font-size: 19px; }
  .gm-feats li { font-size: 15px; }
  .gm-x { top: 22px; right: 22px; width: 44px; height: 44px; border-radius: 13px; }
  .motion .gm[open] .gm-box, .motion .gm[open] .gm-x { animation: gm-up 0.4s cubic-bezier(0.2, 1, 0.3, 1); }
  .motion .gm.closing .gm-box, .motion .gm.closing .gm-x { animation: gm-down 0.22s ease forwards; }
  @keyframes gm-up { from { transform: translateY(100%); } }
  @keyframes gm-down { to { transform: translateY(100%); } }
}
@media (prefers-reduced-motion: reduce) {
  .tile:hover .tile-art, .tile:focus-visible .tile-art { transform: none; }
}
