/* =========================================================
   TEMIMA Seminary — Brand stylesheet
   Palette anchored to the official Temima color guide.
   ========================================================= */

:root {
  /* Brand colors */
  --cream:        #f4dfca;
  --cream-light:  #f8f1e3;
  --burgundy:     #60074a;
  --burgundy-deep:#60074a; /* signature maroon — unified across the site */
  --purple:       #953a90;
  --magenta:      #d44a9e;
  --teal:         #08a99f;
  --teal-deep:    #00837f;
  --rose:         #c17a9e;
  --charcoal:     #3f2a35;
  --gold:         #f4dfca; /* warm cream — used as the brand accent color */

  /* Functional tokens */
  --ink:          #2a1a22;
  --ink-soft:     #5b4651;
  --surface:      #ffffff;
  --surface-alt:  var(--cream-light);

  /* Type */
  --font-display: "Roboto", "Arial Unicode MS", "Arial", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  --font-sans:    "Roboto", "Arial Unicode MS", "Arial", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  --font-serif:   "EB Garamond", "Garamond", "Cormorant Garamond", "Adobe Garamond Pro", Georgia, "Times New Roman", serif;

  /* Spacing scale */
  --container-max: 1280px;
  --gutter:        clamp(1.25rem, 3vw, 2.5rem);

  /* Header */
  --header-h: 84px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--burgundy); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--purple); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--burgundy);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.25rem, 5.5vw, 3.75rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); font-weight: 600; }

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header (softened) ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  /* lower opacity burgundy: more airy, less heavy */
  background: rgba(96, 7, 74, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 50;
  display: flex;
  align-items: center;
  transition: background-color .3s ease, box-shadow .3s ease;
  box-shadow: none;
}
.site-header.is-hovered {
  background: rgba(96, 7, 74, 0.88);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.header-apply { display: none; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: 0;
  background: transparent;
  border-radius: 4px;
  transition: transform .25s ease;
  position: relative;
  z-index: 55;
}
@media (hover: hover) {
  .brand:hover { transform: translateY(-1px); }
}
.brand img {
  height: 58px;
  width: auto;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
}

.primary-nav > ul {
  display: flex;
  align-items: center;
  gap: clamp(.75rem, 2vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.primary-nav a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: 8px 6px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.88);
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: color .2s ease, border-color .2s ease;
}
.primary-nav a:hover {
  color: #fff;
  background: transparent;
  border-bottom-color: rgba(244, 223, 202, 0.6);
}
.primary-nav a.is-active {
  color: #fff;
  background: transparent;
  border-bottom-color: var(--cream);
}
.primary-nav .has-caret::after {
  content: "";
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  display: inline-block;
  opacity: .8;
}

/* ---------- Dropdown nav menus ---------- */
.has-dropdown { position: relative; }
.dropdown {
  display: block;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: #fff;
  min-width: 240px;
  padding: .5rem 0;
  border-radius: 6px;
  box-shadow: 0 12px 32px -8px rgba(96,7,74,0.25), 0 2px 8px rgba(0,0,0,0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
  list-style: none;
  margin: 0;
  z-index: 100;
  flex-direction: column;
}
.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.dropdown li { width: 100%; }
.dropdown a {
  display: block !important;
  width: 100%;
  padding: .65rem 1.1rem !important;
  font-size: 12px !important;
  letter-spacing: .08em !important;
  font-weight: 400 !important;
  color: var(--burgundy-deep) !important;
  background: transparent !important;
  border: none !important;
  text-transform: uppercase;
  white-space: nowrap;
}
.dropdown a:hover {
  background: rgba(96,7,74,0.08) !important;
  color: var(--burgundy-deep) !important;
  border: none !important;
}
.dropdown a.is-active {
  background: rgba(96,7,74,0.08) !important;
  color: var(--burgundy-deep) !important;
}
/* Footer: never render the navigation dropdown UI */
.site-footer .has-dropdown > a::after,
.site-footer .has-caret::after { display: none !important; content: none !important; }
.site-footer .dropdown {
  display: block;
  position: static;
  transform: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
  margin: 0;
  min-width: 0;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.site-footer .dropdown a {
  display: block !important;
  padding: .25rem 0 !important;
  color: #fff !important;
  background: transparent !important;
  text-transform: none;
  font-size: inherit !important;
  letter-spacing: normal !important;
}
.nav-apply {
  padding: 10px 26px !important;
  background: var(--teal) !important;
  color: #fff !important;
  border-radius: 999px;
  font-weight: 700 !important;
  border-bottom: none !important;
  font-size: 1rem;
  transition: transform .2s ease, background-color .2s ease, color .2s ease !important;
}
.nav-apply:hover {
  background: var(--teal-deep) !important;
  color: #fff !important;
  border-bottom-color: transparent !important;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
  color: #fff;
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  display: block;
  width: 26px;
  height: 2px;
  background: #fff;
  position: relative;
  transition: transform .25s ease;
}
.menu-toggle span::before { position: absolute; top: -8px; left: 0; }
.menu-toggle span::after  { position: absolute; top:  8px; left: 0; }

@media (max-width: 960px) and (min-width: 721px) {
  .primary-nav > ul { gap: .35rem; }
  .primary-nav a { font-size: 11px; padding: 8px 4px; letter-spacing: .04em; }
}
@media (max-width: 720px) {
  .primary-nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    left: auto;
    width: min(78vw, 320px);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    background: var(--burgundy-deep);
    padding: 0.75rem 1.25rem 1.25rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
    box-shadow: 0 14px 30px rgba(0,0,0,.25);
    border-bottom-left-radius: 4px;
    z-index: 100;
  }
  .primary-nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .primary-nav > ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .primary-nav a {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    padding: 14px 4px;
    font-size: 16px;
    text-align: right;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.12);
  }
  .primary-nav > ul > li:last-child > a { border-bottom: none; }
  .primary-nav a:hover,
  .primary-nav a.is-active {
    background: transparent;
    border-bottom-color: rgba(255,255,255,0.12);
    color: var(--gold);
  }
  .nav-apply { display: none !important; }
  .floating-inquire { display: none !important; }
  .header-apply {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--teal, #08a99f);
    color: #fff;
    font-family: var(--font-display), serif;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    margin-left: auto;
    margin-right: .5rem;
  }
  .header-apply:hover { background: var(--teal-deep); color: #fff; }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: var(--burgundy-deep);
    border-radius: 4px;
    color: #fff;
    position: relative;
    z-index: 60;
  }
  .menu-toggle span,
  .menu-toggle span::before,
  .menu-toggle span::after { background: #fff; }
  .has-dropdown { position: relative; }
  .primary-nav .has-dropdown > a { display: flex; justify-content: flex-end; align-items: center; gap: .5rem; }
  .primary-nav .has-dropdown > a::after {
    content: "";
    width: 8px; height: 8px;
    border-right: 2px solid var(--teal);
    border-bottom: 2px solid var(--teal);
    transform: rotate(45deg) translateY(-2px);
    display: inline-block !important;
    margin-left: .55rem;
    opacity: .9;
    transition: transform .25s ease;
  }
  .primary-nav .has-dropdown.is-open > a::after { transform: rotate(225deg) translateY(0); }
  .primary-nav .dropdown {
    position: static;
    transform: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
    min-width: 0;
    border-radius: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .primary-nav .has-dropdown.is-open .dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    max-height: 1000px;
    padding: 0 0 .5rem 0;
  }
  .primary-nav .dropdown a {
    display: block !important;
    color: rgba(255,255,255,0.85) !important;
    padding: .55rem 1rem .55rem 0 !important;
    text-align: right;
    white-space: normal !important;
    word-break: normal;
    overflow-wrap: break-word;
    border-bottom: none !important;
    font-size: 15px !important;
  }
  .primary-nav .dropdown a:hover { background: transparent !important; color: var(--gold) !important; }
  .site-footer .has-dropdown > a::after,
  .site-footer .has-caret::after { display: none !important; content: none !important; }
  .site-footer .dropdown { position: static; box-shadow: none; background: transparent; padding: 0; opacity: 1; visibility: visible; pointer-events: auto; transform: none; min-width: 0; }
  .primary-nav .has-caret::after { display: none !important; content: none !important; }

  /* Header always shows a small burgundy backdrop behind the toggle on mobile */
  .site-header .container { align-items: center; }
}


/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  padding-top: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/hero.jpg");
  background-size: cover;
  background-position: center 30%;
  z-index: -2;
}
@media (max-width: 720px) {
  .hero {
    min-height: auto;
    aspect-ratio: 392 / 410;
  }
  .hero::before {
    background-image: url("../images/hero-mobile.jpg");
    background-size: cover;
    background-position: center top;
  }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(42,10,30,0.15) 0%, rgba(42,10,30,0.45) 60%, rgba(42,10,30,0.6) 100%);
  z-index: -1;
}
.hero-inner {
  padding: clamp(3rem, 8vw, 6rem) var(--gutter);
  max-width: 1100px;
}
.hero-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: clamp(4rem, 12vw, 9.5rem);
  line-height: 0.95;
  color: #fff;
  text-shadow: 0 4px 30px rgba(0,0,0,0.25);
  margin: 0;
}
.hero-sub {
  display: block;
  margin-top: -.1em;
  font-family: "EB Garamond", "Cormorant Garamond", Garamond, "Adobe Garamond Pro", Georgia, serif;
  font-style: normal;
  font-weight: 500;
  font-size: clamp(1.5rem, 4.2vw, 3.25rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 4px 30px rgba(0,0,0,0.25);
}
.hero-hebrew {
  display: block;
  margin-top: 1.25rem;
  font-family: "Frank Ruhl Libre", "David", serif;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  color: var(--cream) !important;
  direction: rtl;
  letter-spacing: .04em;
}
.hero-citation {
  display: block;
  margin-top: .35rem;
  font-family: "Frank Ruhl Libre", "David", serif;
  font-style: italic;
  font-size: clamp(.8rem, 1.2vw, .95rem);
  color: var(--cream) !important;
  direction: rtl;
  letter-spacing: .02em;
}
.hero-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: clamp(2rem, 5vw, 3rem);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .2s ease, background-color .25s ease, color .25s ease, border-color .25s ease;
  border: 2px solid #fff;
  background: transparent;
  color: #fff;
}
.btn:hover { transform: translateY(-2px); }
.btn--ghost-light:hover {
  background: #fff;
  color: var(--burgundy);
}
.btn .arrow {
  width: 18px; height: 12px;
  display: inline-block;
}
.btn .arrow svg { display: block; }
.btn--ghost-light .arrow path { stroke: var(--teal); }

