/* Sudoku Mill website: the Warm Native theme of the app.
 *
 * The colours are copied from src/themes/tokens.js (warmLight, warmDark);
 * keep them in step by hand until the site moves to a build (R2). System
 * fonts only, so the site makes no requests beyond its own files.
 *
 * Paths in the pages are root-absolute (/site.css, /play/), because 404.html
 * is served for any missing URL, at any depth.
 */

:root {
  color-scheme: light dark;
  --page: #f5f4ee;
  --edge: #e2e0d6;
  --text: #23221e;
  --muted: #6a685f;
  --card: #fffffd;
  --accent: #2f5d8c;
  --accent-bg: #2f5d8c;
  --on-accent: #ffffff;
  --accent-soft: #e3ebf4;
  --shadow: 0 1px 2px rgba(60, 50, 20, 0.08);
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #161512;
    --edge: #2e2c27;
    --text: #efece3;
    --muted: #a3a094;
    --card: #211f1b;
    --accent: #93bce8;
    --accent-bg: #93bce8;
    --on-accent: #14202e;
    --accent-soft: #22324a;
    --shadow: none;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 max(20px, env(safe-area-inset-left)) 0 max(20px, env(safe-area-inset-right));
}

/* Header and footer */

.site-header {
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 22.5%;
}

main {
  flex: 1;
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--edge);
  padding-top: 20px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 15px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.site-footer a {
  color: var(--muted);
}

/* Landing page */

.hero {
  display: grid;
  gap: 32px;
  align-items: center;
  padding: 32px 0 16px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 7vw, 48px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero .lede {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: clamp(18px, 2.6vw, 21px);
  max-width: 34em;
}

/* The painting below the hero text: portrait on phones, a wide banner from
   720 px. */
.hero-art {
  display: block;
}

.hero-art img {
  display: block;
  width: min(340px, 100%);
  height: auto;
  margin: 8px auto 40px;
  border-radius: 20px;
  box-shadow: 0 10px 36px rgba(35, 34, 30, 0.18);
}

.play {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 12px;
  background: var(--accent-bg);
  color: var(--on-accent);
  box-shadow: var(--shadow);
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
}

.play:hover {
  filter: brightness(1.08);
}

.play:focus-visible {
  outline-offset: 4px;
  border-radius: 12px;
}

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

.features {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.features li {
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 20px 22px;
}

.features h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.features p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

@media (min-width: 720px) {
  .hero {
    padding-top: 56px;
  }

  .hero-art img {
    width: 100%;
    margin-top: 16px;
    border-radius: 24px;
  }

  .features {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

/* Text pages (privacy, 404) */

.prose {
  max-width: 40em;
  padding: 24px 0 0;
}

.prose h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 6vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.prose h2 {
  margin: 32px 0 8px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.prose p,
.prose ul {
  margin: 0 0 14px;
}

.prose .muted {
  color: var(--muted);
}

.placeholder {
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 0 4px;
}
