/* Bais Hora'ah of Lakewood - shared styles
   Palette taken from the printed brochure: near-black, warm gold, white. */

:root {
  --bg:        #0b0b0c;
  --bg-raised: #141416;
  --fg:        #f4f2ee;
  --muted:     #a8a49c;
  --gold:      #c9a961;
  --gold-soft: #e2cd97;
  --rule:      #26262a;
  --measure:   42rem;
  --wide:      68rem;
  --sans: "Lato", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(var(--wide), 100% - 3rem); margin-inline: auto; }
.wrap-wide { width: min(84rem, 100% - 3rem); margin-inline: auto; }

a { color: var(--gold-soft); text-underline-offset: 0.2em; }
a:hover { color: var(--fg); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--gold); color: #000;
  padding: 0.6rem 1rem; z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,11,12,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.75rem 0;
}
.brand { display: flex; align-items: center; gap: 0.75rem; margin-right: auto; text-decoration: none; }
.brand img { display: block; width: 74px; height: auto; }
.brand span {
  font-size: 0.9375rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg); white-space: nowrap;
}
@media (max-width: 30rem) { .brand span { display: none; } }

.nav-links { display: flex; align-items: center; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--fg); text-decoration: none; font-size: 0.9375rem;
  letter-spacing: 0.04em; padding-block: 0.25rem;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover { color: var(--gold-soft); border-bottom-color: var(--gold); }

.nav-cta {
  border: 1px solid var(--gold); color: var(--gold-soft) !important;
  padding: 0.5rem 1rem !important; border-radius: 999px; white-space: nowrap;
}
.nav-cta:hover { background: var(--gold); color: #0b0b0c !important; border-bottom-color: var(--gold) !important; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--rule); border-radius: 6px;
  color: var(--fg); padding: 0.45rem 0.6rem; font: inherit; cursor: pointer; line-height: 1;
}

@media (max-width: 52rem) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; inset: 100% 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-raised); border-bottom: 1px solid var(--rule);
    padding: 0.5rem 1.5rem 1.25rem;
  }
  .nav-links[hidden] { display: none; }
  .nav-links a { padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
  .nav-cta { text-align: center; margin-top: 0.75rem; border-bottom: 1px solid var(--gold) !important; }
}

/* ---------- Hero ---------- */

.hero { padding: clamp(3.5rem, 11vw, 7rem) 0 clamp(3rem, 8vw, 5rem); text-align: center; }
.hero-mark { width: min(190px, 46vw); height: auto; margin: 0 auto 2rem; display: block; }
.kicker {
  margin: 0 0 1.25rem; color: var(--gold); font-size: clamp(1.25rem, 4vw, 1.75rem);
  letter-spacing: 0.04em;
}
.hero h1 {
  margin: 0; font-size: clamp(2.25rem, 7.5vw, 4rem); line-height: 1.1;
  font-weight: 300; letter-spacing: 0.01em;
}
.hero h1 em {
  display: block; font-style: italic; font-weight: 700;
  color: var(--gold); margin-top: 0.15em;
}
.hero p.lead {
  max-width: 34rem; margin: 1.75rem auto 0; color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.1875rem);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 2.5rem; }

.btn {
  display: inline-block; padding: 0.85rem 1.9rem; border-radius: 999px;
  text-decoration: none; font-size: 1rem; letter-spacing: 0.03em; border: 1px solid var(--gold);
}
.btn-primary { background: var(--gold); color: #0b0b0c; font-weight: 700; }
.btn-primary:hover { background: var(--gold-soft); color: #0b0b0c; }
.btn-ghost { color: var(--gold-soft); }
.btn-ghost:hover { background: rgba(201,169,97,0.12); color: var(--fg); }

/* ---------- Stats ---------- */

.stats { border-block: 1px solid var(--rule); background: var(--bg-raised); }
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 3rem 0; padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}

/* Hairline separators between columns, suppressed on the first of each row so a
   wrapped row never starts with a stray rule. */
.stat { padding-inline: clamp(1rem, 3vw, 2.5rem); border-left: 1px solid var(--rule); }
.stat:first-child { border-left: 0; }
@media (max-width: 74rem) { .stat:nth-child(odd) { border-left: 0; } }
@media (max-width: 48rem) { .stat { border-left: 0; } }

.stat b {
  display: block;
  color: var(--gold);
  font-size: clamp(2.75rem, 6.5vw, 4.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;   /* stops the width jittering while counting */
}
.stat b.stat-hours { font-size: clamp(1.9rem, 4vw, 2.9rem); white-space: nowrap; letter-spacing: 0; }
.stat b.stat-hours small { font-size: 0.42em; font-weight: 700; margin-left: 0.15em; letter-spacing: 0.06em; }

.stat-label {
  display: block; margin-top: 1rem; color: var(--fg);
  font-size: 1rem; font-weight: 700; line-height: 1.35;
}
.stat-note {
  display: block; margin-top: 0.4rem; color: var(--muted);
  font-size: 0.875rem; line-height: 1.5;
}

/* ---------- Sections ---------- */

section { padding: clamp(3.5rem, 9vw, 6rem) 0; }
.section-label {
  margin: 0 0 0.75rem; color: var(--gold); font-size: 0.8125rem;
  letter-spacing: 0.18em; text-transform: uppercase;
}
h2 {
  margin: 0 0 1.25rem; font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  font-weight: 300; line-height: 1.2;
}
.prose { max-width: var(--measure); }
.prose p { color: var(--muted); }
.prose p:first-of-type { color: var(--fg); font-size: 1.125rem; }

/* ---------- Quotes ---------- */

.quotes {
  background: var(--bg-raised); border-block: 1px solid var(--rule);
  padding-block: clamp(5rem, 12vw, 8.5rem);
}
.quotes h2 { margin-bottom: 3rem; }
.quote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 2.5rem; }
blockquote { margin: 0; }
blockquote p {
  margin: 0 0 1.25rem; font-size: 1.0625rem; line-height: 1.75;
  border-left: 2px solid var(--gold); padding-left: 1.25rem;
}
blockquote cite { font-style: normal; display: block; padding-left: 1.25rem; }
blockquote cite b { display: block; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.875rem; }
blockquote cite span { color: var(--muted); font-size: 0.875rem; }

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 56rem) { .contact-grid { grid-template-columns: 1.25fr 1fr; gap: 4rem; } }

