/*
 * playsocceratlas.com. White paper and a box of crayons, as in the app: the
 * tokens are src/ui/theme.ts's, the type is the app's own Fredoka and Nunito,
 * served from this site (no third party sees a visitor). No script runs here.
 */
@font-face { font-family: 'Fredoka'; font-weight: 600; font-style: normal; font-display: swap; src: url('fonts/Fredoka_600SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Fredoka'; font-weight: 700; font-style: normal; font-display: swap; src: url('fonts/Fredoka_700Bold.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 400; font-style: normal; font-display: swap; src: url('fonts/Nunito_400Regular.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 700; font-style: normal; font-display: swap; src: url('fonts/Nunito_700Bold.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 800; font-style: normal; font-display: swap; src: url('fonts/Nunito_800ExtraBold.woff2') format('woff2'); }

:root {
  --paper: #ffffff;
  --paper-raised: #faf9f6;
  --edge: #e6e2da;
  --ink: #141c24;
  --ink-muted: #5c6b77;
  --ink-faint: #65737f;
  --scrim: rgba(20, 28, 36, 0.38);

  --gold: #ffc531;
  --gold-edge: #d9a21a;
  --on-accent: #1a1205;

  --sky: #3a8dff;
  --sky-ink: #1f5fb8;
  --sky-soft: #e8f1ff;
  --sky-edge: #2a72d9;
  --coral: #ff5a5f;
  --coral-ink: #c8323a;
  --coral-soft: #ffecec;
  --coral-edge: #d9434a;
  --violet: #7b61ff;
  --violet-ink: #4e39c9;
  --violet-soft: #efebff;
  --violet-edge: #5e45db;
  --green: #2fb36b;
  --green-ink: #1c7a47;
  --green-soft: #e9f8ef;
  --green-edge: #23915a;

  --shadow: 0 14px 34px rgba(20, 28, 36, 0.14);
  --radius: 24px;
  --radius-sm: 14px;
  --font-display: 'Fredoka', ui-rounded, 'Nunito', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #0f1720;
    --paper-raised: #16212c;
    --edge: #27353f;
    --ink: #f2f5f7;
    --ink-muted: #aab7c1;
    --ink-faint: #94a3ae;
    --sky-ink: #93c0ff;
    --sky-soft: rgba(58, 141, 255, 0.16);
    --coral-ink: #ff9fa2;
    --coral-soft: rgba(255, 90, 95, 0.16);
    --violet-ink: #bcb0ff;
    --violet-soft: rgba(123, 97, 255, 0.2);
    --green-ink: #7edba7;
    --green-soft: rgba(47, 179, 107, 0.16);
    --shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --paper: #0f1720;
  --paper-raised: #16212c;
  --edge: #27353f;
  --ink: #f2f5f7;
  --ink-muted: #aab7c1;
  --ink-faint: #94a3ae;
  --sky-ink: #93c0ff;
  --sky-soft: rgba(58, 141, 255, 0.16);
  --coral-ink: #ff9fa2;
  --coral-soft: rgba(255, 90, 95, 0.16);
  --violet-ink: #bcb0ff;
  --violet-soft: rgba(123, 97, 255, 0.2);
  --green-ink: #7edba7;
  --green-soft: rgba(47, 179, 107, 0.16);
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sky-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--gold); color: var(--on-accent); padding: 10px 16px; border-radius: 999px; font-weight: 800; z-index: 20; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 24px; } }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 7vw, 4rem); }
h2 { font-size: clamp(1.75rem, 4.6vw, 2.6rem); }
h3 { font-size: 1.3rem; font-weight: 600; line-height: 1.2; }
p { margin: 0; }
.lead { font-size: clamp(1.1rem, 2.4vw, 1.3rem); color: var(--ink-muted); line-height: 1.5; text-wrap: pretty; }
.muted { color: var(--ink-muted); }
.eyebrow { display: inline-block; font: 800 0.8rem/1 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--green-ink); background: var(--green-soft); padding: 8px 12px; border-radius: 999px; }
@media (max-width: 420px) { .eyebrow { font-size: 0.7rem; letter-spacing: 0.04em; } }

/* ------------------------------------------------------------- header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--edge); }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 1.25rem/1 var(--font-display); }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav { display: none; margin-left: auto; gap: 4px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 700; padding: 10px 12px; border-radius: 999px; }
.nav a:hover { background: var(--paper-raised); }
.lang { margin-left: auto; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 0.95rem; padding: 8px 14px; border: 2px solid var(--edge); border-radius: 999px; }
.lang:hover { background: var(--paper-raised); }
@media (min-width: 900px) { .nav { display: flex; } .lang, .langs { margin-left: 8px; } }
/* More than two languages: the current one opens a list of the others. */
.langs { position: relative; margin-left: auto; }
.langs summary { list-style: none; cursor: pointer; color: var(--ink); font-weight: 800; font-size: 0.95rem; padding: 8px 14px; border: 2px solid var(--edge); border-radius: 999px; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary::after { content: ' ▾'; color: var(--ink-faint); }
.langs ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 180px; margin: 0; padding: 6px; list-style: none; background: var(--paper); border: 2px solid var(--edge); border-radius: 16px; box-shadow: var(--shadow); }
.langs a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--ink); font-weight: 700; text-decoration: none; }
.langs a:hover { background: var(--paper-raised); }

