:root {
  --bg: #0b0b0d; --surface: #151519; --surface-2: #1d1d23; --line: #2a2a32;
  --text: #ececf0; --muted: #a3a3ad; --accent: #ffb547; --accent-ink: #1a1206;
  --head: Georgia, "Times New Roman", serif;
  --max: 1200px; --radius: 16px;
}
body.game {
  --bg: #071c27; --surface: #0d2c3c; --surface-2: #123a4f; --line: #1f4c62;
  --text: #eef6f8; --muted: #a9c3cc; --accent: #ffc83d; --accent-ink: #2a1a00;
  --head: "Trebuchet MS", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 system-ui, -apple-system, "Segoe UI", sans-serif; overflow-x: hidden; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--head); line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
body:not(.game) h2 { text-transform: uppercase; letter-spacing: .08em; background: linear-gradient(100deg, #9a9aa4 0%, #ffffff 22%, #b9b9c2 40%, #f6f6f8 60%, #9a9aa4 80%, #9a9aa4 100%) 0 0 / 520px 100% repeat-x; -webkit-background-clip: text; background-clip: text; color: transparent; }
/* film grain over the whole page */
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 60; opacity: .05; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
section { padding: 72px 0; }
section[id] { scroll-margin-top: 64px; }
@media (max-width: 640px) { section { padding: 56px 0; } }
.kicker { color: var(--accent); text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 700; margin: 0 0 8px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 680px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 93%, transparent); border-bottom: 1px solid var(--line); transition: background .3s, box-shadow .3s; }
.nav.scrolled { background: color-mix(in srgb, var(--bg) 92%, transparent); box-shadow: 0 12px 30px -18px #000; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--head); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .95rem; }
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav ul a { position: relative; color: var(--muted); text-decoration: none; font-size: .95rem; transition: color .2s; }
.nav ul a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--accent); scale: 0 1; transform-origin: left; transition: scale .3s; }
.nav ul a:hover::after { scale: 1 1; }
.nav ul a:hover { color: var(--text); }
.nav ul a.nav-discord { color: var(--accent); font-weight: 700; }
@media (max-width: 560px) { html:not(.js) .brand span { display: none; } .nav ul { gap: 16px; } }
/* mobile menu */
.menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--text); place-items: center; cursor: pointer; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s, background-color .3s; }
.menu-btn span { position: relative; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }
.nav.open .menu-btn span { background-color: transparent; }
.nav.open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
.nav.open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 860px) {
  .js .menu-btn { display: grid; }
  .js .nav ul { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px 20px 20px; background: color-mix(in srgb, var(--bg) 97%, transparent); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -20px #000; }
  .js .nav.open ul { display: flex; animation: rise .3s ease-out both; }
  .js .nav ul a { display: block; padding: 13px 0; font-size: 1.1rem; border-bottom: 1px solid var(--line); }
  .js .nav ul a::after { display: none; }
}

/* buttons and badges */
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; font-weight: 700; text-decoration: none; background: var(--accent); color: var(--accent-ink); border: 2px solid var(--accent); transition: transform .2s, box-shadow .2s, border-color .2s, translate .25s ease-out; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px -8px color-mix(in srgb, var(--accent) 75%, transparent); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.center .actions, .hero-text .actions { justify-content: center; }
.badge { display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 700; border: 1px solid var(--accent); color: var(--accent); }

/* hero: the frame stays put and the oversized picture moves inside it (fx.js sets --hx/--hy),
   so mouse parallax never uncovers an edge */
.hero { position: relative; padding: 16px 0 0; overflow: hidden; background: radial-gradient(ellipse 60% 70% at 50% 45%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%); }
.hero-frame {
  position: relative; overflow: hidden; margin: 0 auto; aspect-ratio: 16 / 9;
  width: min(100%, calc((100vh - 230px) * 16 / 9)); width: min(100%, calc((100svh - 230px) * 16 / 9));
  min-width: min(100%, 520px);
}
.hero-frame picture { display: contents; }
.hero-art {
  width: 100%; height: 100%; object-fit: cover; scale: 1.08;
  translate: calc(var(--hx, 0) * -6%) calc(var(--hy, 0) * -6%);
  animation: hero-in 1.6s ease-out both;
}
/* studio hero: dragon, fog, title and text are separate layers with their own entrance and depth */
.studio-hero { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: calc(100vh - 64px); min-height: calc(100svh - 64px); padding: 24px 16px 76px; text-align: center; }
.studio-hero { background: none; }
/* every background layer fades out before the hero ends, so there is no hard line into the next section */
.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  background: radial-gradient(ellipse 60% 60% at 50% 42%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent 100%); mask-image: linear-gradient(to bottom, #000 50%, transparent 100%); }
.studio-hero .hero-ambient { opacity: .3; -webkit-mask-image: none; mask-image: none; }
/* fog: two pre-softened cloud images drifting with transform only (no masks, nothing repainted per frame) */
.fog { position: absolute; left: 50%; max-width: none; height: auto; pointer-events: none; will-change: transform;
  animation: fade-in 2.5s ease-out .3s both, fog-drift 38s ease-in-out infinite alternate; }
.fog-back { top: 12%; width: 2000px; margin-left: -1000px; opacity: .42; translate: calc(var(--hx, 0) * 18px) 0; }
.fog-front { bottom: -16%; width: 1500px; margin-left: -750px; opacity: .55; translate: calc(var(--hx, 0) * -40px) 0; animation-duration: 2.5s, 27s; animation-direction: normal, alternate-reverse; }
.stage { position: relative; width: min(46vh, 64vw, 470px); aspect-ratio: 960 / 899; margin-bottom: -1.5%; }
.stage::before { content: ""; position: absolute; inset: -12%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.16), color-mix(in srgb, var(--accent) 7%, transparent) 55%, transparent 76%); animation: pulse 5s ease-in-out infinite; }
.dragon { position: relative; width: 100%; height: auto; translate: calc(var(--hx, 0) * -28px) calc(var(--hy, 0) * -20px); animation: dragon-in 1.6s cubic-bezier(.2, .8, .2, 1) .2s both, float 7s ease-in-out 1.8s infinite; }
.title { position: relative; width: min(86vw, 720px); margin: 0; line-height: 0; translate: calc(var(--hx, 0) * -10px) calc(var(--hy, 0) * -6px); animation: title-in 1.4s cubic-bezier(.2, .8, .2, 1) .7s both; }
.title img { width: 100%; height: auto; }
.title::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 42%, rgba(255,255,255,.9) 50%, transparent 58%) 100% 0 / 300% 100% no-repeat;
  -webkit-mask: url(img/title.webp) center / 100% 100% no-repeat; mask: url(img/title.webp) center / 100% 100% no-repeat;
  animation: title-shine 7s ease-in-out 2.6s infinite; }
