:root {
  --canvas: #f7f7f5;
  --paper: #ffffff;
  --ink: #171716;
  --muted: #666662;
  --line: #deded9;
  --soft: #efefeb;
  --blue: #1758d3;
  --blue-dark: #1048b2;
  --radius: 12px;
  --body-font: "Helvetica Neue", Helvetica, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--body-font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }

.site-header, .hero, .platforms, .game-overview, .closing, .footer {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  min-height: 132px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: 16px; font-weight: 700; letter-spacing: -0.025em; }
.brand img { display: block; width: 100px; height: 100px; object-fit: contain; }
.header-action, .card-link { color: var(--blue); font-size: 14px; font-weight: 650; }
.home-nav, .doc-nav { display: flex; align-items: center; gap: 18px; }
.home-nav > a:not(.header-action), .doc-nav > a:not(.header-action) { color: var(--muted); font-size: 14px; font-weight: 600; }
.header-action span, .card-link span, .button span { margin-left: 5px; }

.hero { padding: 80px 0 88px; border-bottom: 1px solid var(--line); }
.kicker { margin-bottom: 16px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.hero h1 { max-width: 780px; font-size: clamp(3.1rem, 8vw, 6.5rem); font-weight: 700; letter-spacing: -0.07em; line-height: 0.94; }
.hero-copy { max-width: 540px; margin-top: 28px; color: var(--muted); font-size: 18px; line-height: 1.55; }
.button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; margin-top: 30px; padding: 0 20px; border-radius: 8px; font-size: 15px; font-weight: 700; transition: background-color 160ms ease, transform 160ms ease; }
.button-primary { background: var(--blue); color: #fff; }
.button-primary:hover { background: var(--blue-dark); transform: translateY(-1px); }
.hero-note { margin-top: 14px; color: var(--muted); font-size: 13px; }

.platforms { padding: 72px 0 80px; border-bottom: 1px solid var(--line); }
.section-heading h2, .overview-intro h2, .closing h2 { font-size: clamp(2.15rem, 5vw, 4rem); font-weight: 700; letter-spacing: -0.055em; line-height: 1; }
.platform-grid { display: grid; gap: 12px; margin-top: 34px; }
.platform-card { display: flex; min-height: 252px; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.platform-card-featured { border-color: var(--ink); }
.platform-card-muted { background: transparent; }
.platform-icon { width: 42px; height: 42px; margin-bottom: 30px; color: var(--ink); }
.platform-label { margin-bottom: 9px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.platform-card h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.1; }
.platform-card p:not(.platform-label) { margin-top: 10px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.card-link { margin-top: auto; padding-top: 22px; }

.game-overview { display: grid; gap: 42px; padding: 80px 0; border-bottom: 1px solid var(--line); }
.overview-intro h2 { max-width: 540px; }
.game-steps { display: grid; gap: 0; padding: 0; margin: 0; list-style: none; border-top: 1px solid var(--line); }
.game-steps li { display: grid; grid-template-columns: 42px 1fr; gap: 8px 10px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.game-steps span { color: var(--muted); font-size: 13px; font-weight: 700; }
.game-steps strong { font-size: 17px; letter-spacing: -0.02em; }
.game-steps p { grid-column: 2; color: var(--muted); font-size: 15px; line-height: 1.5; }

.closing { padding: 88px 0; text-align: center; }
.closing h2 { font-size: clamp(2.8rem, 7vw, 5.2rem); }
.footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px 0 34px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

.doc-main { width: min(860px, calc(100% - 40px)); margin: 0 auto; padding: 76px 0 100px; }
.doc-main h1 { max-width: 760px; font-size: clamp(2.8rem, 7vw, 5.5rem); letter-spacing: -0.065em; line-height: .96; }
.doc-kicker { margin-bottom: 16px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.doc-lede { max-width: 620px; margin-top: 24px; color: var(--muted); font-size: 20px; line-height: 1.5; }
.doc-content { margin-top: 62px; font-size: 17px; line-height: 1.68; }
.doc-content > p:first-child { margin-top: 0; }
.doc-content h2 { margin: 58px 0 14px; font-size: 30px; letter-spacing: -.04em; line-height: 1.08; }
.doc-content h3 { margin: 34px 0 8px; font-size: 20px; letter-spacing: -.025em; }
.doc-content p { margin-top: 14px; color: var(--muted); }
.doc-content strong { color: var(--ink); }
.doc-content ul, .doc-content ol { margin: 18px 0; padding-left: 24px; color: var(--muted); }
.doc-content li { margin: 8px 0; padding-left: 4px; }
.doc-content img { display: block; width: 100%; max-height: 620px; object-fit: cover; margin: 32px 0 42px; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 40px rgba(0,0,0,.12); }
.doc-callout { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 50px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.doc-callout a { color: var(--blue); font-weight: 700; }
.doc-content blockquote { margin: 28px 0; padding: 16px 18px; border-left: 3px solid var(--blue); background: var(--soft); color: var(--muted); }

@media (min-width: 720px) {
  .site-header, .hero, .platforms, .game-overview, .closing, .footer { width: min(1120px, calc(100% - 80px)); }
  .hero { padding: 122px 0 128px; }
  .platform-grid { grid-template-columns: repeat(3, 1fr); }
  .platform-card { min-height: 276px; padding: 28px; }
  .game-overview { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; gap: 80px; }
  .doc-main { width: min(860px, calc(100% - 80px)); padding-top: 112px; }
}

@media (max-width: 680px) {
  .home-nav > a:not(.header-action) { display: none; }
  .doc-nav { gap: 10px; }
  .doc-nav > a:not(.header-action) { font-size: 12px; }
  .doc-callout { align-items: flex-start; flex-direction: column; }
}

@media (prefers-color-scheme: dark) {
  :root { --canvas: #171716; --paper: #20201e; --ink: #f5f5f1; --muted: #b8b8b1; --line: #3a3a36; --soft: #292927; --blue: #5d8fff; --blue-dark: #7aa3ff; }
  .button-primary { color: #101010; }
}

[data-theme="dark"] {
  --canvas: #171716;
  --paper: #20201e;
  --ink: #f5f5f1;
  --muted: #b8b8b1;
  --line: #3a3a36;
  --soft: #292927;
  --blue: #5d8fff;
  --blue-dark: #7aa3ff;
  color-scheme: dark;
}

[data-theme="dark"] .button-primary { color: #101010; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
