/* Congregation Etz Chaim — inspired local site */
:root {
  --color-bg: #f4f6f9;
  --color-surface: #ffffff;
  --color-ink: #12151c;
  --color-muted: #5f6673;
  --color-accent: #1565c0;
  --color-accent-dark: #0d47a1;
  --color-gold: #c9a227;
  --color-gold-soft: #e8d9a8;
  --color-border: #e2e6ee;
  --font-sans: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow-sm: 0 1px 2px rgba(18, 21, 28, 0.06), 0 4px 12px rgba(18, 21, 28, 0.04);
  --shadow-md: 0 4px 6px rgba(18, 21, 28, 0.05), 0 12px 28px rgba(18, 21, 28, 0.08);
  --radius: 12px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--color-accent-dark);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--color-accent);
  color: #fff;
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand:hover {
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-tag {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--color-ink);
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 1.25rem;
}

.site-nav a {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--color-ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--color-accent);
  text-decoration: none;
}

.nav-mobile-cta {
  display: none;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  color: #fff;
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-border);
}

.btn-ghost:hover {
  border-color: var(--color-accent);
  text-decoration: none;
}

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-accent-dark) 0%, var(--color-accent) 45%, #2a6a8f 100%);
  color: #f5f2eb;
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.25rem;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/hero-texture.svg");
  background-size: 480px;
  opacity: 0.35;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 1rem;
  max-width: 18ch;
}

.hero-lead {
  font-size: 1.15rem;
  max-width: 52ch;
  opacity: 0.95;
  margin: 0 0 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero .btn-primary {
  background: var(--color-gold);
  color: var(--color-ink);
}

.hero .btn-primary:hover {
  background: var(--color-gold-soft);
  color: var(--color-ink);
}

.hero .btn-ghost {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.hero .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 0.5rem;
}

.section-intro {
  color: var(--color-muted);
  max-width: 65ch;
  margin: 0 0 2rem;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

@media (hover: hover) {
  .card:hover {
    border-color: #d0d7e3;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
  }
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  color: var(--color-accent);
}

.card p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--color-muted);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 3rem;
}

.split-visual {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.split-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.cta-band {
  background: linear-gradient(165deg, #fff 0%, #eef2f8 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  margin-bottom: 3rem;
}

.cta-band h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.cta-band p {
  margin: 0 auto 1.25rem;
  max-width: 50ch;
  color: var(--color-muted);
}

.site-footer {
  background: var(--color-ink);
  color: #d8dce6;
  padding: 2.5rem 1.25rem;
  font-size: 0.92rem;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.site-footer h3 {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 0.75rem;
}

.site-footer a {
  color: #b8c4d4;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.35rem;
}

.footer-meta {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.85rem;
  color: #9aa3b5;
}

.page-hero {
  padding: 2rem 0 1rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.page-hero p {
  margin: 0;
  color: var(--color-muted);
  max-width: 60ch;
}

.prose {
  max-width: 70ch;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 2rem 0 0.75rem;
}

.prose p,
.prose ul {
  margin: 0 0 1rem;
  color: var(--color-muted);
}

.prose ul {
  padding-left: 1.25rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
  max-width: 560px;
}

label {
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  display: block;
  margin-bottom: 0.35rem;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--color-gold-soft);
  outline-offset: 1px;
  border-color: var(--color-accent);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-top: 0.5rem;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .site-nav.is-open {
    max-height: min(70vh, 420px);
    overflow-y: auto;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1.25rem 1.25rem;
    gap: 0;
  }

  .site-nav li {
    border-bottom: 1px solid var(--color-border);
  }

  .site-nav a {
    display: block;
    padding: 0.85rem 0;
  }

  .nav-cta {
    display: none;
  }

  .nav-mobile-cta {
    display: list-item;
    padding-top: 0.5rem;
  }

  .nav-mobile-cta .btn {
    width: 100%;
    margin-top: 0.35rem;
  }
}

@media (min-width: 901px) {
  .nav-mobile-cta {
    display: none !important;
  }
}