.studio-hero .hero-text { padding: 18px 0 0; }
.studio-hero .hero-text > :nth-child(1) { animation-delay: 1.1s; }
.studio-hero .hero-text > :nth-child(2) { animation-delay: 1.3s; }
.studio-hero .hero-text > :nth-child(3) { animation-delay: 1.5s; }
.scroll-cue { position: absolute; bottom: 18px; left: 50%; translate: -50% 0; width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.35); border-radius: 14px; animation: fade-in 1s ease-out 2s both; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--accent); animation: cue 1.8s ease-in-out infinite; }
@media (max-height: 700px) { .scroll-cue { display: none; } }
/* game: a glowing framed banner over a blurred colour wash of itself */
.hero-ambient {
  position: absolute; top: -10%; left: -10%; width: 120%; max-width: none; height: 120%; object-fit: cover;
  opacity: .55; pointer-events: none;
  translate: calc(var(--hx, 0) * 4%) calc(var(--hy, 0) * 4%);
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 50%, transparent 92%);
}
.hero-card {
  width: min(calc(100% - 32px), calc((100vh - 250px) * 16 / 9)); width: min(calc(100% - 32px), calc((100svh - 250px) * 16 / 9));
  margin-top: 8px; border-radius: 24px;
  box-shadow: 0 40px 90px -40px #000, 0 0 0 1px rgba(255,255,255,.16), 0 0 100px -24px color-mix(in srgb, var(--accent) 55%, transparent);
  transform: perspective(1400px) rotateY(calc(var(--hx, 0) * 6deg)) rotateX(calc(var(--hy, 0) * -5deg));
  animation: card-in 1.2s cubic-bezier(.2, .8, .2, 1) both, bob 6s ease-in-out 1.2s infinite;
}
.hero-card .hero-art { animation: none; scale: 1; translate: none; } /* the logo sits near the top edge: tilt the whole card instead of cropping */
.hero-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.3) 50%, transparent 62%);
  translate: -110% 0; animation: sweep 9s ease-in-out 1.6s infinite;
}
@media (max-width: 700px) {
  .hero-card { aspect-ratio: 3 / 4; min-width: 0; width: min(calc(100% - 32px), calc((100svh - 150px) * 3 / 4)); border-radius: 20px; }
}
.fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
main, footer { position: relative; }
.hero-text { position: relative; z-index: 1; padding: 16px 16px 24px; text-align: center; }
.hero-text .lead { margin: 0 auto; }
.hero-text h1 { font-size: clamp(2.2rem, 7vw, 4rem); margin: 0 0 8px; }
.hero-text .badge { margin-top: 16px; }
.hero-text > * { animation: rise .9s ease-out both; }
.hero-text > :nth-child(2) { animation-delay: .5s; }
.hero-text > :nth-child(3) { animation-delay: .7s; }
.hero-text > :nth-child(4) { animation-delay: .9s; }
.hero-text > :nth-child(5) { animation-delay: 1.1s; }

