/* 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 { 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; }

/* ---------- Game ---------- */
.game { display: grid; grid-template-columns: 27fr 64fr; gap: 20px; }
.cover, .screen { position: relative; overflow: hidden; border: 4px solid var(--edge); border-radius: 22px; background: var(--panel); box-shadow: 0 6px 0 var(--edge); }
.cover img, .screen img { width: 100%; height: 100%; object-fit: cover; }
.screen { aspect-ratio: 16 / 9; }
.screen img { position: absolute; inset: 0; animation: shot 0.3s ease; }
.screen img[hidden] { display: none; }
@keyframes shot { from { opacity: 0; transform: scale(1.015); } to { opacity: 1; transform: none; } }
.bar { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; padding: 14px 16px 14px 24px; border-radius: 18px; background: #0e0714; box-shadow: 0 5px 0 rgba(0, 0, 0, 0.4); }
.stats { display: flex; gap: 36px; }
.stats div { display: flex; flex-direction: column; gap: 5px; }
.stats dt { font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: 0.07em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
.stats dd { font: 400 24px/1 var(--num); letter-spacing: 0.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 8px; }
.tabs button { height: 42px; padding: 0 16px 1px; border-radius: 13px; 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; }
.tabs button:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.tabs button[aria-selected="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); }

.slot { display: flex; align-items: center; gap: 18px; margin-top: 28px; padding: 18px 22px; border: 3px dashed rgba(255, 255, 255, 0.16); border-radius: 22px; }
.slot-mark { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--panel); border: 3px solid var(--edge); }
.slot-mark img { width: 30px; opacity: 0.55; }
.slot p { display: flex; flex-direction: column; gap: 2px; }
.slot b { font: 400 20px/1.2 var(--display); letter-spacing: 0.01em; }
.slot span { font-size: 15px; color: var(--muted); }

/* ---------- Studio ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.steps li { padding: 24px 24px 28px; 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 .n { display: grid; place-items: center; width: 44px; height: 44px; padding-bottom: 2px; border-radius: 14px; border: 3px solid var(--ink); font: 400 22px/1 var(--num); color: #fff; 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 2px 0 rgba(255, 255, 255, 0.45), inset 0 -4px 0 rgba(0, 0, 0, 0.14); }
.steps h3 { margin-top: 20px; font: 400 22px/1.15 var(--display); letter-spacing: 0.01em; }
.steps p { margin-top: 10px; font-size: 16px; 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: 1080px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .stats { gap: 28px; }
}
@media (max-width: 860px) {
  .links, .hud-bar > .key-sm { display: none; }
  .menu { display: block; }
  .hud-bar { padding-right: 10px; }
  .game { grid-template-columns: 1fr; }
  .cover { display: none; }
  .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; }
  .game { gap: 14px; }
  .cover, .screen { border-radius: 18px; }
  .bar { padding: 18px 16px 14px; }
  .stats { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
  .tabs { width: calc(100% + 32px); margin: 0 -16px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .steps { grid-template-columns: 1fr; gap: 16px; }
  .steps li { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; padding: 20px; }
  .steps .n { grid-row: 1 / 3; }
  .steps h3 { margin-top: 0; align-self: center; }
  .steps p { grid-column: 1 / -1; margin-top: 14px; }
  .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, blinking in turn like the game's board */
.bulbs { position: absolute; left: 0; right: 0; bottom: 0; height: 30px; z-index: 1; background: #0e0714; border-top: 3px solid var(--edge); }
.bulbs::before, .bulbs::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, #ffe7a8 0 4px, #ffb84d 5px, rgba(255, 184, 77, 0) 9px) 0 50% / 36px 30px repeat-x;
}
.bulbs::after { background-position: 18px 50%; }
.bulbs::before { animation: blink 1.2s steps(1) infinite; }
.bulbs::after { animation: blink 1.2s steps(1) infinite -0.6s; }
@keyframes blink { 0% { opacity: 1; } 50% { opacity: 0.22; } }

.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 */
.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; }
  .bulbs::before, .bulbs::after { background-size: 28px 24px; }
  .bulbs::after { background-position: 14px 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .motion .reveal { opacity: 1; transform: none; }
  .card-game { transform: rotate(4deg); }
}