.btn--filled {
  background: var(--gold);
  color: var(--burgundy-deep);
  border-color: var(--gold);
}
.btn--filled:hover {
  background: #fff;
  border-color: #fff;
  color: var(--burgundy-deep);
}

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

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

/* ---------- Statement section ---------- */
.statement {
  padding: clamp(4rem, 9vw, 7rem) var(--gutter);
  background: var(--surface);
  text-align: center;
}
.statement p {
  max-width: 980px;
  margin: 0 auto;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.2rem, 2.6vw, 1.85rem);
  line-height: 1.45;
  color: var(--burgundy);
  letter-spacing: -0.005em;
}
.statement .accent-rule {
  display: block;
  width: 64px;
  height: 3px;
  background: var(--gold);
  margin: 0 auto 2rem;
  border-radius: 2px;
}

/* ---------- Pillars (IGNITE / ILLUMINATE / THRIVE) - Mevaseret card scale ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  background: transparent;
  padding: clamp(2rem, 5vw, 4rem) var(--gutter) clamp(2.5rem, 6vw, 4.5rem);
  max-width: 1200px;
  margin-inline: auto;
}
.pillars--three {
  grid-template-columns: repeat(3, 1fr);
  max-width: 980px;
}
.pillar {
  position: relative;
  aspect-ratio: 4 / 3;
  max-width: 320px;
  margin-inline: auto;
  width: 100%;
  overflow: hidden;
  background-color: var(--pillar-color, #000);
  color: #fff;
  isolation: isolate;
  border-radius: 28px;
}
.pillar img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}
.pillar::before { content: ""; position: absolute; inset: 0; background: transparent; z-index: 2; }
.pillar-overlay {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  text-align: center;
  z-index: 3;
}
.pillar-label {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: clamp(1.05rem, 1.8vw, 1.4rem);
  color: #fff;
  margin: 0 0 .55rem;
}
.pillar-copy {
  max-width: 32ch;
  font-family: "EB Garamond", Garamond, "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.65;
  color: rgba(255,255,255,0.97);
  margin: 0;
}

/* No-image pillar variant: solid colored panel over Jerusalem stone bg */
.pillars--no-img {
  background-image:
    linear-gradient(180deg, rgba(236,220,189,0.55) 0%, rgba(217,197,161,0.6) 100%),
    url('/images/jerusalem-stone-light.jpg');
  background-size: cover;
  background-position: center;
  background-blend-mode: multiply;
}
.pillars--no-img .pillar { background-color: var(--pillar-color); }
.pillars--no-img .pillar::before { display: none; }

