/* SnapClack — one stylesheet, the app's own palette.
 *
 * The values come from ios/SnapClack/Core/Theme/Tokens.swift and mean the same
 * things there: `--accent` is the text-safe lime, `--accent-fill` is the bright
 * one that only ever appears under ink. Light mode darkens the first and keeps
 * the second, exactly as the app does — bright lime measures 1.3:1 on a near
 * white page and is unreadable as type.
 *
 * System fonts, no webfont, no script. The page is text and six rectangles;
 * anything else on the critical path is a request spent on nothing. */

:root {
  --bg: #0d0f0e;
  --surface: #171a18;
  --fg: #f2f4ef;
  --dim: #868c82;
  --accent: #c6f135;
  --accent-fill: #c6f135;
  --on-accent: #101503;
  --hairline: rgba(242, 244, 239, 0.13);
  --radius: 16px;
  --measure: 34rem;
  --page: 60rem;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f8f1;
    --surface: #ffffff;
    --fg: #12150f;
    --dim: #6e7368;
    --accent: #4a6b00;
    --accent-fill: #c6f135;
    --on-accent: #101503;
    --hairline: rgba(18, 21, 15, 0.14);
  }
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main, .bar, footer { max-width: var(--page); margin: 0 auto; padding: 0 1.5rem; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--surface);
  border-radius: 5px;
  padding: 0.1em 0.35em;
}

/* ---------------------------------------------------------------- the mark */

.strip rect { fill: var(--accent-fill); }
.brand-strip rect { fill: var(--accent-fill); }

.wordmark { font-weight: 700; letter-spacing: -0.02em; }
.wordmark .accent { color: var(--accent); }

/* ---------------------------------------------------------------- chrome */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.25rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
  color: var(--fg);
  text-decoration: none;
}
.bar nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.bar nav a { color: var(--dim); text-decoration: none; font-size: 0.95rem; }
.bar nav a:hover { color: var(--fg); }

/* ---------------------------------------------------------------- hero */

.hero { padding: 3.5rem 0 2.5rem; }
.hero-strip { display: block; margin-bottom: 1.75rem; }
h1 {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  max-width: 22ch;
}
.lede { font-size: 1.2rem; color: var(--dim); max-width: var(--measure); margin: 0 0 1.5rem; }
.badge {
  display: inline-block;
  margin: 0;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--dim);
  font-size: 0.85rem;
}

/* ---------------------------------------------------------------- sections */

section { padding-block: 2rem; }
h2 { font-size: 1.5rem; letter-spacing: -0.02em; margin: 0 0 1rem; }
h3 { font-size: 1.05rem; margin: 0 0 0.4rem; }
p { max-width: var(--measure); }

.page-head { padding-top: 2.5rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.steps li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.25rem 1rem;
  align-items: start;
}
.steps h3, .steps p { grid-column: 2; margin: 0; }
.step-number {
  grid-row: span 2;
  width: 2rem; height: 2rem;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--accent-fill);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 0.9rem;
}

/* Two up, not three. Four cards in a three-column grid leave one alone on a
 * second row, which reads as a mistake. 20rem is the width at which this
 * container fits exactly two. */
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.card p { margin: 0; color: var(--dim); }

.cta { border-top: 1px solid var(--hairline); margin-top: 1rem; }
.button {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  background: var(--accent-fill);
  border: 1px solid var(--hairline);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}

.faq details {
  border-bottom: 1px solid var(--hairline);
  padding: 0.9rem 0;
}
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--dim); margin: 0.6rem 0 0; }

.sounds { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.sounds li {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
}
.sounds h3 { margin: 0 0 0.15rem; }

.back { margin: 2rem 0 0; }

/* ---------------------------------------------------------------- footer */

footer {
  border-top: 1px solid var(--hairline);
  margin-top: 3rem;
  padding-block: 2rem 3rem;
  display: grid;
  gap: 0.9rem;
}
footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; }
footer nav a { font-size: 0.9rem; }
.languages a { color: var(--dim); text-decoration: none; }
.languages a:hover { color: var(--fg); text-decoration: underline; }
.languages a[aria-current="true"] { color: var(--fg); font-weight: 600; }
.fine { font-size: 0.85rem; color: var(--dim); margin: 0; max-width: var(--measure); }
.build span { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

@media (prefers-reduced-motion: no-preference) {
  a, .button { transition: color 0.15s ease, text-decoration-thickness 0.15s ease; }
}
