/* =========================================================================
   {List} — shared stylesheet
   Monochrome (black/white) + a single red accent, mirroring the app's own
   design tokens. Colour values below are copied from the app's asset
   catalogue so the site and the app stay in sync.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Design tokens
   Light mode is the default; the dark values are swapped in via
   prefers-color-scheme further down, so the site follows the visitor's
   system setting exactly like the app's "System" appearance option.
   ------------------------------------------------------------------------- */
:root {
  /* Brand */
  --accent: #ff2919;          /* the app's AccentColor, used for shapes/fills */
  --accent-ink: #d91400;      /* a darkened accent for text/links: #ff2919 on
                                 white is too low-contrast for body text, so
                                 links use this instead. Same hue, AA-legible. */

  /* Surfaces */
  --bg: #ffffff;
  --surface: #f6f6f6;
  --surface-2: #f2f2f7;
  --separator: rgba(60, 60, 67, 0.29);

  /* Text */
  --text: #000000;
  --text-secondary: rgba(60, 60, 67, 0.78);
  --text-on-solid: #ffffff;
  --solid: #000000;           /* primary button background */

  /* Type */
  --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Rhythm */
  --radius: 16px;
  --radius-sm: 10px;
  --measure: 34rem;           /* comfortable reading width for text pages */
  --page: 62rem;              /* outer page width */
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent-ink: #ff2919;    /* pure accent is legible on black, so dark mode
                                 gets the true brand red for links too */
    --bg: #000000;
    --surface: #1e1e1e;
    --surface-2: #2c2c2e;
    --separator: rgba(84, 84, 88, 0.65);
    --text: #ffffff;
    --text-secondary: rgba(235, 235, 245, 0.72);
    --text-on-solid: #000000;
    --solid: #ffffff;
  }
}

/* -------------------------------------------------------------------------
   2. Base
   ------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;       /* 17px — the iOS body size */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 7vw, 3.25rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.75rem); margin-top: 2.5rem; }
h3 { font-size: 1.125rem; margin-top: 1.75rem; }

p, ul, ol { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: 0.4em; }

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

/* A visible focus ring everywhere — keyboard users need to see where they are. */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

strong { font-weight: 700; }

/* Used for the handful of technical names in the privacy policy. */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--surface-2);
  padding: 0.1em 0.35em;
  border-radius: 5px;
}

hr {
  border: 0;
  border-top: 1px solid var(--separator);
  margin: 2.5rem 0;
}

/* Skip link: hidden until focused, lets keyboard users jump past the nav. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--solid);
  color: var(--text-on-solid);
  padding: 0.75rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  text-decoration: none;
  z-index: 10;
}
.skip-link:focus { left: 0; }

/* -------------------------------------------------------------------------
   3. Layout
   ------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.prose { max-width: var(--measure); }

main { display: block; }

/* -------------------------------------------------------------------------
   4. Logo + wordmark
   The mark is an inline SVG (see any page's header) whose wide bar uses
   currentColor, so it flips black/white with the theme automatically.
   ------------------------------------------------------------------------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}
.logo svg { display: block; flex: none; }

.wordmark { font-weight: 700; letter-spacing: -0.03em; }

/* -------------------------------------------------------------------------
   5. Header / nav
   Only four links, so no burger menu or JavaScript is needed — the nav
   simply wraps onto a second line on narrow screens.
   ------------------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--separator);
  padding: 1.1rem 0;
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.35rem;
  font-size: 0.9375rem;
}
.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.15rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* -------------------------------------------------------------------------
   6. Hero (landing page)
   ------------------------------------------------------------------------- */