/* --------------------------------------------------------------- hero */
.hero { position: relative; padding: 0 0 clamp(20px, 4vw, 40px); }
.hero-art { position: relative; overflow: hidden; background: #0b3a6b; }
.hero-art img { width: 100%; height: min(124vw, 540px); object-fit: cover; object-position: 50% 0%; }
.hero-art::after { content: ''; position: absolute; inset: auto 0 0 0; height: 38%; background: linear-gradient(to bottom, transparent, var(--paper)); }
/* Wide screens crop the picture's height, never its top: the game's name is painted there.
   A big, tall screen gets a taller hero, so the globe under the name still shows. */
@media (min-width: 720px) { .hero-art img { height: clamp(380px, 46vw, max(640px, 62vh)); } }
.hero-card { position: relative; z-index: 1; margin-top: -72px; background: var(--paper); border: 2px solid var(--edge); border-bottom-width: 6px; border-radius: 28px; padding: 26px 20px 24px; box-shadow: var(--shadow); text-align: center; display: grid; gap: 16px; justify-items: center; }
@media (min-width: 720px) { .hero-card { margin-top: -110px; max-width: 860px; margin-inline: auto; padding: 36px 40px 32px; gap: 20px; } }
.hero-card .lead { max-width: 36ch; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; list-style: none; margin: 4px 0 0; padding: 0; }
.chips li { font-weight: 800; font-size: 0.9rem; color: var(--ink-muted); background: var(--paper-raised); border: 2px solid var(--edge); padding: 6px 12px; border-radius: 999px; }

/* ------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 22px; border-radius: 999px; font: 800 1.02rem/1.1 var(--font-body); text-decoration: none; border: 0; cursor: pointer; transition: transform 0.08s, box-shadow 0.08s; }
.btn-gold { background: var(--gold); color: var(--on-accent); box-shadow: 0 5px 0 var(--gold-edge); }
.btn-gold:hover { transform: translateY(1px); box-shadow: 0 4px 0 var(--gold-edge); text-decoration: none; }
.btn-gold:active { transform: translateY(5px); box-shadow: 0 0 0 var(--gold-edge); }
.btn-soon { background: var(--paper-raised); color: var(--ink-muted); border: 2px dashed var(--edge); cursor: default; flex-direction: column-reverse; gap: 3px; padding: 8px 16px; min-width: 138px; }
.btn-soon small { font: 800 0.7rem/1 var(--font-body); letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-faint); }
.btn-soon strong { font: 800 1.05rem/1.1 var(--font-body); color: var(--ink); }

/* ----------------------------------------------------------- sections */
section { padding-block: clamp(44px, 8vw, 88px); }
.head { display: grid; gap: 12px; margin-bottom: clamp(24px, 4vw, 40px); max-width: 60ch; }
.head.center { text-align: center; margin-inline: auto; justify-items: center; }
.alt { background: var(--paper-raised); border-block: 1px solid var(--edge); }

.cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 540px) { .cards.four { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 720px) { .cards.three { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .cards.four { grid-template-columns: repeat(4, 1fr); } }
.card { --accent: var(--sky); --accent-ink: var(--sky-ink); --accent-soft: var(--sky-soft); --accent-edge: var(--sky-edge); background: var(--paper); border: 2px solid var(--edge); border-bottom: 6px solid var(--accent-edge); border-radius: var(--radius); padding: 22px 20px; display: grid; gap: 10px; align-content: start; }
.card.sky { --accent: var(--sky); --accent-ink: var(--sky-ink); --accent-soft: var(--sky-soft); --accent-edge: var(--sky-edge); }
.card.coral { --accent: var(--coral); --accent-ink: var(--coral-ink); --accent-soft: var(--coral-soft); --accent-edge: var(--coral-edge); }
.card.violet { --accent: var(--violet); --accent-ink: var(--violet-ink); --accent-soft: var(--violet-soft); --accent-edge: var(--violet-edge); }
.card.green { --accent: var(--green); --accent-ink: var(--green-ink); --accent-soft: var(--green-soft); --accent-edge: var(--green-edge); }
.badge { width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.7rem; background: var(--accent-soft); border-radius: 16px; }
.card h3 { color: var(--accent-ink); }
.card p { color: var(--ink-muted); }

.rules { display: grid; gap: 14px; margin-top: 28px; }
@media (min-width: 900px) { .rules { grid-template-columns: repeat(3, 1fr); align-items: stretch; } }
.rule { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; background: var(--paper-raised); border: 2px solid var(--edge); border-radius: var(--radius); padding: 18px 20px; }
.rule .dot { font-size: 1.6rem; line-height: 1.2; }
.rule b { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; display: block; margin-bottom: 2px; }

/* -------------------------------------------------------- screenshots */
.shots { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 16px 28px; margin-inline: -16px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
@media (min-width: 720px) { .shots { margin-inline: -24px; padding-inline: 24px; } }
@media (min-width: 1180px) { .shots { overflow: visible; justify-content: center; margin-inline: 0; padding-inline: 0; } }
.shot { flex: 0 0 min(64vw, 250px); scroll-snap-align: center; display: grid; gap: 14px; justify-items: center; text-align: center; margin: 0; }
@media (min-width: 1180px) { .shot { flex: 1 1 0; max-width: 260px; } }
.phone { width: 100%; aspect-ratio: 390 / 844; border-radius: 34px; padding: 8px; background: #11161c; box-shadow: var(--shadow), inset 0 0 0 2px #2b3540; }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 27px; background: var(--paper-raised); }
.phone-empty { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 27px; background: var(--paper-raised); color: var(--ink-faint); font-weight: 800; padding: 16px; text-align: center; }
.shot figcaption { font-weight: 800; font-size: 0.98rem; line-height: 1.3; color: var(--ink); max-width: 22ch; text-wrap: balance; }
.shot figcaption span { display: block; font-weight: 400; color: var(--ink-muted); margin-top: 2px; }

/* ------------------------------------------------------------ families */
.split { display: grid; gap: 28px; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; } }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checks li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.checks .tick { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green-ink); font-weight: 800; font-size: 1rem; margin-top: 2px; }
.checks b { display: block; font-weight: 800; }
.checks span { color: var(--ink-muted); }
.poster { border-radius: 28px; overflow: hidden; border: 2px solid var(--edge); border-bottom-width: 6px; box-shadow: var(--shadow); max-width: 440px; margin-inline: auto; }
.poster img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 82%; }

/* ----------------------------------------------------------- download */
.band { background: linear-gradient(135deg, #0f3d78, #1b6fc9 55%, #2fb36b); color: #fff; border-radius: 32px; padding: clamp(28px, 6vw, 56px); text-align: center; display: grid; gap: 18px; justify-items: center; }
.band h2 { color: #fff; }
.band p { color: rgba(255, 255, 255, 0.92); max-width: 44ch; font-size: 1.15rem; }
.band .btn-soon { background: rgba(255, 255, 255, 0.14); border: 2px dashed rgba(255, 255, 255, 0.55); }
.band .btn-soon small { color: rgba(255, 255, 255, 0.8); }
.band .btn-soon strong { color: #fff; }

/* ---------------------------------------------------------------- faq */
.faq { display: grid; gap: 12px; max-width: 800px; margin-inline: auto; }
.faq details { background: var(--paper); border: 2px solid var(--edge); border-radius: var(--radius-sm); padding: 0 18px; }
.faq summary { cursor: pointer; font: 600 1.15rem/1.3 var(--font-display); padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 700 1.5rem/1 var(--font-display); color: var(--sky-ink); }
.faq details[open] summary::after { content: '–'; }
.faq details p { padding-bottom: 16px; color: var(--ink-muted); }

/* ------------------------------------------------------------- footer */
.foot { background: var(--paper-raised); border-top: 1px solid var(--edge); padding-block: 36px 44px; font-size: 0.96rem; color: var(--ink-muted); }
.foot .cols { display: grid; gap: 22px; }
@media (min-width: 800px) { .foot .cols { grid-template-columns: 1.4fr 1fr; gap: 48px; } }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a { color: var(--ink); font-weight: 700; }
.foot small { display: block; margin-top: 10px; color: var(--ink-faint); font-size: 0.86rem; line-height: 1.5; }

/* -------------------------------------------------------------- pages */
.doc { max-width: 760px; margin-inline: auto; padding-block: clamp(32px, 6vw, 64px); }
.doc h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 8px; }
.doc h2 { font-size: 1.5rem; margin: 34px 0 10px; }
.doc p { margin: 0 0 12px; text-wrap: pretty; }
.doc .updated { color: var(--ink-faint); margin-bottom: 24px; }
.doc .callout { background: var(--paper-raised); border: 2px solid var(--edge); border-radius: var(--radius-sm); padding: 16px 18px; margin: 18px 0; }
.doc ul { margin: 0 0 12px; padding-left: 1.3rem; }
.doc li { margin: 0 0 8px; }
