/* =====================================================================
   Hadley Wood Jewish Community — site styles
   Palette is controlled by CSS variables. Change data-palette on <html>
   (or add ?palette=slate|linen|mono to the URL to preview).
   ===================================================================== */

:root,
[data-palette="stone"] {
  /* Stone & Sage (default) — warm neutral, logo green accent, pomegranate for calls to action */
  --bg: #f6f4ef;
  --bg-alt: #ece9e1;
  --surface: #ffffff;
  --ink: #26292b;
  --ink-soft: #4f5559;
  --muted: #6f7579;
  --line: #e0dcd3;
  --accent: #5b8c39;
  --accent-strong: #46702b;
  --accent-soft: #e7efdd;
  --secondary: #b8392e;
  --secondary-soft: #f6e4e1;
  --focus: #1f5fbf;
}

[data-palette="slate"] {
  /* Soft Slate — cool neutral, muted teal accent */
  --bg: #f3f5f7;
  --bg-alt: #e7ebef;
  --surface: #ffffff;
  --ink: #1f2a33;
  --ink-soft: #46535e;
  --muted: #6b7680;
  --line: #d9dfe5;
  --accent: #3b7f79;
  --accent-strong: #2d635e;
  --accent-soft: #dfeeec;
  --secondary: #b8392e;
  --secondary-soft: #f6e4e1;
  --focus: #1f5fbf;
}

[data-palette="linen"] {
  /* Warm Linen — cream, olive accent, terracotta secondary */
  --bg: #faf6ef;
  --bg-alt: #f1eadf;
  --surface: #fffdf9;
  --ink: #2e2a26;
  --ink-soft: #55504a;
  --muted: #76706a;
  --line: #e5dccc;
  --accent: #6a7a35;
  --accent-strong: #525f28;
  --accent-soft: #ecefd9;
  --secondary: #bf5f3a;
  --secondary-soft: #f8e6dc;
  --focus: #1f5fbf;
}

[data-palette="mono"] {
  /* Cloud & Charcoal — near-monochrome with the logo green only */
  --bg: #fafafa;
  --bg-alt: #f0f0f0;
  --surface: #ffffff;
  --ink: #222426;
  --ink-soft: #4a4d50;
  --muted: #6e7275;
  --line: #e2e2e2;
  --accent: #5b8c39;
  --accent-strong: #46702b;
  --accent-soft: #e7efdd;
  --secondary: #3a3d40;
  --secondary-soft: #e9eaeb;
  --focus: #1f5fbf;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.125rem; /* 18px base — comfortable for all ages */
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
h4 { font-size: 1.15rem; font-family: "Manrope", system-ui, sans-serif; font-weight: 700; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1.5px;
}
a:hover { color: var(--ink); }

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

img { max-width: 100%; height: auto; display: block; }

ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.35em; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  z-index: 1000;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

.container {
  width: min(100% - 2.5rem, 1140px);
  margin-inline: auto;
}
.container--narrow { width: min(100% - 2.5rem, 800px); }

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 0.9rem;
}