/* cards */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 32px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .3s, box-shadow .3s, border-color .3s; }
.card:hover, .member:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 22px 48px -22px color-mix(in srgb, var(--accent) 50%, transparent); }
.card-media { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; transition: transform .6s; }
.card:hover .card-media { transform: scale(1.05); }
.card > a { overflow: hidden; }
.card-body { padding: 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 1.6rem; margin: 0; }
.card-body p { margin: 0; color: var(--muted); }
.card-body .actions { margin-top: auto; padding-top: 16px; }

.tilt { position: relative; }
.mouse .tilt:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px); transition: transform .12s ease-out, box-shadow .3s, border-color .3s; }
.tilt::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2; opacity: 0; transition: opacity .3s; background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.09), transparent 45%); }
.tilt::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 3; opacity: 0; transition: opacity .3s; background: radial-gradient(260px circle at var(--gx, 50%) var(--gy, 50%), var(--accent), transparent 65%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.mouse .tilt:hover::after, .mouse .tilt:hover::before { opacity: 1; }
.cursor-ring { position: fixed; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1.5px solid var(--accent); border-radius: 50%; pointer-events: none; z-index: 70; opacity: .7; transition: width .25s, height .25s, margin .25s, opacity .25s, background-color .25s; }
.cursor-ring.big { width: 64px; height: 64px; margin: -32px 0 0 -32px; background-color: color-mix(in srgb, var(--accent) 12%, transparent); opacity: .9; }
.cursor-ring.hide { opacity: 0; }

/* coming-soon card art, drawn in CSS until real art exists */
.tcg-art { position: relative; aspect-ratio: 16 / 9; background: radial-gradient(circle at 50% 60%, #4a2a6b 0%, #1b1027 55%, #0b0b0d 100%); display: grid; place-items: center; overflow: hidden; }
.tcg-art::before { content: ""; position: absolute; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(#b07cff55, transparent 65%); animation: pulse 4s ease-in-out infinite; }
.tcg-art .c { position: absolute; width: 22%; aspect-ratio: 5 / 7; border-radius: 10px; border: 2px solid #d9c7a0; background: linear-gradient(160deg, #2c1a40, #120a1c); box-shadow: 0 12px 30px #0009; transition: translate .5s, rotate .5s; animation: float 5s ease-in-out infinite; }
.tcg-art .c:nth-child(1) { translate: -55% 0; rotate: -14deg; animation-delay: -1.6s; }
.tcg-art .c:nth-child(2) { translate: 55% 0; rotate: 14deg; animation-delay: -3.2s; }
.tcg-art .c:nth-child(3) { translate: 0 -4%; display: grid; place-items: center; color: #d9c7a0; font: 700 clamp(1.4rem, 4vw, 2.4rem) var(--head); }
.card:hover .tcg-art .c:nth-child(1) { translate: -85% 4%; rotate: -24deg; }
.card:hover .tcg-art .c:nth-child(2) { translate: 85% 4%; rotate: 24deg; }
.card:hover .tcg-art .c:nth-child(3) { translate: 0 -10%; }
.tcg-art .ribbon { position: absolute; bottom: 14px; right: 14px; }

/* team */
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; margin-top: 32px; }
.member { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 14px; text-align: center; transition: transform .3s, box-shadow .3s, border-color .3s; }
.avatar { width: 124px; height: 124px; border-radius: 50%; margin: 0 auto 16px; object-fit: cover; display: grid; place-items: center; font: 700 2.4rem var(--head); color: var(--text); background: radial-gradient(circle at 30% 25%, #3a3a44, #141418); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.member:hover .avatar { animation: glow 1.8s ease-in-out infinite; }
.member h3 { font-family: system-ui, sans-serif; font-size: 1.25rem; margin: 0 0 4px; }
.member .god { margin: 0 0 6px; font: 700 clamp(.9rem, 1.15vw, 1.05rem) var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.member .role { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.4; }
@media (max-width: 560px) { .team { gap: 12px; } .member { padding: 20px 10px; } .avatar { width: 96px; height: 96px; font-size: 1.9rem; } }

/* panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 24px; }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split img { border-radius: var(--radius); }

/* game page */
/* waves: two tiled strips slid with transform so they stay on the GPU */
.waves { position: relative; height: 56px; margin-top: -6px; overflow: hidden; }
.waves::before, .waves::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: calc(100% + 900px); background-repeat: repeat-x; will-change: transform; }
.waves::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 56'%3E%3Cpath d='M0 22 Q150 6 300 22 T600 22 V34 Q450 50 300 34 T0 34Z' fill='%231f4c62'/%3E%3C/svg%3E"); background-size: 600px 56px; animation: wave-a 14s linear infinite; }
.waves::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 56'%3E%3Cpath d='M0 30 Q150 16 300 30 T600 30 V36 Q450 48 300 36 T0 36Z' fill='%23a9c3cc' fill-opacity='.35'/%3E%3C/svg%3E"); background-size: 900px 56px; animation: wave-b 21s linear infinite reverse; }
/* the crew rides past above the waves */
.parade { position: relative; overflow: hidden; padding: 26px 0 0; }
.parade::before, .parade::after { content: ""; position: absolute; top: 0; bottom: 0; width: 14%; z-index: 1; pointer-events: none; }
.parade::before { left: 0; background: linear-gradient(to right, var(--bg), transparent); }
.parade::after { right: 0; background: linear-gradient(to left, var(--bg), transparent); }
.parade-track { display: flex; width: max-content; will-change: transform; animation: parade 45s linear infinite; }
.parade img { width: 64px; height: 64px; margin-right: 64px; image-rendering: pixelated; animation: hop 1.1s ease-in-out infinite; }
.parade img:nth-child(even) { animation-delay: -.55s; }
.parade img:nth-child(3n) { animation-duration: .9s; }
@media (max-width: 600px) { .parade img { width: 48px; height: 48px; margin-right: 40px; } }
/* game page reveals pop with a little overshoot */
.js .game .reveal.in { animation-name: pop; animation-timing-function: cubic-bezier(.34, 1.45, .64, 1); }
.video { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); background: #000; margin-top: 24px; box-shadow: 0 30px 60px -30px #000; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 32px; }
.feature { background: var(--surface); border-radius: var(--radius); padding: 24px; border-top: 4px solid var(--accent); transition: transform .3s, box-shadow .3s; }
.feature:hover { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 20px 40px -20px color-mix(in srgb, var(--accent) 45%, transparent); }
.feature h3 { font-size: 1.2rem; margin: 0 0 6px; }
.feature p { margin: 0; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr; } }
.gallery a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); transition: border-color .3s, box-shadow .3s; }
.gallery a:hover { border-color: var(--accent); box-shadow: 0 16px 36px -18px color-mix(in srgb, var(--accent) 60%, transparent); }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .4s; }
.gallery a:hover img { transform: scale(1.06); }
.pixel { image-rendering: pixelated; }

/* scroll reveal (fx.js adds .js and .in) */
.js .reveal { opacity: 0; }
.js .reveal.in { animation: rise .8s ease-out both; animation-delay: calc(var(--d, 0) * 90ms); }

@keyframes hero-in { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }
@keyframes dragon-in { from { opacity: 0; scale: .85; } to { opacity: 1; scale: 1; } }
@keyframes title-in { from { opacity: 0; scale: .92; } to { opacity: 1; scale: 1; } }
@keyframes title-shine { 0% { background-position: 100% 0; } 20%, 100% { background-position: 0% 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fog-drift { from { transform: translateX(-140px) scale(1); } to { transform: translateX(140px) scale(1.08); } }
@keyframes cue { 0% { translate: 0 0; opacity: 1; } 70% { translate: 0 14px; opacity: 0; } 100% { opacity: 0; } }
@keyframes card-in { from { opacity: 0; translate: 0 40px; scale: .94; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes sweep { 0% { translate: -110% 0; } 14%, 100% { translate: 110% 0; } }
@keyframes rise { from { opacity: 0; translate: 0 26px; } to { opacity: 1; translate: 0 0; } }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes pulse { 50% { opacity: .45; scale: 1.15; } }
@keyframes glow { 50% { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent), 0 0 30px 6px color-mix(in srgb, var(--accent) 55%, transparent); } }
@keyframes wave-a { to { transform: translateX(-600px); } }
@keyframes wave-b { to { transform: translateX(-900px); } }
@keyframes parade { to { transform: translateX(-50%); } }
@keyframes hop { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes hop-big { 0% { translate: 0 0; scale: 1; } 30% { translate: 0 -18px; scale: .94 1.08; } 60% { translate: 0 0; scale: 1.1 .9; } 80% { scale: .97 1.03; } 100% { translate: 0 0; scale: 1; } }
@keyframes pop { from { opacity: 0; translate: 0 34px; scale: .92; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes bob { 50% { translate: 0 -8px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; }
}

/* stats strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--surface); padding: 22px 16px; text-align: center; }
.stat b { display: block; font: 700 clamp(1.6rem, 4vw, 2.3rem) var(--head); color: var(--accent); line-height: 1.15; }
.stat span { color: var(--muted); font-size: .9rem; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* three-column blocks: values, modes */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
.pillar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; transition: transform .3s, box-shadow .3s, border-color .3s; }
.pillar .num { font: 700 .8rem var(--head); color: var(--accent); letter-spacing: .2em; text-transform: uppercase; }
.pillar h3 { font-size: 1.35rem; margin: 8px 0; }
.pillar p { margin: 0 0 10px; color: var(--muted); }
.pillar p:last-child { margin: 0; }
.pillar .map { padding-top: 12px; border-top: 1px dashed var(--line); font-size: .92rem; }
.pillar .map b { color: var(--text); }
.meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 2px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .9rem; }
.meta li::before { content: "\25C6"; color: var(--accent); font-size: .55rem; margin-right: 7px; vertical-align: middle; }

/* game quick facts */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; margin: 32px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-align: left; }
.facts div { background: var(--surface); padding: 16px 18px; }
.facts dt { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; }
.facts dd { margin: 4px 0 0; font-weight: 700; }

/* racers */
.racers { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-top: 32px; }
.racer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; display: flex; flex-direction: column; gap: 4px; text-align: center; transition: transform .3s, box-shadow .3s, border-color .3s; }
.racer img { width: 96px; height: 96px; image-rendering: pixelated; margin: 0 auto 8px; filter: drop-shadow(0 10px 12px #0009); transition: transform .3s; }
.racer:hover img { animation: hop-big .7s ease-out; }
.racer h3 { margin: 0; font-size: 1.3rem; }
.racer .quote { margin: 0 0 8px; color: var(--muted); font-size: .92rem; }
.racer .ability { margin: auto 0 0; padding-top: 12px; border-top: 1px dashed var(--line); font-size: .9rem; color: var(--muted); }
.racer .ability b { display: block; color: var(--accent); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 2px; }
@media (max-width: 520px) { .racers { grid-template-columns: repeat(2, 1fr); gap: 10px; } .racer { padding: 16px 10px; } .racer img { width: 72px; height: 72px; } .racer .quote { display: none; } }

/* courses */
.courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; margin-top: 32px; }
.courses .card-body h3 { font-size: 1.3rem; }
.courses .badge { align-self: flex-start; }

/* faq */
.faq { max-width: 820px; margin: 32px auto 0; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 20px; transition: border-color .3s; }
.faq details[open] { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 32px 18px 0; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; translate: 0 -50%; font-size: 1.5rem; line-height: 1; color: var(--accent); transition: rotate .3s; }
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { margin: 0 0 18px; color: var(--muted); }

/* footer with columns */
footer.site-footer { padding: 56px 0 28px; text-align: left; font-size: .95rem; }
.foot { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.foot h4 { color: var(--text); margin: 0 0 12px; font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { text-decoration: none; transition: color .2s; }
.foot a:hover { color: var(--accent); }
.foot .brand { margin-bottom: 12px; }
.foot p { margin: 0; max-width: 300px; }
.legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: .85rem; }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr 1fr; } .foot > :first-child { grid-column: 1 / -1; } }

/* copy-email button and its toast (added by fx.js) */
.copy-mail { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-left: 6px; padding: 0; vertical-align: middle; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; transition: color .2s, border-color .2s, background-color .2s; }
.copy-mail:hover, .copy-mail:focus-visible { color: var(--accent); border-color: var(--accent); outline: none; }
.copy-mail svg { width: 15px; height: 15px; }
.actions .copy-mail { width: 52px; height: 52px; margin: 0; border-width: 2px; }
.actions .copy-mail svg { width: 20px; height: 20px; }
.toast { position: fixed; left: 50%; bottom: 24px; translate: -50% 20px; opacity: 0; z-index: 80; max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--accent); color: var(--text); font-weight: 600; box-shadow: 0 16px 40px -16px #000; pointer-events: none; transition: opacity .25s, translate .25s; }
.toast.show { opacity: 1; translate: -50% 0; }

/* plain text pages (privacy) */
main { max-width: 760px; margin: 0 auto; padding: 32px 16px 48px; }
main.page { max-width: none; padding: 0; }
.tag { color: var(--muted); margin: 0; }

footer { border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: .9rem; padding: 32px 16px 40px; }
footer a { color: var(--muted); }
