/* Torah Discovery — design system */

:root {
  /* LITERARY (default) — warm parchment, ink, muted cover accents */
  --paper: #F5EFE3;
  --paper-2: #EDE4D2;
  --paper-3: #E2D6BE;
  --ink: #1A1410;
  --ink-2: #3D2817;
  --ink-muted: rgba(26, 20, 16, 0.62);
  --rule: rgba(26, 20, 16, 0.14);
  --rule-strong: rgba(26, 20, 16, 0.32);
  --terracotta: #C85A2B;
  --teal: #2B7F87;
  --mustard: #D9A842;
  --brown: #6B3F1F;
  --accent: var(--terracotta);
  --accent-2: var(--teal);

  --font-display: 'Fraunces', 'Source Serif 4', Georgia, serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
  --font-hand: 'Caveat', 'Comic Sans MS', cursive;

  --maxw: 1280px;
  --gutter: 48px;
}

/* PLAYFUL — book-cover palette, more color, more illustration bleed */
[data-theme="playful"] {
  --paper: #FAF3E3;
  --paper-2: #F4E7CB;
  --paper-3: #EAD4A6;
  --ink: #1F140C;
  --ink-2: #3D2817;
  --ink-muted: rgba(31, 20, 12, 0.66);
  --rule: rgba(31, 20, 12, 0.14);
  --rule-strong: rgba(31, 20, 12, 0.32);
  --accent: #D96A2C;
  --accent-2: #2B8B94;
}

/* EDITORIAL — austere, mostly bone + ink, one accent */
[data-theme="editorial"] {
  --paper: #F8F6F1;
  --paper-2: #EEEAE0;
  --paper-3: #E1DBCA;
  --ink: #0F0D0A;
  --ink-2: #1F1912;
  --ink-muted: rgba(15, 13, 10, 0.58);
  --rule: rgba(15, 13, 10, 0.10);
  --rule-strong: rgba(15, 13, 10, 0.28);
  --accent: #1A3E56;
  --accent-2: #8A6A2E;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "ss02", "kern";
}

/* subtle paper grain */
.paper-grain {
  position: relative;
}
.paper-grain::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.08  0 0 0 0 0.05  0 0 0 0.12 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  mix-blend-mode: multiply;
}

h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; line-height: 1.05; }
p { margin: 0; }
a { color: inherit; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ─── Top bar ─── */
.topbar {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 96px;
}
.brand {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: var(--ink);
}
.brand-logo {
  height: 72px; width: auto;
}
[data-theme="playful"] .brand-logo,
[data-theme="literary"] .brand-logo { mix-blend-mode: normal; filter: none; }

.brand-meta {
  font-family: var(--font-ui);
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-muted);
  border-left: 1px solid var(--rule-strong);
  padding-left: 14px;
  line-height: 1.35;
}
.brand-meta strong { color: var(--ink); font-weight: 600; letter-spacing: 0.12em; }

.topnav {
  display: flex; gap: 36px; align-items: center;
  font-family: var(--font-ui);
  font-size: 14px; font-weight: 500;
}
.topnav a {
  text-decoration: none; color: var(--ink);
  padding-bottom: 4px; border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}
.topnav a:hover { border-bottom-color: var(--ink); }

.topnav a.nav-cta {
  font-family: var(--font-ui);
  font-size: 13px; font-weight: 600;
  padding: 10px 16px;
  background: var(--ink); color: var(--paper);
  border: 0; border-radius: 0;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.topnav a.nav-cta:hover { border-bottom-color: transparent; }
[data-theme="playful"] .topnav a.nav-cta { background: #1F140C; color: #FAF3E3; }

/* ─── Theme switcher (product chrome) ─── */
.theme-switcher {
  position: fixed; right: 20px; bottom: 20px; z-index: 100;
  display: flex; flex-direction: column; gap: 6px;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: 0;
  padding: 12px;
  font-family: var(--font-ui);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  min-width: 220px;
}
.theme-switcher-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-muted); margin-bottom: 4px;
}
.theme-switcher button {
  all: unset; cursor: pointer;
  font-family: var(--font-ui); font-size: 13px;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
}
.theme-switcher button.active { border-color: var(--ink); background: var(--paper-2); }
.theme-switcher button small { color: var(--ink-muted); font-size: 11px; }
.theme-swatch { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }

/* ─── Hero ─── */
.hero { padding: 72px 0 96px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }

.eyebrow {
  font-family: var(--font-ui);
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 28px;
  display: flex; align-items: center; gap: 14px;
}
.eyebrow::before {
  content: ""; width: 28px; height: 1px; background: var(--accent);
}

.hero-title {
  font-size: clamp(52px, 6vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin-bottom: 28px;
}
.hero-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--ink-2);
}
[data-theme="editorial"] .hero-title { font-weight: 600; }
[data-theme="playful"] .hero-title em { color: var(--accent); font-style: italic; }

.hero-lede {
  font-size: 22px;
  line-height: 1.45;
  color: var(--ink);
  max-width: 44ch;
  margin-bottom: 40px;
  text-wrap: pretty;
}
.hero-meta {
  display: flex; gap: 32px; align-items: center;
  font-family: var(--font-ui);
  font-size: 12px; font-weight: 500;
  color: var(--ink-muted);
  text-transform: uppercase; letter-spacing: 0.12em;
}
.hero-meta span { display: flex; align-items: center; gap: 8px; }
.hero-meta strong { color: var(--ink); font-weight: 600; }

.hero-ctas { display: flex; gap: 16px; margin-bottom: 48px; }
.btn {
  font-family: var(--font-ui);
  font-size: 14px; font-weight: 600;
  padding: 16px 24px;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px;
  letter-spacing: 0.02em;
  transition: transform 0.1s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
[data-theme="playful"] .btn-primary { background: var(--accent); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn svg { transition: transform 0.15s; }
.btn:hover svg { transform: translateX(3px); }

.hero-art {
  position: relative;
}
.hero-art img {
  width: 100%; height: auto; display: block;
}

/* Book cover in hero */
.book-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #0a0a0a;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.08),
    0 12px 28px rgba(0,0,0,0.14),
    0 40px 80px rgba(0,0,0,0.22);
  transform: rotate(-1.5deg);
  transition: transform 0.3s;
}
.book-cover:hover { transform: rotate(0deg) translateY(-4px); }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 6px 0 18px rgba(0,0,0,0.25);
  pointer-events: none;
}

/* ─── Section header ─── */
.section {
  padding: 140px 0 120px;
  border-top: 1px solid var(--rule);
}
.section-head {
  display: grid; grid-template-columns: 1fr 2fr; gap: 48px;
  margin-bottom: 72px;
  align-items: start;
  padding-top: 12px;
}
.section-num {
  font-family: var(--font-ui);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--ink-muted);
}
.section-num::before { content: ""; display: inline-block; width: 24px; height: 1px; background: var(--ink-muted); vertical-align: middle; margin-right: 12px; }
.section-title {
  font-size: clamp(40px, 4.2vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-top: 18px;
  text-wrap: balance;
}
.section-title em { font-style: italic; font-weight: 300; color: var(--ink-2); }
.section-intro {
  font-size: 19px; line-height: 1.55;
  color: var(--ink-muted);
  max-width: 52ch;
  text-wrap: pretty;
}
.section-intro p + p { margin-top: 16px; }

/* ─── Mission ─── */
.mission-pull {
  font-family: var(--font-display);
  font-size: clamp(30px, 3vw, 46px);
  line-height: 1.15;
  font-weight: 400;
  font-style: italic;
  color: var(--ink);
  max-width: 22ch;
  margin: 0 auto;
  text-align: center;
  padding: 40px 0;
  text-wrap: balance;
}
.mission-pull strong { font-style: normal; font-weight: 600; }
.mission-pull-mark {
  display: block;
  font-family: var(--font-display);
  font-size: 120px; line-height: 0.6;
  color: var(--accent); opacity: 0.35;
  font-weight: 700;
}

/* ─── Programs (3-up) ─── */
.programs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.program {
  padding: 40px 32px 48px;
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 16px;
  min-height: 320px;
  position: relative;
}
.program:last-child { border-right: 0; }
.program-num {
  font-family: var(--font-display);
  font-size: 56px; font-weight: 300; font-style: italic;
  color: var(--accent); line-height: 1;
  margin-bottom: 8px;
}
.program-label {
  font-family: var(--font-ui);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--ink-muted); font-weight: 600;
}
.program-title {
  font-size: 28px; line-height: 1.08;
  font-weight: 600;
}
.program-body {
  font-size: 15px; line-height: 1.55;
  color: var(--ink-muted);
  flex: 1;
}
.program-status {
  font-family: var(--font-ui);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em;
  font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  color: var(--accent-2);
}
.program-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); }

