/* ==========================================================================
   Sandton City Church — design tokens & shared components
   Public website: warm light theme (cream paper, ink, gold — like the event posters).
   Admin dashboard: dark theme (body.admin overrides the tokens below).
   ========================================================================== */

:root {
  --bg: #f6f1e8;
  --bg-2: #fffdf9;
  --surface: #efe8dc;
  --surface-2: #e7dfd1;
  --line: rgba(43, 32, 16, 0.10);
  --line-strong: rgba(43, 32, 16, 0.20);
  --text: #1c1712;
  --text-2: #4c4339;
  --muted: #7d7265;
  --gold: #9a6a1f;          /* accent text & icons */
  --gold-2: #8a5c14;        /* emphasis text (serif italics, prices) */
  --gold-deep: #c8963e;
  --gold-btn: #d6a650;      /* solid gold buttons (dark text on top) */
  --gold-btn-2: #e3b866;
  --danger: #b4321f;
  --ok: #2f7a47;
  --hover: rgba(43, 32, 16, 0.06);
  --btn: #ebe3d5;
  --btn-2: #e1d7c6;
  --input: #fffdf9;
  --input-focus: #ffffff;
  --placeholder: #a2988a;
  --dim: #d8cfbf;           /* unselected dots, switches */
  --header-bg: rgba(246, 241, 232, 0.9);
  --menu-bg: rgba(246, 241, 232, 0.98);
  --backdrop: rgba(28, 23, 18, 0.45);
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%234c4339' stroke-width='1.5'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");

  --tone-warm: #d6a650;
  --tone-white: #fff4e2;
  --tone-blue: #2d7fa3;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 24px 60px -28px rgba(60, 40, 10, 0.35);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --font-sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;

  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

/* Admin dashboard keeps the dark theme. */
body.admin {
  --bg: #0b0a09;
  --bg-2: #11100e;
  --surface: #161411;
  --surface-2: #1d1a16;
  --line: rgba(255, 244, 228, 0.09);
  --line-strong: rgba(255, 244, 228, 0.18);
  --text: #efe9df;
  --text-2: #b9b0a3;
  --muted: #847b6f;
  --gold: #e3b25b;
  --gold-2: #f6d28b;
  --gold-deep: #9a6a1f;
  --gold-btn: #e3b25b;
  --gold-btn-2: #f6d28b;
  --danger: #ff8a7a;
  --ok: #8fd6a4;
  --hover: rgba(255, 244, 228, 0.06);
  --btn: #221f1a;
  --btn-2: #2d2922;
  --input: #11100e;
  --input-focus: #14120f;
  --placeholder: #5f584e;
  --dim: #3a352e;
  --header-bg: rgba(11, 10, 9, 0.85);
  --menu-bg: rgba(8, 7, 6, 0.97);
  --backdrop: rgba(5, 4, 3, 0.7);
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23b9b0a3' stroke-width='1.5'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  --tone-warm: #ffb54d;
  --tone-blue: #6fd6ff;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 350;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: rgba(227, 178, 91, 0.35); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type ---------- */
.eyebrow {
  font-size: 11.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); font-weight: 450;
}
.eyebrow.gold { color: var(--gold); }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.015em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(34px, 6vw, 68px); }
h2 { font-size: clamp(28px, 4vw, 46px); }
h3 { font-size: clamp(20px, 2.2vw, 26px); }
p { margin: 0; }
.lede { color: var(--text-2); font-size: clamp(15px, 1.4vw, 17.5px); max-width: 58ch; }
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--gold-2); }
.scripture { font-family: var(--font-serif); font-style: italic; color: var(--gold-2); font-size: 1.05em; line-height: 1.5; }

/* Section label with hairlines either side, like "FEATURED LIGHTING" */
.rule-label {
  display: flex; align-items: center; gap: 18px; justify-content: center;
  font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--text-2);
}
.rule-label::before, .rule-label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong)); }
.rule-label::after { background: linear-gradient(270deg, transparent, var(--line-strong)); }

