/* ==========================================================================
   Dee's Games studio pages (home, about, privacy). Deliberately quiet: the
   studio is paper and ink with one accent from the logo's purple; each game
   brings its own colour inside its own card. The pixel logo is the only
   pixel element. Game pages use site.css instead.
   ========================================================================== */

:root {
  --paper: #fbfafd;
  --ink: #211a2c;
  --muted: #5f5873;
  --rule: #e6e1ee;
  --tint: #f3eff8;
  --accent: #7b3aa6;        /* logo purple, darkened to 6.4:1 on paper for text */
  --logo-dark: #403353;
  --measure: 64ch;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #15121b; --ink: #efeaf6; --muted: #a99fbc; --rule: #2b2538; --tint: #1d1926; --accent: #c9a0ea;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] { --paper: #15121b; --ink: #efeaf6; --muted: #a99fbc; --rule: #2b2538; --tint: #1d1926; --accent: #c9a0ea; color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.studio {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, sans-serif;
  font-size: 18px; line-height: 1.6;
}
.px { image-rendering: pixelated; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 12px; }
h1 { font-size: clamp(34px, 5vw, 46px); }
h2 { font-size: 26px; margin-top: 44px; }
h3 { font-size: 19px; margin-top: 28px; }
p, li { max-width: var(--measure); }
p { margin: 0 0 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Bar and footer */
.s-bar { max-width: 1080px; margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.s-brand img { display: block; width: 136px; height: auto; }
.s-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.s-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 16px; padding: 6px 10px; border-radius: 6px; }
.s-nav a:hover { background: var(--tint); }
.s-nav a[aria-current] { color: var(--accent); }
.s-foot { max-width: 1080px; margin: 72px auto 0; padding: 22px 24px 40px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-size: 15px; color: var(--muted); }
.s-foot p { margin: 0; }
.s-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.s-foot a { color: var(--muted); }

.s-main { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.s-doc { max-width: 720px; margin: 0 auto; padding: 24px 24px 0; }
.s-kicker { color: var(--muted); font-size: 15px; margin-bottom: 8px; }
.s-lede { font-size: 21px; color: var(--muted); }

/* Home hero: the logo, large, is the whole statement */
.s-hero { padding: 40px 0 24px; display: grid; gap: 20px; justify-items: start; }
.s-hero img { width: 408px; max-width: 100%; height: auto; }
.s-hero p { font-size: 22px; color: var(--muted); margin: 0; }

/* Games */
.s-games { display: grid; gap: 20px; margin-top: 12px; }
.game-card {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); overflow: hidden;
  border: 1px solid var(--rule); border-radius: 18px; background: var(--paper);
}
.game-art {
  position: relative; min-height: 300px; display: grid; place-items: center; padding: 28px;
  background: #7dabff url("../assets/map/MapOceanTile.png") 0 0 / 192px; image-rendering: pixelated;
}
/* The game's real sea chart (MapIslandCatalog layout), portrait, on the right;
   the intro-splash title on the left. */
.game-art .isles { position: absolute; top: 50%; left: 50%; height: 112%; aspect-ratio: 180 / 270; transform: translate(-50%, -50%); }
.game-art .isles img { position: absolute; transform: translate(-50%, -50%); image-rendering: pixelated; }
.game-title a { text-decoration: none; display: inline-block; }
.game-title .ptext { --s: 1.5; }
.game-body { padding: 32px 32px 30px; display: grid; align-content: center; gap: 4px; }
.game-body h3 { margin: 0; font-size: 28px; }
.game-meta { color: var(--muted); font-size: 15px; margin: 0 0 12px; }
.game-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.s-btn { display: inline-block; font-weight: 700; font-size: 16px; text-decoration: none; padding: 11px 18px; border-radius: 10px; border: 1px solid var(--ink); color: var(--ink); }
.s-btn.primary { background: var(--ink); color: var(--paper); }
.s-btn:hover { transform: translateY(-1px); }
.game-card.soon { grid-template-columns: 1fr; border-style: dashed; background: transparent; }
.game-card.soon .game-body { padding: 26px 30px; }
.game-card.soon h3 { font-size: 20px; }

/* Documents (about, privacy) */
.s-summary { background: var(--tint); border-radius: 14px; padding: 20px 24px; margin: 24px 0 8px; }
.s-summary h2 { margin: 0 0 8px; font-size: 19px; }
.s-summary ul { margin: 0; padding-left: 20px; }
.s-summary li { margin-bottom: 4px; }
.s-toc { margin: 22px 0 0; padding: 0; list-style: none; counter-reset: toc; display: grid; gap: 4px; }
.s-toc li { counter-increment: toc; }
.s-toc li::before { content: counter(toc) "."; display: inline-block; width: 1.6em; color: var(--muted); }
.s-doc h2 { scroll-margin-top: 20px; }
.s-doc h2 .n { color: var(--muted); font-weight: 600; margin-right: 10px; }
.s-doc ul { padding-left: 22px; }
.s-doc li { margin-bottom: 8px; }
.s-doc code { font-size: 0.9em; background: var(--tint); padding: 1px 6px; border-radius: 5px; }
.s-table { width: 100%; border-collapse: collapse; font-size: 16px; margin: 8px 0 16px; }
.s-table th, .s-table td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); }
.s-table th { font-size: 14px; color: var(--muted); font-weight: 600; }

@media (max-width: 760px) {
  .game-card { grid-template-columns: 1fr; }
  .game-art { min-height: 220px; }
  .game-body { padding: 24px 22px; }
}
@media (max-width: 640px) {
  body.studio { font-size: 17px; }
  .s-bar { padding: 14px 16px; }
  .s-brand img { width: 102px; }
  .game-title .ptext { --s: 1.5; }
  .s-bar { flex-wrap: nowrap; }
  .s-nav { gap: 0; flex-wrap: nowrap; }
  .s-nav a { padding: 6px 7px; font-size: 15px; }
  .s-hero img { width: 272px; }
  .s-main, .s-doc { padding-left: 16px; padding-right: 16px; }
  .s-foot { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