.lead {
  font-size: 1.3rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3.1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 22px -12px var(--accent-strong);
}
.btn--primary:hover { background: var(--accent-strong); color: #fff; }

.btn--secondary {
  background: var(--secondary);
  color: #fff;
}
.btn--secondary:hover { filter: brightness(0.92); color: #fff; }

.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--outline:hover { background: var(--ink); color: #fff; }

.btn--light {
  background: #fff;
  color: var(--ink);
}
.btn--light:hover { background: var(--bg-alt); color: var(--ink); }

.btn svg { width: 1.1em; height: 1.1em; flex: none; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px -20px rgba(0, 0, 0, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--ink);
}
.brand img {
  width: 48px;
  height: auto;
  transition: transform 0.25s;
}
.brand:hover img { transform: rotate(-4deg) scale(1.04); }
.brand__name {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.1;
}
.brand__sub {
  display: block;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.2rem;
  white-space: nowrap;
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.5rem 0.9rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

.site-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
}
.site-nav li { margin: 0; position: relative; }
.site-nav a,
.site-nav .nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.8rem;
  padding: 0.5rem 0.7rem;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  background: transparent;
  border: 0;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s;
}
.site-nav a:hover,
.site-nav .nav-btn:hover,
.site-nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.site-nav .nav-btn svg { width: 16px; height: 16px; transition: transform 0.2s; }
.site-nav .nav-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

.submenu {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  min-width: 15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.35);
  padding: 0.5rem;
  display: none;
  flex-direction: column;
  gap: 0.1rem;
  z-index: 50;
}
.submenu.is-open { display: flex; }
.submenu a {
  display: flex;
  border-radius: 10px;
  width: 100%;
  font-weight: 600;
}

.nav-cta a {
  background: var(--ink);
  color: #fff;
}
.nav-cta a:hover { background: var(--accent-strong); color: #fff; }

@media (max-width: 1120px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.4);
    display: none;
    padding: 0.75rem 1.25rem 1.25rem;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
  }
  .site-nav a,
  .site-nav .nav-btn {
    width: 100%;
    justify-content: space-between;
    font-size: 1.1rem;
    min-height: 3.2rem;
  }
  .submenu {
    position: static;
    box-shadow: none;
    border: 0;
    background: var(--bg-alt);
    margin: 0.25rem 0 0.5rem;
  }
  .brand__name { font-size: 1.05rem; }
  .brand__sub { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem);
  isolation: isolate;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  pointer-events: none;
}
.hero::before {
  width: 40vw; height: 40vw;
  max-width: 560px; max-height: 560px;
  background: var(--accent-soft);
  top: -10%; right: -8%;
}
.hero::after {
  width: 30vw; height: 30vw;
  max-width: 420px; max-height: 420px;
  background: var(--secondary-soft);
  bottom: -20%; left: -6%;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.hero__logo {
  width: min(100%, 380px);
  margin-inline: auto;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.12));
}
.hero__logo img { width: 100%; }

.hero--simple {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}
.hero--simple .lead { max-width: 46rem; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__logo { width: min(55%, 200px); order: -1; }
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(2rem, 5vw, 4rem) 0;
}
.section--tight { padding: clamp(2rem, 5vw, 3.5rem) 0; }
/* Faint grey line between every section */
.section + .section { border-top: 1px solid var(--line); }
.hero + .section { border-top: 1px solid var(--line); }

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}
.section-head.center { margin-inline: auto; text-align: center; }

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split--reverse > :first-child { order: 2; }
.split--top { align-items: start; }
@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split--reverse > :first-child { order: 0; }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 40px -28px rgba(0, 0, 0, 0.35);
  border-color: var(--accent-soft);
}
.card h3 { margin: 0.2rem 0 0.1rem; }
.card p { color: var(--ink-soft); }
.card__icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: grid;
  place-items: center;
}
.card__icon svg { width: 26px; height: 26px; }
.card .btn, .card > a.card-link { margin-top: auto; align-self: flex-start; }
.card-link {
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.card-link svg { width: 1em; height: 1em; transition: transform 0.2s; }
.card-link:hover svg { transform: translateX(3px); }

.card--accent { background: var(--accent-soft); border-color: transparent; }
.card--secondary { background: var(--secondary-soft); border-color: transparent; }
.card--secondary .card__icon { background: #fff; color: var(--secondary); }

/* Whole-card links */
a.card { text-decoration: none; color: inherit; }
a.card h3 { color: var(--ink); }
a.card:hover h3 { color: var(--accent-strong); }
.card-grid--wide { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.card .btn { margin-top: auto; align-self: flex-start; }

/* Stats */
.stats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.stats li {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.2rem 1rem;
  text-align: center;
}
.stats strong {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent-strong);
  line-height: 1.1;
}
.stats span { font-size: 0.95rem; color: var(--muted); }
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; } }

/* Tick lists */
.ticks {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ticks li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.6rem;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.45em;
  width: 0.55em; height: 0.9em;
  border: solid var(--accent);
  border-width: 0 3px 3px 0;
  transform: translateY(-0.15em) rotate(45deg);
  margin-left: 0.35em;
}

/* Images */
.frame {
  border-radius: 24px;
  overflow: hidden;
  background: var(--bg-alt);
  box-shadow: 0 30px 60px -36px rgba(0, 0, 0, 0.45);
}
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame--portrait { aspect-ratio: 4 / 3; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.gallery figure {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.gallery figure img {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  padding: 0.75rem 1.1rem;
  font-size: 1rem;
  color: var(--ink-soft);
}
.gallery figcaption strong { display: block; color: var(--ink); font-size: 1.05rem; }
@media (max-width: 860px) { .gallery { grid-template-columns: 1fr; } }

.gallery--four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .gallery--four { grid-template-columns: 1fr 1fr; } }
.gallery--four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .gallery--four { grid-template-columns: 1fr 1fr; } }
.gallery--feature { grid-template-columns: 2fr 1fr; }
.gallery--feature figure:first-child { grid-row: span 2; }
.gallery--feature figure:first-child img { aspect-ratio: auto; height: 100%; }
@media (max-width: 860px) {
  .gallery--feature { grid-template-columns: 1fr; }
  .gallery--feature figure:first-child img { aspect-ratio: 4 / 3; height: auto; }
}