/* Each tile keeps its own color (no swap on hover) */
.pillar--ignite     { --pillar-color: var(--burgundy); }
.pillar--illuminate { --pillar-color: var(--teal-deep); }
.pillar--thrive     { --pillar-color: var(--purple); }
.pillar:hover { filter: brightness(1.06); }

@media (max-width: 960px) {
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .pillars--three { grid-template-columns: repeat(3, 1fr); }
  .pillar { max-width: 100%; }
}
@media (max-width: 640px) {
  .pillars--three { grid-template-columns: 1fr; }
}

/* ---------- Tracks CTA strip (under pillars) ---------- */
.tracks-cta {
  background: var(--burgundy);
  padding: clamp(2rem, 4vw, 3rem) var(--gutter);
  text-align: center;
}
.tracks-cta .btn {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.55);
  font-size: 13px;
  letter-spacing: .18em;
}
.tracks-cta .btn:hover {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--burgundy);
}
.tracks-cta .btn:hover .arrow path { stroke: var(--burgundy); }

/* ---------- Tracks page ---------- */
.tracks-hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(3rem, 7vw, 5rem)) var(--gutter) clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(ellipse at top right, rgba(149,58,144,0.5), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(212,74,158,0.35), transparent 65%),
    var(--burgundy);
  color: #fff;
  text-align: center;
  overflow: hidden;
}
.tracks-hero .eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 1rem;
}
.tracks-hero h1 {
  color: #fff;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 auto .75rem;
  max-width: 18ch;
}
.tracks-hero h1 .dot { color: var(--cream); }
.tracks-hero .hebrew {
  display: block;
  font-family: "Frank Ruhl Libre", serif;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  color: var(--cream);
  direction: rtl;
  letter-spacing: .04em;
  margin: 1rem auto 1.5rem;
}
.tracks-hero .intro {
  max-width: 760px;
  margin: 0 auto;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.7;
  color: rgba(255,255,255,0.9);
}

.tracks-list {
  background: var(--surface);
  padding: clamp(3rem, 6vw, 5rem) var(--gutter);
}
.tracks-list .container {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.track-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: stretch;
  background: var(--cream-light);
  border-radius: 8px;
  overflow: hidden;
  border-left: 6px solid var(--track-color, var(--burgundy));
}
.track-card__mark {
  background: var(--track-color, var(--burgundy));
  color: #fff;
  padding: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}
.track-card__num {
  font-size: 13px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--cream);
  font-weight: 700;
  margin-bottom: .75rem;
}
.track-card__name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #fff;
  line-height: 1;
  margin: 0;
}
.track-card__tag {
  margin-top: .5rem;
  font-size: clamp(.95rem, 1.4vw, 1.1rem);
  font-style: italic;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: .02em;
}
.track-card__body {
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.5rem, 3vw, 2.25rem) clamp(1.5rem, 3vw, 2.25rem) 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
}
.track-card__body p { margin: 0; }

.track-card--torah  { --track-color: var(--burgundy); }
.track-card--temima { --track-color: var(--purple); }
.track-card--nefesh { --track-color: var(--teal-deep); }

.tracks-summary {
  background: var(--cream);
  padding: clamp(3rem, 6vw, 5rem) var(--gutter);
  text-align: center;
}
.tracks-summary .hebrew {
  display: block;
  font-family: "Frank Ruhl Libre", serif;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  color: var(--burgundy);
  direction: rtl;
  letter-spacing: .04em;
  margin-bottom: 2rem;
}
.tracks-summary h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--burgundy);
  font-weight: 700;
  max-width: 22ch;
  margin: 0 auto 2rem;
}
.tracks-summary ul {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.tracks-summary li {
  padding: 1.1rem 1.5rem;
  background: #fff;
  border-radius: 6px;
  border-left: 4px solid var(--row-color, var(--burgundy));
  text-align: left;
  font-size: 1.05rem;
  color: var(--ink);
}
.tracks-summary li strong {
  color: var(--row-color);
  font-weight: 700;
  margin-right: .35rem;
  letter-spacing: .02em;
}
.tracks-summary li.row--torah  { --row-color: var(--burgundy); }
.tracks-summary li.row--temima { --row-color: var(--purple); }
.tracks-summary li.row--nefesh { --row-color: var(--teal-deep); }

@media (max-width: 720px) {
  .track-card { grid-template-columns: 1fr; border-left: none; border-top: 6px solid var(--track-color, var(--burgundy)); }
  .track-card__body { padding: 0 1.5rem 1.75rem; }
}

/* ---------- Section heading common ---------- */
.section {
  padding: clamp(4rem, 9vw, 7rem) var(--gutter);
}
.section--cream { background: var(--cream); }
.section--cream-light { background: var(--cream-light); }
.section--white { background: var(--surface); }
.section-head {
  text-align: center;
  max-width: 820px;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
}
.section-head h2 {
  margin-bottom: .75rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--burgundy);
}
.section-head p {
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.65;
  margin: 0;
}
#beyond-heading {
  color: var(--purple);
  font-family: "Sorts Mill Goudy", "EB Garamond", Garamond, Georgia, serif;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
#beyond-heading + p,
.section-head:has(#beyond-heading) p {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.2rem, 2.6vw, 1.85rem);
  line-height: 1.45;
  color: var(--burgundy);
  letter-spacing: -0.005em;
}

