/* Magnet Squared site. Colors and type match the game (lib/ui/palette.dart,
   web_poc/template.html). Fonts are self-hosted so the site makes no
   third-party requests, which keeps the privacy policy's "the website
   collects nothing" line true. */

@font-face {
  font-family: "Chakra Petch";
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/chakra-petch-600.woff2") format("woff2");
}
@font-face {
  font-family: "Chakra Petch";
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/chakra-petch-700.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --ground: #0b0d12;
  --panel: #141822;
  --hairline: #232838;
  --hairline-hot: #323950;
  --ink: #eef1fa;
  --ink-dim: #8b93a8;
  --ink-faint: #5a6175;
  --rose: #ff4d6d;
  --mint: #3ddc97;
  --amber: #ffc145;
  --peri: #7b7bff;
  --f-display: "Chakra Petch", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --f-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink-dim);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--peri); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
a:focus-visible { outline: 2px solid var(--peri); outline-offset: 3px; border-radius: 2px; }

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ----------------------------------------------------------------- top --- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--hairline);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 15px;
}
.brand img { width: 28px; height: 28px; border-radius: 7px; }

.top nav { display: flex; gap: 18px; font-family: var(--f-mono); font-size: 13px; }
.top nav a { color: var(--ink-dim); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ink); }

/* ---------------------------------------------------------------- hero --- */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  padding: 56px 0 40px;
}

.title {
  margin: 0;
  color: var(--ink);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(34px, 8vw, 56px);
  line-height: 1.02;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  /* The game's channel-separation title: a mistuned signal. */
  text-shadow: 2px 0 0 rgba(255, 77, 109, 0.55), -2px 0 0 rgba(61, 220, 151, 0.4);
}

.kicker {
  margin: 14px 0 0;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.pitch {
  margin: 22px 0 0;
  max-width: 34ch;
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.soon {
  display: inline-block;
  padding: 10px 14px;
  border: 1px solid var(--hairline-hot);
  border-radius: 8px;
  background: var(--panel);
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--ink-dim);
}

/* Primary action: the web demo. Amber, like the game's "hot" offer button. */
.cta {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--amber);
  border-radius: 8px;
  background: rgba(255, 193, 69, 0.08);
  color: var(--ink);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}
.cta:hover { background: rgba(255, 193, 69, 0.16); color: var(--ink); }

.hero-icon {
  width: 168px;
  height: 168px;
  border-radius: 38px;
  box-shadow: 0 0 0 1px var(--hairline), 0 18px 60px rgba(255, 193, 69, 0.14);
}

/* ------------------------------------------------------------- content --- */
section { padding: 36px 0; border-top: 1px solid var(--hairline); }

h2 {
  margin: 0 0 18px;
  color: var(--ink);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.04em;
}

h3 {
  margin: 26px 0 8px;
  color: var(--ink);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 17px;
}

p { margin: 0 0 14px; }
strong { color: var(--ink); font-weight: 600; }

.rules {
  list-style: none;
  counter-reset: rule;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.rules li {
  counter-increment: rule;
  display: grid;
  grid-template-columns: 34px 1fr;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 8px;
}
.rules li::before {
  content: "0" counter(rule);
  font-family: var(--f-mono);
  font-size: 12px;
  line-height: 1.9;
  color: var(--peri);
}

.shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.shots figure { margin: 0; }
.shots img {
  display: block;
  width: 100%;
  height: auto;
  /* Captures are full phone screens; show the top, where the game is. */
  aspect-ratio: 780 / 1280;
  object-fit: cover;
  object-position: top;
  border-radius: 14px;
  border: 1px solid var(--hairline);
}
.shots figcaption {
  margin-top: 8px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-faint);
}

/* Long-form pages: privacy, support. */
.doc { max-width: 68ch; padding: 40px 0 24px; }
.doc h1 {
  margin: 0 0 6px;
  color: var(--ink);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 32px;
  letter-spacing: 0.04em;
}
.doc .meta { font-family: var(--f-mono); font-size: 13px; color: var(--ink-faint); margin-bottom: 28px; }
.doc h2 { margin-top: 34px; font-size: 20px; }
.doc ul { padding-left: 20px; margin: 0 0 14px; }
.doc li { margin-bottom: 6px; }

.callout {
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--hairline-hot);
  border-left: 3px solid var(--amber);
  border-radius: 8px;
  margin: 0 0 18px;
}

/* -------------------------------------------------------------- footer --- */
footer {
  margin-top: 24px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--hairline);
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--ink-faint);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}
footer nav { display: flex; gap: 18px; }
footer a { color: var(--ink-dim); text-decoration: none; }

@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; }
  .hero-icon { order: -1; width: 96px; height: 96px; border-radius: 22px; }
  .top nav { gap: 14px; }
}
