/*
  Known shared site styles (Nov 2026 homepage redesign, extended to the
  rest of public-site/). Every page links this file for the design
  tokens, fonts, buttons, header/nav (including the mobile menu), and
  footer, so a future color or header change happens here once instead
  of in five separate <style> blocks. Page-specific layout (the
  homepage's hero/sections, the legal pages' document styling, the
  form pages' cards) stays in each page's own <style> block, loaded
  after this file so it can override these defaults where a page
  genuinely needs something different (e.g. the homepage's much larger
  marketing headline sizes).

  Fonts: Caladea (serif headings/verses) + Inter (body/UI). Colors:
  the fixed Wine/Amber/Honey/Ground/Ink/Tint brand palette from
  design/known-homepage-handoff/SPEC.md, plus theme tokens that follow
  the visitor's OS light/dark setting automatically.
*/

:root {
  --page: #F6EBDD;
  --surface: #FFFDF9;
  --ink: #2B2420;
  --soft: #6B5A4E;
  --em: #7A2E3A;
  --line: #E6D3B8;
  --label: #8A5A10;
  --chip: #F3E3C7;
  --phone-bg: #FFFBF4;
  --phone-card: #F3E3C7;
  --phone-frame: #2B2420;
  --btn2-border: #D9BE93;
  --btn2-text: #7A2E3A;
  --glow-a: rgba(232, 184, 92, 0.55);
  --glow-b: rgba(243, 227, 199, 0.95);
  --hero-base: #FBF6EE;

  /* Fixed brand colors -- same in both modes. */
  --wine: #7A2E3A;
  --amber: #C98A1E;
  --honey: #E8B85C;
  --ground: #FBF6EE;
  --brand-ink: #2B2420;
  --tint: #F3E3C7;

  /* Semantic status colors -- not part of the brand palette, used by
     the form pages' error/success states. */
  --danger: #A8392F;
  --danger-light: #FBEAE8;
  --success: #2E7D32;
  --success-light: #E9F5EA;
  --shadow: rgba(43, 36, 32, 0.12);

  /* Callout boxes (legal pages): the Tint/line pairing stays readable
     on a light background, but Tint never darkens in dark mode (it's
     a fixed brand color), so these get their own theme-aware pair. */
  --callout-bg: #F3E3C7;
  --callout-border: #E6D3B8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #1C1513;
    --surface: #2B2420;
    --ink: #FBF1E2;
    --soft: #CDBBA6;
    --em: #E8B85C;
    --line: #3A2E29;
    --label: #E8B85C;
    --chip: #3A2E29;
    --phone-bg: #1C1513;
    --phone-card: #3A2E29;
    --phone-frame: #4A3C36;
    --btn2-border: #5A4A42;
    --btn2-text: #E8B85C;
    --glow-a: rgba(232, 184, 92, 0.26);
    --glow-b: rgba(122, 46, 58, 0.35);
    --hero-base: #2B2420;

    --danger: #E87A6F;
    --danger-light: #3A2320;
    --success: #6FBF73;
    --success-light: #1E2E1F;
    --shadow: rgba(0, 0, 0, 0.35);

    --callout-bg: #3A2E29;
    --callout-border: #4A3C36;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--wine);
  outline-offset: 3px;
  border-radius: 8px;
}

.serif { font-family: 'Caladea', Georgia, serif; }
h1, h2, h3 { font-family: 'Caladea', Georgia, serif; color: var(--ink); margin: 0 0 10px; }
h1 { font-size: clamp(32px, 5vw, 44px); font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 700; line-height: 1.18; text-wrap: balance; }
h3 { font-size: 19px; font-weight: 700; line-height: 1.3; }
p { margin: 0 0 14px; }
em { font-style: italic; }
.verse { font-family: 'Caladea', Georgia, serif; font-style: italic; color: var(--em); margin: 0; }
.verse-ref { font-family: 'Inter', sans-serif; font-style: normal; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--label); white-space: nowrap; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--page); padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 700;
}
.skip-link:focus { top: 12px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.eyebrow {
  display: block; font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--label); margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Inter', sans-serif; font-size: 16.5px; font-weight: 600; line-height: 1;
  padding: 16px 28px; border-radius: 999px; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn-primary { background: var(--wine); color: #FBF1E2; box-shadow: 0 12px 24px -12px rgba(122, 46, 58, 0.6); }
.btn-primary:hover { transform: translateY(-1px); opacity: .92; }
.btn-primary:disabled { opacity: .5; cursor: default; transform: none; }
.btn-outline { background: transparent; color: var(--btn2-text); border-color: var(--btn2-border); }
.btn-outline:hover { opacity: .75; }
.btn-sm { padding: 10px 18px; font-size: 15px; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--page);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; min-height: 76px; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.header-left { display: flex; align-items: center; gap: 14px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 34px; height: auto; }
.brand span { font-family: 'Caladea', Georgia, serif; font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; }
.nav-links a:not(.btn) { color: var(--soft); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav-links a:not(.btn):hover { color: var(--ink); }

/* Mobile menu button + dropdown -- hidden on desktop; shown via the
   860px media query below. Forcing display:none above that width
   (even if the dropdown's `hidden` attribute were ever out of sync,
   e.g. a resize while it's open) keeps it from ever appearing on
   desktop. */
.menu-toggle {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
}
.menu-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mobile-menu {
  display: flex; flex-direction: column;
  position: absolute; top: 100%; left: 0; right: 0; z-index: 49;
  background: var(--page); border-bottom: 1px solid var(--line);
  padding: 4px 24px 12px; box-shadow: 0 16px 24px -16px rgba(43, 36, 32, 0.25);
}
.mobile-menu a { padding: 13px 0; font-size: 16px; font-weight: 500; color: var(--soft); border-bottom: 1px solid var(--line); }
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--ink); }
.mobile-menu[hidden] { display: none; }
@media (min-width: 861px) { .menu-toggle, .mobile-menu { display: none !important; } }
.label-short { display: none; }

@media (max-width: 860px) {
  /* Only the primary button (if any) stays inline next to the logo --
     the section links and "Church login" move into the dropdown
     opened by .menu-toggle instead. Header stays on one row: no
     wrapping, and the button shrinks to fit. */
  .nav-links a:not(.btn-primary) { display: none; }
  .menu-toggle { display: inline-flex; flex-shrink: 0; }
  .site-header .wrap { flex-wrap: nowrap; }
  .header-left { flex-shrink: 0; min-width: 0; }
  .nav-links { flex-wrap: nowrap; min-width: 0; }
  .nav-links .btn-primary.btn-sm { padding: 9px 14px; font-size: 14px; white-space: nowrap; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .nav-links { gap: 14px; }
  .brand span { font-size: 22px; }
}
@media (max-width: 420px) {
  /* Last-resort shrink for very narrow phones so the header never wraps. */
  .label-full { display: none; }
  .label-short { display: inline; }
  .header-left { gap: 10px; }
  .brand span { font-size: 19px; }
}

/* ---------- Footer ---------- */
.site-footer { padding: 56px 24px 56px; }
.footer-inner {
  max-width: 1200px; margin: 0 auto; border-top: 1px solid var(--line); padding-top: 36px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  font-size: 14px; color: var(--soft);
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 26px; height: auto; }
.footer-brand span.name { font-family: 'Caladea', Georgia, serif; font-weight: 700; font-size: 20px; color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-credit { margin-top: 8px; flex-basis: 100%; font-size: 12px; line-height: 1.6; color: var(--soft); }