/* ---------- buttons: solid, flat, minimal ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 18px; min-height: 44px; flex-shrink: 0;
  border: 0; border-radius: 10px; background: var(--btn); color: var(--text);
  font: 450 14px/1 var(--font-sans); letter-spacing: .01em; white-space: nowrap; cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), transform .15s var(--ease);
}
.btn:hover { background: var(--btn-2); }
.btn:active { transform: scale(.98); }
.btn .i, .btn .arr { width: 16px; height: 16px; flex: none; transition: transform .2s var(--ease); }
.btn:hover .arr { transform: translateX(2px); }
.btn-gold { background: var(--gold-btn); color: #17110a; font-weight: 500; }
.btn-gold:hover { background: var(--gold-btn-2); }
.btn-light { background: var(--text); color: #17110a; }
.btn-light:hover { background: #fff; }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--hover); color: var(--text); }
.btn-sm { padding: 0 13px; min-height: 36px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.i { width: 18px; height: 18px; flex: none; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 68px; }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px;
  background: none; border: 0; cursor: pointer; color: var(--text);
}
.icon-btn:hover { background: var(--hover); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 450; letter-spacing: 0.14em; font-size: 14px; text-transform: uppercase; }
.brand img { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.header-actions { justify-self: end; display: flex; gap: 8px; align-items: center; }
.header-actions .btn { padding: 8px 14px; min-height: 38px; font-size: 13px; }

/* full-screen menu */
.menu {
  position: fixed; inset: 0; z-index: 60; background: var(--menu-bg);
  display: grid; grid-template-rows: auto 1fr auto; padding: 0 var(--gutter) 32px;
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
}
.menu.open { opacity: 1; visibility: visible; }
.menu .bar { height: 68px; display: flex; align-items: center; justify-content: space-between; }
.menu nav { display: flex; flex-direction: column; justify-content: center; gap: 4px; max-width: var(--max); width: 100%; margin: 0 auto; }
.menu nav a {
  font-size: clamp(28px, 6vw, 54px); font-weight: 300; padding: 6px 0; color: var(--text-2);
  display: flex; align-items: baseline; gap: 18px; transition: color .25s, transform .35s var(--ease);
  transform: translateY(10px);
}
.menu.open nav a { transform: none; }
.menu nav a:hover { color: var(--text); }
.menu nav a span { font-size: 12px; letter-spacing: .2em; color: var(--muted); }
.menu .foot { max-width: var(--max); width: 100%; margin: 0 auto; color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* ---------- forms ---------- */
.field { display: grid; gap: 7px; }
.field > label:not(.check):not(.drop), .field > .label { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); }
.field .hint { font-size: 13px; color: var(--muted); }
.req::after { content: " *"; color: var(--gold); }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 11px 14px;
  background: var(--input); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  color: var(--text); font: inherit; font-size: 15.5px; transition: border-color .2s, box-shadow .2s, background .2s;
}
textarea.input { min-height: 110px; resize: vertical; }
.input::placeholder { color: var(--placeholder); }
.input:hover { border-color: var(--muted); }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214, 166, 80, 0.22); background: var(--input-focus); }
select.input { appearance: none; background-image: var(--select-arrow); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
input[type="date"].input::-webkit-calendar-picker-indicator { filter: invert(0.8); }
.field.invalid .input { border-color: var(--danger); }
.field .error { color: var(--danger); font-size: 13px; display: none; }
.field.invalid .error { display: block; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* choice chips & cards */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--text-2); font-size: 14px; transition: all .2s var(--ease);
}
.chip span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); transition: all .25s var(--ease); }
.chip input:checked + span { color: var(--text); border-color: rgba(255, 181, 77, 0.6); background: rgba(255, 181, 77, 0.07); }
.chip input:checked + span::before { background: var(--tone-warm); box-shadow: 0 0 10px 2px rgba(255, 181, 77, 0.7); }
.chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; color: var(--text-2); font-size: 14.5px; }
.check input { appearance: none; flex: none; width: 20px; height: 20px; margin-top: 2px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--bg-2); display: grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--gold); border-color: var(--gold); }
.check input:checked::after { content: ""; width: 10px; height: 6px; border: 2px solid #1a1206; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.check a { color: var(--gold-2); text-decoration: underline; text-underline-offset: 3px; }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice { padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); font-size: 14.5px; color: var(--text-2); }
.notice.ok { border-color: rgba(143, 214, 164, 0.4); color: var(--ok); }
.notice.err { border-color: rgba(255, 138, 122, 0.4); color: var(--danger); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 36px; color: var(--muted); font-size: 14px; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-2); margin-bottom: 14px; font-weight: 450; }
.site-footer a:hover { color: var(--text); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer .legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 90;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 12px 18px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .35s var(--ease);
  max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.header-actions .btn { white-space: nowrap; }
@media (max-width: 480px) {
  .site-header .long { display: none; }
  .brand { gap: 8px; font-size: 12.5px; letter-spacing: .1em; }
  .site-header .bar { grid-template-columns: auto 1fr auto; gap: 8px; }
  .site-header .brand { justify-self: center; }
  .header-actions .btn { padding: 8px 12px; }
}
