/* Layout: a phone shelf for the hero (the games are the thesis), then a catalogue of fourteen
   games read like a shelf of cartridges, then plain sections for the pledge and updates.
   Palette: night sky over a wheat field - the two halves of the flag, as places. */
:root {
  --sky: #eef3fa;          /* page ground */
  --paper: #ffffff;        /* raised surfaces */
  --ink: #0f1d33;          /* text */
  --ink-soft: #4a5b75;     /* secondary text */
  --line: #d6dfeb;         /* hairlines */
  --blue: #1f5fbf;         /* flag blue, links and primary buttons */
  --wheat: #f2b705;        /* flag yellow, the one bold accent */
  --wheat-ink: #3b2a00;    /* text on wheat */
  --field: #e6edf7;        /* card wells */
  --ok: #1d7a46;
  --soon: #8a5a00;
  --font-display: "Rubik", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sky: #0a1424; --paper: #111e33; --ink: #edf2fa; --ink-soft: #a9b8cf; --line: #22324d;
    --blue: #7fb0ff; --wheat: #ffc61a; --wheat-ink: #2a1d00; --field: #0d1a2d;
    --ok: #6fd99a; --soon: #ffcf66; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --sky: #0a1424; --paper: #111e33; --ink: #edf2fa; --ink-soft: #a9b8cf; --line: #22324d;
  --blue: #7fb0ff; --wheat: #ffc61a; --wheat-ink: #2a1d00; --field: #0d1a2d;
  --ok: #6fd99a; --soon: #ffcf66; color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--sky); color: var(--ink);
  font: 17px/1.6 var(--font-body);
  padding-inline: max(16px, env(safe-area-inset-left, 0px));
}
.wrap { max-width: 1120px; margin-inline: auto; }
a { color: var(--blue); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--wheat); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.01em; }
.eyebrow { font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
p { margin: 0; }
.prose { max-width: 62ch; display: grid; gap: 14px; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 19px; }
.brand svg { width: 34px; height: 34px; flex: none; }
.top nav { display: flex; gap: 18px; flex-wrap: wrap; font-weight: 700; font-size: 15px; }
.top nav a { color: var(--ink); text-decoration: none; }
.top nav a:hover { color: var(--blue); }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: center; padding-block: 28px 56px; }
.hero h1 { font-size: clamp(40px, 6.2vw, 74px); font-weight: 800; letter-spacing: -0.02em; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--wheat) 62%); padding-inline: 4px; }
.hero .lead { margin-top: 18px; font-size: 19px; color: var(--ink-soft); max-width: 46ch; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font-family: var(--font-display); font-weight: 700; font-size: 16px; text-decoration: none; border: 2px solid transparent; cursor: pointer; }
.btn-primary { background: var(--wheat); color: var(--wheat-ink); box-shadow: 0 4px 0 color-mix(in srgb, var(--wheat) 55%, #000); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--paper); }
.langs { margin-top: 22px; font-size: 14px; color: var(--ink-soft); }
.langs b { color: var(--ink); }

.shelf { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 0; min-height: 420px; }
.phone { width: 31%; max-width: 200px; aspect-ratio: 540 / 1171; border-radius: 26px; overflow: hidden; background: #000; border: 6px solid #0b1322;
         box-shadow: 0 30px 50px -20px rgba(9, 20, 40, .55); flex: none; }
.phone img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phone:nth-child(1) { transform: rotate(-7deg) translate(18px, 14px); }
.phone:nth-child(2) { transform: translateY(-18px); z-index: 2; max-width: 220px; width: 35%; }
.phone:nth-child(3) { transform: rotate(7deg) translate(-18px, 14px); }
@media (prefers-reduced-motion: no-preference) {
  .phone { transition: transform .35s ease; }
  .shelf:hover .phone:nth-child(1) { transform: rotate(-10deg) translate(4px, 10px); }
  .shelf:hover .phone:nth-child(3) { transform: rotate(10deg) translate(-4px, 10px); }
}

/* catalogue */
.section { padding-block: 56px; border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head p { color: var(--ink-soft); max-width: 52ch; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.game { background: var(--paper); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); min-width: 0; }
.shot { background: var(--field); aspect-ratio: 4 / 3; overflow: hidden; position: relative; }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; display: block; }
.shot.top img { object-position: top; }
.shot.land img { object-position: center; }
.shot.fallback { display: grid; place-items: center; background:
  repeating-linear-gradient(135deg, color-mix(in srgb, var(--blue) 14%, transparent) 0 14px, transparent 14px 28px), var(--field); }
.shot.fallback span { font-family: var(--font-display); font-weight: 800; font-size: 26px; color: var(--ink-soft); text-align: center; padding: 16px; }
.game-body { padding: 16px 18px 20px; display: grid; gap: 8px; }
.game h3 { font-size: 21px; font-weight: 700; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.genre { color: var(--ink-soft); font-weight: 700; }
.status { font-family: var(--font-display); font-weight: 700; font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid currentColor; }
.status.ok { color: var(--ok); } .status.soon { color: var(--soon); }
.game p { font-size: 15.5px; color: var(--ink-soft); }

/* pledge */
.pledge { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.steps { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; }
.steps li::before { content: counter(step); font-family: var(--font-display); font-weight: 800; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--wheat); color: var(--wheat-ink); }
.note { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 12px; }
.note small { color: var(--ink-soft); font-size: 14px; }

/* languages */
.tongues { display: flex; flex-wrap: wrap; gap: 10px; }
.tongues span { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 15px; }
.tongues span i { font-style: normal; color: var(--ink-soft); font-weight: 400; margin-left: 6px; font-size: 13px; }

/* updates */
.signup { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; max-width: 520px; }
.signup input { flex: 1 1 220px; min-width: 0; padding: 13px 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; }
.signup-msg { margin-top: 10px; font-size: 14px; color: var(--ink-soft); min-height: 1.4em; }

footer { border-top: 1px solid var(--line); padding-block: 28px 40px; color: var(--ink-soft); font-size: 14px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.slava { font-family: var(--font-display); font-weight: 700; color: var(--ink); }

@media (max-width: 820px) {
  .hero, .pledge { grid-template-columns: minmax(0, 1fr); }
  .shelf { min-height: 0; padding-top: 10px; }
}

/* game pages */
.crumb { font-weight: 700; font-size: 15px; text-decoration: none; }
.game-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; align-items: center; padding-block: 20px 44px; }
.game-hero h1 { font-size: clamp(38px, 5.6vw, 64px); font-weight: 800; letter-spacing: -0.02em; margin-top: 10px; }
.game-hero .lead { margin-top: 14px; font-size: 19px; color: var(--ink-soft); max-width: 48ch; }
.gallery { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; }
.gallery img { flex: none; height: 440px; width: auto; max-width: none; border-radius: 16px; border: 1px solid var(--line); scroll-snap-align: start; background: var(--field); }
.gallery.land img { height: 300px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.cols ul { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.coming { background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius); padding: 18px 20px; color: var(--ink-soft); }
@media (max-width: 820px) { .game-hero { grid-template-columns: minmax(0, 1fr); } .gallery img { height: 360px; } .gallery.land img { height: 220px; } }
.game-link { color: inherit; text-decoration: none; }
.game-link::after { content: ""; position: absolute; inset: 0; }
.game { position: relative; }
.game:hover { border-color: var(--blue); }
.cols > div { align-content: start; }

/* coming later: one wide card for a game that is still a prototype */
.later { margin-top: 36px; display: grid; gap: 14px; }
.game-wide { flex-direction: row; }
.game-wide .shot { flex: 0 0 46%; aspect-ratio: 16 / 9; }
.game-wide .game-body { align-content: center; }
@media (max-width: 640px) { .game-wide { flex-direction: column; } .game-wide .shot { flex: none; } }

/* legal pages (privacy, data deletion, terms, support, do-not-sell): long text, a draft banner, tables that scroll */
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; }
.draft { background: var(--wheat); color: var(--wheat-ink); border-radius: var(--radius); padding: 14px 18px; font-weight: 700; display: grid; gap: 4px; }
.draft span { font-weight: 400; font-size: 15px; }
.legal h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 800; letter-spacing: -0.02em; }
.legal h2 { font-size: clamp(22px, 3vw, 28px); margin-top: 18px; }
.legal h3 { font-size: 19px; margin-top: 8px; }
.legal ul, .legal ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.legal .meta { color: var(--ink-soft); }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.table-scroll table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 15px; }
.table-scroll th, .table-scroll td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table-scroll th { font-family: var(--font-display); font-weight: 700; background: var(--field); }
.table-scroll tr:last-child td { border-bottom: 0; }
.legal-wide { max-width: 860px; display: grid; gap: 14px; }
/* legal pages in two languages (privacy, terms: English, then Finnish at #fi) */
.legal-lang { margin: 0; font-weight: 700; }
.legal-fi { display: grid; gap: 14px; margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
/* press page: the studio fact sheet and the download button on each card */
.table-scroll table.facts { min-width: 0; }
.facts th { width: 34%; background: transparent; }
.press-dl { margin-top: 4px; }
.press-dl .btn { background: var(--blue); color: var(--paper); padding: 9px 16px; font-size: 15px; }
.press-dl .btn span { font-weight: 500; opacity: .85; }
