/* Simple Supper — site styles. Colors follow the Chesspionage palette
   (chesspionage_app/lib/theme/palette.dart, theme.dart). */

@font-face { font-family: "Fredoka"; font-weight: 600; font-display: swap; src: url("../fonts/Fredoka-600.ttf") format("truetype"); }
@font-face { font-family: "Fredoka"; font-weight: 700; font-display: swap; src: url("../fonts/Fredoka-700.ttf") format("truetype"); }
@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url("../fonts/Nunito-400.ttf") format("truetype"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("../fonts/Nunito-700.ttf") format("truetype"); }

:root {
  --crimson: #E5484D;
  --crimson-dark: #B8363B;
  --cobalt: #3E63DD;
  --agent: #10B981;
  --gold: #F5B82E;
  --meadow: #7FA650;

  --paper: #FFF8EC;
  --paper-deep: #F3E9D6;
  --card: #FFFFFF;
  --ink: #1E2230;
  --ink-soft: #5B6075;
  --line: #E6DFD0;
  --lip: #D9D2C3;
  --shadow: rgba(60, 47, 18, 0.10);

  --display: "Fredoka", ui-rounded, system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1080px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161925;
    --paper-deep: #0F1119;
    --card: #232838;
    --ink: #F3EEE4;
    --ink-soft: #A6ACBF;
    --line: #353B4F;
    --lip: #0B0D14;
    --shadow: rgba(0, 0, 0, 0.35);
  }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cobalt); text-underline-offset: 3px; }
@media (prefers-color-scheme: dark) { a { color: #8AA4F5; } }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; margin: 0 0 .5em; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 10; }

/* ---------- Header ---------- */
.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }
/* The pixel logo has white lettering, so it sits on a dark plate in both themes. */
.plate { box-sizing: content-box; background: #1E2230; padding: 6px 8px; border-radius: 12px; box-shadow: 0 0 0 1px var(--line), 0 3px 0 var(--lip); }
.about-logo.plate, .notfound .plate { padding: 14px 18px; border-radius: 22px; }
.brand img { width: 94px; height: 78px; } /* 2x of 47x39 */
.brand { border-radius: 14px; }
/* The pixel logo already spells the name; the text stays for screen readers only. */
.brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nav { display: flex; gap: 4px; }
.nav a {
  font-family: var(--display); font-weight: 600; font-size: 1rem;
  color: var(--ink-soft); text-decoration: none;
  padding: 8px 12px; border-radius: 999px;
}
.nav a:hover, .nav a:focus-visible { color: var(--ink); background: var(--paper-deep); }

/* ---------- Game hero ---------- */
.game { padding: 32px 0 80px; }
.game-head { text-align: center; display: flex; flex-direction: column; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display); font-weight: 600; font-size: .95rem; letter-spacing: .02em;
  color: #fff; background: var(--crimson);
  padding: 6px 14px; border-radius: 999px;
  box-shadow: 0 3px 0 var(--crimson-dark);
  margin-bottom: 26px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .eyebrow::before { animation: none; } }

.game-title { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 16px; }
.game-title img { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 4px 0 var(--lip), 0 10px 24px var(--shadow); }
.game-title h1 { font-size: clamp(2.4rem, 7vw, 4.2rem); margin: 0; }
.pitch { font-size: 1.3rem; color: var(--ink-soft); max-width: 36ch; margin-bottom: .6em; }
.pitch strong { color: var(--ink); }
.platforms { font-family: var(--display); font-weight: 600; color: var(--ink-soft); margin: 0; }
.platforms strong { color: var(--ink); }

.features {
  list-style: none; padding: 0; margin: 44px 0 56px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
.features li { background: var(--card); border-radius: 18px; padding: 20px; box-shadow: 0 3px 0 var(--lip); }
.features .dot {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 12px;
  font-family: var(--display); font-weight: 700; color: #fff; font-size: 1.15rem;
}
.features b { font-family: var(--display); font-weight: 600; font-size: 1.15rem; display: block; margin-bottom: 4px; }
.features span { color: var(--ink-soft); font-size: .98rem; }
.dot.agent { background: var(--agent); }
.dot.defect { background: var(--gold); }
.dot.play { background: var(--cobalt); }

/* Phone screenshots */
.shots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; align-items: start; }
.phone {
  margin: 0; border-radius: 28px; padding: 6px;
  background: #1E2230; box-shadow: 0 0 0 1px var(--line), 0 14px 30px var(--shadow);
}
.phone img { border-radius: 22px; aspect-ratio: 460 / 1000; width: 100%; object-fit: cover; }
.shots .phone:nth-child(even) { transform: translateY(28px); }
.shots-note { grid-column: 1 / -1; text-align: center; color: var(--ink-soft); font-size: .9rem; margin: 40px 0 0; }

/* ---------- Sections ---------- */
.band { background: var(--paper-deep); padding: 72px 0; }
.section { padding: 72px 0; }
.section h2, .band h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); }