.program-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.program-link {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: opacity 0.15s;
  align-self: flex-start;
}
.program-link:hover { opacity: 0.7; }

.tier-link {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  margin-top: 16px;
  transition: opacity 0.15s;
}
.tier-link:hover { opacity: 0.7; }

/* ─── Book feature (Marc's story-page style) ─── */
.book-story {
  padding: 120px 0;
}
.book-story-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
  margin-bottom: 56px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--rule);
}
.book-story-logo {
  width: 520px;
  max-width: 48vw;
}
.book-story-logo img {
  width: 100%;
  height: auto;
  display: block;
}
.book-story-spread {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: start;
  margin-bottom: 64px;
}
.book-story-art {
  position: relative;
}
.book-story-art img {
  width: 100%;
  height: auto;
  display: block;
}
.book-story-text {
  padding-top: 20px;
}
.book-story-alttitle {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--ink-muted);
  font-style: italic;
  margin: 0 0 28px 0;
}
.book-story-poem {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  max-width: none;
}
.book-story-poem p {
  margin: 0 0 22px 0;
}
.book-story-poem .line {
  display: block;
  white-space: nowrap;
  padding-left: 1.5em;
  text-indent: -1.5em;
}
.book-story-poem p:last-child { margin-bottom: 0; }

.book-story-footer {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 64px;
  align-items: start;
  padding-top: 48px;
  border-top: 1px solid var(--rule);
}
.book-details-inline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin: 0;
}
.book-details-inline > div {
  border-left: 1px solid var(--rule);
  padding-left: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.book-details-inline dt {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.book-details-inline dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ink);
  line-height: 1.2;
}
.book-story-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 960px) {
  .book-story-header { grid-template-columns: 1fr; }
  .book-story-logo { width: 100%; max-width: 100%; }
  .book-story-spread { grid-template-columns: 1fr; gap: 40px; }
  .book-story-footer { grid-template-columns: 1fr; gap: 32px; }
  .book-details-inline { grid-template-columns: repeat(2, 1fr); }
  .book-story-ctas { justify-content: flex-start; }
}

/* ─── Legacy book feature (kept for back-compat, unused) ─── */
.book-feature {
  display: grid; grid-template-columns: 1fr 1.1fr;
  gap: 80px; align-items: center;
}
.book-showcase {
  position: relative;
}