/* ---------- Beyond the Classroom (icon tiles) ---------- */
.beyond-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
  max-width: var(--container-max);
  margin-inline: auto;
}
.beyond-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: 1.5rem 1rem;
  text-align: center;
  color: #fff;
  background: var(--burgundy);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease;
  text-decoration: none;
}
.beyond-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -10px rgba(96,7,74,0.35);
}
.beyond-tile .icon {
  width: 52px;
  height: 52px;
  margin-bottom: 1rem;
  color: #fff;
}
.beyond-tile .icon svg { width: 100%; height: 100%; display: block; }
.beyond-tile .tile-label {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #fff;
}
.beyond-tile .tile-sub {
  margin-top: .35rem;
  font-size: 13px;
  letter-spacing: .04em;
  color: rgba(255,255,255,0.85);
}
.beyond-tile--tiyulim { background: linear-gradient(150deg, var(--teal) 0%, var(--teal-deep) 100%); }
.beyond-tile--babayit { background: linear-gradient(150deg, var(--purple) 0%, var(--burgundy) 100%); }
.beyond-tile--chaburot { background: linear-gradient(150deg, var(--burgundy) 0%, var(--magenta) 100%); }
.beyond-tile--chessed { background: linear-gradient(150deg, var(--magenta) 0%, #a32a78 100%); }
.beyond-tile--stem    { background: linear-gradient(150deg, var(--rose) 0%, var(--magenta) 100%); color: #fff; }
.beyond-tile--stem .icon,
.beyond-tile--stem .tile-label { color: #fff; }
.beyond-tile--stem .tile-sub { color: rgba(255,255,255,0.9); }

/* Photo tiles (image background with overlay label) */
.beyond-grid--4 { grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 1.6vw, 1.5rem); max-width: 1040px; }
.beyond-grid--4 .beyond-tile { aspect-ratio: 4 / 3; font-size: 1.15rem; }
.beyond-grid--4 .beyond-tile .tile-label { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.beyond-tile--photo { padding: 0; background: #000; }
.beyond-tile--photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.beyond-tile--photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.7) 100%);
  z-index: 2;
}
.beyond-tile--photo .tile-label { position: relative; z-index: 3; text-shadow: 0 2px 14px rgba(0,0,0,0.7); }
.beyond-tile--photo:hover img { transform: scale(1.05); }
@media (max-width: 640px) { .beyond-grid--4 { grid-template-columns: 1fr; } }

.beyond-cta {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
}

@media (max-width: 900px) {
  .beyond-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px) {
  .beyond-grid { grid-template-columns: 1fr; }
  .beyond-tile { aspect-ratio: 5 / 3; }
}

/* ---------- Next Step CTA ---------- */
.next-step {
  background:
    radial-gradient(ellipse at top left, rgba(149,58,144,0.45), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(212,74,158,0.35), transparent 65%),
    var(--burgundy);
  color: #fff;
  text-align: center;
  padding: clamp(5rem, 10vw, 8rem) var(--gutter);
}
.next-step .eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.next-step h2 {
  color: #fff;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin: 0 auto 1rem;
  max-width: 14ch;
}
.next-step p {
  color: rgba(255,255,255,0.85);
  max-width: 38ch;
  margin: 0 auto 2rem;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}
.next-step .hero-actions { margin-top: 2rem; }

/* ---------- Footer ---------- */
.site-footer {
  background:
    linear-gradient(rgba(96,7,74,0.88), rgba(96,7,74,0.88)),
    url('/images/jerusalem-stone.jpg') center/cover no-repeat;
  background-blend-mode: multiply;
  color: rgba(255,255,255,0.85);
  padding: 3rem var(--gutter) 2rem;
  font-size: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.site-footer .container {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.site-footer img {
  height: 72px;
  background: transparent;
  padding: 0;
  border-radius: 0;
  display: block;
}
.site-footer h4 {
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #fff;
  font-weight: 700;
  margin-bottom: 1rem;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.site-footer p { color: rgba(255,255,255,0.78); }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--cream); }
.footer-bottom {
  margin-top: 2.5rem;
  margin-left: calc(var(--gutter) * -1);
  margin-right: calc(var(--gutter) * -1);
  margin-bottom: -2rem;
  padding: .6rem 1rem;
  background: var(--burgundy);
  color: #fff;
  text-align: center;
  font-size: 12px;
  border-top: 1px solid rgba(255,255,255,0.15);
  display: block;
}
.footer-bottom a { color: #fff; }
.footer-bottom-copy { display: inline-block; }
@media (max-width: 800px) {
  .site-footer .container { grid-template-columns: 1fr; }
}

/* ---------- Coming Soon ---------- */
.coming-soon {
  min-height: calc(100vh - var(--header-h));
  margin-top: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem var(--gutter);
  background:
    radial-gradient(ellipse at top, rgba(149,58,144,0.18), transparent 60%),
    var(--cream-light);
}
.coming-soon-inner { max-width: 640px; }
.coming-soon .eyebrow {
  font-size: 13px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--purple);
  font-weight: 600;
  margin-bottom: 1rem;
}
.coming-soon h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
}
.coming-soon p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.7;
}
.coming-soon .hero-actions { margin-top: 2rem; }

/* ---------- Reveal animation ----------
   Only opt in when JS has marked the document ready (class on <html>),
   so that no-JS users still see all content. */
html.has-js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1);
}
html.has-js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html.has-js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Utilities ---------- */
.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;
}

/* =========================================================
   ROUND-6 ADDITIONS
   ========================================================= */

/* ---------- Generic content page (about, faculty, mission, etc) ---------- */
.page-hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(3rem, 6vw, 4.5rem)) var(--gutter) clamp(2.5rem, 5vw, 4rem);
  background:
    radial-gradient(ellipse at top right, rgba(149,58,144,0.45), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(212,74,158,0.25), transparent 65%),
    var(--burgundy);
  color: #fff;
  text-align: center;
}
.page-hero .eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 1rem;
}
.page-hero h1 {
  color: #fff;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  margin: 0 auto .75rem;
  max-width: 18ch;
}
.page-hero p {
  max-width: 720px;
  margin: 0 auto;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.7;
  color: rgba(255,255,255,0.9);
}

.page-content {
  padding: clamp(3rem, 6vw, 5rem) var(--gutter);
  background: var(--surface);
}
.page-content .container { max-width: 880px; }
.page-content h2 {
  color: var(--burgundy);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  margin-top: 2.5rem;
}
.page-content h2:first-child { margin-top: 0; }
.page-content h3 {
  color: var(--purple);
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  margin-top: 1.75rem;
  font-weight: 600;
}
.page-content p,
.page-content li {
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.75;
}
.page-content ul, .page-content ol { padding-left: 1.25rem; }
.page-content ul li { margin-bottom: .5rem; }
.page-content strong { color: var(--burgundy-deep); }

