/* One Church @ Harvest Point Events: shared styles (brand tokens from the 2027 Brand Guide) */
:root {
  --ocean: #163957;
  --green: #7C9F8B;
  --sand: #EFD3A8;
  --sand-tint: #FFF4E2;
  --white: #FFFFFF;
  --error: #CC0000;
  --success-text: #2E7D32;

  --bg: var(--white);
  --surface: #F4F7F5;
  --text: var(--ocean);
  --muted: #4A5D6E;
  --rule: #DDE3E8;
  --field: #6B7F90;
  --focus: var(--ocean);
  --btn-bg: var(--ocean);
  --btn-text: var(--white);

  --font-head: "DIN 2014", "D-DIN", "DIN Alternate", Barlow, "Arial Narrow", sans-serif;
  --font-body: Calibri, Carlito, "Source Sans 3", "Segoe UI", sans-serif;
  --ease: 300ms ease-in-out;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F2A41; --surface: #163957; --text: #F3F5F7; --muted: #C5D0DA; --rule: #2B4D6B;
    --field: #8FA3B5; --focus: var(--sand); --btn-bg: var(--sand); --btn-text: var(--ocean);
    --sand-tint: #24425E; --success-text: #8FD694; --error: #FF8A80;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.75; }
@media (max-width: 600px) { body { font-size: 15px; } }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; letter-spacing: 0.5px; line-height: 1.2; margin: 0; }
h1 { font-size: 48px; } h2 { font-size: 32px; } h3 { font-size: 22px; }
@media (max-width: 600px) { h1 { font-size: 36px; } h2 { font-size: 26px; } }
p { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 4px solid var(--green);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 48px; }
.brand { display: flex; align-items: center; gap: 24px; text-decoration: none; }
.brand img { height: 40px; width: auto; display: block; }
.brand .logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand .logo-light { display: none; } :root:not([data-theme="light"]) .brand .logo-dark { display: block; } }
.brand span { font-family: var(--font-head); font-size: 24px; font-weight: 700; padding-left: 24px; border-left: 1px solid var(--rule); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; font-weight: 600; }
.site-nav a { text-decoration: none; padding: 12px 0; border-bottom: 3px solid transparent; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--ocean); }
.site-nav .who { color: var(--muted); font-weight: 400; }
@media (max-width: 600px) { .site-header { padding: 12px 16px; } .brand span { display: none; } }

main { max-width: 960px; margin: 0 auto; padding: 48px 48px 64px; display: flex; flex-direction: column; gap: 48px; }
main.wide { max-width: 1200px; }
@media (max-width: 600px) { main { padding: 32px 16px 48px; gap: 32px; } }
.lede { color: var(--muted); max-width: 720px; margin-top: 8px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.section { display: flex; flex-direction: column; gap: 24px; }
.section + .section { border-top: 1px solid var(--rule); padding-top: 48px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 32px; border-radius: 999px;
  border: 0; background: var(--btn-bg); color: var(--btn-text); font-family: var(--font-head); font-weight: 700; font-size: 18px;
  letter-spacing: 1px; text-transform: uppercase; text-decoration: none; cursor: pointer; white-space: nowrap; transition: opacity var(--ease); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-small { min-height: 44px; padding: 8px 20px; font-family: var(--font-body); font-size: 16px; letter-spacing: 0; text-transform: none; }
.btn-outline { background: transparent; color: var(--text); border: 2px solid currentColor; }
.btn-link { min-height: 44px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.field .hint { font-size: 14px; font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=number], select, textarea {
  font: inherit; font-weight: 400; color: var(--text); background: var(--bg); border: 1px solid var(--field); border-radius: 8px;
  padding: 10px 12px; min-height: 44px; width: 100%; }
input[readonly] { background: var(--surface); }
textarea { min-height: 96px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; margin: 0; accent-color: var(--ocean); flex: none; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-weight: 600; padding: 0; margin-bottom: 12px; }
.check { display: flex; gap: 12px; align-items: center; font-weight: 400; min-height: 32px; }

/* Ministry picker */
.ministry { border: 1px solid var(--rule); border-radius: 12px; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; transition: border-color var(--ease); }
.ministry.on { border-color: var(--ocean); }
.ministry .check { font-weight: 600; }
.subs { display: flex; flex-direction: column; gap: 6px; padding-left: 32px; }
.subs p { font-size: 15px; font-weight: 600; }

/* Messages */
.notice { border: 2px solid var(--ocean); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.notice.soft { border: 1px solid var(--rule); background: var(--surface); }
.alert { color: var(--error); font-weight: 600; }
.ok { color: var(--success-text); font-weight: 600; }
.muted { color: var(--muted); }
.empty { border: 1px dashed var(--field); border-radius: 16px; padding: 32px; text-align: center; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; padding: 12px 20px; border-radius: 12px;
  background: var(--ocean); color: var(--white); font-weight: 600; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 14px; color: var(--muted); padding: 12px 16px; border-bottom: 2px solid var(--ocean); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--rule); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.id { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; border-radius: 999px; padding: 1px 12px; font-size: 14px; font-weight: 600; background: var(--rule); color: var(--ocean); white-space: nowrap; }
.tag.gold { background: var(--sand); }

/* Tabs (leadership page) */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--rule); }
.tabs button { font: inherit; font-weight: 600; color: var(--text); background: none; border: 0; border-bottom: 3px solid transparent; padding: 12px 8px; min-height: 44px; cursor: pointer; }
.tabs button[aria-selected="true"] { border-bottom-color: var(--ocean); }
.count { display: inline-block; min-width: 24px; margin-left: 6px; padding: 0 8px; border-radius: 999px; background: var(--sand); color: var(--ocean); font-size: 14px; text-align: center; }

/* Request cards */
.card { border: 1px solid var(--rule); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.card header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.code-input { width: 96px !important; text-transform: uppercase; font-weight: 700; }
[hidden] { display: none !important; }
.subs .check { font-weight: 400; }