.about .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 40px; align-items: center; }
.about-logo { width: 188px; height: 156px; } /* 4x of 47x39 */
.about .wrap { align-items: start; }
.about p { max-width: 62ch; }
.about .lead { font-size: 1.2rem; color: var(--ink); }
.fruits { list-style: none; padding: 0; margin: 4px 0 22px; display: flex; flex-wrap: wrap; gap: 8px; max-width: 62ch; }
.fruits li {
  font-family: var(--display); font-weight: 600; font-size: .95rem;
  background: var(--card); color: var(--ink);
  padding: 5px 12px; border-radius: 999px; box-shadow: 0 2px 0 var(--lip);
}
.fruits li:nth-child(3n+1) { box-shadow: inset 0 -3px 0 var(--agent), 0 2px 0 var(--lip); }
.fruits li:nth-child(3n+2) { box-shadow: inset 0 -3px 0 var(--gold), 0 2px 0 var(--lip); }
.fruits li:nth-child(3n) { box-shadow: inset 0 -3px 0 var(--crimson), 0 2px 0 var(--lip); }
.about cite { color: var(--ink-soft); font-style: normal; font-size: .92rem; }

.contact { text-align: center; }
.contact p { color: var(--ink-soft); }
.button {
  display: inline-block; font-family: var(--display); font-weight: 600; font-size: 1.1rem;
  color: #fff; background: var(--cobalt); text-decoration: none;
  padding: 12px 26px; border-radius: 14px; box-shadow: 0 4px 0 #2C49AE;
  transition: transform .08s ease, box-shadow .08s ease;
}
.button:hover { transform: translateY(1px); box-shadow: 0 3px 0 #2C49AE; }
.button:active { transform: translateY(4px); box-shadow: 0 0 0 #2C49AE; }
.button:focus-visible, .nav a:focus-visible, .brand:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--ink-soft); font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer a { color: var(--ink-soft); }

/* ---------- Prose pages (privacy, 404) ---------- */
.prose { padding: 32px 0 72px; }
.prose .wrap { max-width: 760px; }
.prose h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.prose h2 { font-size: 1.4rem; margin-top: 2em; }
.prose .meta { color: var(--ink-soft); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose .callout { background: var(--card); border-radius: 16px; padding: 16px 20px; box-shadow: 0 3px 0 var(--lip); }
.notfound { text-align: center; padding: 64px 0 96px; }
.notfound img { width: 188px; height: 156px; margin: 0 auto 24px; }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .features { grid-template-columns: minmax(0, 1fr); margin: 32px 0 36px; }
  .features li { display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding: 16px; }
  .features .dot { margin: 0; }
  .shots {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px;
    margin: 0 -20px; padding: 6px 20px 24px;
    scrollbar-width: none;
  }
  .shots::-webkit-scrollbar { display: none; }
  .shots .phone { flex: 0 0 62%; max-width: 260px; scroll-snap-align: center; }
  .shots .phone:nth-child(even) { transform: none; }
  .shots-note { display: none; }
  .about .wrap { grid-template-columns: minmax(0, 1fr); gap: 20px; justify-items: start; }
  .about-logo { width: 141px; height: 117px; } /* 3x */
}

@media (max-width: 520px) {
  .nav a { padding: 6px 8px; font-size: .92rem; }
  .game-title { gap: 12px; }
  .game-title img { width: 60px; height: 60px; border-radius: 15px; }
  .pitch { font-size: 1.1rem; }
  .band, .section { padding: 56px 0; }
}