/* TEST SIGNAL ribbon - placed on any page with invented placeholder content */
.test-signal {
  background: #fff3cd;
  border-left: 4px solid #e0a800;
  padding: 1rem 1.25rem;
  margin: 0 0 2rem;
  border-radius: 4px;
  font-size: .92rem;
  color: #8a6d3b;
  line-height: 1.6;
}
.test-signal .test-signal-label {
  display: block;
  font-size: .8rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #b8860b;
  margin-bottom: .35rem;
  font-weight: 700;
}
.test-signal strong {
  color: #8a6d3b;
  font-weight: 700;
}

/* ---------- Faculty grid (placeholder) ---------- */
.faculty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.faculty-card {
  background: var(--cream-light);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  border-top: 4px solid var(--burgundy);
}
.faculty-card .avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--burgundy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: .04em;
  margin: 0 auto 1rem;
}
.faculty-card h3 {
  font-size: 1.15rem;
  margin: 0 0 .25rem;
  color: var(--burgundy);
}
.faculty-card .role {
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--purple);
  font-weight: 600;
  margin-bottom: .75rem;
}
.faculty-card p {
  font-size: .95rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- FAQ accordion ---------- */
.faq-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
}
.faq-item {
  border-bottom: 1px solid rgba(96,7,74,0.12);
  padding: 1.25rem 0;
}
.faq-item:first-child { border-top: 1px solid rgba(96,7,74,0.12); }
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--burgundy-deep);
  font-size: 1.08rem;
  list-style: none;
  position: relative;
  padding-right: 2rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: -2px;
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--purple);
  transition: transform .2s ease;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
  margin: .85rem 0 0;
  color: var(--ink-soft);
  line-height: 1.65;
  font-size: .98rem;
}
.faq-item ul {
  margin: .6rem 0 0 1.1rem;
  padding: 0;
  color: var(--ink-soft);
  line-height: 1.65;
  font-size: .98rem;
}
.faq-item .hebrew-line {
  font-family: "SBL Hebrew", "Frank Ruhl Libre", "David", serif;
  direction: rtl;
  text-align: center;
  font-size: 1.4rem;
  color: var(--burgundy-deep);
  margin: 1rem 0 .25rem;
}
.faq-item blockquote {
  margin: .75rem 0;
  padding: .5rem 1rem;
  border-left: 3px solid var(--teal, #08a99f);
  color: var(--ink-soft);
  font-style: italic;
}

/* FAQ groups */
.faq-groups { margin-top: 1.5rem; }
.faq-group { margin: 2.5rem 0; }
.faq-group-title {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  color: var(--burgundy-deep);
  margin: 0 0 .25rem;
  letter-spacing: .02em;
}
.faq-group-rule {
  width: 60px; height: 3px; background: var(--teal, #08a99f);
  border: 0; margin: 0 0 1rem;
}
.faq-search {
  position: sticky; top: calc(var(--header-h) + 8px); z-index: 5;
  background: var(--cream, #f7f1e6);
  padding: .75rem; border-radius: 14px;
  box-shadow: 0 4px 18px rgba(96,7,74,.08);
  margin-bottom: 1.5rem;
  display: flex; gap: .5rem; align-items: center;
}
.faq-search input {
  flex: 1; padding: .8rem 1rem;
  border: 1px solid rgba(96,7,74,0.18);
  border-radius: 10px; font-size: 1rem;
  background: #fff; color: var(--ink, #2a0a23);
  outline: none;
}
.faq-search input:focus { border-color: var(--burgundy, #7a1163); }
.faq-toc {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin: 1.25rem 0 0;
  padding: 0; list-style: none;
}
.faq-toc a {
  display: inline-block;
  padding: .45rem .9rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(96,7,74,0.18);
  color: var(--burgundy-deep);
  font-size: .82rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none;
}
.faq-toc a:hover { background: var(--burgundy-deep); color: #fff; }
.faq-item.is-hidden { display: none; }
@media (max-width: 640px) {
  .faq-item summary { font-size: 1rem; padding-right: 1.75rem; }
  .faq-group-title { font-size: 1.25rem; }
}


/* ---------- Schedule table (Daily Life / Weekly Schedule) ---------- */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(96,7,74,0.06);
}
.schedule-table th,
.schedule-table td {
  padding: .85rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(96,7,74,0.08);
  font-size: .98rem;
}
.schedule-table th {
  background: var(--burgundy);
  color: #fff;
  font-weight: 600;
  letter-spacing: .04em;
  font-size: .88rem;
  text-transform: uppercase;
}
.schedule-table tr:nth-child(even) td { background: var(--cream-light); }
.schedule-table td:first-child {
  font-weight: 600;
  color: var(--burgundy);
  white-space: nowrap;
}

/* ---------- TEMIMA Advantage feature blocks ---------- */
.advantage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.advantage-card {
  background: #fff;
  border: 1px solid rgba(96,7,74,0.12);
  border-left: 4px solid var(--burgundy);
  border-radius: 6px;
  padding: 1.5rem;
}
.advantage-card h3 {
  color: var(--burgundy);
  font-size: 1.15rem;
  margin: 0 0 .5rem;
  font-weight: 700;
}
.advantage-card p {
  margin: 0;
  font-size: .98rem;
  color: var(--ink-soft);
  line-height: 1.65;
}
.advantage-card:nth-child(2) { border-left-color: var(--purple); }
.advantage-card:nth-child(2) h3 { color: var(--purple); }
.advantage-card:nth-child(3) { border-left-color: var(--teal-deep); }
.advantage-card:nth-child(3) h3 { color: var(--teal-deep); }
.advantage-card:nth-child(4) { border-left-color: var(--magenta); }
.advantage-card:nth-child(4) h3 { color: var(--magenta); }

/* ---------- Contact page (Mevaseret-inspired, minimal) ---------- */
.contact-hero {
  padding: calc(var(--header-h) + clamp(3rem, 6vw, 4.5rem)) var(--gutter) clamp(2rem, 4vw, 3rem);
  text-align: center;
  background: var(--surface);
}
.contact-hero h1 {
  color: var(--burgundy);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 600;
  margin: 0 0 .75rem;
}
.contact-hero p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 auto;
}

.contact-grid {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3.5rem) var(--gutter) clamp(4rem, 8vw, 6rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact-block {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
}
.contact-block .icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  color: var(--burgundy);
  margin-top: 4px;
}
.contact-block .icon svg { width: 100%; height: 100%; display: block; }
.contact-block .label {
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--purple);
  font-weight: 600;
  margin-bottom: .25rem;
}
.contact-block .value {
  font-size: 1.15rem;
  color: var(--burgundy-deep);
  font-weight: 500;
}
.contact-block .value a {
  color: var(--burgundy-deep);
  text-decoration: none;
}
.contact-block .value a:hover {
  color: var(--purple);
  text-decoration: underline;
}

.contact-socials {
  display: flex;
  gap: .75rem;
  margin-top: 1rem;
  grid-column: 2 / 3;
  justify-self: end;
  justify-content: flex-end;
  align-self: end;
}
.contact-socials a {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--cream);
  color: var(--burgundy-deep);
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
}
.contact-socials a:hover {
  background: #fff;
  color: var(--burgundy-deep);
  transform: translateY(-2px);
}
.contact-socials a svg { width: 22px; height: 22px; display: block; }

@media (max-width: 720px) {
  .contact-socials { grid-column: 1; justify-self: center; justify-content: center; }
}

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

/* ---------- TEMIMA Torah page (media library) ---------- */
.torah-intro {
  padding: clamp(3rem, 6vw, 5rem) var(--gutter);
  background: var(--cream-light);
  text-align: center;
}
.torah-intro .hebrew {
  display: block;
  font-family: "Frank Ruhl Libre", serif;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  color: var(--burgundy);
  direction: rtl;
  margin-bottom: 1.5rem;
  letter-spacing: .04em;
}
.torah-intro p {
  max-width: 720px;
  margin: 0 auto;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.75;
  color: var(--ink);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: var(--container-max);
  margin: 2.5rem auto 0;
  padding: 0 var(--gutter);
}
.media-card {
  background: #fff;
  border: 1px solid rgba(96,7,74,0.12);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.media-card .thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--burgundy) 0%, var(--purple) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .85rem;
}
.media-card .body { padding: 1.25rem 1.25rem 1.5rem; }
.media-card h3 {
  color: var(--burgundy);
  font-size: 1.1rem;
  margin: 0 0 .5rem;
}
.media-card p {
  font-size: .95rem;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.6;
}
.media-card .meta {
  display: block;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--purple);
  font-weight: 600;
  margin-bottom: .35rem;
}

