/* ─────────────────────────────────────────────────────────────────────────
 * sojournrealms.com — shared styles.
 *
 * Tokens are lifted VERBATIM from the app's own registry
 * (src/theme/tokens.ts, the "Moonlit Silver" palette) so the site and the app
 * cannot drift. Do not invent colours here; if a value needs to change, change
 * it in tokens.ts and mirror it.
 *
 * Typography: Bodoni Moda display, matching the app (see the --serif note).
 *
 * Fonts load from the Google Fonts CDN, the same approach getmushin.com uses.
 * ───────────────────────────────────────────────────────────────────────── */

:root {
  /* Moonlit Silver — src/theme/tokens.ts `Colors` */
  --bg: #020617;
  --surface: #0f172a;
  --surface-raised: #1e293b;
  --accent: #a5b4fc;
  --accent-bright: #e2e8f0;
  --text: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --lavender: #cbb8e8;
  --candle: #ffd7a9;

  /* Realm accents — src/content/wings.ts. Mirrored here (base.css is the
     documented home for tokens) so the scroll scenes + hero do not depend on
     arch.css, which is being retired as the round-2 redesign lands. */
  --realm-cozy: #ffd7a9;
  --realm-fantasy: #c7d2fe;
  --realm-dreamscape: #a7f3d0;
  --realm-cyberpunk: #f9a8d4;

  --serif: 'Bodoni Moda', Georgia, 'Times New Roman', serif;
  /* Bodoni Moda = the APP's own display serif (tokens.ts), site and app in the
     same voice. Fraunces was tried 2026-07-17 and rejected by the founder: its
     hooked J reads wrong in "Sojourn". Do not re-try Fraunces. */
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --whisper: 'Cormorant Garamond', Georgia, serif;

  --measure: 68ch;
}

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

html {
  scroll-behavior: smooth;
  /* The app ships Bodoni's STATIC default cut (BodoniModa_400Regular). The web
     variable font auto-selects a high optical size at display sizes: far
     thinner hairlines, "looks nothing the same" (founder). Turning optical
     sizing off renders the same default cut as the app. */
  font-optical-sizing: none;
  /* The hero's scroll cue is an anchor jump; keep it from slamming. */
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-bright);
}

/* ── The eyebrow / small-caps label, straight off the app's type ramp ──── */
.eyebrow {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Shared page chrome for the legal pages ───────────────────────────── */
.page-head {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(2, 6, 23, 0.86);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.page-head-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.page-head .wordmark {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--text);
}

.page-head nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
}

.page-head nav a {
  color: var(--text-secondary);
}

.page-head nav a:hover,
.page-head nav a[aria-current='page'] {
  color: var(--text);
}

.site-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 80px;
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.site-foot .foot-word {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.site-foot nav {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.site-foot nav a {
  color: var(--text-secondary);
}

/* Instagram mark: sits between the wordmark and the nav, quiet by default,
   brightening on hover like the text links around it. */
.foot-ig {
  display: inline-flex;
  padding: 8px; /* 18px glyph + 8px halo keeps the tap target ~34px */
  margin-bottom: 6px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.foot-ig:hover {
  color: var(--text);
}

/* ── Waitlist form (closing block + footer repeat; shared/waitlist.js) ──── */
.wl-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
}

/* The success state hides the form via the hidden attribute; display:flex
   above would beat the UA stylesheet without this. */
.wl-form[hidden] {
  display: none;
}

.wl-input {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(226, 232, 240, 0.25);
  border-radius: 999px;
  padding: 12px 22px;
  width: min(280px, 100%);
  outline: none;
  transition: border-color 300ms ease, box-shadow 300ms ease;
}

.wl-input::placeholder {
  color: var(--text-muted);
}

.wl-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 22px -6px rgba(165, 180, 252, 0.55);
}

.wl-input[aria-invalid='true'] {
  border-color: rgba(249, 168, 212, 0.7);
}

.wl-join {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--bg);
  background: var(--accent-bright);
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  cursor: pointer;
  box-shadow: 0 8px 34px rgba(165, 180, 252, 0.22);
  transition: background 300ms ease, opacity 300ms ease;
}

.wl-join:hover {
  background: #fff;
}

.wl-join:disabled {
  opacity: 0.55;
  cursor: default;
}

/* Honeypot: off-canvas, never display:none (some bots skip hidden inputs). */
.wl-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.wl-note {
  font-family: var(--whisper);
  font-style: italic;
  font-size: 17px;
  color: var(--accent);
  margin: 14px 0 0;
}

/* Footer repeat: quieter, sits above the wordmark. */
.foot-wait {
  margin-bottom: 34px;
}

.foot-wait-line {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.wl-form--compact .wl-input {
  width: min(240px, 100%);
  padding: 10px 18px;
}

.wl-form--compact .wl-join {
  padding: 10px 22px;
}

/* ── Legal document body ──────────────────────────────────────────────── */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 24px 0;
}

.legal h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 44px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.legal .updated {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 48px;
}

.legal h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.3;
  margin: 44px 0 14px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.legal h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 28px 0 10px;
}

.legal p {
  color: var(--text-secondary);
  margin: 0 0 16px;
}

.legal ul {
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--text-secondary);
}

.legal li {
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .legal {
    padding: 48px 20px 0;
  }
  .legal h1 {
    font-size: 34px;
  }
  .legal h2 {
    font-size: 22px;
    margin: 34px 0 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
