/* Beit Midrash Ha'Olam — bmh.academy
   Palette drawn from R. Moshe Cordovero, Sha'ar HaGevanim
   (Pardes Rimonim, Gate 10) — one of several readings he himself gives,
   not a fixed code. See footer for attribution. */

:root {
  --navy:    #1E2438; /* Malchut — this world, where the learner stands */
  --lgray:   #EDE7DA; /* Keter — the light the journey moves toward */
  --gold:    #B08D3E; /* Tiferet — harmony, where Torah lives */
  --garnet:  #7A2E2E; /* Gevurah — the will to act; reserved for CTAs */
  --mgray:   #D8D2C2;
  --ink:     #211E1A;
  --ink-rgb: 33, 30, 26;
  --white:   #FFFFFF;

  --font-display: "Frank Ruhl Libre", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --wrap: 1080px;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(30, 36, 56, .08);
  --shadow-lg: 0 10px 40px rgba(30, 36, 56, .14);
}

/* ---------- reset ---------- */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-family: var(--font-display); line-height: 1.2; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: .75rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .75rem;
}
.h2--light { color: var(--white); }

.lede {
  max-width: 60ch;
  color: rgba(var(--ink-rgb), .72);
  margin-bottom: 2.5rem;
}
.lede--center { margin-left: auto; margin-right: auto; text-align: center; }

.rule {
  width: 64px;
  height: 2px;
  background: var(--gold);
  margin: 1.75rem auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  padding: .8rem 1.6rem;
  border-radius: var(--radius);
  background: var(--garnet);
  color: var(--white);
  border: 1px solid var(--garnet);
  transition: background .18s ease, transform .18s ease;
}
.btn:hover { background: #632424; transform: translateY(-1px); }

.btn--ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--ghost:hover { background: var(--lgray); }

.btn--gold {
  background: var(--gold);
  border-color: var(--gold);
  color: #2b2007;
}
.btn--gold:hover { background: #9c7b35; }

.btn--sm { padding: .55rem 1.1rem; font-size: .875rem; }

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

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--mgray);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}

.nav__brand { text-decoration: none; line-height: 1.1; }
.nav__he {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--gold);
}
.nav__en {
  display: block;
  font-size: .7rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--navy);
}

.nav__links { display: flex; gap: 26px; }
.nav__links a {
  font-size: .9rem;
  text-decoration: none;
  color: rgba(var(--ink-rgb), .72);
  transition: color .15s ease;
}
.nav__links a:hover { color: var(--navy); }

/* ---------- hero ---------- */

.hero { padding: 88px 0 72px; }

.hero__inner { text-align: center; }

.hero__he {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  color: var(--gold);
  margin: 0 0 .5rem;
  line-height: 1.1;
}

.hero__h1 {
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  font-weight: 700;
  color: var(--navy);
  max-width: 18ch;
  margin: 0 auto;
}

.hero__sub {
  max-width: 58ch;
  margin: 0 auto 2rem;
  font-size: 1.06rem;
  color: rgba(var(--ink-rgb), .78);
}

.hero__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- who ---------- */

.who { padding: 64px 0; background: var(--lgray); }

.who__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 32px;
  margin-top: 1.5rem;
}
.who__list li {
  padding-left: 18px;
  border-left: 2px solid var(--gold);
  color: rgba(var(--ink-rgb), .78);
}
.who__list strong { display: block; color: var(--navy); font-weight: 600; }

/* ---------- pillars ---------- */

.pillars { padding: 84px 0; }

.pillar {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--mgray);
  border-radius: var(--radius);
  background: var(--white);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.pillar:hover { box-shadow: var(--shadow-lg); border-color: var(--gold); }

/* signature: the pillar's own letter, structural not decorative */
.pillar__glyph {
  position: absolute;
  right: -10px;
  bottom: -46px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 11rem;
  line-height: 1;
  color: var(--gold);
  opacity: .12;
  pointer-events: none;
  user-select: none;
}

.pillar__name {
  position: relative;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .5rem;
}
.pillar__name span { color: var(--gold); font-weight: 400; margin-left: .3rem; }

.pillar p {
  position: relative;
  margin: 0;
  font-size: .95rem;
  color: rgba(var(--ink-rgb), .74);
}

/* ---------- tradition explorer ---------- */

.explorer { padding: 84px 0; background: var(--lgray); }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }

.tab {
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 500;
  padding: .6rem 1.1rem;
  border: 1px solid var(--mgray);
  border-radius: 999px;
  background: var(--white);
  color: rgba(var(--ink-rgb), .7);
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.tab:hover { border-color: var(--gold); color: var(--navy); }
.tab[aria-selected="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.panel {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--mgray);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel__q {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1.25rem;
}

.panel__cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

/* every tradition card is identical: same size, same weight, no ranking */
.trad {
  padding: 18px;
  border: 1px solid var(--mgray);
  border-top: 3px solid var(--gold);
  border-radius: 6px;
  background: var(--lgray);
}
.trad__name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .1rem;
}
.trad__he {
  font-family: var(--font-display);
  font-size: .85rem;
  color: var(--gold);
  margin-bottom: .6rem;
}
.trad__a {
  margin: 0;
  font-size: .87rem;
  line-height: 1.55;
  color: rgba(var(--ink-rgb), .78);
}

.panel__note {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--mgray);
  font-size: .9rem;
  font-style: italic;
  color: rgba(var(--ink-rgb), .6);
}

/* ---------- how ---------- */

.how { padding: 84px 0; }

.card {
  padding: 26px;
  border: 1px solid var(--mgray);
  border-radius: var(--radius);
  background: var(--white);
}
.card__h {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .5rem;
}
.card p {
  margin: 0;
  font-size: .95rem;
  color: rgba(var(--ink-rgb), .74);
}

/* ---------- scholarship ---------- */

.schol { padding: 84px 0; background: var(--navy); }

.schol__inner { max-width: 62ch; }

.schol__body { color: rgba(255, 255, 255, .82); }

.schol .btn { margin-top: .75rem; }

/* ---------- close ---------- */

.close { padding: 84px 0 96px; }

.close__inner { text-align: center; }

.close__he {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: .5rem;
}

/* ---------- footer ---------- */

.foot { padding: 36px 0; border-top: 1px solid var(--mgray); background: var(--lgray); }

.foot__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.foot__he {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold);
  margin: 0;
}
.foot__en { margin: 0; font-size: .82rem; color: rgba(var(--ink-rgb), .6); }

.foot__links { display: flex; gap: 20px; flex-wrap: wrap; }
.foot__links a {
  font-size: .85rem;
  text-decoration: none;
  color: rgba(var(--ink-rgb), .68);
}
.foot__links a:hover { color: var(--navy); }

.foot__note {
  margin: 10px 0 0;
  font-size: .74rem;
  line-height: 1.5;
  color: rgba(var(--ink-rgb), .48);
  max-width: 620px;
}

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .panel__cards { grid-template-columns: repeat(2, 1fr); }
  .nav__links { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .grid,
  .who__list,
  .panel__cards { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 48px; }
  .pillars, .explorer, .how, .schol, .close { padding: 56px 0; }
  .pillar__glyph { font-size: 8rem; bottom: -32px; }
  .panel { padding: 20px; }
  .foot__inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