.hero {
  padding: clamp(3.5rem, 12vw, 7rem) 0 clamp(2.5rem, 8vw, 4.5rem);
  text-align: center;
}
.hero .mark { margin: 0 auto 1.75rem; display: block; }
.hero h1 {
  margin-bottom: 0.15em;
  font-size: clamp(3rem, 12vw, 5rem);
  letter-spacing: -0.045em;
}
.tagline {
  color: var(--text-secondary);
  font-size: clamp(1.1rem, 3.5vw, 1.35rem);
  margin: 0 0 1.75rem;
}
.lede {
  max-width: 30rem;
  margin: 0 auto 2rem;
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--separator);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
}
.badge .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.meta {
  margin-top: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* -------------------------------------------------------------------------
   7. Features
   ------------------------------------------------------------------------- */
.features {
  padding: clamp(2rem, 6vw, 3.5rem) 0;
  border-top: 1px solid var(--separator);
}
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  margin-top: 2rem;
}
@media (min-width: 40rem) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 2.5rem; }
}
.feature h3 {
  margin: 0 0 0.25rem;
  font-size: 1.0625rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.feature h3 svg { flex: none; color: var(--accent); }
.feature p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

/* -------------------------------------------------------------------------
   8. Buttons + call-to-action band
   The primary button is monochrome on purpose: red is kept for small
   accents (the logo bar, links, focus rings) so it stays emphatic.
   ------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  background: var(--solid);
  color: var(--text-on-solid);
  text-decoration: none;
  font-weight: 600;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--solid);
}
.btn:hover { opacity: 0.85; }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--separator);
}

.cta {
  border-top: 1px solid var(--separator);
  padding: clamp(2.5rem, 8vw, 4rem) 0;
  text-align: center;
}
.cta h2 { margin-top: 0; }
.cta p { color: var(--text-secondary); max-width: 32rem; margin: 0 auto 1.75rem; }
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* -------------------------------------------------------------------------
   9. Inner pages
   ------------------------------------------------------------------------- */
.page-head {
  padding: clamp(2.5rem, 8vw, 4rem) 0 1rem;
}
.page-head h1 { font-size: clamp(2rem, 6vw, 2.75rem); }
.page-head p {
  color: var(--text-secondary);
  max-width: var(--measure);
  margin-bottom: 0;
}
.page-body { padding-bottom: clamp(3rem, 10vw, 5rem); }

.card {
  background: var(--surface);
  border: 1px solid var(--separator);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 4vw, 1.75rem);
  margin: 1.75rem 0;
}
.card :first-child { margin-top: 0; }
.card :last-child { margin-bottom: 0; }

/* The email address the visitor is meant to write to. */
.email {
  font-weight: 700;
  font-size: 1.0625rem;
  word-break: break-word;
}

/* FAQ entries use native <details>, so they open and close with no
   JavaScript and stay keyboard-accessible for free. */
.faq {
  border-bottom: 1px solid var(--separator);
  padding: 0.35rem 0;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 0.9rem 2rem 0.9rem 0;
  font-weight: 600;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
}
.faq[open] summary::after { content: "–"; }
.faq .answer {
  padding: 0 0 1rem;
  color: var(--text-secondary);
  max-width: var(--measure);
}
.faq .answer :last-child { margin-bottom: 0; }

/* Legal pages: numbered sections, slightly smaller type. */
.legal { font-size: 1rem; }
.legal h2 {
  font-size: 1.1875rem;
  margin-top: 2.25rem;
}
.legal p, .legal li { color: var(--text-secondary); }
.legal .effective {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-top: 0.5rem;
}

/* Short "the gist" summary box at the top of the privacy policy. */
.summary-box {
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.1rem 1.25rem;
  margin: 1.75rem 0 2rem;
}
.summary-box p:last-child, .summary-box ul:last-child { margin-bottom: 0; }

/* -------------------------------------------------------------------------
   10. Footer
   ------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--separator);
  padding: 2.5rem 0 3.5rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: flex-start;
  justify-content: space-between;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.35rem;
}
.site-footer a { color: var(--text-secondary); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.footer-brand { display: flex; flex-direction: column; gap: 0.35rem; }

/* -------------------------------------------------------------------------
   11. 404
   ------------------------------------------------------------------------- */
.centered {
  text-align: center;
  padding: clamp(4rem, 15vw, 8rem) 0;
}
