@layer theme, base, utilities;

:root {
  color-scheme: dark;
  --bg: #101119;
  --surface: #191b26;
  --surface-up: #222534;
  --line: #333849;
  --ink: #f5f3f8;
  --muted: #bbc0d2;
  --accent: #c9fc81;
  --bass: #67edce;
  --danny: #ffd17c;
  --radius: 18px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding: 154px 0 calc(88px + env(safe-area-inset-bottom)); }
body { margin: 0; background: var(--bg); color: var(--ink); }
img { display: block; max-width: 100%; height: auto; }
@layer base {
  a { color: inherit; }
}
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
p { color: var(--muted); line-height: 1.66; margin: 0 0 1rem; }
h1, h2, h3 { margin: 0 0 0.7em; line-height: 1.1; letter-spacing: -0.035em; }
h1 { font-size: clamp(3rem, 7.2vw, 6.75rem); }
h2 { font-size: clamp(1.65rem, 3vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2.3vw, 1.65rem); }
.shell { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.skip { position: absolute; top: 1rem; left: 1rem; z-index: 30; transform: translateY(-200%); padding: 0.8rem; background: var(--accent); color: var(--bg); }
.skip:focus { transform: none; }
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: #12141d; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 22px; min-height: 60px; }
.wordmark, .footer-brand { text-decoration: none; font-size: 1.4rem; font-weight: 850; letter-spacing: -0.06em; white-space: nowrap; }
.wordmark { display: inline-flex; align-items: center; }
.wordmark > span:last-child { color: var(--accent); }
.mark { display: flex; gap: 3px; align-items: center; justify-content: center; width: 31px; height: 31px; margin-right: 9px; border: 1px solid #486242; border-radius: 8px; }
.mark i { display: block; width: 3px; border-radius: 3px; height: 12px; background: var(--accent); transform: skewY(-22deg); }
.mark i:nth-child(2) { height: 17px; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 12px 25px; margin-left: auto; }
.site-header nav a { color: var(--muted); text-decoration: none; font-weight: 650; font-size: 0.9rem; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--accent); }
.header-action, .floating-bonus {
  padding-inline: max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-right));
}
.header-action { padding-bottom: 8px; }
.floating-bonus {
  position: fixed;
  z-index: 19;
  inset: auto 0 0;
  padding-block: 6px calc(8px + env(safe-area-inset-bottom));
  background: #12141d;
  border-top: 1px solid var(--line);
}
.floating-bonus[hidden] { display: none; }
.header-action a:focus-visible, .floating-bonus a:focus-visible { outline-offset: -6px; outline-color: #101119; }
.homepage-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); align-items: center; gap: 50px; padding: 72px 0; }
.homepage-hero h1 { margin-bottom: 0.28em; }
.homepage-hero h1 span { display: block; color: var(--accent); }
.homepage-hero p, .lede { font-size: clamp(1.02rem, 1.85vw, 1.24rem); max-width: 34rem; }
.button { margin-top: 0.65rem; }
.hero-visual { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; min-width: 0; isolation: isolate; }
.hero-visual::before { content: ""; position: absolute; inset: -20px; z-index: -1; background: radial-gradient(ellipse at 28% 20%, #2b83705e, transparent 64%), radial-gradient(ellipse at 81% 72%, #a066344f, transparent 69%); filter: blur(18px); pointer-events: none; }
.hero-panel { border: 1px solid #656a78; overflow: hidden; border-radius: var(--radius); background: #1b2530; box-shadow: 0 13px 40px #0007; transform: rotate(-5deg); }
.hero-panel img { width: 100%; height: 100%; min-height: 245px; aspect-ratio: 0.93; object-fit: cover; }
.hero-panel-danny { transform: translateY(20px) rotate(5deg); background: #432852; }
.game-section { border-top: 1px solid var(--line); padding-top: 36px; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.game-card { display: flex; flex-direction: column; text-decoration: none; min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.game-card:hover { border-color: var(--tone); }
.bass { --tone: var(--bass); }
.danny { --tone: var(--danny); }
.bounty { --tone: #ffad8c; }
.avatars { --tone: #9dddea; }
.card-image { aspect-ratio: 2.05; background: #181c28; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.game-card-copy { display: flex; flex: 1; flex-direction: column; padding: clamp(18px, 3vw, 28px); }
.game-card-copy h3 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 0.35em; }
.kicker { font-size: 0.78rem; letter-spacing: 0.08em; font-weight: 750; text-transform: uppercase; color: var(--tone, var(--accent)); margin-bottom: 0.75rem; }
.card-link { margin-top: auto; }
.site-footer { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 70px; padding-block: 25px calc(104px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.site-footer p { margin: 0; font-size: 0.84rem; }
.breadcrumbs { display: flex; align-items: center; gap: 10px; padding: 25px 0; color: var(--muted); font-size: 0.9rem; }
.breadcrumbs a:hover { color: var(--tone); }
.guide-hero { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; gap: 36px; padding-block: 16px 24px; }
.guide-hero h1 { font-size: clamp(2.75rem, 6.1vw, 5.3rem); margin-bottom: 0.32em; }
.bounty .guide-hero h1 { font-size: clamp(2.5rem, 5.2vw, 4.7rem); }
.avatars .guide-hero h1 { font-size: clamp(2.4rem, 4.8vw, 4.4rem); }
.feature-table { width: 100%; border-collapse: collapse; text-align: left; margin: 1.1rem 0; }
.feature-table caption { padding: .75rem; text-align: left; font-weight: 750; color: var(--tone); }
.feature-table :is(th, td) { padding: .65rem .9rem; border-bottom: 1px solid var(--line); }
.feature-table thead { background: var(--surface); }
.demo-note { margin: 10px 0 0; font-size: 0.85rem; }
.demo-note a { color: var(--tone); text-underline-offset: 3px; }
.game-media { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.game-media img { width: 100%; max-height: 480px; object-fit: contain; background: #161827; }
.game-media figcaption { padding: 10px 14px; color: var(--muted); font-size: 0.79rem; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 16px 0 38px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.facts div { background: var(--surface); padding: clamp(10px, 2.5vw, 22px); }
.facts dt { font-size: 0.84rem; color: var(--muted); margin-bottom: 6px; }
.facts dd { font-size: clamp(0.98rem, 2.4vw, 1.55rem); font-weight: 800; margin: 0; overflow-wrap: anywhere; }
.guide-content { display: grid; grid-template-columns: minmax(140px, 0.25fr) minmax(0, 1fr); gap: 42px; }
.guide-content aside nav { position: sticky; top: 154px; display: grid; gap: 10px; padding: 1.2rem; border-left: 1px solid var(--line); }
.guide-content aside h2 { font-size: 1.05rem; margin-bottom: 6px; }
.guide-content aside a { color: var(--muted); font-size: 0.91rem; text-decoration: none; }
.guide-content aside a:hover { color: var(--tone); }
.article-body { max-width: 49rem; font-size: 1.04rem; }
.article-body section { padding: 20px 0 25px; border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.article-body p a, .version-list a, .text-links a { color: var(--tone); text-underline-offset: 3px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-block: 18px; }
.steps div { padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.steps strong, .steps span, .version-list span { display: block; }
.steps strong { color: var(--tone); margin-bottom: 4px; }
.steps span, .version-list span { color: var(--muted); line-height: 1.5; }
.note { font-size: 0.91rem; }
.version-list, .text-links { list-style: none; margin: 1rem 0; padding: 0; }
.version-list { display: grid; gap: 8px; }
.version-list li { padding: 13px 16px; background: var(--surface); border-radius: 8px; }
.text-links { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.related { display: grid; gap: 5px; border: 1px solid var(--line); border-radius: 12px; padding: 18px; text-decoration: none; background: var(--surface); }
.related:hover { border-color: var(--tone); }
.related > span { color: var(--muted); font-size: 0.86rem; }
.related strong { color: var(--tone); }
@media (min-width: 1000px) {
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 740px) {
  html { scroll-padding-top: 174px; }
  .shell { width: calc(100% - 36px); }
  .header-inner { flex-wrap: wrap; justify-content: flex-start; padding-block: 9px; gap: 8px 16px; }
  .site-header nav { gap: 8px 14px; margin-left: 0; }
  .homepage-hero { grid-template-columns: 1fr; gap: 29px; padding: 40px 0; }
  .hero-visual { margin: 6px 15px 16px; }
  .hero-panel img { min-height: 0; aspect-ratio: 1.13; }
  .hero-panel-danny { transform: translateY(10px) rotate(5deg); }
  .game-section { padding-top: 24px; }
  .card-grid, .guide-hero, .guide-content { grid-template-columns: 1fr; gap: 22px; }
  .guide-content aside nav { position: static; display: flex; flex-wrap: wrap; padding: 12px 0; gap: 10px 16px; border: 0; }
  .guide-content aside h2 { width: 100%; margin: 0; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 8px; margin-top: 45px; }
}
@media (max-width: 420px) {
  .steps { grid-template-columns: 1fr; }
  .text-links { gap: 7px 15px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
