/* One stylesheet for every page.

   Two jobs that pull in opposite directions. The home page is the studio's front
   door and should look like the games do — bright, rounded, friendly. The legal
   pages are documents people open when something has gone wrong, or when a store
   reviewer is checking compliance, so they have to stay calm and readable on any
   phone and never fight the text.

   The palette is taken straight off the logotype: navy outline, cartoon blue,
   golden yellow. Nothing here is decoration for its own sake. */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

:root {
    /* Brand, sampled from the logo */
    --navy:   #151c4a;
    --blue:   #2f9bff;
    --blue-d: #1a62e0;
    --gold:   #ffc646;
    --gold-d: #ffa90f;

    --ink:    #1b2141;
    --muted:  #5f678c;
    --rule:   #e4e8f6;
    --link:   #1a62e0;
    --accent: #1a62e0;
    --paper:  #ffffff;
    --panel:  #f3f6ff;
    --tint:   #eaf2ff;
    --shadow: 0 2px 4px rgba(21, 28, 74, .04), 0 12px 28px rgba(21, 28, 74, .07);
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink:    #e7eaf7;
        --muted:  #9aa2c4;
        --rule:   #2a3157;
        --link:   #7fb4ff;
        --accent: #7fb4ff;
        --paper:  #0f1330;
        --panel:  #171d40;
        --tint:   #1a2148;
        --shadow: 0 2px 4px rgba(0, 0, 0, .2), 0 12px 28px rgba(0, 0, 0, .28);
    }
}

* { box-sizing: border-box; }

/* 100vw includes the scrollbar, so the full-bleed band above can overhang by a
   few pixels. Nothing on these pages is meant to scroll sideways. */
html { overflow-x: hidden; }

body {
    margin: 0;
    padding: 0 20px 80px;
    background: var(--paper);
    color: var(--ink);
    font: 17px/1.7 Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
}

main, header, footer { max-width: 720px; margin: 0 auto; }

/* ---------------------------------------------------------------- headings */

h1 { font-size: 34px; line-height: 1.2; letter-spacing: -.02em; font-weight: 800; margin: 0 0 10px; }
h2 { font-size: 22px; line-height: 1.3; letter-spacing: -.01em; font-weight: 800; margin: 44px 0 12px; }
h3 { font-size: 17px; font-weight: 700; margin: 28px 0 6px; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration: none; }

ul { padding-left: 22px; }
li { margin: 7px 0; }

/* Long third-party URLs are printed in full in the policy, and on a narrow phone
   a single unbroken one would push the whole page sideways. */
li a { word-break: break-word; }

code {
    background: var(--panel);
    border: 1px solid var(--rule);
    border-radius: 5px;
    padding: 1px 6px;
    font-size: 15px;
}

/* -------------------------------------------------- document page furniture */

header {
    padding: 44px 0 26px;
    border-bottom: 2px solid var(--rule);
    margin-bottom: 28px;
}

.studio {
    font-size: 13px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 800;
    margin: 0 0 10px;
}

.studio a { color: inherit; text-decoration: none; }
.studio a:hover { text-decoration: underline; }

.updated { color: var(--muted); font-size: 15px; margin: 0; }

.panel {
    background: var(--tint);
    border: 1px solid var(--rule);
    border-left: 4px solid var(--blue);
    border-radius: 12px;
    padding: 18px 22px;
    margin: 26px 0;
}

.panel p:first-child { margin-top: 0; }
.panel p:last-child  { margin-bottom: 0; }

footer {
    margin-top: 60px;
    padding-top: 22px;
    border-top: 2px solid var(--rule);
    color: var(--muted);
    font-size: 15px;
}

footer p { margin: 6px 0; }

/* ------------------------------------------------------------------- cards */

.cards { display: grid; gap: 16px; margin: 28px 0; }

.card {
    position: relative;
    display: block;
    border: 1px solid var(--rule);
    border-radius: 16px;
    padding: 22px 24px 22px 28px;
    text-decoration: none;
    color: inherit;
    background: var(--panel);
    overflow: hidden;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

/* The stripe down the left edge is the only colour on the card, so it carries
   the brand without competing with the text. */
.card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, var(--blue), var(--blue-d));
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--blue);
    box-shadow: var(--shadow);
}

.card strong { display: block; font-size: 19px; font-weight: 800; margin-bottom: 3px; color: var(--ink); }
.card span   { color: var(--muted); font-size: 15px; }

/* A card whose stripe is gold, for the odd one out. */
.card.alt::before { background: linear-gradient(180deg, var(--gold), var(--gold-d)); }
.card.alt:hover   { border-color: var(--gold-d); }

/* -------------------------------------------------------------- home page */

/* The hero is a tinted band that runs the full width of the window while its
   contents stay inside the same column as every other page. */
header.home {
    border-bottom: none;
    text-align: center;
    max-width: none;
    /* Pull the band out to both window edges: a negative margin of exactly the
       gap between the column and the edge. Then push the contents back in with
       padding, never below the 20px gutter a phone needs. */
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: 40px;
    padding: 56px max(20px, calc(50vw - 360px)) 48px;
    background:
        radial-gradient(900px 420px at 50% -10%, var(--tint), transparent 70%),
        linear-gradient(180deg, var(--panel), var(--paper));
}

.logo {
    width: 100%;
    max-width: 240px;
    height: auto;
    display: inline-block;
    filter: drop-shadow(0 10px 22px rgba(21, 28, 74, .18));
}

.tagline {
    margin: 18px auto 0;
    max-width: 30ch;
    color: var(--muted);
    font-size: 18px;
    font-weight: 600;
}

/* Read aloud, never drawn. The logotype already shows the name on screen. */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.home-main h2 { margin-top: 0; }
.home-main h2 + p { margin-top: 0; }
.home-main section { margin-bottom: 44px; }

.contact {
    background: var(--tint);
    border: 1px solid var(--rule);
    border-radius: 16px;
    padding: 22px 24px;
}

.contact p:first-child { margin-top: 0; }
.contact p:last-child  { margin-bottom: 0; }

footer.home { text-align: center; border-top: none; }

/* --------------------------------------------------------------- narrow */

@media (max-width: 520px) {
    body { padding: 0 16px 64px; }
    h1 { font-size: 28px; }
    h2 { font-size: 20px; }
    header.home { padding-top: 40px; padding-bottom: 36px; }
    .logo { max-width: 190px; }
    .tagline { font-size: 17px; }
}

/* Someone who has asked their system to stop moving things gets no lift. */
@media (prefers-reduced-motion: reduce) {
    .card { transition: none; }
    .card:hover { transform: none; }
}
