/* =============================================================================
   App Page styles (hand-written; generate.mjs only writes the HTML).
   One phone-first column (max 40rem); the brand purple is spent on the join
   action. Served under a strict CSP (style-src 'self', font-src 'self'), so
   no inline styles anywhere and fonts are self-hosted (OFL, see fonts/).
   ============================================================================= */

/* Fonts: latin + latin-ext subsets. Greek falls back to the system font. */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/atkinson-400-latin-ext.woff2) format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/atkinson-400-latin.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/atkinson-700-latin-ext.woff2) format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/atkinson-700-latin.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Bricolage Grotesque is a variable font: one file covers 600 and 800. */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url(fonts/bricolage-latin-ext.woff2) format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url(fonts/bricolage-latin.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #fbfaff;
  --surface: #ffffff;
  --sunk: #f1edfb;
  --fg: #1d1630;
  --muted: #5d5574;
  --line: #e2dcf0;
  --accent: #7c3aed; /* ICDA purple, from the web-admin token (262 83% 58%) */
  --accent-ink: #ffffff;
  --accent-soft: #ede4ff;
  --ok: #17794a;
  --note-bg: #fff6dd;
  --note-fg: #6b4a00;
  --display: 'Bricolage Grotesque', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: 2.25rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14101f;
    --surface: #1d172c;
    --sunk: #241c38;
    --fg: #f1ecfb;
    --muted: #b3a9cc;
    --line: #362b50;
    --accent: #a87bff;
    --accent-ink: #14101f;
    --accent-soft: #2e2150;
    --ok: #5fd39a;
    --note-bg: #3a2f10;
    --note-fg: #f3d68a;
  }
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.55;
}
.wrap {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 16px;
}
h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
}
h1 {
  font-size: var(--step-3);
  font-weight: 800;
  letter-spacing: -0.01em;
}
h2 {
  font-size: var(--step-2);
  font-weight: 800;
}
h3 {
  font-size: var(--step-1);
  font-weight: 600;
}
p {
  margin: 0;
}
a {
  color: var(--accent);
}
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.muted {
  color: var(--muted);
}
section {
  padding-block: 2rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Top bar */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 1rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--fg);
  text-decoration: none;
}
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.langs {
  display: flex;
  gap: 0.15rem;
  font-size: 0.9rem;
}
.langs a {
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--muted);
}
.langs a[aria-current] {
  color: var(--fg);
  font-weight: 700;
  background: var(--sunk);
}

/* Hero */
.hero {
  padding-block: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.lead {
  font-size: var(--step-1);
  color: var(--muted);
  max-width: 34rem;
}
.status {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 0.9rem;
  font-weight: 700;
}
.status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.status.live::before {
  background: var(--ok);
}

/* Join steps: a real sequence, so numbered */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.2rem;
  border-radius: 12px;
  font: 700 1rem var(--body);
  text-decoration: none;
  background: var(--accent);
  color: var(--accent-ink);
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.25rem 0.85rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.steps li::before {
  content: counter(step);
  grid-row: span 3;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font: 800 1.2rem var(--display);
  display: grid;
  place-items: center;
}
/* A step without a button (e.g. "Wait for our email") has two rows, not three */
.steps li:not(:has(.btn))::before {
  grid-row: span 2;
}
.steps li > * {
  min-width: 0;
}
.steps .btn {
  justify-self: start;
  margin-top: 0.4rem;
}
.note {
  background: var(--note-bg);
  color: var(--note-fg);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
}
.ios {
  padding: 0.9rem 1rem;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
}
.ios b {
  color: var(--fg);
}
/* Only useful on a computer: scan to open the page on a phone. */
.qr {
  display: none;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  background: var(--sunk);
  border-radius: 14px;
}
.qr img {
  flex: none;
  border-radius: 6px;
}
@media (min-width: 720px) {
  .qr {
    display: flex;
  }
}

/* Store badges (published phase); official artwork, sized by height */
.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.badge img {
  display: block;
  height: 64px;
  width: auto;
}

/* Features */
.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}
.feature {
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: 0.85rem;
  align-items: start;
}
.feature > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.ico {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  background: var(--sunk);
  display: grid;
  place-items: center;
  color: var(--accent);
}
.ico svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Sites, grouped by country */
.countries {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.country {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.country summary {
  cursor: pointer;
  padding: 0.8rem 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 700;
  list-style: none;
}
.country summary::-webkit-details-marker {
  display: none;
}
.country summary span:last-child {
  color: var(--muted);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.country[open] summary {
  border-bottom: 1px solid var(--line);
}
.sitelist {
  list-style: none;
  margin: 0;
  padding: 0.5rem 1rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.sitelist li {
  display: flex;
  flex-direction: column;
}
.town {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: 0.95rem;
}
.help {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}
/* Logos sit on white plates so they read in dark mode too. */
.mm {
  align-self: flex-start;
  height: 36px;
  width: auto;
  background: #fff;
  padding: 4px 6px;
  border-radius: 6px;
}
.lockup {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.lockup .muted {
  font-size: 0.875rem;
}
.lockup img {
  height: 32px;
  width: auto;
  background: #fff;
  padding: 2px 6px;
  border-radius: 4px;
}