/* ─── Book preview (page turn) ─── */
.book-preview {
  position: relative;
  aspect-ratio: 16 / 10;
  perspective: 2000px;
  font-family: var(--font-body);
}
.book-preview-inner {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
}
.book-spread {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: 1fr 1fr;
  background: #FEF9ED;
  box-shadow:
    0 2px 6px rgba(0,0,0,0.08),
    0 20px 50px rgba(0,0,0,0.18),
    inset 0 0 0 1px rgba(0,0,0,0.04);
}
.book-spread::before {
  content: ""; position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 40px; transform: translateX(-50%);
  background: linear-gradient(to right, transparent, rgba(0,0,0,0.18) 45%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.18) 55%, transparent);
  pointer-events: none; z-index: 2;
}
.book-page {
  padding: 48px 56px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative;
  overflow: hidden;
}
.book-page.left { padding-right: 40px; }
.book-page.right { padding-left: 40px; }
.book-page-num {
  position: absolute;
  font-family: var(--font-ui);
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-muted);
  bottom: 20px;
}
.book-page.left .book-page-num { left: 40px; }
.book-page.right .book-page-num { right: 40px; }
.book-poem {
  font-family: var(--font-body);
  font-size: 16px; line-height: 1.65;
  color: var(--ink);
  white-space: pre-line;
  text-wrap: pretty;
}
.book-poem.drop::first-letter {
  font-family: var(--font-display);
  font-size: 64px; line-height: 1; font-weight: 700;
  float: left; padding: 4px 10px 0 0;
  color: var(--accent);
}

.book-illus {
  width: 100%; height: 100%; object-fit: contain;
  padding: 20px;
}
.book-illus-wrap {
  position: relative; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(216,168,66,0.08), transparent 70%);
}

.book-controls {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 24px;
  font-family: var(--font-ui);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-muted);
}
.book-controls button {
  all: unset; cursor: pointer;
  font-family: var(--font-ui); font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink);
  padding: 8px 14px;
  border: 1px solid var(--ink);
  transition: background 0.15s, color 0.15s;
}
.book-controls button:hover { background: var(--ink); color: var(--paper); }
.book-controls button:disabled { opacity: 0.3; cursor: not-allowed; }
.book-controls button:disabled:hover { background: transparent; color: var(--ink); }

.book-dots { display: flex; gap: 6px; }
.book-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--rule-strong); transition: background 0.2s, transform 0.2s; }
.book-dot.active { background: var(--ink); transform: scale(1.3); }

/* Page turning animation */
.page-turning { animation: pageTurn 0.6s ease-in-out; }
@keyframes pageTurn {
  0% { transform: rotateY(0); }
  50% { transform: rotateY(-8deg) scale(0.98); }
  100% { transform: rotateY(0); }
}

/* Book feature side content */
.book-meta {
  display: flex; flex-direction: column; gap: 24px;
}
.book-meta h2 {
  font-size: clamp(36px, 3.6vw, 54px);
  line-height: 1.05;
  font-weight: 700;
}
.book-kicker {
  font-family: var(--font-ui);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--accent);
}
.book-blurb {
  font-size: 18px; line-height: 1.55;
  color: var(--ink); text-wrap: pretty;
}
.book-details {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 20px 36px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-ui);
}
.book-detail { display: flex; flex-direction: column; gap: 4px; }
.book-detail dt {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-muted); font-weight: 600;
}
.book-detail dd {
  margin: 0; font-size: 15px; font-weight: 500; color: var(--ink);
}

/* ─── Architecture (5-tier) ─── */
.architecture {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
  position: relative;
}
.tier {
  padding: 32px 24px;
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 12px;
  min-height: 280px;
  position: relative;
  transition: background 0.2s;
  cursor: default;
}
.tier:last-child { border-right: 0; }
.tier:hover { background: var(--paper-2); }
.tier-num {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400; font-style: italic;
  color: var(--ink-muted);
}
.tier-title {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 700;
  line-height: 1.08;
}
.tier-role {
  font-family: var(--font-ui);
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--accent);
}
.tier-body {
  font-size: 14px; line-height: 1.5;
  color: var(--ink-muted);
  flex: 1;
}
.tier-price {
  font-family: var(--font-ui);
  font-size: 11px; color: var(--ink-muted);
  border-top: 1px solid var(--rule);
  padding-top: 12px;
}
.tier-price strong { color: var(--ink); font-weight: 600; }