/* Teal check-circle bullet list (Our Students page) */
.teal-check-list { list-style: none; padding-left: 0; margin: 1.25rem 0; }
.teal-check-list li {
  position: relative;
  padding: .25rem 0 .25rem 2.25rem;
  margin: .35rem 0;
  line-height: 1.55;
}
.teal-check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55rem;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  background-color: var(--teal);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='5 12 10 17 19 8'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 70% 70%;
  box-shadow: 0 2px 6px rgba(8,169,159,.25);
  flex-shrink: 0;
}

/* ---------- Our Mission page ---------- */
.mission-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-h) + clamp(4rem, 8vw, 7rem)) var(--gutter) clamp(4rem, 8vw, 7rem);
  background:
    linear-gradient(180deg, rgba(40,3,30,0.72) 0%, rgba(96,7,74,0.62) 55%, rgba(30,2,22,0.82) 100%),
    url('/__l5e/assets-v1/5965c37c-d438-456b-b0c3-fb7e36574c39/jerusalem-night.png') center/cover no-repeat;
  color: #fff;
  text-align: center;
}
.mission-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(212,180,140,0.22) 0%, rgba(212,180,140,0) 65%);
  pointer-events: none;
}
.mission-hero .eyebrow {
  position: relative;
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: .38em;
  text-transform: uppercase; color: var(--cream);
  padding: .45rem 1rem; border: 1px solid rgba(244,223,202,0.45);
  border-radius: 999px; margin-bottom: 1.5rem;
}
.mission-hero h1 {
  position: relative;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.05;
  margin: 0 auto .5rem;
  max-width: 16ch;
  letter-spacing: -.01em;
  color: var(--cream);
}
.mission-hero h1 .accent { color: var(--cream); font-style: italic; }
.mission-pasuk {
  position: relative;
  margin: 2.25rem auto 0;
  max-width: 760px;
  padding: 1.75rem 1.5rem;
  border-top: 1px solid rgba(244,223,202,0.35);
  border-bottom: 1px solid rgba(244,223,202,0.35);
}
.mission-pasuk .hebrew {
  font-family: "SBL Hebrew", "Frank Ruhl Libre", "David", serif;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.5;
  color: #fff;
  direction: rtl;
  margin: 0 0 .65rem;
}
.mission-pasuk cite {
  display: block;
  font-style: normal;
  font-size: .8rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 1rem;
}
.mission-pasuk .translation {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: rgba(255,255,255,0.95);
  margin: 0;
}

.mission-body {
  padding: clamp(4rem, 7vw, 6rem) var(--gutter);
  background: var(--surface);
}
.mission-body .container { max-width: 820px; }
.mission-lede {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.4;
  color: var(--burgundy-deep);
  text-align: center;
  margin: 0 0 3rem;
}
.mission-lede strong { color: var(--magenta); font-style: italic; font-weight: 600; }
.mission-body p {
  font-size: 1.1rem; line-height: 1.8; color: var(--ink);
  margin: 0 0 1.4rem;
}
.mission-pullquote {
  margin: 3rem -1rem;
  padding: 2rem 2.25rem;
  background: linear-gradient(135deg, rgba(8,169,159,0.10), rgba(149,58,144,0.08));
  border-left: 5px solid var(--teal);
  border-radius: 6px;
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1.45;
  color: var(--burgundy-deep);
  font-weight: 500;
}
.mission-pullquote strong { color: var(--teal-deep); }

