/* BendWell — the same design system as the app.
 *
 * The tokens are copied from App/BendWell/Support/Design.swift on purpose: the
 * site and the app should read as one thing, and a visitor who taps through to
 * the App Store should recognise what they land in. Every pair here is the one
 * DesignTests measures for AA contrast in both schemes.
 *
 * No webfonts, no CDN, no analytics, no third-party anything. That is partly
 * taste and mostly consistency: the privacy page says this site sets no cookies
 * and loads nothing from anywhere else, and that sentence has to stay true.
 */

:root {
  --bg: #F7F4EE;
  --surface: #FFFFFF;
  --ink: #211E1A;
  --ink-soft: #5A544B;
  --accent: #3F6B57;
  --on-accent: #FFFFFF;
  --accent-soft: #E6EFE8;
  --line: #E3DCD1;

  /* System faces only. On the audience's devices this is New York + SF, which
   * is exactly what the app draws — so the two genuinely match rather than
   * approximately match. */
  --serif: ui-serif, "New York", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;

  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141310;
    --surface: #1E1C17;
    --ink: #F0EBE2;
    --ink-soft: #AFA79A;
    --accent: #82BE9F;
    /* Not white. In dark the accent is a PALE green and white on it fails
     * badly — the same bug that shipped in the app's play button. */
    --on-accent: #10231A;
    --accent-soft: #1D2A23;
    --line: #312C25;
  }
}

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

html {
  /* 19px base, not 16. The whole positioning is legibility for people whose
   * sight is changing; the default size is the one this audience turns up. */
  font-size: 119%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
}

.skip {
  position: absolute;
  left: -9999px;
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.6rem 1rem;
  border-radius: 8px;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 10; }

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* ── masthead ─────────────────────────────────────────────── */

.masthead {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.5rem;
}

.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

nav ul {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}
nav a { color: var(--ink-soft); }
nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }

/* ── type ─────────────────────────────────────────────────── */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;
  line-height: 1.2;
}

/* Clamped, not fixed. At a fixed 2.3rem the headline ran five lines on a 375pt
 * phone and filled the entire first screen before a word of the page appeared.
 * Large type is the brand, but a headline is not the product. */
h1 { font-size: clamp(1.85rem, 6.4vw, 2.3rem); margin: 0 0 0.75rem; }
h2 { font-size: clamp(1.3rem, 4.6vw, 1.5rem); margin: 2.75rem 0 0.75rem; }
h3 { font-size: 1.12rem; margin: 2rem 0 0.4rem; }

.lede {
  font-size: 1.18rem;
  color: var(--ink-soft);
  margin: 0 0 2rem;
}

p, li { margin: 0 0 1rem; }
ul, ol { padding-left: 1.35rem; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

strong { font-weight: 650; }

.quiet { color: var(--ink-soft); font-size: 0.95rem; }

/* ── blocks ───────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  margin: 1.5rem 0;
}
.card > :last-child { margin-bottom: 0; }
.card > h2, .card > h3 { margin-top: 0; }

.price {
  font-family: var(--serif);
  font-size: clamp(2rem, 7vw, 2.4rem);
  font-weight: 600;
  line-height: 1;
  margin: 0 0 0.4rem;
}

.checks { list-style: none; padding: 0; }
.checks li {
  padding-left: 1.75rem;
  position: relative;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.62em;
  width: 0.72rem;
  height: 0.38rem;
  border-left: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}

/* Programme list — a definition list is what this actually is. */
.programmes { margin: 1.5rem 0; }
.programmes dt {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.08rem;
  margin-top: 1.1rem;
}
.programmes dd { margin: 0.1rem 0 0; color: var(--ink-soft); }

details {
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 0;
}
summary {
  cursor: pointer;
  font-weight: 600;
  padding-right: 1rem;
}
summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
details > :not(summary) { margin-top: 0.75rem; }
details p:last-child { margin-bottom: 0; }

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9rem;
}
footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
}

/* Long email addresses must not push the page sideways on a narrow phone. */
.break { overflow-wrap: anywhere; }
