/* Zedmo promo site: single stylesheet, no build step. */

:root {
  color-scheme: light dark;

  /* Game accents, copied from lib/shared/ui/data/game_catalogue.dart. */
  --chains: #87521b;
  --stowaway: #006a6a;
  --missing-vowels: #854b71;
  --four: #415f91;

  --bg: #fbf8f4;
  --surface: #ffffff;
  --border: #e6e0d8;
  --text: #1b1a17;
  --text-muted: #5e5a54;
  --accent: #1b1a17;
  --on-accent: #fbf8f4;

  --radius-card: 18px;
  --radius-pill: 999px;
  --gap: 1rem;
  --measure: 62ch;
  --page-max: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark-scheme accents, from GameColorSchemes.dark in
       lib/app/theme/color_schemes.dart. The light accents are far too dark
       to read against the dark background. */
    --chains: #ffb878;
    --stowaway: #80d4d4;
    --missing-vowels: #f8b1dc;
    --four: #aac7ff;

    --bg: #14130f;
    --surface: #1e1c18;
    --border: #322f29;
    --text: #f2ede5;
    --text-muted: #a9a49b;
    --accent: #f2ede5;
    --on-accent: #14130f;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* Header */

.site-header {
  padding-block: 1.75rem;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
}

.wordmark {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.publisher {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Hero */

.hero {
  padding-block: clamp(3rem, 9vw, 6.5rem) clamp(2.5rem, 7vw, 5rem);
  text-align: center;
}

.hero h1 {
  margin: 0 auto 1rem;
  max-width: 16ch;
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.hero .lede {
  margin: 0 auto 2rem;
  max-width: 46ch;
  color: var(--text-muted);
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  font-weight: 600;
  transition: transform 120ms ease, opacity 120ms ease;
}

.store-button:hover { transform: translateY(-1px); }
.store-button:focus-visible { outline: 3px solid var(--four); outline-offset: 3px; }

.store-button .label { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.store-button .label small { font-size: 0.7rem; font-weight: 500; opacity: 0.75; }

.store-note {
  width: 100%;
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* Sections */

section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }

.section-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  letter-spacing: -0.02em;
}

.section-sub {
  margin: 0 0 2rem;
  max-width: var(--measure);
  color: var(--text-muted);
}

/* Game cards */

.games {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.game {
  position: relative;
  padding: 1.5rem 1.35rem 1.5rem 1.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.game::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 5px;
  background: var(--game-accent, var(--accent));
}

.game h3 {
  margin: 0 0 0.35rem;
  font-size: 1.125rem;
  color: var(--game-accent, var(--text));
}

.game p { margin: 0 0 0.75rem; color: var(--text-muted); }

.game .example {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--text);
  opacity: 0.85;
}

/* Feature strip */

.features {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.feature h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.feature p { margin: 0; color: var(--text-muted); font-size: 0.9375rem; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2rem 3rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* Legal pages */

.legal { padding-block: 2rem 4rem; }
.legal .wrap > * { max-width: var(--measure); }
.legal h1 { font-size: clamp(2rem, 5vw, 2.75rem); letter-spacing: -0.03em; margin-bottom: 0.25rem; }
.legal h2 { margin-top: 2.5rem; font-size: 1.25rem; letter-spacing: -0.01em; }
.legal .updated { color: var(--text-muted); font-size: 0.875rem; margin-top: 0; }

.placeholder-banner {
  max-width: var(--measure);
  margin-block: 1.5rem 2rem;
  padding: 0.9rem 1.1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.back-link { display: inline-block; margin-top: 2.5rem; font-size: 0.9375rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Per-game accents. Classes rather than inline style attributes, so the
   site's Content-Security-Policy does not need 'unsafe-inline'. */
.game--chains { --game-accent: var(--chains); }
.game--stowaway { --game-accent: var(--stowaway); }
.game--missing-vowels { --game-accent: var(--missing-vowels); }
.game--four { --game-accent: var(--four); }