/* Fact list / info rows */
.facts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}
.facts li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 0;
}
.facts li span:first-child {
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--accent-strong);
  padding-top: 0.3rem;
}
@media (max-width: 520px) { .facts li { grid-template-columns: 1fr; gap: 0.2rem; } }

.price-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--ink);
}
.price-tag small {
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
}

/* Quotes */
.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}
.quote {
  margin: 0;
  background: var(--surface);
  border-radius: 20px;
  padding: 1.75rem;
  border: 1px solid var(--line);
  position: relative;
}
.quote::before {
  content: "\201C";
  font-family: "Fraunces", Georgia, serif;
  font-size: 4rem;
  line-height: 1;
  color: var(--accent);
  position: absolute;
  top: 0.6rem; left: 1.2rem;
  opacity: 0.5;
}
.quote p { padding-top: 1.4rem; font-size: 1.05rem; }
.quote cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-weight: 700;
  color: var(--accent-strong);
}

/* Timeline */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--line);
}
.timeline li {
  position: relative;
  padding: 0 0 1.6rem 2.4rem;
  margin: 0;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.timeline strong {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.25rem;
  color: var(--ink);
}

/* Steps */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  align-items: start;
  margin: 0;
}
.steps li::before {
  content: counter(step);
  width: 3rem; height: 3rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 800;
  font-size: 1.2rem;
  display: grid;
  place-items: center;
}

/* Banner / CTA */
.cta-band {
  background: var(--ink);
  color: #fff;
  border-radius: 28px;
  padding: clamp(2rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.cta-band::after {
  content: "";
  position: absolute;
  right: -10%; top: -40%;
  width: 60%; height: 180%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 60%, transparent), transparent);
  opacity: 0.55;
  pointer-events: none;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.82); }
.cta-band .btn-row { justify-content: flex-end; }
@media (max-width: 760px) {
  .cta-band { grid-template-columns: 1fr; }
  .cta-band .btn-row { justify-content: flex-start; }
}

.notice {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: var(--secondary-soft);
  border-left: 5px solid var(--secondary);
  border-radius: 14px;
  padding: 1.1rem 1.3rem;
  margin: 1.5rem 0;
}
.notice svg { width: 26px; height: 26px; flex: none; color: var(--secondary); margin-top: 0.2rem; }
.notice p { margin: 0; }

.emergency-number {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}

/* Contact block */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem;
}
.contact-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.4rem;
}
.contact-item h3 { font-family: "Manrope", system-ui, sans-serif; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-strong); margin-bottom: 0.5rem; }
.contact-item a { font-weight: 700; word-break: break-word; }
.contact-item address { font-style: normal; }

/* Anchor offset for sticky header */
[id] { scroll-margin-top: 6rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 1.5rem;
  margin-top: clamp(1.5rem, 4vw, 3rem);
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.brand--footer img { width: 40px; }
.brand--footer .brand__name { font-size: 1.05rem; }
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}
.footer-links li { margin: 0; }
.site-footer a { color: var(--ink); text-decoration: none; font-weight: 600; }
.site-footer a:hover { text-decoration: underline; }
.footer-contact { margin: 1.25rem 0 0.5rem; }
.footer-bottom { margin: 0; color: var(--muted); font-size: 0.85rem; }
.footer-bottom a { color: var(--muted); font-weight: 500; }

/* Community news */
.news {
  display: grid;
  grid-template-columns: minmax(200px, 240px) 1fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
}
.news__video { margin: 0; }
.news__video video {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  display: block;
  border-radius: 18px;
  background: #000;
  border: 1px solid var(--line);
}
.news__video figcaption {
  margin-top: 0.6rem;
  font-weight: 700;
  color: var(--ink);
}
.news__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.9rem;
}
.news__list li {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.1rem 1.3rem;
}
.news__list li:first-child { background: var(--accent-soft); border-color: transparent; }
.news__list--row { grid-template-columns: repeat(4, 1fr); align-items: start; }
@media (max-width: 1100px) { .news__list--row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .news__list--row { grid-template-columns: 1fr; } }
.news__list h3 { margin: 0 0 0.25rem; font-size: 1.25rem; }
.news__list p { margin: 0; color: var(--ink-soft); }
.news__list .eyebrow { margin-bottom: 0.3rem; }
@media (max-width: 760px) {
  .news { grid-template-columns: 1fr; }
  .news__video { max-width: 220px; margin-inline: auto; }
}

