/* ============================================================
   TorahScribe — landing page styles
   Palette: parchment / ink / brass-gold, scholarly serif display
   ============================================================ */

:root {
  --ink:        #15233b;   /* deep navy-ink */
  --ink-2:      #1d3050;
  --ink-soft:   #41506b;
  --parch:      #f7f2e9;   /* parchment background */
  --parch-2:    #fbf8f1;
  --warm:       #f1e8d6;   /* warmer band */
  --gold:       #b5872f;   /* brass / scribe gold */
  --gold-2:     #caa04a;
  --line:       #e4dbc8;
  --text:       #25303f;
  --text-soft:  #54627a;
  --white:      #ffffff;

  --maxw: 1120px;
  --radius: 14px;
  --shadow: 0 18px 50px -28px rgba(21, 35, 59, .45);
  --serif: "Frank Ruhl Libre", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--parch);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; color: var(--ink); line-height: 1.12; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); margin: 0 0 .6em; }
h3 { font-size: 1.2rem; margin: 0 0 .4em; }
p { margin: 0 0 1em; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: var(--ink); font-weight: 600; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 600; font-size: .98rem;
  padding: 13px 24px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--gold); color: #fff; box-shadow: 0 10px 24px -12px rgba(181,135,47,.8); }
.btn-primary:hover { background: #a2772a; }
.btn-ghost { background: transparent; color: var(--ink); border-color: rgba(21,35,59,.22); }
.btn-ghost:hover { border-color: var(--ink); background: rgba(21,35,59,.04); }
.btn-small { padding: 9px 17px; font-size: .9rem; background: var(--ink); color: #fff; }
.btn-small:hover { background: var(--ink-2); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,242,233,.86);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); }
.wordmark:hover { text-decoration: none; }
.wordmark-mark { color: var(--gold); display: inline-flex; }
.wordmark-text { font-family: var(--serif); font-weight: 900; font-size: 1.3rem; letter-spacing: -.01em; }