.arch-thesis {
  margin-top: 48px;
  padding: 32px 40px;
  border-left: 3px solid var(--accent);
  background: var(--paper-2);
  font-family: var(--font-display);
  font-size: 22px; line-height: 1.45;
  font-style: italic;
  font-weight: 400;
  max-width: 800px;
}
.arch-thesis strong { font-weight: 600; font-style: normal; }

/* ─── Board / team ─── */
.board-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px;
}
.board-card {
  display: flex; flex-direction: column; gap: 16px;
}
.board-photo {
  aspect-ratio: 4/5;
  background: var(--paper-2);
  position: relative; overflow: hidden;
  border: 1px solid var(--rule);
}
.board-photo img { width: 100%; height: 100%; object-fit: cover; }
.board-photo.placeholder {
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(
    45deg,
    var(--paper-2),
    var(--paper-2) 14px,
    var(--paper-3) 14px,
    var(--paper-3) 28px
  );
}
.board-photo.placeholder span {
  font-family: var(--font-ui);
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-muted);
  background: var(--paper); padding: 8px 12px;
}
.board-name {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 700;
  line-height: 1.1;
}
.board-role {
  font-family: var(--font-ui);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent);
}
.board-bio {
  font-size: 15px; line-height: 1.55;
  color: var(--ink-muted); text-wrap: pretty;
}
.board-links {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-top: 4px;
  font-family: var(--font-ui);
  font-size: 12px;
}
.board-links a {
  color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-strong);
  text-underline-offset: 3px;
}
.board-links a:hover { text-decoration-color: var(--ink); }

/* ─── Portfolio strip ─── */
.portfolio-strip {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.portfolio-item {
  background: var(--paper-2);
  aspect-ratio: 3/4;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  position: relative;
}
.portfolio-item span {
  font-family: var(--font-ui);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-muted);
  text-align: center;
}