.mission-pillars {
  padding: clamp(4rem, 7vw, 6rem) var(--gutter);
  background:
    radial-gradient(ellipse at top, rgba(212,74,158,0.12), transparent 60%),
    var(--cream-light);
  text-align: center;
}
.mission-pillars .eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: .35em;
  text-transform: uppercase; color: var(--teal-deep);
  margin-bottom: 1rem;
}
.mission-pillars h2 {
  font-family: var(--font-serif);
  color: var(--burgundy-deep);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  margin: 0 auto 3rem;
  max-width: 22ch;
}
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}
.pillar-card {
  position: relative;
  padding: 2.25rem 1.75rem;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px -20px rgba(96,7,74,0.35);
  text-align: left;
  border-top: 4px solid var(--burgundy);
  transition: transform .3s ease, box-shadow .3s ease;
}
.pillar-card:nth-child(2) { border-top-color: var(--magenta); }
.pillar-card:nth-child(3) { border-top-color: var(--teal); }
.pillar-card:hover { transform: translateY(-4px); box-shadow: 0 22px 50px -22px rgba(96,7,74,0.5); }
.pillar-card .num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--burgundy);
  opacity: .35;
  display: block;
  margin-bottom: .5rem;
}
.pillar-card:nth-child(2) .num { color: var(--magenta); }
.pillar-card:nth-child(3) .num { color: var(--teal); }
.pillar-card h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--burgundy-deep);
  margin: 0 0 .5rem;
}
.pillar-card p { margin: 0; color: var(--ink-soft); font-size: .98rem; line-height: 1.6; }

.mission-close {
  padding: clamp(4rem, 7vw, 6rem) var(--gutter);
  background: linear-gradient(160deg, var(--burgundy-deep), #3a0530);
  color: #fff;
  text-align: center;
}
.mission-close p {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  line-height: 1.5;
  margin: 0 auto .75rem;
  max-width: 720px;
  color: rgba(255,255,255,0.92);
}
.mission-close .climax {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  color: var(--cream);
  margin-top: 1.5rem;
  font-weight: 500;
}
.mission-close .hero-actions { margin-top: 2.5rem; justify-content: center; }

/* ---------- Beit Midrash page ---------- */
.mission-hero.beit-hero {
  background:
    linear-gradient(180deg, rgba(40,3,30,0.72) 0%, rgba(96,7,74,0.62) 55%, rgba(30,2,22,0.82) 100%),
    url('/__l5e/assets-v1/ac1a5482-5645-46ee-ab86-edfc93e6e1f0/beit-midrash.png') center/cover no-repeat;
}
.mission-hero.sephardic-hero {
  background:
    linear-gradient(180deg, rgba(40,3,30,0.72) 0%, rgba(96,7,74,0.62) 55%, rgba(30,2,22,0.82) 100%),
    url('/__l5e/assets-v1/13451235-6027-4ccb-9ffe-27d222b45c0f/sephardic-chacham.png') center/cover no-repeat;
}

/* ---------- Extracurricular: hero + clickable tile grid ---------- */
.extra-hero {
  background: linear-gradient(180deg, var(--cream-light) 0%, var(--cream) 100%);
  padding: clamp(3rem, 7vw, 5rem) 1.25rem clamp(2rem, 4vw, 3rem);
  text-align: center;
}
.extra-hero .eyebrow {
  display: inline-block;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--burgundy);
  margin-bottom: 0.9rem;
}
.extra-hero h1 {
  font-size: clamp(2.2rem, 5.2vw, 3.6rem);
  color: var(--burgundy-deep);
  margin: 0 0 0.75rem;
  line-height: 1.05;
}
.extra-hero h1 .accent { color: var(--magenta); }
.extra-hero .lede {
  max-width: 720px;
  margin: 0 auto;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: #5a3a4d;
  line-height: 1.55;
}

.extra-tiles-section {
  padding: clamp(1.5rem, 4vw, 3rem) 1.25rem clamp(3rem, 6vw, 5rem);
  background: #fff;
}
.extra-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 1.8vw, 1.5rem);
  max-width: 1180px;
  margin: 0 auto;
}
.extra-tile {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  min-height: 92px;
  padding: 1rem 3rem 1rem 1.15rem;
  border-radius: 10px;
  color: #fff !important;
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(40, 3, 30, 0.10);
  transition: transform .25s ease, box-shadow .25s ease;
}
.extra-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(40, 3, 30, 0.18);
  color: #fff !important;
}
.extra-tile .tile-icon {
  margin-bottom: 0 !important;
  width: 42px !important;
  height: 42px !important;
  border-radius: 10px !important;
  flex-shrink: 0;
}
.extra-tile .tile-icon svg {
  width: 22px !important;
  height: 22px !important;
}
.extra-tile .tile-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.extra-tile .tile-eyebrow {
  display: inline-block;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 0.2rem;
}
.extra-tile .tile-title {
  font-family: inherit;
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.2;
  margin-top: 0;
}
.extra-tile .tile-arrow {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  font-size: 1.15rem;
  line-height: 1;
  opacity: 0.8;
  transition: transform .25s ease, opacity .25s ease;
}
.extra-tile:hover .tile-arrow { transform: translateY(-50%) translateX(4px); opacity: 1; }