/* Narrow calendar cells (phones, tablets, small laptops): labels become colour bars; the legend explains them */
@media (max-width: 1100px) {
  .cal__grid .cal__day .chip { font-size: 0; height: 6px; width: 70%; padding: 0; border-radius: 999px; }
  .cal__grid .cal__day .chip--free { background: var(--accent); }
  .cal__grid .cal__day .chip--booked { background: var(--secondary); }
  .cal__grid .cal__day .chip--festival { background: #c9a227; }
  .cal__grid .cal__day .cal__name { display: none; }
}

/* ---------- Phone compaction ---------- */
@media (max-width: 600px) {
  .hero { padding: 1.75rem 0 1.5rem; }
  .hero--simple { padding: 1.5rem 0; }
  .lead { font-size: 1.15rem; }
  .section { padding: 1.5rem 0; }
  .card-grid { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
  .emergency-number { font-size: 1.6rem; }
  .news { gap: 1rem; }
  .news__list { gap: 0.6rem; }
  .card-grid--wide { grid-template-columns: 1fr; }
  .card { padding: 1rem; border-radius: 14px; gap: 0.35rem; }
  .card__icon { display: none; }
  .card h3 { font-size: 1.1rem; }
  .card p { font-size: 0.95rem; }
  .card .btn { min-height: 2.6rem; padding: 0.5rem 1rem; font-size: 0.95rem; }
  .contact-grid { gap: 0.7rem; }
  .contact-item { padding: 0.9rem 1rem; }
  .gallery { gap: 0.7rem; }
  .gallery figure img { aspect-ratio: 16 / 9; }
  .news__list li { padding: 0.9rem 1rem; }
  .gallery figcaption { padding: 0.5rem 0.9rem; }
  .facts li { padding: 0.65rem 0.9rem; }
  .footer-links { display: none; }
  .footer-contact a { display: block; }
  .footer-contact .sep { display: none; }
  .site-footer { padding: 1.25rem 0 1rem; }
}

/* ---------- Scroll animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-stagger.is-visible > * { opacity: 1; transform: none; }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.35s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.45s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.55s; }

.hero .reveal { transition-duration: 0.9s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.hero__logo { animation: float 7s ease-in-out infinite; }

/* Users who ask for less motion get none */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hero__logo { animation: none; }
  .btn:hover, .card:hover, .gallery figure:hover img { transform: none; }
}

/* No-JS: everything visible */
.no-js .reveal, .no-js .reveal-stagger > * { opacity: 1; transform: none; }
.no-js .site-nav { display: block; position: static; box-shadow: none; }
.no-js .submenu { display: flex; position: static; box-shadow: none; }

/* Palette switcher (only shown with ?palette-picker) */
.palette-picker {
  position: fixed;
  bottom: 1rem; right: 1rem;
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.6rem;
  display: none;
  gap: 0.4rem;
  box-shadow: 0 16px 30px -18px rgba(0, 0, 0, 0.4);
}
.palette-picker.is-visible { display: flex; }
.palette-picker button {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}
.palette-picker button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }

@media print {
  .site-header, .site-footer, .palette-picker, .nav-toggle { display: none !important; }
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
}

/* =====================================================================
   Book my Kiddush — calendar, booking form, FAQ chat
   ===================================================================== */
