/* Sermon Lane design system — see docs/DESIGN_SYSTEM.md.
   Family resemblance to Missionary Lane (navy #17325C), with its own warm "lamp" gold for sound and voice. */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,650&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --navy: #17325C;
  --navy-deep: #0F2342;
  --navy-tint: rgba(23, 50, 92, .08);
  --gold: #E0AE45;          /* on navy / dark only */
  --gold-deep: #94650F;     /* text and icons on light (4.9:1 on white) */
  --gold-tint: rgba(224, 174, 69, .16);
  --paper: #FAF7F1;
  --surface: #FFFFFF;
  --surface-2: #F3EEE4;
  --ink: #18202E;
  --text: #384152;
  --muted: #667085;
  --line: #E4DDCF;
  --ok: #1F7A4D;
  --warn: #9A5B00;
  --bad: #B42318;
  --focus: #2F6FDB;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 8px; --r: 12px; --r-lg: 20px;
  --shadow: 0 1px 2px rgba(15, 35, 66, .06), 0 8px 24px rgba(15, 35, 66, .08);
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1120px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #0C1526; --surface: #131F35; --surface-2: #1A2843; --ink: #F3F0E8; --text: #CDD3DE; --muted: #93A0B5;
  --line: #24365A; --navy-tint: rgba(224, 174, 69, .10); --gold-deep: #E0AE45; --focus: #7FA8F0;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0C1526; --surface: #131F35; --surface-2: #1A2843; --ink: #F3F0E8; --text: #CDD3DE; --muted: #93A0B5;
    --line: #24365A; --navy-tint: rgba(224, 174, 69, .10); --gold-deep: #E0AE45; --focus: #7FA8F0;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 16px/1.6 var(--font-body); }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); font-weight: 650; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.2rem; font-family: var(--font-body); font-weight: 650; letter-spacing: 0; }
p { margin: 0 0 1em; }
a { color: var(--navy); text-underline-offset: 3px; }
:root[data-theme="dark"] a { color: var(--gold); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
img, svg { max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { font: 600 .78rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 14px; display: block; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header / footer */
.site-head { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; text-decoration: none; color: var(--ink); font: 650 1.2rem/1 var(--font-display); }
.brand svg { width: 32px; height: 32px; flex: none; }
.nav { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; color: var(--text); font-weight: 500; font-size: .95rem; white-space: nowrap; }
.nav a:hover { color: var(--ink); }
@media (max-width: 1100px) { .nav a.wide { display: none; } }
@media (max-width: 760px) { .nav a:not(.btn) { display: none; } }
.site-foot { background: var(--navy-deep); color: #C9D3E4; padding: 48px 0 36px; margin-top: 96px; font-size: .92rem; }
.site-foot a { color: #E8EEF8; }
.site-foot .wrap { display: grid; gap: 24px; grid-template-columns: 1.4fr 1fr; }
.site-foot .brand { color: #fff; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
@media (max-width: 680px) { .site-foot .wrap { grid-template-columns: 1fr; } }

/* ---------- buttons, inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px;
  border: 1px solid transparent; font: 600 .95rem/1 var(--font-body); text-decoration: none; cursor: pointer; transition: background .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff !important; }
.btn-primary:hover { background: var(--navy-deep); }
:root[data-theme="dark"] .btn-primary { background: var(--gold); color: var(--navy-deep) !important; }
.btn-gold { background: var(--gold); color: var(--navy-deep) !important; }
.btn-gold:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink) !important; }
.btn-ghost:hover { background: var(--navy-tint); }
.btn-danger { background: var(--bad); color: #fff !important; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 1.05rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
label { display: block; font-weight: 600; color: var(--ink); font-size: .9rem; margin-bottom: 6px; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; min-height: 44px; }
textarea { min-height: 96px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--navy); }
.field { margin-bottom: 16px; }
.hint { color: var(--muted); font-size: .85rem; margin-top: 4px; }

/* ---------- surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; box-shadow: var(--shadow); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: 600 .78rem/1.2 var(--font-body); background: var(--surface-2); color: var(--text); }
.pill.live { background: rgba(180, 35, 24, .12); color: var(--bad); }
.pill.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.4s infinite; }
.pill.ok { background: rgba(31, 122, 77, .12); color: var(--ok); }
.pill.warn { background: rgba(154, 91, 0, .12); color: var(--warn); }
@keyframes pulse { 50% { opacity: .35; } }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.notice { border-left: 4px solid var(--gold); background: var(--gold-tint); padding: 12px 16px; border-radius: var(--r-sm); color: var(--ink); }
.notice.bad { border-color: var(--bad); background: rgba(180, 35, 24, .08); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: var(--r-sm); box-shadow: var(--shadow); z-index: 99; max-width: calc(100% - 32px); }

/* ---------- sound-wave mark animation (used in hero + live states) */
.waves.on .w1 { animation: wave 1.6s ease-in-out infinite; }
.waves.on .w2 { animation: wave 1.6s ease-in-out .2s infinite; }
.waves.on .w3 { animation: wave 1.6s ease-in-out .4s infinite; }
@keyframes wave { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