.details dt { color: var(--gold); font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; margin-top: 1.5rem; }
.details dd { margin: 0.35rem 0 0; }
.details dd a { color: var(--fg); }

/* ---------- Form ---------- */

form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.cf-field-full { grid-column: 1 / -1; }
@media (max-width: 40rem) { form { grid-template-columns: 1fr; } }

label.fl { display: block; font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem; }

input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; padding: 0.8rem 0.9rem; font: inherit; font-size: 1rem;
  color: var(--fg); background: #101012; border: 1px solid var(--rule); border-radius: 6px;
}
input:focus, textarea:focus { border-color: var(--gold); outline: none; }
textarea { min-height: 8rem; resize: vertical; }
::placeholder { color: #6b6862; }

.cf-field.has-error input, .cf-field.has-error textarea,
.cf-field-full.has-error input, .cf-field-full.has-error textarea { border-color: #d97a6c; }

.consent { border: 1px solid var(--rule); border-radius: 8px; padding: 1rem 1.1rem; background: #101012; }
.consent-row { display: flex; gap: 0.85rem; align-items: flex-start; cursor: pointer; }
.consent-row input { margin-top: 0.3rem; width: 1.05rem; height: 1.05rem; accent-color: var(--gold); flex: none; }
.consent-row span { font-size: 0.875rem; line-height: 1.6; color: var(--muted); }

.cf-submit { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.cf-submit iframe { border: 0; }
button[type="submit"] {
  padding: 0.85rem 2.2rem; border-radius: 999px; border: 1px solid var(--gold);
  background: var(--gold); color: #0b0b0c; font: inherit; font-weight: 700;
  font-size: 1rem; letter-spacing: 0.03em; cursor: pointer;
}
button[type="submit"]:hover { background: var(--gold-soft); }
button[type="submit"][disabled] { opacity: 0.55; cursor: default; }

.form-error { color: #e79484; margin: 0; font-size: 0.9375rem; }
.form-success {
  grid-column: 1 / -1; border: 1px solid var(--gold); border-radius: 8px;
  padding: 1rem 1.1rem; color: var(--gold-soft);
}

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--rule); padding: 3rem 0; color: var(--muted); font-size: 0.875rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: center; }
.site-footer img { width: 64px; height: auto; opacity: 0.85; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-left: auto; list-style: none; padding: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--gold-soft); }

/* ---------- Legal / content pages ---------- */

.page { max-width: var(--measure); margin: 0 auto; padding: 3rem 0 1rem; }
.page h1 { margin: 0 0 0.25rem; font-size: clamp(1.75rem, 5vw, 2.25rem); font-weight: 300; }
.page h2 { margin: 2.5rem 0 0.5rem; font-size: 1.1875rem; font-weight: 400; color: var(--gold-soft); }
.page p, .page li { color: var(--muted); }
.page strong { color: var(--fg); }
.updated { margin: 0 0 2rem; font-size: 0.875rem; }
.page ul { padding-left: 1.25rem; }
.page li { margin-bottom: 0.5rem; }
.back { display: inline-block; margin-bottom: 2.5rem; font-size: 0.9375rem; }

/* ---------- CWForm bridge injections ----------
   The bridge inserts its own .cwform-verify wrapper (the managed Turnstile widget).
   In this two-column grid form it would otherwise land in a single ~226px column and
   CLIP the widget's right edge, hiding the Cloudflare branding and the Help link.
   A clipped/shrunk widget is the documented cause of silently-blocked submissions,
   so give it the full row and never constrain its width. */
.cwform-verify { grid-column: 1 / -1; min-width: 300px; }
.cwform-verify iframe { max-width: 100%; }