.cal {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1rem;
}
.cal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}
.cal__head h3 { margin: 0; font-size: 1.25rem; }
.cal__nav {
  min-height: 2.6rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.cal__nav:hover { border-color: var(--ink); }
.cal__weekdays,
.cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-width: 0;
  gap: 0.4rem;
}
.cal__weekdays div {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 0.3rem;
}
.cal__day {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  padding: 0.2rem;
  min-width: 0;
  overflow: hidden;
  cursor: default;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.cal__num { font-weight: 700; font-size: 1rem; }
.cal__day.is-available { cursor: pointer; }
.cal__day.is-available:hover { background: var(--accent-soft); border-color: var(--accent); transform: translateY(-1px); }
.cal__day.is-off { background: var(--bg); color: var(--muted); border-color: transparent; }
.cal__day.is-other .cal__num { color: var(--muted); font-weight: 500; }
.cal__day.is-selected { outline: 3px solid var(--accent); outline-offset: 2px; background: var(--accent-soft); }
.cal__day:disabled { cursor: default; }
.chip {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chip--free { background: var(--accent-soft); color: var(--accent-strong); }
.chip--booked { background: var(--secondary-soft); color: var(--secondary); }
.chip--other { background: var(--bg-alt); color: var(--muted); }
.cal__loading { color: var(--muted); font-size: 0.95rem; margin: 0 0 0.75rem; }
.cal__key { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin: 0.9rem 0 0; font-size: 0.85rem; color: var(--muted); }
.cal__key span { display: inline-flex; align-items: center; gap: 0.4rem; }
@media (max-width: 600px) {
  .cal { padding: 0.8rem; }
  .cal__head { gap: 0.4rem; margin-bottom: 0.6rem; }
  .cal__head h3 { font-size: 1.05rem; white-space: nowrap; text-align: center; }
  .cal__nav { flex: none; white-space: nowrap; min-height: 2.3rem; padding: 0.3rem 0.75rem; font-size: 0.9rem; }
  .cal__weekdays, .cal__grid { gap: 0.25rem; }
  .cal__weekdays div { font-size: 0.7rem; }
  .cal__day { border-radius: 9px; }
  /* Phones: days that can't be booked are plain numbers, so only bookable Saturdays stand out */
  .cal__day.is-off, .cal__day.is-reserved { background: transparent; border-color: transparent; }
  .cal__day.is-off .cal__num { font-weight: 500; font-size: 0.9rem; color: var(--muted); }
  .cal__day.is-other .cal__num { opacity: 0.55; }
  .cal__key .chip { font-size: 0.55rem; padding: 0.05rem 0.35rem; }
  .cal__num { font-size: 0.9rem; }
  .cal__head h3 { font-size: 1.05rem; }
  .cal__nav { padding: 0.35rem 0.7rem; }
}

/* Booking form */
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.5rem;
}
.form-intro { color: var(--ink-soft); margin: 0; }
.form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.form-head h3 { margin: 0; font-size: 1.3rem; }
.link-btn {
  background: none;
  border: 0;
  padding: 0.25rem 0;
  font: inherit;
  font-weight: 700;
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
  white-space: nowrap;
}
.kform {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.kform__full { grid-column: 1 / -1; }
.kform__field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.kform input,
.kform select {
  width: 100%;
  min-height: 3rem;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.kform input:focus,
.kform select:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.kform input:disabled { background: var(--bg); color: var(--muted); }
.kform__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 0.9rem; }
.form-msg { font-size: 0.95rem; font-weight: 600; color: var(--ink-soft); }
.form-msg--ok { color: var(--accent-strong); }
.form-msg--error { color: var(--secondary); }
.form-error { color: var(--secondary); font-size: 0.9rem; margin: 0.5rem 0 0; }
.form-success {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
  font-weight: 600;
}
@media (max-width: 600px) { .kform { grid-template-columns: 1fr; } }

/* Package details */
.pkg {
  background: var(--accent-soft);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  animation: pkgIn 0.25s ease-out;
}
.pkg--special { background: var(--secondary-soft); }
.pkg h4 { margin: 0 0 0.5rem; font-size: 0.95rem; }
.pkg p { font-size: 0.95rem; color: var(--ink-soft); }
.pkg__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.15rem 1rem;
  font-size: 0.95rem;
}
.pkg__list li { margin: 0; padding-left: 1rem; position: relative; }
.pkg__list li::before { content: "\2022"; position: absolute; left: 0; color: var(--accent-strong); font-weight: 700; }
.pkg__extras { border-top: 1px solid rgba(0, 0, 0, 0.08); margin-top: 0.8rem; padding-top: 0.8rem; }
.pkg__extras-title { font-size: 0.9rem; font-weight: 700; margin: 0 0 0.5rem; color: var(--ink); }
.extra-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.extra-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.extra-option label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
}
.extra-option label::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
}
.extra-option input[type="radio"]:checked + label {
  border-color: var(--accent);
  background: var(--surface);
  color: var(--accent-strong);
  font-weight: 700;
}
.extra-option input[type="radio"]:checked + label::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 3px #fff;
}
.extra-option input[type="radio"]:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.extra-option label:hover { border-color: var(--accent); }
@keyframes pkgIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 480px) { .pkg__list, .extra-grid { grid-template-columns: 1fr; } }