.header-right { display: flex; align-items: center; gap: 24px; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { color: var(--text-soft); font-weight: 500; font-size: .95rem; }
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.site-nav a.btn { color: #fff; }

/* בס״ד — sits in the sticky header, far right corner */
.bsd {
  font-family: var(--serif); font-weight: 500; color: var(--gold);
  font-size: 1rem; letter-spacing: .02em; line-height: 1;
  padding-left: 22px; border-left: 1px solid var(--line);
  white-space: nowrap; user-select: none; order: 3;
}

/* Hamburger (mobile only) */
.nav-toggle {
  display: none; width: 44px; height: 40px; padding: 0; order: 2;
  border: 1px solid rgba(21,35,59,.18); border-radius: 10px;
  background: transparent; cursor: pointer;
  align-items: center; justify-content: center; flex-direction: column; gap: 4px;
}
.nav-toggle span { display: block; width: 19px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .22s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }
  .header-right { gap: 16px; }
  .bsd { order: 1; padding-left: 0; border-left: 0; font-size: .95rem; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--parch-2); border-bottom: 1px solid var(--line);
    box-shadow: 0 22px 40px -24px rgba(21,35,59,.55);
    padding: 6px 24px 16px;
    max-height: 0; overflow: hidden; opacity: 0; pointer-events: none;
    transition: max-height .28s ease, opacity .2s ease, padding .28s ease;
  }
  .site-nav.open { max-height: 420px; opacity: 1; pointer-events: auto; }
  .site-nav a { padding: 14px 4px; font-size: 1.02rem; border-bottom: 1px solid var(--line); }
  .site-nav a.btn { margin-top: 14px; justify-content: center; padding: 14px; border-bottom: 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 480px at 78% -8%, rgba(202,160,74,.20), transparent 60%),
    radial-gradient(900px 520px at 12% 8%, rgba(29,48,80,.08), transparent 60%),
    var(--parch);
  padding: clamp(56px, 9vw, 110px) 0 clamp(48px, 7vw, 86px);
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: 880px; }
.hero-text { min-width: 0; }
.hero-accent { display: none; }
@media (min-width: 1080px) {
  .hero-inner { max-width: var(--maxw); display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 52px; align-items: center; }
  .hero-text { max-width: 760px; }
  .hero-accent { display: block; }
  .hero-accent svg { width: 100%; height: auto; display: block; }
}
.eyebrow {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: .14em;
  font-size: .78rem; font-weight: 600; color: var(--gold);
  margin: 0 0 18px;
}
.hero h1 { font-size: clamp(2.3rem, 6vw, 4.1rem); font-weight: 900; margin: 0 0 .35em; }
.lede { font-size: clamp(1.08rem, 2vw, 1.32rem); color: var(--text-soft); max-width: 720px; margin-bottom: 1.8em; }
.lede strong { color: var(--ink); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.hero-note { font-size: .92rem; color: var(--text-soft); margin: 0; }

/* ---------- Stats ---------- */
.stats { background: var(--ink); color: #eaf0fb; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  padding: 40px 24px;
}
.stat { padding: 10px 16px; border-left: 2px solid rgba(202,160,74,.5); }
.stat-num { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.9rem; color: var(--gold-2); line-height: 1.1; }
.stat-label { display: block; font-size: .92rem; color: #c2cde0; margin-top: 4px; }
@media (max-width: 800px) { .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 18px 8px; } }
@media (max-width: 440px) { .stats-grid { grid-template-columns: 1fr; } }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-warm { background: var(--warm); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-ink { background: var(--ink); color: #dce4f1; }
.section-ink h2 { color: #fff; }
.kicker {
  text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700;
  color: var(--gold); margin: 0 0 14px;
}
.kicker-light { color: var(--gold-2); }
.prose { font-size: 1.08rem; color: var(--text-soft); }
.narrow .prose { max-width: 680px; }
.prose-light { color: #c3cde0; }
.prose-light strong { color: #fff; }

/* ---------- Why-now grid ---------- */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 34px; }
.why-item { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.10); border-radius: var(--radius); padding: 22px 22px; }
.why-item h3 { color: var(--gold-2); }
.why-item p { color: #c3cde0; margin: 0; font-size: .98rem; }
@media (max-width: 760px) { .why-grid { grid-template-columns: 1fr; } }

/* ---------- Pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 36px; }
.pillar {
  background: var(--parch-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .2s ease;
}
.pillar:hover { transform: translateY(-3px); box-shadow: 0 24px 56px -30px rgba(21,35,59,.5); }
.pillar-ic {
  width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(181,135,47,.12); color: var(--gold); font-size: 1.3rem; margin-bottom: 16px;
  font-family: var(--serif); font-weight: 700;
}
.pillar p { color: var(--text-soft); margin: 0; font-size: .96rem; }
@media (max-width: 900px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .pillars { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.card {
  background: var(--parch-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; transition: transform .18s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--gold); }
.card h3 { color: var(--ink); }
.card p { color: var(--text-soft); margin: 0; font-size: .96rem; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

/* ---------- Checklist ---------- */
.how-diagram { margin: 8px auto 30px; text-align: center; }
.how-diagram svg { width: 100%; max-width: 720px; height: auto; }

.checklist { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 14px; }
.checklist li {
  position: relative; padding: 16px 18px 16px 52px; background: var(--parch-2);
  border: 1px solid var(--line); border-radius: 12px; color: var(--text-soft); font-size: 1.02rem;
}
.checklist li::before {
  content: "✓"; position: absolute; left: 16px; top: 15px; width: 24px; height: 24px;
  background: rgba(181,135,47,.14); color: var(--gold); border-radius: 50%;
  display: grid; place-items: center; font-size: .8rem; font-weight: 700;
}

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 4px; }
.timeline li { display: flex; gap: 22px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.phase {
  flex: 0 0 92px; font-family: var(--serif); font-weight: 700; color: var(--gold);
  font-size: 1rem; padding-top: 2px;
}
.timeline h3 { margin-bottom: .25em; }
.timeline p { color: var(--text-soft); margin: 0; }
@media (max-width: 560px) { .timeline li { flex-direction: column; gap: 6px; } .phase { flex-basis: auto; } }

/* ---------- Support / ask ---------- */
.ask-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 34px 0 30px; }
.ask { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 22px; }
.ask h3 { color: var(--gold-2); }
.ask p { color: #c3cde0; margin: 0; font-size: .96rem; }
@media (max-width: 760px) { .ask-grid { grid-template-columns: 1fr; } }
.support-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.support-note { color: #aebbd2; font-size: .95rem; }
.support-note a { color: var(--gold-2); }

/* ---------- Footer ---------- */
.site-footer { background: #0f1a2c; color: #aebbd2; padding: 46px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-brand .wordmark-text { color: #fff; font-size: 1.25rem; }
.footer-brand p { margin: 6px 0 0; color: #8b9ab5; font-size: .95rem; max-width: 280px; }
.footer-meta { max-width: 460px; }
.footer-meta p { font-size: .9rem; margin: 0 0 6px; }
.footer-meta .muted { color: #6f7e99; }

/* ---------- Reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }
