/* Clinkfall site: one stylesheet, no external fonts, no scripts. Colours follow the game's palette
   (src/game/theme.ts, src/ui/tokens.ts) in dark mode, with a warm paper version for light mode. */

:root {
  color-scheme: light dark;
  --bg: #f7f5ef;
  --surface: #ffffff;
  --surface-2: #efece3;
  --rim: #dcd7c9;
  --text: #15171e;
  --muted: #555b6b;
  --accent: #f4c542;      /* the game's gold */
  --accent-ink: #1a1508;  /* text on gold */
  --link: #7a5600;        /* gold dark enough for text on paper (AA) */
  --ice: #2b6f9e;
  --focus: #1f5fc4;
  --radius: 16px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f15;
    --surface: #1b2030;
    --surface-2: #121521;
    --rim: #2c3348;
    --text: #f1f2f6;
    --muted: #9ea4b8;
    --link: #f4c542;
    --ice: #7fc4f5;
    --focus: #7fc4f5;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  padding: 8px 12px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 8px;
  font-weight: 700;
  z-index: 10;
}
.skip:focus { top: 12px; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

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

header.site {
  border-bottom: 1px solid var(--rim);
}
header.site .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}
.brand-mark {
  display: inline-grid;
  grid-template-columns: 10px 10px;
  gap: 3px;
}
.brand-mark span { width: 10px; height: 10px; border-radius: 3px; }
.brand-mark span:nth-child(1) { background: #f4c542; }
.brand-mark span:nth-child(2) { background: #ff8a3d; }
.brand-mark span:nth-child(3) { background: #7fc4f5; }
.brand-mark span:nth-child(4) { background: #3cbf6a; }

nav.site ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
nav.site a { text-decoration: none; font-weight: 600; }
nav.site a[aria-current="page"] { text-decoration: underline; }

main { padding: 32px 0 48px; }

h1 { font-size: clamp(1.75rem, 5vw, 2.4rem); line-height: 1.15; margin: 0 0 8px; }
h2 { font-size: 1.3rem; line-height: 1.3; margin: 2.2em 0 0.5em; }
h3 { font-size: 1.08rem; margin: 1.6em 0 0.4em; }
p, ul, ol { margin: 0 0 1em; }
li + li { margin-top: 0.35em; }

.lede { font-size: 1.2rem; color: var(--muted); margin-bottom: 1.5em; }
.meta { color: var(--muted); font-size: 0.95rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--rim);
  border-radius: var(--radius);
  padding: 20px;
  margin: 0 0 16px;
}
.card > :last-child { margin-bottom: 0; }

.hero { text-align: left; padding: 8px 0 8px; }
.hero .tagline { font-size: 1.25rem; color: var(--muted); margin: 0 0 24px; }

/* App Store badge placeholder. Replace with Apple's official badge artwork (see README). */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 12px;
  background: #000;
  color: #fff;
  border: 1px solid #a6a6a6;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.2;
}
.badge small { display: block; font-size: 0.72rem; font-weight: 500; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button.secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--rim); }

.features { list-style: none; padding: 0; display: grid; gap: 12px; }
.features li { margin: 0; }
.features strong { display: block; }

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  word-break: break-all;
  background: var(--surface-2);
  border: 1px solid var(--rim);
  border-radius: 10px;
  padding: 10px 14px;
  display: inline-block;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }

details {
  background: var(--surface);
  border: 1px solid var(--rim);
  border-radius: 12px;
  margin: 0 0 10px;
}
summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 650;
  list-style-position: inside;
}
details > div { padding: 0 16px 14px; }
details > div > :last-child { margin-bottom: 0; }

.placeholder {
  background: rgba(244, 197, 66, 0.22);
  border-radius: 4px;
  padding: 0 3px;
}

footer.site {
  border-top: 1px solid var(--rim);
  color: var(--muted);
  font-size: 0.95rem;
  padding: 20px 0 32px;
}
footer.site ul { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 4px 16px; }

[hidden] { display: none !important; }

@media (min-width: 40rem) {
  main { padding-top: 48px; }
  .features { grid-template-columns: 1fr 1fr; }
}

@media print {
  header.site nav, .skip, .actions { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
}
