/* Pixel Dreamland — shared styles (header, footer, homepage, policy pages, game page layout)
   Game pages add a theme file from assets/css/games/ that restyles the <main class="game"> area. */

:root {
  --ink: #122033;
  --muted: #53627a;
  --line: #e3e8f0;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --accent: #1f7fc4;
  --accent-dark: #155e92;
  --accent-soft: #eaf3fb;
  --radius: 16px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; margin: 0; }
p { margin: 0; }

.container { max-width: var(--max); margin: 0 auto; padding-inline: 24px; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip-link:focus { left: 8px; }
.pixelated { image-rendering: pixelated; }

/* ---------- Header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.site-header .container { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; padding-block: 14px; }
.site-header .logo img { height: 40px; width: auto; image-rendering: pixelated; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; font-weight: 600; font-size: 15px; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 6px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 10px; font-weight: 700; text-decoration: none; font-size: 15px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-link { color: var(--ink); padding-inline: 6px; }
.btn-link:hover { color: var(--accent); }

.store-btn { display: inline-flex; align-items: center; gap: 10px; background: #000; color: #fff; border: 1px solid #a6a6a6; border-radius: 10px; padding: 8px 16px 8px 12px; text-decoration: none; line-height: 1.1; }
.store-btn:hover { color: #fff; background: #222; }
.store-btn svg { flex-shrink: 0; }
.store-btn small { display: block; font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; }
.store-btn strong { display: block; font-size: 17px; font-weight: 600; }

/* ---------- Homepage ---------- */
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.hero { background: var(--surface); }
.hero .container { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-block: 80px 88px; }
.hero-copy { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero-copy h1 { font-size: clamp(36px, 5vw, 60px); line-height: 1.08; letter-spacing: -0.02em; font-weight: 800; }
.hero-copy p { font-size: 18px; line-height: 1.65; color: var(--muted); max-width: 50ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-phones { flex: 1 1 400px; min-width: 0; display: flex; justify-content: center; align-items: flex-end; gap: 4%; }
.phone { width: 30%; max-width: 200px; aspect-ratio: 9 / 16; border-radius: 26px; background: #0e1626; padding: 7px; box-shadow: 0 24px 48px rgba(14, 22, 38, 0.18); }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; }
.phone.tilt-l { transform: rotate(-4deg); margin-bottom: 24px; }
.phone.tilt-r { transform: rotate(4deg); margin-bottom: 24px; }
.phone.center { width: 36%; max-width: 230px; }

.section { padding-block: 72px; }
.section-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 36px); letter-spacing: -0.01em; font-weight: 800; }
.section-head p { color: var(--muted); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.game-card { display: flex; flex-direction: column; gap: 16px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; transition: border-color 0.15s, box-shadow 0.15s; }
.game-card:hover { border-color: #c5d3e4; box-shadow: 0 8px 24px rgba(18, 32, 51, 0.06); }
.game-card-top { display: flex; gap: 16px; align-items: center; }
.game-card-top img { width: 64px; height: 64px; border-radius: 14px; }
.game-card h3 { font-size: 18px; font-weight: 700; }
.game-card h3 a { color: inherit; text-decoration: none; }
.game-card .genre { font-size: 13px; color: var(--muted); }
.game-card p { font-size: 15px; line-height: 1.55; color: var(--muted); }
.game-card-links { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; font-weight: 700; }
.game-card-links a { text-decoration: none; }
.game-card-links a.ext { color: var(--ink); }
.game-card-links a.ext:hover { color: var(--accent); }

.soon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.soon-card { display: flex; gap: 18px; align-items: center; padding: 22px; background: var(--surface); border: 1px dashed #b8c4d6; border-radius: var(--radius); min-width: 0; }
.soon-card h3 { font-size: 17px; font-weight: 700; }
.soon-card p { font-size: 14px; color: var(--muted); line-height: 1.5; }
.soon-card .tag { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--accent); background: var(--accent-soft); border-radius: 99px; padding: 2px 10px; }
.soon-art { width: 64px; height: 64px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.soon-art.tumbler { background: #f2b179; color: #fff; font-size: 16px; transform: rotate(-8deg); box-shadow: 4px 4px 0 #edcf72; }
.soon-art.supreme { grid-template-columns: repeat(2, 20px); gap: 4px; place-content: center; background: #2f3640; }
.soon-art.supreme span { width: 20px; height: 20px; border-radius: 4px; }
.soon-art.tacky { background: #fff4cc; color: #d9483b; }

.about { background: var(--surface); border-top: 1px solid var(--line); }
.about .container { display: flex; flex-wrap: wrap; gap: 24px 48px; }
.about h2 { flex: 1 1 260px; font-size: clamp(28px, 3.4vw, 36px); font-weight: 800; letter-spacing: -0.01em; }
.about p { flex: 2 1 420px; font-size: 17px; line-height: 1.75; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg); border-top: 1px solid var(--line); color: var(--ink); font-family: var(--font); }
.footer-main { display: flex; flex-wrap: wrap; gap: 40px 64px; justify-content: space-between; padding-block: 56px 40px; }
.footer-brand { max-width: 320px; display: flex; flex-direction: column; gap: 12px; }
.footer-brand img { width: 180px; image-rendering: pixelated; }
.footer-brand p { font-size: 14px; color: var(--muted); }
.footer-col { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-col h2 { font-size: 14px; font-weight: 700; }
.footer-col a { color: var(--muted); text-decoration: none; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--line); padding-block: 20px 32px; font-size: 13px; color: var(--muted); }

/* ---------- Policy / text pages ---------- */
.doc { background: var(--surface); }
.doc .container { max-width: 780px; padding-block: 64px 88px; }
.doc .breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.doc .breadcrumb a { color: var(--muted); }
.doc h1 { font-size: clamp(30px, 4vw, 42px); font-weight: 800; letter-spacing: -0.015em; margin-bottom: 32px; }
.prose { font-size: 16px; line-height: 1.75; color: #2c3a4f; }
.prose > * + * { margin-top: 16px; }
.prose h2 { font-size: 20px; font-weight: 700; color: var(--ink); margin-top: 40px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 6px; }
.prose a { word-break: break-word; }
.policy-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.policy-list a { display: flex; justify-content: space-between; gap: 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; }
.policy-list a:hover { border-color: var(--accent); color: var(--accent); }
.policy-list span { color: var(--muted); font-weight: 400; font-size: 14px; }

/* ---------- Game pages: shared layout (themes live in assets/css/games/) ---------- */
.game { --g-bg: #fff; --g-ink: var(--ink); --g-muted: var(--muted); --g-accent: var(--accent); --g-display: var(--font); --g-body: var(--font); background: var(--g-bg); color: var(--g-ink); font-family: var(--g-body); }
.game h1, .game h2, .game h3 { font-family: var(--g-display); font-weight: 400; }
.game-hero .container { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-block: 64px; }
.game-hero-copy { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.game-hero-copy .game-icon { width: 96px; height: 96px; border-radius: 22px; }
.game-hero-copy h1 { font-size: clamp(46px, 7vw, 84px); line-height: 1; }
.game-hero-copy .lede { font-size: 19px; line-height: 1.6; max-width: 44ch; }
.game-hero-copy .meta { font-size: 14px; font-weight: 700; }
.game-hero-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.game-hero-media { flex: 1 1 420px; min-width: 0; display: flex; justify-content: center; align-items: flex-end; gap: 20px; }
.game-section { padding-block: 72px; }
.game-section h2 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 24px; }
.game-section .intro { max-width: 62ch; font-size: 17px; line-height: 1.7; color: var(--g-muted); }
.two-col { display: flex; flex-wrap: wrap; gap: 48px; }
.two-col > * { flex: 1 1 360px; min-width: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 20px; }
.feature { display: flex; flex-direction: column; gap: 8px; padding: 22px; min-width: 0; }
.feature h3 { font-size: 22px; }
.feature p { font-size: 15px; line-height: 1.55; }
.tips { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; font-size: 16px; line-height: 1.55; }
.tips li { display: flex; gap: 12px; align-items: flex-start; }
.tips li::before { content: ""; flex-shrink: 0; width: 18px; height: 18px; margin-top: 4px; background: var(--g-accent); border-radius: 4px; }
.shots { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
.shots img { flex: 0 0 auto; width: 240px; scroll-snap-align: start; }
.shots.landscape img { width: min(520px, 85vw); }
.game-legal { font-size: 14px; }
.game-section.game-legal-wrap { padding-block: 28px; }
.shots.landscape { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); overflow: visible; }
.shots.landscape img { width: 100%; }
.game .game-legal a { color: var(--g-ink); }
@media (max-width: 640px) {
  .site-header { position: static; }
  .site-header .logo img { height: 34px; }
}
