/* Kehilat Shaare Shalom — shared tokens (matches the campaign deck: cream, navy, brass) */
/* Layout: deck-style split hero, then a catalog of dedication cards grouped by section */
:root {
  --bg: #F9F6EF;          /* deck cream */
  --surface: #FFFFFF;
  --surface-2: #F2EDE2;
  --ink: #1F2A44;         /* deck navy */
  --ink-2: #5B6068;       /* deck body grey */
  --muted: #8A8F96;
  --line: #E4DCCB;
  --brass: #A47A3B;       /* deck gold */
  --brass-ink: #8C6630;
  --brass-soft: #F1E6D2;
  --ok: #3D6B4F;  --ok-soft: #E3EEE6;
  --warn: #9A6A12; --warn-soft: #F7EBD3;
  --bad: #9B3B32; --bad-soft: #F6E1DE;
  --plaque-a: #C9A063; --plaque-b: #8C6630; --plaque-ink: #2A1E0C;
  --shadow: 0 1px 2px rgba(31,42,68,.06), 0 8px 24px rgba(31,42,68,.08);
  --f-display: "Tinos", "Liberation Serif", "Times New Roman", Georgia, serif;
  --f-body: "Arimo", "Liberation Sans", Arial, Helvetica, sans-serif;
  --f-hebrew: "Frank Ruhl Libre", "David", "Times New Roman", serif;
  --r: 4px;
  --logo-plate: transparent;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141A2B; --surface: #1C2438; --surface-2: #232C43; --ink: #F3EEE3; --ink-2: #C3C6CE; --muted: #8E94A3;
    --line: #2E3851; --brass: #D2A866; --brass-ink: #E2BE84; --brass-soft: #3A3324;
    --ok: #8CC7A0; --ok-soft: #1F3328; --warn: #E8C27A; --warn-soft: #3A3020; --bad: #EB9A90; --bad-soft: #3D2421;
    --plaque-a: #D9B477; --plaque-b: #9C7438; --plaque-ink: #241906; --logo-plate: #F3EEE3;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141A2B; --surface: #1C2438; --surface-2: #232C43; --ink: #F3EEE3; --ink-2: #C3C6CE; --muted: #8E94A3;
  --line: #2E3851; --brass: #D2A866; --brass-ink: #E2BE84; --brass-soft: #3A3324;
  --ok: #8CC7A0; --ok-soft: #1F3328; --warn: #E8C27A; --warn-soft: #3A3020; --bad: #EB9A90; --bad-soft: #3D2421;
  --plaque-a: #D9B477; --plaque-b: #9C7438; --plaque-ink: #241906; --logo-plate: #F3EEE3;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--f-body); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; color: var(--ink); text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--brass-ink); }
img { max-width: 100%; display: block; }
.he { font-family: var(--f-hebrew); direction: rtl; unicode-bidi: isolate; }
.eyebrow { font: 700 13px/1.2 var(--f-body); color: var(--brass-ink); letter-spacing: .02em; }
.caps { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; }
.rule { width: 56px; height: 4px; background: var(--brass); border: 0; margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border-radius: var(--r); border: 1px solid transparent; font: 700 15px/1 var(--f-body); cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--brass)); }
.btn-brass { background: var(--brass); color: #fff; }
:root[data-theme="dark"] .btn-brass { color: #1b1408; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-brass { color: #1b1408; } }
.btn-brass:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brass); }
.btn-small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brass) 70%, transparent); outline-offset: 2px; }

/* Form fields */
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field small { color: var(--muted); font-size: 12px; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], input[type=date], input[type=search], input[type=url], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--ink); font: 16px/1.4 var(--f-body);
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 25%, transparent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brass); flex: none; }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font: 700 12px/1.4 var(--f-body); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-bad { background: var(--bad-soft); color: var(--bad); }
.pill-brass { background: var(--brass-soft); color: var(--brass-ink); }
.pill-muted { background: var(--surface-2); color: var(--ink-2); }

/* Brass plaque preview */
.plaque { position: relative; padding: 18px 22px; border-radius: 3px; text-align: center; color: var(--plaque-ink);
  background: linear-gradient(135deg, var(--plaque-a), var(--plaque-b) 55%, var(--plaque-a));
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.25), inset 0 0 0 5px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.18);
  font-family: var(--f-display); }
.plaque::before, .plaque::after { content: ""; position: absolute; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff8, #0004); }
.plaque::before { left: 9px; } .plaque::after { right: 9px; }
.plaque .p-pre { font: 700 10px/1.4 var(--f-body); letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.plaque .p-main { font-size: 19px; line-height: 1.3; margin-top: 4px; white-space: pre-line; overflow-wrap: anywhere; }
.plaque .p-he { font-family: var(--f-hebrew); font-size: 16px; margin-top: 2px; }
.plaque .p-item { font: 11px/1.4 var(--f-body); opacity: .75; margin-top: 6px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 90;
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: var(--r); box-shadow: var(--shadow); font-weight: 700; font-size: 14px; max-width: calc(100% - 32px); }
.preview-ribbon { background: var(--brass); color: #fff; text-align: center; font: 700 13px/1.4 var(--f-body); padding: 8px 16px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

.logo-plate { background: var(--logo-plate); border-radius: 10px; padding: 3px; }
[hidden] { display: none !important; }