/* ─── Kickstarter / support ─── */
.support {
  background: var(--ink);
  color: var(--paper);
  padding: 96px 0;
  margin-top: 0;
  position: relative;
  overflow: hidden;
}
[data-theme="playful"] .support { background: var(--accent); color: #FAF3E3; }
[data-theme="literary"] .support { background: var(--ink); }
.support .section-num,
.support .section-intro { color: rgba(245,239,227,0.62); }
.support .section-num::before { background: rgba(245,239,227,0.5); }
.support-grid {
  display: grid; grid-template-columns: 1.1fr 1fr;
  gap: 64px; align-items: start;
}
.tiers { display: flex; flex-direction: column; border-top: 1px solid rgba(245,239,227,0.2); }
.tier-row {
  display: grid; grid-template-columns: 100px 1fr auto;
  gap: 24px; align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid rgba(245,239,227,0.2);
  font-family: var(--font-body);
}
.tier-amt {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 700;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}
.tier-desc {
  font-size: 15px; line-height: 1.45;
  color: rgba(245,239,227,0.82);
}
.tier-tax {
  font-family: var(--font-ui);
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em;
  color: rgba(245,239,227,0.5);
  white-space: nowrap;
}

/* ─── Footer ─── */
.footer {
  padding: 64px 0 48px;
  border-top: 1px solid var(--rule);
  background: var(--paper-2);
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--ink-muted);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer h4 {
  font-family: var(--font-ui);
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink);
  margin-bottom: 16px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer a { text-decoration: none; color: var(--ink-muted); }
.footer a:hover { color: var(--ink); }
.footer-wordmark img { height: 52px; width: auto; mix-blend-mode: multiply; margin-bottom: 16px; }
.footer-meta {
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px;
}

/* ─── Mobile showcase ─── */
.mobile-showcase {
  padding: 120px 0;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  border-top: 1px solid var(--rule);
}
.mobile-grid {
  display: grid; grid-template-columns: 1fr 420px;
  gap: 80px; align-items: center;
}
.mobile-frame-outer {
  display: flex; justify-content: center;
}

/* ─── Utilities ─── */
.hr-ornate {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin: 80px 0;
  font-family: var(--font-display); font-style: italic;
  color: var(--ink-muted); font-size: 14px;
}
.hr-ornate::before, .hr-ornate::after {
  content: ""; flex: 1; height: 1px; background: var(--rule);
  max-width: 200px;
}

.hebrew {
  font-family: 'Frank Ruhl Libre', 'David', serif;
  font-weight: 500;
  direction: rtl;
  unicode-bidi: isolate;
}

/* ─── Hero variants ─── */
/* LITERARY: book cover hero */
[data-theme="literary"] .hero-art .book-cover {
  background: #FAF3E3;
}

/* PLAYFUL: full bleed illustration background */
[data-theme="playful"] .topbar {
  background: #FAF3E3;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid rgba(31,20,12,0.08);
}
[data-theme="playful"] .topbar .brand-meta { color: #1F140C; }
[data-theme="playful"] .topbar .brand-meta strong { color: #1F140C; }
[data-theme="playful"] .topbar .topnav a { color: #1F140C; }
[data-theme="playful"] .topbar .nav-cta {
  background: var(--accent);
  color: #FAF3E3 !important;
  padding: 8px 16px;
  border-radius: 2px;
}
[data-theme="playful"] .topbar .nav-cta:hover { background: #B94E1F; }
[data-theme="playful"] .hero {
  background: var(--accent);
  color: #FAF3E3;
  padding: 80px 0 96px;
  min-height: auto;
  display: flex; align-items: center;
  border-top: none;
}
[data-theme="playful"] .hero .container { width: 100%; }
[data-theme="playful"] .hero-title { color: #FAF3E3; }
[data-theme="playful"] .hero-title em { color: #F4E7CB; }
[data-theme="playful"] .hero-lede { color: rgba(250, 243, 227, 0.88); }
[data-theme="playful"] .hero-meta { color: rgba(250, 243, 227, 0.7); }
[data-theme="playful"] .hero-meta strong { color: #FAF3E3; }
[data-theme="playful"] .eyebrow { color: #F4E7CB; background: transparent !important; }
[data-theme="playful"] .eyebrow::before { background: #F4E7CB; }
[data-theme="playful"] .btn-primary { background: #1F140C; color: #FAF3E3; }
[data-theme="playful"] .btn-ghost { border-color: #FAF3E3; color: #FAF3E3; }
[data-theme="playful"] .topbar-old-override-removed { display: none; }
[data-theme="playful"] .topnav a,
[data-theme="playful"] .brand { color: #FAF3E3; }
[data-theme="playful"] .brand-logo { filter: none; }
[data-theme="playful"] .brand-meta { color: rgba(250,243,227,0.7); border-left-color: rgba(250,243,227,0.3); }
[data-theme="playful"] .brand-meta strong { color: #FAF3E3; }
[data-theme="playful"] .topnav a.nav-cta-pf { background: #1F140C; color: #FAF3E3; }

/* EDITORIAL: centered text, no image hero */
[data-theme="editorial"] .hero { padding: 140px 0 120px; }
[data-theme="editorial"] .hero-grid { grid-template-columns: 1fr; max-width: 900px; margin: 0 auto; text-align: left; gap: 0; }
[data-theme="editorial"] .hero-art { display: none; }
[data-theme="editorial"] .hero-title { font-size: clamp(64px, 7vw, 120px); font-weight: 600; }
[data-theme="editorial"] .hero-lede { max-width: 56ch; }

/* ─── Responsive ─── */
@media (max-width: 960px) {
  .hero-grid, .book-feature, .support-grid, .mobile-grid,
  .footer-grid, .board-grid, .programs, .architecture { grid-template-columns: 1fr; }
  .section-head { grid-template-columns: 1fr; }
  .tier, .program { border-right: 0; border-bottom: 1px solid var(--rule); }
  .topnav { display: none; }
  .section { padding: 64px 0; }
  :root { --gutter: 24px; }
}