.extra-tile--burgundy      { background: linear-gradient(150deg, var(--burgundy) 0%, #3d0530 100%); }
.extra-tile--teal          { background: linear-gradient(150deg, var(--teal) 0%, var(--teal-deep) 100%); }
.extra-tile--purple        { background: linear-gradient(150deg, var(--purple) 0%, var(--burgundy) 100%); }
.extra-tile--magenta       { background: linear-gradient(150deg, var(--magenta) 0%, #a32a78 100%); }
.extra-tile--teal-deep     { background: linear-gradient(150deg, var(--teal-deep) 0%, #035852 100%); }
.extra-tile--rose          { background: linear-gradient(150deg, var(--rose) 0%, var(--magenta) 100%); }
.extra-tile--burgundy-deep { background: linear-gradient(150deg, #7a0a5e 0%, #2c0322 100%); }

@media (max-width: 900px) {
  .extra-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .extra-grid { grid-template-columns: 1fr; gap: 0.6rem; }
  .extra-tile { min-height: 80px; padding: 0.85rem 2.5rem 0.85rem 1rem; }
  .extra-tile .tile-title { font-size: 0.98rem; }
}

/* ---------- Bat-Ami Society membership card ---------- */
.society-card {
  margin: 2.5rem auto;
  max-width: 720px;
  padding: 2rem 1.75rem 2.25rem;
  background: linear-gradient(160deg, var(--cream-light) 0%, var(--cream) 100%);
  border: 1px solid rgba(96, 7, 74, 0.15);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(40, 3, 30, 0.10);
  text-align: center;
}
.society-card h2 {
  color: var(--burgundy-deep);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  margin: 0 0 1.5rem;
}
.society-tiers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.society-tier {
  flex: 1 1 220px;
  max-width: 280px;
  padding: 1.1rem 1rem;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(96, 7, 74, 0.12);
}
.society-tier .tier-label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: 0.4rem;
}
.society-tier .tier-amount {
  display: block;
  font-size: clamp(1.6rem, 3.2vw, 2.1rem);
  font-weight: 700;
  color: var(--burgundy-deep);
  line-height: 1.1;
}
.society-or {
  font-size: 0.95rem;
  color: var(--burgundy);
  font-style: italic;
  text-transform: lowercase;
}
.partner-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
@media (max-width: 560px) {
  .society-tiers { flex-direction: column; gap: 0.75rem; }
  .society-tier { max-width: 100%; width: 100%; }
}

/* ---------- Giving opportunities ---------- */
.giving-section {
  padding: clamp(2.5rem, 6vw, 4rem) var(--gutter);
  background: var(--surface);
}
.giving-section .container { max-width: 1100px; }
.giving-section h2 {
  text-align: center;
  color: var(--burgundy-deep);
  margin-bottom: 0.5rem;
}
.giving-section .giving-lede {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.7;
}
.giving-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.giving-card {
  background: #fff;
  border: 1px solid rgba(96,7,74,0.12);
  border-top: 4px solid var(--teal);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.giving-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(96,7,74,0.08);
}
.giving-card h3 {
  color: var(--burgundy);
  font-size: 1.1rem;
  margin: 0 0 .5rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.giving-card p {
  margin: 0;
  font-size: .97rem;
  color: var(--ink-soft);
  line-height: 1.65;
}
.giving-card .giving-cta {
  display: inline-block;
  margin-top: 1rem;
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--teal-deep);
}
.giving-card .giving-cta:hover { color: var(--burgundy); }
.giving-card:nth-child(2) { border-top-color: var(--purple); }
.giving-card:nth-child(2) h3 { color: var(--purple); }
.giving-card:nth-child(3) { border-top-color: var(--magenta); }
.giving-card:nth-child(3) h3 { color: var(--magenta); }
.giving-card:nth-child(4) { border-top-color: var(--burgundy); }
.giving-card:nth-child(4) h3 { color: var(--burgundy); }
.giving-card:nth-child(5) { border-top-color: var(--rose); }
.giving-card:nth-child(5) h3 { color: var(--rose); }

.giving-hero-quote {
  text-align: center;
  max-width: 760px;
  margin: 2rem auto 0;
  padding: 1.5rem 1.5rem;
  background: linear-gradient(160deg, var(--cream-light) 0%, var(--cream) 100%);
  border-radius: 14px;
  border: 1px solid rgba(96,7,74,0.12);
}
.giving-hero-quote .hebrew {
  font-family: "Frank Ruhl Libre", "SBL Hebrew", serif;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  color: var(--burgundy-deep);
  direction: rtl;
  margin-bottom: .5rem;
  letter-spacing: .04em;
}
.giving-hero-quote p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.7;
  font-style: italic;
}

/* ---------- Extracurricular polish ---------- */
.extra-mission-hero {
  background:
    linear-gradient(180deg, rgba(40,3,30,0.72) 0%, rgba(96,7,74,0.62) 55%, rgba(30,2,22,0.82) 100%),
    url('/__l5e/assets-v1/3998c7a4-d44c-4ec2-944b-10f0643759cb/kotel-night.png') center/cover no-repeat;
}
.extra-tile {
  padding-top: 1.4rem;
}
.extra-tile .tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(4px);
  color: #fff;
  margin-bottom: 1rem;
  transition: transform .3s ease, background .3s ease;
}
.extra-tile .tile-icon svg {
  width: 28px;
  height: 28px;
}
.extra-tile:hover .tile-icon {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.08) rotate(-3deg);
}
.extra-tile .tile-eyebrow {
  font-weight: 600;
  opacity: 0.92;
}

/* ---------- Global mobile optimization ---------- */
html, body { overflow-x: hidden; max-width: 100%; }
@media (max-width: 720px) {
  .site-header {
    background: rgba(96, 7, 74, 0.78) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
  }
  :root { --gutter: 1.25rem; }
  img, video { max-width: 100%; height: auto; }
  /* Keep brand logo at fixed header size — overrides the generic img rule above */
  .site-header .brand img { height: 58px !important; width: auto !important; max-width: none !important; }

  /* Stack any horizontal grids */
  .pillars, .pillars--three,
  .beyond-grid, .beyond-grid--4,
  .extra-grid, .extra-grid--3,
  .site-footer .container { grid-template-columns: 1fr !important; }
  .site-footer .container { display: grid; gap: 1.5rem; }

  /* Bigger tap targets */
  .btn {
    padding: 16px 28px;
    font-size: 16px;
    min-height: 48px;
  }
  .hero-actions { flex-direction: column; align-items: stretch; width: 100%; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  /* Larger body text & headings on phone */
  body { font-size: 17px; line-height: 1.6; }
  .statement p { font-size: 1.05rem; line-height: 1.65; }
  #beyond-heading + p,
  .section-head:has(#beyond-heading) p { font-size: 1.05rem; line-height: 1.65; }
  .section { padding: 3rem 1.25rem; }

  /* Avoid wide tables / pre overflow */
  table, pre { display: block; max-width: 100%; overflow-x: auto; }
}

/* ---------- Floating mobile Inquire button (homepage) ---------- */
.floating-inquire {
  display: none;
}
@media (max-width: 720px) {
  .floating-inquire {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: 1rem;
    bottom: 5.5rem;
    z-index: 60;
    padding: 14px 22px;
    border-radius: 999px;
    background: var(--teal, #08a99f);
    color: #fff;
    font-family: var(--font-display), serif;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 10px 28px rgba(0,0,0,0.28);
  }
  .floating-inquire:hover { filter: brightness(1.05); }
}

/* ---------- Scroll-to-top button (subtle grey, mevaseret-style) ---------- */
.scroll-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(245,245,245,0.85);
  color: #555;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, background .2s ease;
  z-index: 70;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.scroll-to-top svg { width: 22px; height: 22px; }
.scroll-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.scroll-to-top:hover { background: #fff; color: #222; }
