/* Shared styling for the static pages under sojourn.rest (/about/, /faq/).
   The player is a React Native Web app and styles itself; these are the plain
   HTML pages that sit behind it.

   Palette and serif are lifted from web/src/player/SharePlayer.tsx so the two
   are visibly the same product. Keep them in step. */

:root {
  --bg: #141426;
  --ink: #ece7da;
  --ink-soft: #9b97a0;
  --ink-faint: #6c6a72;
  --gold: #d8b878;
  --gold-soft: #b9a173;
  --line: #23222a;
  --serif: Charter, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  /* Flat navy, no gradient. The launch asset's field is #141326 — the app's
     navy with green one unit down, because the asset pipeline quantizes it
     there. LaunchScreen.storyboard pins its own background to the same 19/255
     for the same reason: a boundary rectangle around the lockup would show,
     a uniform one-unit shift does not. The masthead is stored lossless so that
     field survives encoding, and it meets this background invisibly. */
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* The iOS launch screen, reused. It is the first thing anyone sees of Sojourn
   on a phone, and shortly it will be the first thing again — the web has no
   business introducing the brand differently. */
.mark { display: block; line-height: 0; }
.mark img {
  display: block;
  width: 100%;
  height: auto;
  /* No object-fit: the source is already cropped to a 3.6:1 band, so it can
     scale on its own. Capping the height and cropping to fit ate the sky above
     the wordmark and left it jammed against the top of the window. */
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}

.wrap {
  max-width: 34rem;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

h1 {
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1.15;
  font-weight: 400;
  margin: 1rem 0 1.25rem;
  letter-spacing: -0.01em;
}

/* On a wide window the masthead is tall and its faded lower third is dead space
   worth reclaiming. On a phone the band is only ~140px and the same pull-up
   shoves the heading into the J's descender, so it stays put. */
@media (min-width: 46em) {
  h1 { margin-top: -1.5rem; }
}

.lede {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--gold);
  font-style: italic;
  margin: 0 0 2.5rem;
}

h2 {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-family: var(--sans);
  font-weight: 500;
  color: var(--gold-soft);
  margin: 3.25rem 0 1rem;
}

/* FAQ question, and story title on /origins/. An h3 rather than a styled
   paragraph so the page has a real outline for screen readers and for search
   engines rendering a Q&A. */
h3 {
  font-size: 1.0625rem;
  font-weight: 400;
  font-style: italic;
  color: var(--gold);
  margin: 2rem 0 0.5rem;
}

/* Story cover beside its title on /origins/, served through Supabase's image
   transform (~7KB each rather than the 1.6MB originals). Decorative — the title
   is right beside it — so alt is empty and it stays out of the reading order.
   Sized in ch-independent px because it should not scale with body text. */
h3 .cover {
  width: 76px;
  height: 76px;
  border-radius: 5px;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 0.85rem;
  /* The covers are dark, nocturnal paintings meeting a dark page; a hairline
     keeps them from bleeding into the background at this size. */
  box-shadow: 0 0 0 1px rgba(216, 184, 120, 0.18);
}
@media (max-width: 30em) {
  h3 .cover { width: 60px; height: 60px; margin-right: 0.65rem; }
}

p { margin: 0 0 1.25rem; }

a { color: var(--gold); text-decoration-color: rgba(216, 184, 120, 0.4); text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--gold); }

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

.begin {
  display: block;
  margin: 2.5rem 0 0;
  padding: 0.95rem 1.5rem;
  border: 1px solid var(--gold-soft);
  border-radius: 30px;
  color: var(--gold);
  text-align: center;
  text-decoration: none;
  font-size: 1.0625rem;
  letter-spacing: 0.02em;
  transition: background-color 120ms ease;
}
.begin:hover { background: rgba(216, 184, 120, 0.1); }

.under {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--ink-faint);
  font-family: var(--sans);
}

footer {
  margin-top: 4.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  font-family: var(--sans);
  color: var(--ink-faint);
}
footer a { color: var(--ink-soft); }

/* The static pages' own navigation. The player deliberately exposes exactly one
   door out (to /about/); once a reader is through it they are on an ordinary
   little site and can move around normally. */
.sitenav {
  margin: 0 0 0.9rem;
  font-family: var(--sans);
  color: var(--ink-faint);
}
.sitenav a { margin-right: 1rem; }
.sitenav a[aria-current="page"] { color: var(--ink-faint); text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