/* Key information accordions */
.faq { display: grid; gap: 0.6rem; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 1.1rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 0.9rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  line-height: 1;
  color: var(--accent-strong);
  flex: none;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 1rem; margin: 0; color: var(--ink-soft); }

/* FAQ chat widget */
.chat-panel[hidden] { display: none; }
.chat-root { position: fixed; bottom: 1rem; right: 1rem; z-index: 150; display: flex; flex-direction: column; align-items: flex-end; gap: 0.6rem; }
.chat-panel {
  width: 20rem;
  max-width: calc(100vw - 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}
.chat-close { background: none; border: 0; font: inherit; font-size: 1.1rem; color: var(--muted); cursor: pointer; padding: 0.2rem 0.4rem; }
.chat-messages { padding: 0.8rem 1rem; max-height: 16rem; overflow-y: auto; display: grid; gap: 0.4rem; font-size: 0.9rem; }
.chat-hint { color: var(--muted); font-size: 0.8rem; }
.chat-row { display: flex; }
.chat-row--user { justify-content: flex-end; }
.chat-bubble { max-width: 85%; padding: 0.5rem 0.75rem; border-radius: 14px; background: var(--bg-alt); color: var(--ink); }
.chat-bubble--user { background: var(--accent); color: #fff; }
.chat-questions { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.7rem 1rem; border-top: 1px solid var(--line); background: var(--bg); }
.chat-q {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.chat-q:hover { background: var(--accent-soft); border-color: var(--accent); }
.typing-dots { display: inline-flex; align-items: flex-end; gap: 3px; }
.typing-dot { width: 5px; height: 5px; border-radius: 999px; background: var(--muted); animation: typingBounce 0.6s infinite ease-in-out; }
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-3px); }
}
.credit { font-size: 0.85rem; color: var(--muted); margin-top: 1.25rem; }

/* ---------- Read my Haftorah (Community page) ---------- */
.chip--festival { background: #efe6c8; color: #6b5510; }
/* Calendar cells are narrow: keep the labels compact so they never truncate */
.cal__day .chip { font-size: 0.56rem; padding: 0.1rem 0.3rem; letter-spacing: 0.02em; }
.cal__day .chip--other { display: none; } /* greyed-out days already show they are outside the month */
/* Calendar gets a little more room than the form beside it */
.split--cal { grid-template-columns: 1.15fr 0.85fr; }
@media (max-width: 860px) { .split--cal { grid-template-columns: minmax(0, 1fr); } }
.cal__day.is-reserved { background: var(--bg); border-color: transparent; cursor: pointer; }
.cal__day.is-reserved:hover { border-color: var(--secondary); background: var(--secondary-soft); }
.cal__name {
  display: block;
  max-width: 100%;
  font-size: 0.62rem;
  line-height: 1.1;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: help;
}
[data-tooltip] { position: relative; }
[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 50;
  pointer-events: none;
}
.lookup { display: flex; gap: 0.6rem; }
.lookup input {
  flex: 1;
  min-width: 0;
  min-height: 3rem;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.lookup input:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.lookup__results { margin-top: 0.75rem; font-size: 0.95rem; }
.lookup__hit { padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
.lookup__hit:last-child { border-bottom: 0; }
.who-search {
  width: 100%;
  min-height: 2.8rem;
  padding: 0.5rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}
.who-search:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.who-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.who-table th {
  text-align: left;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--line);
}
.who-table td { padding: 0.45rem 0.75rem 0.45rem 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.who-table td:last-child { white-space: normal; }
.who-name { color: var(--accent-strong); font-weight: 600; cursor: help; }
.who-box { max-height: 22rem; overflow-y: auto; }
.reserved-card { background: var(--secondary-soft); border-radius: 14px; padding: 1.1rem 1.2rem; }
.reserved-card__badge { text-align: center; margin: 0 0 0.75rem; }
.reserved-card__badge .chip { font-size: 0.75rem; padding: 0.3rem 0.75rem; }
.reserved-card__list { margin: 0; display: grid; gap: 0.4rem; }
.reserved-card__list div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; border-bottom: 1px solid rgba(0, 0, 0, 0.08); font-size: 0.95rem; }
.reserved-card__list dt { color: var(--ink-soft); font-weight: 600; }
.reserved-card__list dd { margin: 0; text-align: right; font-weight: 700; }
.haftorah-note { font-size: 0.85rem; color: var(--muted); margin-top: 0.75rem; }
@media (max-width: 600px) {
  .lookup { flex-direction: column; }
  .lookup .btn { align-self: flex-start; }
}
