/* Colours from the app's Reflections page (ReflectionPageStyle.swift). */
:root {
  --paper: #F4EFE5;
  --card: #FBF8F1;
  --ink: #2A251F;
  --soft: #3E382F;
  --faint: #6F675B;
  --gold: #B79C66;
  --link: #7A5A1C;
  --rule: #DCD2BE;
  --badge-bg: #141A2E;
  --badge-ink: #F4EFE5;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141A2E;
    --card: #1B2238;
    --ink: #ECE6D6;
    --soft: #D2CAB6;
    --faint: #A39DB0;
    --gold: #C9A862;
    --link: #D9BC7A;
    --rule: #2E3550;
    --badge-bg: #F4EFE5;
    --badge-ink: #141A2E;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 2px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--ink); color: var(--paper);
  padding: 0.5rem 1rem; border-radius: 0.5rem; z-index: 10;
}
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: 44rem; margin: 0 auto; padding: 0 1rem; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.25rem 1rem; padding-top: 0.875rem; padding-bottom: 0.875rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.125rem;
}
.brand svg { width: 1.375rem; height: 1.375rem; }
.site-nav ul { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  font-family: var(--sans); font-size: 0.9375rem; color: var(--soft);
  text-decoration: none; padding: 0.5rem 0; display: inline-block;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 0.4em; }

.site-footer {
  margin-top: 4rem; border-top: 1px solid var(--rule);
  font-family: var(--sans); font-size: 0.875rem; color: var(--faint);
}
.site-footer .wrap { padding-top: 1.5rem; padding-bottom: 2.5rem; }
.site-footer p { margin: 0.25rem 0; }
.site-footer a { color: var(--faint); }

/* The star and the double rule, as on the app's Reflections page */
.star { fill: var(--gold); }
.double-rule { border: 0; border-top: 3px double var(--gold); margin: 0; }

.eyebrow {
  font-variant: all-small-caps; letter-spacing: 0.12em;
  color: var(--faint); font-size: 1.0625rem; margin: 0;
}

/* Landing */
.hero { text-align: center; padding: 3.5rem 0 2.5rem; }
.hero .star-lg { width: 3.5rem; height: 3.5rem; display: block; margin: 0 auto 1.25rem; }
.hero h1 { font-size: clamp(2.25rem, 9vw, 3.25rem); line-height: 1.1; margin: 0.25rem 0 1rem; font-weight: 600; letter-spacing: -0.01em; }
.hero .lede { font-size: 1.25rem; color: var(--soft); margin: 0 auto 2rem; max-width: 32rem; }

.badge {
  display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center;
  min-height: 3.25rem; padding: 0.4rem 1.25rem; border-radius: 0.75rem;
  background: var(--badge-bg); color: var(--badge-ink); text-decoration: none;
  font-family: var(--sans); line-height: 1.15;
}
.badge small { font-size: 0.75rem; opacity: 0.85; }
.badge span { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
a.badge:hover { text-decoration: none; opacity: 0.9; }
.badge[aria-disabled="true"] { cursor: default; }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.tag {
  display: inline-block; vertical-align: 0.15em; margin-left: 0.4rem; padding: 0.05rem 0.45rem;
  border: 1px solid var(--rule); border-radius: 0.375rem;
  font-family: var(--sans); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.01em; color: var(--faint); white-space: nowrap;
}
.nowrap { white-space: nowrap; }
.hero .note { font-family: var(--sans); font-size: 0.875rem; color: var(--faint); margin-top: 0.75rem; }

.verse { text-align: center; padding: 1.5rem 0; }
.verse blockquote { margin: 1rem auto; max-width: 34rem; font-style: italic; color: var(--soft); }
.verse blockquote p { margin: 0; }
.verse cite { font-style: normal; font-variant: all-small-caps; letter-spacing: 0.1em; font-size: 0.9375rem; color: var(--faint); display: block; margin-top: 0.5rem; }

/* App screenshots: a swipeable row on phones, a grid on wider screens */
.screens {
  list-style: none; margin: 0 -1rem; padding: 0.25rem 1rem 1rem;
  display: grid; grid-auto-flow: column; grid-auto-columns: 62%; gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.screens::-webkit-scrollbar { display: none; }
.screens li { scroll-snap-align: center; }
@media (min-width: 40rem) {
  .screens { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto; overflow: visible; margin: 0; padding: 0; gap: 1.5rem 1.25rem; }
}
.screens figure { margin: 0; }
.screens img {
  display: block; width: 100%; height: auto;
  border-radius: 1.5rem; border: 1px solid var(--rule);
  box-shadow: 0 0.5rem 1.5rem rgba(20, 26, 46, 0.12);
}
.screens figcaption { text-align: center; font-size: 0.9375rem; color: var(--soft); margin-top: 0.625rem; }

.section-title { text-align: center; font-size: 1.75rem; font-weight: 600; margin: 3rem 0 1.5rem; }
.section-title:has(+ .section-note) { margin-bottom: 0.375rem; }
.section-note { text-align: center; font-family: var(--sans); font-size: 0.875rem; color: var(--faint); margin: 0 0 1.25rem; }

.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 40rem) { .features { grid-template-columns: 1fr 1fr; } }
.features li {
  background: var(--card); border: 1px solid var(--rule); border-radius: 1rem;
  padding: 1.25rem 1.25rem 1.125rem;
}
.features h3 { display: flex; align-items: center; gap: 0.5rem; font-size: 1.1875rem; margin: 0 0 0.375rem; font-weight: 600; }
.features h3 svg { width: 0.875rem; height: 0.875rem; flex: none; }
.features p { margin: 0; color: var(--soft); font-size: 1.0625rem; line-height: 1.5; }

.promise { text-align: center; max-width: 34rem; margin: 3rem auto 0; color: var(--soft); }
.promise h2 { font-size: 1.5rem; margin: 0 0 0.5rem; color: var(--ink); font-weight: 600; }

/* Text pages (privacy, support) */
.page { padding-top: 2.5rem; }
.page h1 { font-size: clamp(2rem, 7vw, 2.5rem); line-height: 1.15; margin: 0.25rem 0 0.5rem; font-weight: 600; }
.page .meta { font-family: var(--sans); font-size: 0.875rem; color: var(--faint); margin: 0 0 2rem; }
.page h2 { font-size: 1.375rem; margin: 2.25rem 0 0.5rem; font-weight: 600; }
.page h3 { font-size: 1.125rem; margin: 1.5rem 0 0.25rem; font-weight: 600; }
.page p, .page li { color: var(--soft); }
.page ul { padding-left: 1.25rem; }
.page li { margin: 0.375rem 0; }
.page strong { color: var(--ink); }

.summary {
  background: var(--card); border: 1px solid var(--rule); border-radius: 1rem;
  padding: 1rem 1.25rem; margin: 0 0 1rem;
}
.summary ul { margin: 0.25rem 0 0; }

.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-of-type { border-top: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1rem 2rem 1rem 0; position: relative;
  font-weight: 600; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0.25rem; top: 0.875rem;
  font-family: var(--sans); font-weight: 400; font-size: 1.375rem; color: var(--gold);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 1rem; }
.faq details > div p:first-child { margin-top: 0; }

.contact-card {
  text-align: center; background: var(--card); border: 1px solid var(--rule);
  border-radius: 1rem; padding: 1.5rem 1.25rem; margin-top: 1.5rem;
}
.contact-card p { margin: 0.25rem 0; }
.contact-card .email { font-size: 1.25rem; word-break: break-all; }

.center { text-align: center; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
