/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #0a0a0a;
  --color-bg-warm: #111111;
  --color-surface: #1a1a1a;
  --color-surface-hover: #222222;
  --color-text: #e8e0d4;
  --color-text-muted: #a09888;
  --color-accent: #c4a265;
  --color-accent-dim: #a08850;
  --color-border: #2a2520;
  --color-red: #7a2e2e;
  --font-hebrew: 'Frank Ruhl Libre', 'David Libre', serif;
  --font-french: 'Cormorant Garamond', serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
  font-size: 16px;
}

body {
  font-family: var(--font-hebrew);
  background: var(--color-bg);
  color: var(--color-text);
  padding-top: 0;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* === Reading Progress Bar === */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--color-accent);
  z-index: 101;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* === Navigation === */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.93);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(196, 162, 101, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

/* --- Row 1: Title + Section Links --- */
.nav-title {
  font-family: var(--font-french);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 1.2rem;
  padding: 1rem 0;
  line-height: 1;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  flex: 1;
  justify-content: center;
}

.nav-links li {
  display: flex;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-french);
  font-size: 0.82rem;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 0.75rem 0.7rem;
  border-radius: 2px;
  transition: color 0.3s ease, background 0.3s ease;
  letter-spacing: 0.05em;
  white-space: nowrap;
  font-weight: 500;
  line-height: 1;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0.4rem;
  left: 0.7rem;
  right: 0.7rem;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav-links a:hover {
  color: var(--color-text);
  background: rgba(196, 162, 101, 0.05);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-links a.active {
  color: var(--color-accent);
  background: rgba(196, 162, 101, 0.08);
}

.nav-links a.active::after {
  transform: scaleX(1);
  opacity: 0.6;
}

/* --- Row 2: Language Bar --- */
.nav-lang {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-basis: 100%;
  justify-content: center;
  padding: 0.4rem 0 0.5rem;
  margin: 0;
  border-top: 1px solid rgba(196, 162, 101, 0.06);
  background: rgba(255, 255, 255, 0.012);
}

.lang-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--color-text-muted);
  font-family: var(--font-french);
  font-size: 0.7rem;
  cursor: pointer;
  padding: 0.12rem 0.5rem;
  border-radius: 3px;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.7;
}

.lang-btn:hover {
  color: var(--color-text);
  opacity: 1;
}

.lang-btn.active {
  color: var(--color-accent);
  background: rgba(196, 162, 101, 0.08);
  border-color: rgba(196, 162, 101, 0.15);
  opacity: 1;
}

.lang-sep {
  color: rgba(196, 162, 101, 0.15);
  font-size: 0.65rem;
  user-select: none;
  line-height: 1;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
  z-index: 110;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text-muted);
  border-radius: 1px;
  transition: all 0.3s ease;
}

.nav-hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 3rem;
  text-align: center;
  letter-spacing: 0.06em;
  line-height: 1.25;
  font-family: var(--font-french);
}

/* Section heading underline accent */
h2::after {
  content: '';
  display: block;
  width: 64px;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--color-accent-dim), transparent);
  margin: 1rem auto 0;
  opacity: 0.7;
  border-radius: 1px;
}

/* === Section Dividers === */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 0;
  background: transparent;
}

.divider-line {
  display: block;
  width: min(420px, 60%);
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-accent-dim), transparent);
  position: relative;
  opacity: 0.5;
}

.divider-line::before {
  content: '\25C6';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--color-accent-dim);
  font-size: 0.45rem;
  background: var(--color-bg);
  padding: 0 1.4rem;
  line-height: 1;
  opacity: 0.7;
}

/* Dividers between warm sections need warm bg behind diamond */
.about + .section-divider .divider-line::before,
.read + .section-divider .divider-line::before,
.quotes-section + .section-divider .divider-line::before {
  background: var(--color-bg-warm);
}

/* === Smooth Section Color Transitions === */
/* Sections transitioning from warm (bg-warm) to dark (bg) */
.video-section::before,
.journey-map::before,
.gallery::before,
.endorsements::before,
.family-tree-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, var(--color-bg-warm), transparent);
  pointer-events: none;
  z-index: 1;
}

/* Sections transitioning from dark (bg) to warm (bg-warm) */
.about::before,
.timeline::before,
.read::before,
.rabbi-section::before,
.quotes-section::before,
.guestbook-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, var(--color-bg), transparent);
  pointer-events: none;
  z-index: 1;
}

/* Ensure sections with gradients have relative positioning */
.about,
.biography,
.video-section,
.timeline,
.journey-map,
.read,
.gallery,
.endorsements,
.rabbi-section,
.family-tree-section,
.quotes-section,
.guestbook-section,
.testimonials-section,
.donations-section {
  position: relative;
}

/* === Hero === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: clamp(120px, 18vh, 200px);
  background:
    radial-gradient(ellipse at 50% 45%, rgba(196, 162, 101, 0.07) 0%, transparent 45%),
    radial-gradient(ellipse at 30% 50%, rgba(196, 162, 101, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 60%, rgba(138, 114, 69, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, transparent 50%, rgba(0, 0, 0, 0.4) 100%),
    linear-gradient(180deg, #0a0a0a 0%, #0f0d0a 50%, #0a0a0a 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('assets/hero-bg.webp') center/cover no-repeat;
  opacity: 0.04;
  filter: grayscale(100%) blur(2px);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, transparent 0%, var(--color-bg) 70%);
}

.hero-content {
  position: relative;
  z-index: 1;
}

/* === Hero Typewriter Stagger === */
.hero-content .hero-portrait,
.hero-content .hero-subtitle,
.hero-content .hero-title,
.hero-content .hero-book-title,
.hero-content .hero-translation,
.hero-content .hero-matricule,
.hero-content .hero-cta {
  opacity: 0;
  transform: translateY(20px);
}

.hero-content .hero-portrait {
  animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

.hero-content .hero-subtitle {
  animation: fadeInUp 0.6s ease-out 0.5s forwards;
}

/* Title waits for typewriter — made visible by JS */
.hero-content .hero-title {
  opacity: 0;
  transform: none;
}

.hero-title.typewriter-ready {
  opacity: 1;
}

.hero-title.typewriter-active::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 0.85em;
  background: var(--color-accent);
  margin-left: 4px;
  vertical-align: baseline;
  animation: cursorBlink 0.6s step-end infinite;
}

.hero-title.typewriter-done::after {
  display: none;
}

/* Elements after the title fade in after typing completes */
.hero-content .hero-book-title.hero-stagger-in,
.hero-content .hero-translation.hero-stagger-in,
.hero-content .hero-matricule.hero-stagger-in,
.hero-content .hero-cta.hero-stagger-in {
  animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-portrait {
  margin-bottom: 2.8rem;
}

/* Premium portrait ring treatment */
.hero-portrait img {
  width: 280px;
  height: 280px;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 50%;
  border: 1px solid rgba(196, 162, 101, 0.25);
  outline: 1px solid rgba(196, 162, 101, 0.08);
  outline-offset: 6px;
  box-shadow:
    0 0 0 8px rgba(196, 162, 101, 0.04),
    0 0 60px rgba(196, 162, 101, 0.14),
    0 0 120px rgba(196, 162, 101, 0.07),
    0 12px 40px rgba(0,0,0,0.6);
  filter: grayscale(15%);
  transition: filter 0.7s ease, box-shadow 0.7s ease, border-color 0.7s ease, outline-color 0.7s ease;
}

.hero-portrait img:hover {
  filter: grayscale(0%);
  border-color: rgba(196, 162, 101, 0.55);
  outline-color: rgba(196, 162, 101, 0.15);
  box-shadow:
    0 0 0 8px rgba(196, 162, 101, 0.06),
    0 0 80px rgba(196, 162, 101, 0.22),
    0 0 140px rgba(196, 162, 101, 0.1),
    0 12px 40px rgba(0,0,0,0.6);
}

.hero-subtitle {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
  font-family: var(--font-french);
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.1;
  margin-bottom: 1.8rem;
  letter-spacing: 0.02em;
}

.hero-book-title {
  font-family: var(--font-french);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-style: italic;
  font-weight: 400;
  color: var(--color-accent);
  direction: ltr;
  margin-bottom: 0.4rem;
}

.hero-translation {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin-bottom: 1.8rem;
  letter-spacing: 0.03em;
}

.hero-matricule {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  color: var(--color-accent-dim);
  margin-bottom: 3.5rem;
  direction: ltr;
  opacity: 0.8;
}

.hero-cta {
  display: inline-block;
  padding: 1.1rem 3.6rem;
  border: 1px solid rgba(196, 162, 101, 0.45);
  border-radius: 2px;
  color: var(--color-accent);
  text-decoration: none;
  font-family: var(--font-french);
  font-size: 0.88rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background 0.45s ease, color 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
  position: relative;
}

.hero-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s ease;
  z-index: -1;
}

.hero-cta:hover {
  color: var(--color-bg);
  border-color: var(--color-accent);
  box-shadow: 0 6px 28px rgba(196, 162, 101, 0.22);
}

.hero-cta:hover::before {
  transform: scaleX(1);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.scroll-indicator span {
  display: block;
  width: 1px;
  height: 40px;
  background: var(--color-accent-dim);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* === About === */
/* === AIO Summary Snippet (visible factual paragraph for AI extraction) === */
.bio-summary-snippet {
  max-width: 780px;
  margin: 0 auto 3rem;
  padding: 1.8rem 2rem;
  background: rgba(196, 162, 101, 0.04);
  border: 1px solid rgba(196, 162, 101, 0.15);
  border-radius: 8px;
  position: relative;
}

.bio-summary-snippet p {
  font-family: var(--font-french);
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--color-text-muted);
  margin: 0;
}

.bio-summary-snippet strong {
  color: var(--color-text);
  font-weight: 600;
}

.bio-summary-snippet em {
  font-style: italic;
  color: var(--color-accent);
}

.bio-summary-snippet a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(196, 162, 101, 0.3);
  transition: border-color 0.3s;
}

.bio-summary-snippet a:hover {
  border-bottom-color: var(--color-accent);
}

.bio-summary-snippet time {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
  .bio-summary-snippet {
    margin: 0 1rem 2rem;
    padding: 1.4rem 1.2rem;
  }

  .bio-summary-snippet p {
    font-size: 0.95rem;
    line-height: 1.75;
  }
}

.about {
  padding: 7rem 0 6rem;
  background: var(--color-bg-warm);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 5rem;
  align-items: start;
}

.about-text p {
  margin-bottom: 1.4rem;
  font-size: 1.05rem;
  color: var(--color-text);
  line-height: 1.85;
}

.about-text p:first-of-type {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--color-accent);
  border-inline-start: 2px solid var(--color-accent);
  padding-inline-start: 1.6rem;
  margin-bottom: 2rem;
  line-height: 1.9;
  opacity: 0.9;
}

.about-text em {
  font-family: var(--font-french);
  font-style: italic;
  color: var(--color-accent);
}

.about-visual {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.page-preview {
  border: 1px solid rgba(196, 162, 101, 0.15);
  overflow: hidden;
  transition: transform 0.45s ease, box-shadow 0.45s ease, border-color 0.45s ease;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.2);
  border-radius: 2px;
}

.page-preview:hover {
  transform: scale(1.025) translateY(-2px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 20px rgba(196, 162, 101, 0.08);
  border-color: rgba(196, 162, 101, 0.3);
}

.page-preview img {
  width: 100%;
  display: block;
  filter: sepia(8%);
  transition: filter 0.45s ease;
}

.page-preview:hover img {
  filter: sepia(0%);
}

/* === Biography === */
.biography {
  padding: 7rem 0 6rem;
  background: var(--color-bg-warm);
  position: relative;
}

.bio-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  font-family: var(--font-french);
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: 3.5rem;
  letter-spacing: 0.02em;
  line-height: 1.6;
}

.bio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  max-width: 960px;
  margin: 0 auto 3rem;
}

.bio-chapter {
  background: rgba(196,162,101,0.03);
  border: 1px solid rgba(196,162,101,0.1);
  border-top: 2px solid rgba(196,162,101,0.18);
  border-radius: 4px;
  padding: 2.2rem 2rem;
  transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}

.bio-chapter:hover {
  border-color: rgba(196,162,101,0.28);
  border-top-color: rgba(196,162,101,0.5);
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.25), 0 0 0 1px rgba(196,162,101,0.06);
}

.bio-icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.bio-chapter h3 {
  font-family: var(--font-french);
  font-size: 1.2rem;
  color: var(--color-accent);
  margin-bottom: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.bio-chapter p {
  font-family: var(--font-french);
  font-size: 0.98rem;
  line-height: 1.8;
  color: var(--color-text);
}

.bio-dates {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-family: var(--font-french);
  color: var(--color-text-muted);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}

.bio-line {
  flex: 0 0 80px;
  height: 1px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-dim));
  opacity: 0.4;
}

@media (max-width: 768px) {
  .bio-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .bio-dates {
    flex-direction: column;
    gap: 0.5rem;
  }
  .bio-line {
    width: 60px;
    flex: none;
  }
}

/* === Video === */

@keyframes videoGlowPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

@keyframes playBtnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196, 162, 101, 0.4); }
  50% { box-shadow: 0 0 0 18px rgba(196, 162, 101, 0); }
}

.video-section {
  padding: 6rem 0 5rem;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(196, 162, 101, 0.03) 0%, transparent 70%),
    var(--color-bg);
  text-align: center;
  position: relative;
}

.video-subtitle {
  font-family: var(--font-french);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--color-text-muted);
  margin-bottom: 3rem;
  letter-spacing: 0.04em;
}

/* --- Main video: cinematic theater screen --- */
.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding-bottom: 56.25%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(196, 162, 101, 0.12);
  box-shadow:
    0 0 0 1px rgba(196, 162, 101, 0.06),
    0 4px 16px rgba(0, 0, 0, 0.3),
    0 16px 48px rgba(0, 0, 0, 0.4),
    0 32px 80px rgba(0, 0, 0, 0.35),
    0 0 100px -20px rgba(196, 162, 101, 0.08);
  transition: box-shadow 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.video-wrapper:hover {
  border-color: rgba(196, 162, 101, 0.22);
  box-shadow:
    0 0 0 1px rgba(196, 162, 101, 0.1),
    0 4px 16px rgba(0, 0, 0, 0.3),
    0 20px 60px rgba(0, 0, 0, 0.45),
    0 40px 100px rgba(0, 0, 0, 0.4),
    0 0 120px -10px rgba(196, 162, 101, 0.12);
}

/* Cinematic gold glow frame */
.video-wrapper::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(196, 162, 101, 0.15) 0%,
    transparent 40%,
    transparent 60%,
    rgba(196, 162, 101, 0.08) 100%
  );
  z-index: -1;
  pointer-events: none;
  animation: videoGlowPulse 6s ease-in-out infinite;
}

/* Inner vignette for theater depth */
.video-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  z-index: 2;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* --- YouTube facade & play button --- */
.youtube-facade {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.youtube-facade img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.youtube-facade:hover img {
  transform: scale(1.03);
  filter: brightness(1.08);
}

/* Gradient overlay on facade for depth */
.youtube-facade::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.4) 100%),
    linear-gradient(to top, rgba(0, 0, 0, 0.3) 0%, transparent 40%);
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.6s ease;
}

.youtube-facade:hover::after {
  opacity: 0.7;
}

.youtube-play {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.9;
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.4s ease,
              border-color 0.4s ease,
              box-shadow 0.4s ease;
}

.youtube-facade:hover .youtube-play {
  opacity: 1;
  transform: scale(1.12);
  background: rgba(196, 162, 101, 0.18);
  border-color: rgba(196, 162, 101, 0.35);
  animation: playBtnPulse 2s ease-in-out infinite;
}

/* --- "More Testimonies" heading --- */
.video-more-heading {
  font-family: var(--font-french);
  font-size: 1.35rem;
  color: var(--color-accent);
  text-align: center;
  margin: 4rem 0 2rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
}

.video-more-heading::before,
.video-more-heading::after {
  content: '';
  height: 1px;
  width: 60px;
  background: linear-gradient(90deg, transparent, var(--color-accent-dim), transparent);
  flex-shrink: 0;
}

/* --- Video grid --- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.8rem;
  max-width: 940px;
  margin: 0 auto;
}

.video-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(196, 162, 101, 0.08);
  border-radius: 12px;
  padding: 6px;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.5s ease;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.2),
    0 8px 32px rgba(0, 0, 0, 0.15);
}

.video-card:hover {
  transform: translateY(-6px);
  background: rgba(196, 162, 101, 0.03);
  border-color: rgba(196, 162, 101, 0.2);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.3),
    0 16px 48px rgba(0, 0, 0, 0.25),
    0 0 40px -8px rgba(196, 162, 101, 0.1);
}

.video-card .youtube-facade {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16/9;
  position: relative;
  cursor: pointer;
}

.video-card .youtube-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.7s ease;
}

.video-card:hover .youtube-facade img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.video-card .youtube-play {
  width: 56px;
  height: 56px;
}

.video-card-title {
  font-family: var(--font-french);
  font-size: 1rem;
  color: var(--color-text);
  margin: 0.75rem 0.4rem 0.2rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}

.video-card:hover .video-card-title {
  color: var(--color-accent);
}

.video-card-note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 0 0.4rem;
  letter-spacing: 0.01em;
}

/* --- Hebrew self-hosted video: cinematic card --- */
.hebrew-video-card {
  max-width: 860px;
  margin: 2.5rem auto 0;
  background:
    linear-gradient(135deg, rgba(196, 162, 101, 0.05) 0%, rgba(196, 162, 101, 0.01) 100%);
  border: 1px solid rgba(196, 162, 101, 0.12);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.25),
    0 16px 48px rgba(0, 0, 0, 0.2),
    0 0 80px -20px rgba(196, 162, 101, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.5s ease;
}

.hebrew-video-card:hover {
  border-color: rgba(196, 162, 101, 0.22);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.3),
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 100px -10px rgba(196, 162, 101, 0.1);
}

.hebrew-video-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  font-family: var(--font-french);
  font-size: 1.05rem;
  color: var(--color-text);
  font-weight: 500;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(196, 162, 101, 0.06);
}

.hebrew-video-badge {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dim) 100%);
  color: var(--color-bg);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hebrew-video-player {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  position: relative;
}

.hebrew-video-player video {
  width: 100%;
  height: 100%;
  display: block;
}

.hebrew-video-note {
  padding: 12px 20px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0;
  letter-spacing: 0.01em;
  border-top: 1px solid rgba(196, 162, 101, 0.04);
}

/* --- Video section responsive --- */
@media (max-width: 768px) {
  .video-section {
    padding: 4rem 0 3.5rem;
  }

  .video-wrapper {
    max-width: 100%;
    border-radius: 6px;
  }

  .video-wrapper::before {
    border-radius: 8px;
  }

  .video-wrapper::after {
    border-radius: 6px;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.3);
  }

  .video-grid {
    gap: 1.2rem;
  }

  .video-more-heading {
    margin: 3rem 0 1.5rem;
    font-size: 1.15rem;
  }

  .video-more-heading::before,
  .video-more-heading::after {
    width: 40px;
  }

  .youtube-play {
    width: 60px;
    height: 60px;
  }

  .video-card .youtube-play {
    width: 48px;
    height: 48px;
  }

  .hebrew-video-card {
    border-radius: 8px;
    margin: 2rem auto 0;
  }
}

@media (max-width: 600px) {
  .video-section {
    padding: 3rem 0 2.5rem;
  }

  .video-subtitle {
    font-size: 1.05rem;
    margin-bottom: 2rem;
  }

  .video-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    max-width: 480px;
  }

  .video-card {
    padding: 5px;
    border-radius: 10px;
  }

  .video-wrapper {
    border-radius: 4px;
    box-shadow:
      0 4px 16px rgba(0, 0, 0, 0.3),
      0 16px 40px rgba(0, 0, 0, 0.25);
  }

  .video-wrapper::before {
    border-radius: 6px;
  }

  .video-wrapper::after {
    border-radius: 4px;
  }

  .youtube-play {
    width: 52px;
    height: 52px;
  }

  .video-card .youtube-play {
    width: 44px;
    height: 44px;
  }

  .hebrew-video-card {
    border-radius: 6px;
  }
}

/* === Historical Context === */
.context {
  padding: 7rem 0 6rem;
  background: var(--color-bg);
  position: relative;
}

.context::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(196, 162, 101, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(122, 46, 46, 0.02) 0%, transparent 50%);
  pointer-events: none;
}

.context-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.context-card {
  background: rgba(255,255,255,0.018);
  border: 1px solid var(--color-border);
  border-bottom: 2px solid rgba(196,162,101,0.1);
  border-radius: 3px;
  padding: 2.8rem 2rem 2.5rem;
  text-align: center;
  transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}

.context-card:hover {
  border-color: rgba(196,162,101,0.25);
  border-bottom-color: rgba(196,162,101,0.4);
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(0,0,0,0.25);
}

.context-number {
  font-family: var(--font-french);
  font-weight: 300;
  letter-spacing: 0.02em;
  font-size: 2.6rem;
  color: var(--color-accent);
  margin-bottom: 1.1rem;
  line-height: 1.1;
}

.context-text {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.75;
  font-family: var(--font-french);
}

.context-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.context-links a {
  font-family: var(--font-french);
  font-size: 0.85rem;
  color: var(--color-accent-dim);
  text-decoration: none;
  padding: 0.55rem 1.1rem;
  border: 1px solid rgba(196, 162, 101, 0.12);
  border-radius: 3px;
  transition: color 0.35s ease, border-color 0.35s ease, background 0.35s ease;
  letter-spacing: 0.02em;
}

.context-links a:hover {
  color: var(--color-accent);
  border-color: rgba(196, 162, 101, 0.4);
  background: rgba(196, 162, 101, 0.04);
}

/* === Timeline === */
.timeline {
  padding: 7rem 0 6rem;
  background: var(--color-bg-warm);
}

.timeline-track {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding-inline-start: 3rem;
}

.timeline-track::before {
  content: '';
  position: absolute;
  inset-inline-start: 1.5rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--color-accent-dim) 10%,
    var(--color-accent-dim) 90%,
    transparent
  );
}

.timeline-item {
  position: relative;
  padding: 0 0 3rem 0;
  padding-inline-end: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  inset-inline-start: calc(-1.5rem - 5px);
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 14px rgba(196, 162, 101, 0.4), 0 0 4px rgba(196, 162, 101, 0.6);
}

.timeline-item::after {
  content: '';
  position: absolute;
  inset-inline-start: calc(-1.5rem - 8px);
  top: 0.15rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(196, 162, 101, 0.18);
}

.timeline-item:nth-child(n+5):nth-child(-n+7)::before {
  background: #7a2e2e;
  box-shadow: 0 0 14px rgba(122, 46, 46, 0.5);
}

.timeline-date {
  font-family: var(--font-french);
  font-size: 0.78rem;
  color: var(--color-accent);
  margin-bottom: 0.4rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.9;
}

.timeline-content h3 {
  font-family: var(--font-french);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.timeline-content p {
  font-family: var(--font-french);
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}

/* === Journey Map === */
.journey-map {
  padding: 7rem 0 6rem;
  background: var(--color-bg);
  position: relative;
}

.map-intro {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: 3rem;
}

.map-wrapper {
  max-width: 960px;
  margin: 0 auto;
  border: 1px solid rgba(196, 162, 101, 0.1);
  border-radius: 4px;
  background: rgba(0,0,0,0.28);
  padding: 1.5rem;
  box-shadow: 0 8px 40px rgba(0,0,0,0.45), inset 0 0 60px rgba(0,0,0,0.15);
}

.journey-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* === Read === */
.read {
  padding: 7rem 0 6rem;
  background: var(--color-bg-warm);
}

.read-intro {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

.book-editions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 2rem auto 2.5rem;
  padding: 1rem 0 2rem;
  justify-content: center;
}

.book-edition-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 170px;
}

.book-edition {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--color-text);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.flipbook-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 0.5rem;
  padding: 4px 12px;
  font-size: 0.72rem;
  color: var(--color-accent-dim);
  text-decoration: none;
  border: 1px solid rgba(196, 162, 101, 0.15);
  border-radius: 12px;
  transition: all 0.2s;
  letter-spacing: 0.03em;
}
.flipbook-btn svg {
  width: 14px;
  height: 14px;
}
.flipbook-btn:hover {
  color: var(--color-accent);
  border-color: rgba(196, 162, 101, 0.4);
  background: rgba(196, 162, 101, 0.08);
}

.book-edition:hover {
  transform: translateY(-5px);
}

.book-cover {
  position: relative;
  width: 150px;
  height: 212px;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow:
    2px 2px 6px rgba(0,0,0,0.35),
    6px 6px 18px rgba(0,0,0,0.4),
    14px 14px 38px rgba(0,0,0,0.28),
    -1px 0 3px rgba(0,0,0,0.18);
  transition: box-shadow 0.45s ease, transform 0.45s ease;
}

.book-edition:hover .book-cover {
  box-shadow:
    2px 2px 8px rgba(0,0,0,0.3),
    6px 6px 20px rgba(0,0,0,0.35),
    14px 14px 40px rgba(0,0,0,0.22),
    0 0 24px rgba(196,162,101,0.22),
    0 0 50px rgba(196,162,101,0.1);
}

/* "Read" overlay badge on hover */
.book-cover::after {
  content: "Read";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10,10,10,0.55);
  color: var(--color-accent);
  font-family: var(--font-french);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: 4px;
}

.book-edition:hover .book-cover::after {
  opacity: 1;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-cover-text {
  background: linear-gradient(160deg, #1a1510 0%, #0f0d0a 100%);
  border: 1px solid rgba(196, 162, 101, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 14px;
}

.cover-text-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-accent);
  text-align: center;
  line-height: 1.5;
}

.cover-text-author {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
}

.book-edition-title {
  font-family: var(--font-french);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
  line-height: 1.35;
  margin-bottom: 0.15rem;
}

.book-edition-subtitle {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.3;
  margin-bottom: 0.2rem;
  font-style: italic;
}

.book-edition-label {
  font-size: 0.78rem;
  color: var(--color-accent-dim);
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@media (max-width: 600px) {
  .book-editions {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    gap: 1.25rem;
    padding: 0.5rem 1rem 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent-dim) transparent;
  }
  .book-editions::-webkit-scrollbar { height: 5px; }
  .book-editions::-webkit-scrollbar-track { background: transparent; }
  .book-editions::-webkit-scrollbar-thumb { background: var(--color-accent-dim); border-radius: 3px; }
  .book-edition-wrap { width: 145px; flex-shrink: 0; scroll-snap-align: center; }
  .book-cover { width: 130px; height: 182px; }
  .book-cover-placeholder { width: 130px; height: 182px; }
  .book-edition-title { font-size: 0.9rem; }
  .book-edition-subtitle { font-size: 0.72rem; }
}

.read-original-note {
  max-width: 900px;
  margin: 1rem auto 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.reader-wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 2rem;
  aspect-ratio: 4/3;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.reader-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.read-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.read-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border: 1px solid rgba(42, 37, 32, 0.9);
  color: var(--color-text-muted);
  text-decoration: none;
  font-family: var(--font-french);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  border-radius: 2px;
  transition: border-color 0.35s ease, color 0.35s ease, background 0.35s ease;
}

.read-link:hover {
  border-color: rgba(196, 162, 101, 0.35);
  color: var(--color-accent);
  background: rgba(196, 162, 101, 0.04);
}

.read-link-download {
  border-color: rgba(196, 162, 101, 0.35);
  color: var(--color-accent);
}

.read-link-download:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  border-color: var(--color-accent);
  box-shadow: 0 4px 16px rgba(196,162,101,0.18);
}

.read-link-icon {
  font-size: 1.2rem;
}

/* === Gallery === */
.gallery {
  padding: 7rem 0 6rem;
  background: var(--color-bg);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(196, 162, 101, 0.08);
  cursor: pointer;
  transition: transform 0.45s ease, box-shadow 0.45s ease, border-color 0.45s ease;
  background: #111;
  break-inside: avoid;
  margin-bottom: 1.4rem;
  border-radius: 2px;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(196, 162, 101, 0.15);
  border-color: rgba(196, 162, 101, 0.2);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  filter: sepia(5%);
  transition: filter 0.3s ease;
}

.gallery-item:hover img {
  filter: sepia(0%);
}

.gallery-label {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  padding: 1.2rem 0.8rem 0.7rem;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
  color: rgba(160, 152, 136, 0.9);
  font-family: var(--font-french);
  font-size: 0.82rem;
  font-style: italic;
  text-align: center;
  letter-spacing: 0.03em;
  transform: translateY(0);
  transition: color 0.35s ease;
}

.gallery-item:hover .gallery-label {
  color: var(--color-text);
}

/* === Endorsements === */
.endorsements {
  padding: 7rem 0 6rem;
  background: var(--color-bg);
}

.endorsements h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.endorsement-foreword {
  max-width: 780px;
  margin: 0 auto 3.5rem;
}

.foreword-quote {
  border-left: 2px solid rgba(196, 162, 101, 0.5);
  padding: 2.2rem 2.5rem;
  background: rgba(196,162,101,0.03);
  border-radius: 0 6px 6px 0;
  position: relative;
}

.foreword-quote::before {
  content: '\201C';
  position: absolute;
  top: 0.2rem;
  left: 0.6rem;
  font-family: var(--font-french);
  font-size: 5rem;
  line-height: 1;
  color: var(--color-accent);
  opacity: 0.1;
  pointer-events: none;
}

.foreword-quote p {
  font-family: var(--font-french);
  font-size: 1.12rem;
  font-style: italic;
  line-height: 1.85;
  color: var(--color-text);
  margin-bottom: 1.2rem;
}

.foreword-quote p:last-of-type {
  margin-bottom: 1.6rem;
}

.foreword-attribution {
  text-align: right;
}

.foreword-attribution cite {
  font-family: var(--font-french);
  font-size: 1rem;
  color: var(--color-accent);
  font-style: normal;
  letter-spacing: 0.02em;
}

.endorsement-honor {
  max-width: 680px;
  margin: 3.5rem auto 0;
  text-align: center;
  padding: 2.5rem 2rem;
  background: rgba(196,162,101,0.04);
  border: 1px solid rgba(196,162,101,0.15);
  border-radius: 6px;
  position: relative;
}

.endorsement-honor::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-accent), transparent);
  opacity: 0.4;
}

.honor-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.endorsement-honor p {
  font-family: var(--font-french);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.endorsement-honor strong {
  color: var(--color-accent);
}

@media (max-width: 768px) {
  .foreword-quote {
    padding: 1.5rem 1.5rem;
  }
  .foreword-quote p {
    font-size: 1.05rem;
  }
}

/* === Letters of Honor === */
.letters-section {
  padding: 7rem 0 6rem;
  text-align: center;
}
.letters-section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
}
.letters-intro {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-text-muted);
}
.letters-names {
  max-width: 780px;
  margin: 0 auto 2rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text-muted);
  opacity: 0.85;
}
.letters-names strong {
  color: var(--color-accent);
}
.letters-grid-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto 2rem;
}
.letters-grid-preview img {
  width: 100%;
  aspect-ratio: 3/4;
  height: auto;
  object-fit: cover;
  object-position: top;
  border-radius: 4px;
  border: 1px solid rgba(196,162,101,0.15);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.letters-grid-preview img:hover {
  transform: scale(1.03) translateY(-3px);
  border-color: rgba(196,162,101,0.45);
  box-shadow: 0 14px 40px rgba(0,0,0,0.4), 0 0 12px rgba(196,162,101,0.08);
}
.letters-cta {
  display: inline-block;
  margin-top: 2rem;
  padding: 1rem 2.8rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  border: 1px solid rgba(196,162,101,0.45);
  border-radius: 3px;
  text-decoration: none;
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.letters-cta:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  border-color: var(--color-accent);
  box-shadow: 0 6px 24px rgba(196,162,101,0.2);
}
@media (max-width: 768px) {
  .letters-grid-preview {
    grid-template-columns: repeat(2, 1fr);
  }
  .letters-grid-preview img {
    height: auto;
  }
}

/* === Wiki Link === */
.wiki-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 780px;
  margin: 3rem auto 0;
  padding: 1.8rem 2.2rem;
  background: rgba(196,162,101,0.04);
  border: 1px solid rgba(196,162,101,0.15);
  border-radius: 8px;
  transition: border-color 0.3s, transform 0.3s;
}

.wiki-card:hover {
  border-color: rgba(196,162,101,0.35);
  transform: translateY(-2px);
}

.wiki-card-icon {
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.wiki-card-text {
  flex: 1;
}

.wiki-card-text h3 {
  font-family: var(--font-french);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.3rem;
  text-align: left;
}

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

.wiki-card-btn {
  flex-shrink: 0;
  padding: 0.7rem 1.5rem;
  border: 1px solid var(--color-accent-dim);
  color: var(--color-accent);
  text-decoration: none;
  font-family: var(--font-french);
  font-size: 0.95rem;
  border-radius: 4px;
  transition: all 0.3s;
  white-space: nowrap;
}

.wiki-card-btn:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  border-color: var(--color-accent);
}

@media (max-width: 768px) {
  .wiki-card {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 1.5rem;
  }
  .wiki-card-text h3 {
    text-align: center;
  }
}

/* === Rabbi Stern === */
.rabbi-section {
  padding: 7rem 0 6rem;
  background: var(--color-bg-warm);
}

.rabbi-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--color-accent);
  margin-bottom: 2rem;
}

.rabbi-content {
  max-width: 720px;
  margin: 0 auto;
}

.rabbi-content p {
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

/* === Quotes === */
.quotes-section {
  padding: 7rem 0 6rem;
  background: var(--color-bg-warm);
  text-align: center;
}

.quotes-section h2 {
  margin-bottom: 3rem;
}

.quotes-carousel {
  position: relative;
  max-width: 800px;
  margin: 0 auto 2.5rem;
  min-height: 180px;
}

.carousel-track {
  position: relative;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  align-items: center;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  padding: 1rem;
}

.carousel-slide.active {
  opacity: 1;
  transform: translateY(0);
  position: relative;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent-dim);
  border: none;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.3s, transform 0.3s;
  padding: 10px;
  background-clip: content-box;
}

.carousel-dot.active {
  opacity: 1;
  transform: scale(1.3);
  background: var(--color-accent);
}

.quote-text {
  font-family: var(--font-french);
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-style: italic;
  line-height: 1.85;
  color: var(--color-text);
  margin: 0;
  text-align: center;
  position: relative;
}

.quote-text::before {
  content: '\201C';
  font-size: 4.5rem;
  line-height: 0;
  position: absolute;
  top: 0.9rem;
  left: -1.5rem;
  color: var(--color-accent);
  opacity: 0.15;
  font-style: normal;
}

.quotes-attribution {
  margin-top: 1rem;
}

.quotes-attribution cite {
  font-style: normal;
  font-size: 0.95rem;
  color: var(--color-accent);
  letter-spacing: 0.05em;
}

/* === LTR Override === */
html[dir="ltr"] body {
  font-family: var(--font-french);
}

html[dir="ltr"] .hero-title {
  font-family: var(--font-french);
}

/* === RTL (Hebrew) Override === */
html[dir="rtl"] body {
  font-family: var(--font-hebrew);
}

html[dir="rtl"] .foreword-quote {
  border-left: none;
  border-right: 3px solid var(--color-accent);
  border-radius: 8px 0 0 8px;
}

html[dir="rtl"] .foreword-attribution {
  text-align: left;
}

/* === Footer === */
.site-footer {
  padding: 4rem 0 3rem;
  background: var(--color-bg);
  border-top: 1px solid rgba(196, 162, 101, 0.08);
  text-align: center;
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-accent-dim), transparent);
  opacity: 0.5;
}

.footer-qr {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.qr-code {
  width: 100px;
  height: 100px;
  border-radius: 4px;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.qr-code:hover {
  opacity: 1;
}

.qr-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.footer-dedication {
  font-family: var(--font-french);
  font-size: 1rem;
  font-style: italic;
  color: var(--color-text-muted);
  margin-bottom: 0.8rem;
  letter-spacing: 0.02em;
}

.footer-copy {
  font-family: var(--font-french);
  font-size: 0.78rem;
  color: var(--color-accent-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
}

/* === Family Tree === */
.family-tree-section {
  padding: 7rem 0 6rem;
  background: var(--color-bg);
}

.tree-intro {
  text-align: center;
  color: var(--color-text-muted);
  font-family: var(--font-french);
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: 3rem;
}

.tree-wrapper {
  max-width: 100%;
  margin: 0 auto;
  overflow-x: auto;
}

.tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.tree-level {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
}

.tree-parents {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tree-node {
  text-align: center;
}

.tree-node-inner {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.5rem 2rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: rgba(255,255,255,0.02);
  transition: border-color 0.3s ease;
}

.tree-node-inner:hover {
  border-color: rgba(196,162,101,0.3);
}

.tree-node-highlight {
  border-color: var(--color-accent-dim);
  background: rgba(196,162,101,0.05);
}

.tree-connector-h {
  width: 40px;
  height: 2px;
  background: var(--color-accent-dim);
  align-self: center;
  flex-shrink: 0;
}

.tree-connector-v {
  width: 2px;
  height: 40px;
  background: var(--color-accent-dim);
  margin: 0 auto;
}

.tree-name {
  font-family: var(--font-french);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
}

.tree-detail {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.tree-marriages {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border);
}

.tree-marriage {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.tree-link-wrapper {
  text-align: center;
  margin-top: 2.5rem;
}

.tree-geni-link {
  color: var(--color-accent);
  font-family: var(--font-french);
  font-size: 1rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.tree-geni-link:hover {
  border-bottom-color: var(--color-accent);
}

/* === Guestbook === */
.guestbook-section {
  padding: 7rem 0 6rem;
  background: var(--color-bg-warm);
}

.guestbook-intro {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

.guestbook-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.guestbook-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.guestbook-field label {
  font-family: var(--font-french);
  font-size: 0.95rem;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

.guestbook-field input,
.guestbook-field textarea {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(42, 37, 32, 0.8);
  border-radius: 3px;
  padding: 0.85rem 1.1rem;
  font-family: var(--font-french);
  font-size: 1rem;
  color: var(--color-text);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  resize: vertical;
}

.guestbook-field input::placeholder,
.guestbook-field textarea::placeholder {
  color: rgba(160, 152, 136, 0.5);
}

.guestbook-field input:focus,
.guestbook-field textarea:focus {
  outline: none;
  border-color: var(--color-accent-dim);
  box-shadow: 0 0 0 2px rgba(196, 162, 101, 0.1);
}

.guestbook-submit {
  align-self: center;
  padding: 0.85rem 2.8rem;
  background: transparent;
  border: 1px solid rgba(196, 162, 101, 0.4);
  color: var(--color-accent);
  font-family: var(--font-french);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.guestbook-submit:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  border-color: var(--color-accent);
  box-shadow: 0 4px 18px rgba(196,162,101,0.18);
}

.guestbook-wall {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--color-border);
}

.guestbook-wall h3 {
  font-family: var(--font-french);
  font-size: 1.3rem;
  color: var(--color-accent);
  text-align: center;
  margin-bottom: 2rem;
  font-weight: 400;
}

.guestbook-messages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
  max-width: 900px;
  margin: 0 auto;
}

.guestbook-msg {
  background: rgba(196, 162, 101, 0.025);
  border: 1px solid rgba(196, 162, 101, 0.08);
  border-radius: 4px;
  padding: 1.3rem 1.5rem;
  transition: border-color 0.35s ease, transform 0.35s ease;
}

.guestbook-msg:hover {
  border-color: rgba(196, 162, 101, 0.22);
  transform: translateY(-2px);
}

.guestbook-msg-new {
  animation: guestbookFadeIn 0.5s ease;
}

@keyframes guestbookFadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.guestbook-msg-text {
  font-family: var(--font-french);
  font-size: 1rem;
  font-style: italic;
  color: var(--color-text);
  line-height: 1.7;
  margin-bottom: 0.8rem;
}

.guestbook-msg-author {
  font-family: var(--font-french);
  font-size: 0.85rem;
  color: var(--color-accent-dim);
}

.guestbook-msg-date {
  margin-inline-start: 0.8rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.guestbook-thanks {
  text-align: center;
  padding: 3rem 1rem;
}

.guestbook-thanks p {
  font-family: var(--font-french);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--color-accent);
  line-height: 1.8;
}

/* === Memorial Candle === */
.memorial-candle {
  display: flex;
  justify-content: center;
  align-items: center;
  direction: ltr;
  margin-bottom: 1.5rem;
}

.candle {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.candle-body {
  width: 16px;
  height: 50px;
  background: linear-gradient(to right, #e8dcc8, #f5edd8, #e8dcc8);
  border-radius: 2px 2px 3px 3px;
  position: relative;
}

.candle-wick {
  width: 2px;
  height: 8px;
  background: #333;
  border-radius: 1px;
}

.flame {
  width: 16px;
  height: 28px;
  margin-bottom: -2px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  transform-origin: bottom center;
  animation: flicker 2.5s ease-in-out infinite alternate;
}

.flame-inner {
  width: 12px;
  height: 26px;
  background: radial-gradient(ellipse at 50% 90%, #f5c842 0%, #ef8f2e 40%, #e45a0a 65%, transparent 80%);
  border-radius: 50% 50% 30% 30%;
  animation: flame-dance 1.8s ease-in-out infinite alternate;
}

.flame-inner::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 10px;
  background: radial-gradient(ellipse, #fff8e0 0%, #f5c842 50%, transparent 100%);
  border-radius: 50%;
}

.candle-glow {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(245, 200, 66, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: glow-pulse 3s ease-in-out infinite alternate;
}

/* === Share Buttons === */
.share-bar {
  display: none;
}

.share-label {
  font-family: var(--font-french);
  font-size: 0.7rem;
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  margin-bottom: 0.3rem;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(8px);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
}

.share-btn:hover {
  border-color: var(--color-accent-dim);
  color: var(--color-accent);
  background: rgba(196, 162, 101, 0.08);
}

.share-btn svg {
  flex-shrink: 0;
}

/* === Back to Top === */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--color-accent-dim);
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(8px);
  color: var(--color-accent);
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease, background 0.3s ease, border-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  border-color: var(--color-accent);
}

/* === Animations === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollPulse {
  0%, 100% {
    opacity: 0.3;
    transform: scaleY(0.6);
    transform-origin: top;
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes flicker {
  0% { transform: scaleY(1); }
  25% { transform: scaleY(1.04); }
  50% { transform: scaleY(0.96); }
  75% { transform: scaleY(1.02); }
  100% { transform: scaleY(0.98); }
}

@keyframes flame-dance {
  0% { height: 26px; }
  33% { height: 24px; }
  66% { height: 27px; }
  100% { height: 25px; }
}

@keyframes glow-pulse {
  0% { opacity: 0.8; transform: translateX(-50%) scale(1); }
  100% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

/* === Reveal on scroll === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Lightbox === */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border: 1px solid var(--color-border);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  width: 40px;
  height: 40px;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.lightbox-close:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border: 1px solid var(--color-border);
}

.lightbox-caption {
  margin-top: 1rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--color-accent);
  text-align: center;
  max-width: 600px;
  line-height: 1.5;
}

/* === SVG Map Path Animation === */
#escape-path,
#deportation-line {
  stroke-dasharray: var(--path-length);
  stroke-dashoffset: var(--path-length);
}

#escape-path.animate {
  transition: stroke-dashoffset 1.5s ease-out;
  stroke-dashoffset: 0;
}

#deportation-line.animate {
  transition: stroke-dashoffset 2s ease-out;
  stroke-dashoffset: 0;
}

#deportation-arrow {
  transition: opacity 0.6s ease-in;
}

#deportation-arrow.animate {
  opacity: 0.7;
}

/* Auschwitz marker fade-in */
.auschwitz-marker {
  opacity: 0;
  transition: opacity 0.8s ease-in;
}

.auschwitz-marker.animate {
  opacity: 1;
}

/* === Responsive === */
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-visual {
    flex-direction: row;
  }

  .about-visual .page-preview {
    flex: 1;
  }

  .context-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .context-number {
    font-size: 2rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quote-text {
    font-size: 1.15rem;
  }

  .timeline-track {
    padding-inline-start: 2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .reader-wrapper {
    aspect-ratio: 3/4;
  }

  .read-links {
    flex-direction: column;
    align-items: center;
  }

  .map-wrapper {
    padding: 0.8rem;
  }

  .divider-line {
    width: 160px;
  }

  /* Nav mobile */
  .nav-hamburger {
    display: flex;
  }

  .nav-overlay {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 56px;
    right: 0;
    width: 280px;
    height: calc(100vh - 56px);
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    padding: 1.5rem 0;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 110;
    overflow-y: auto;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.25rem;
    padding: 1rem 2rem;
    display: block;
    border-bottom: 1px solid rgba(42, 37, 32, 0.4);
    color: var(--color-text);
    font-weight: 500;
  }

  .nav-lang {
    margin-left: 0;
    padding: 1.5rem 2rem 0;
    justify-content: center;
    border-top: none;
    background: none;
    flex-basis: auto;
    margin-top: 0;
    gap: 0.5rem;
  }

  .lang-btn {
    font-size: 0.85rem;
    opacity: 1;
    padding: 0.5rem 0.8rem;
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
  }

  .lang-sep {
    font-size: 0.7rem;
    color: rgba(196, 162, 101, 0.2);
  }

  /* Tree mobile */
  .tree-parents {
    flex-direction: column;
    align-items: center;
  }

  .tree-connector-h {
    width: 2px;
    height: 30px;
  }

  .tree-node-inner {
    padding: 1.2rem 1.5rem;
  }

  /* Share bar mobile */
  .share-bar {
    right: 0.8rem;
    gap: 0.4rem;
  }

  .share-btn {
    width: 32px;
    height: 32px;
  }

  .share-btn svg {
    width: 15px;
    height: 15px;
  }

  .share-label {
    font-size: 0.6rem;
  }

  /* Back to top mobile — offset above floating share */
  .back-to-top {
    right: 0.8rem;
    bottom: 5rem;
    width: 38px;
    height: 38px;
  }
}

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

  .about-visual {
    flex-direction: column;
  }

  .hero-title {
    font-size: 2.4rem;
  }

  .tree-name {
    font-size: 0.95rem;
  }

  .tree-detail,
  .tree-marriage {
    font-size: 0.78rem;
  }
}

/* === Loading Screen === */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: loadingFadeIn 0.6s ease-out forwards;
}

@keyframes loadingFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.loading-candle {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
}

.loading-flame {
  width: 14px;
  height: 28px;
  background: radial-gradient(ellipse at 50% 85%, #f5c842 0%, #ef8f2e 35%, #e45a0a 60%, transparent 80%);
  border-radius: 50% 50% 35% 35%;
  animation: flameDance 1.2s ease-in-out infinite alternate;
  filter: blur(0.5px);
  z-index: 2;
}

@keyframes flameDance {
  0% { transform: scale(1) rotate(-2deg); opacity: 0.85; }
  33% { transform: scale(1.06) rotate(1deg); opacity: 1; }
  66% { transform: scale(0.97) rotate(-1deg); opacity: 0.9; }
  100% { transform: scale(1.03) rotate(2deg); opacity: 0.95; }
}

.loading-wick {
  width: 2px;
  height: 6px;
  background: #333;
  z-index: 1;
}

.loading-wax {
  width: 10px;
  height: 40px;
  background: linear-gradient(to bottom, #f0e6c8, #e8dbb8);
  border-radius: 2px 2px 3px 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.loading-glow {
  position: absolute;
  top: -20px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(245,200,66,0.15) 0%, rgba(196,162,101,0.05) 40%, transparent 70%);
  border-radius: 50%;
  animation: glowPulse 2s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes glowPulse {
  from { transform: scale(0.9); opacity: 0.6; }
  to { transform: scale(1.1); opacity: 1; }
}

.loading-name {
  font-family: var(--font-french);
  font-size: 1.4rem;
  color: var(--color-accent);
  letter-spacing: 0.12em;
  font-weight: 300;
  margin: 0 0 0.3rem;
  opacity: 0;
  animation: loadingTextIn 0.6s ease-out 0.3s forwards;
}

.loading-years {
  font-family: var(--font-french);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  letter-spacing: 0.2em;
  margin: 0 0 1.5rem;
  opacity: 0;
  animation: loadingTextIn 0.6s ease-out 0.5s forwards;
}

@keyframes loadingTextIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.loading-bar {
  width: 120px;
  height: 1px;
  background: rgba(196,162,101,0.15);
  border-radius: 1px;
  overflow: hidden;
  opacity: 0;
  animation: loadingTextIn 0.4s ease-out 0.7s forwards;
}

.loading-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--color-accent-dim), var(--color-accent));
  animation: loadingProgress 1.8s cubic-bezier(0.4, 0, 0.2, 1) 0.8s forwards;
}

@keyframes loadingProgress {
  0% { width: 0; }
  60% { width: 70%; }
  100% { width: 100%; }
}

/* === Hero Particles Canvas === */
.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-overlay,
.hero-content,
.scroll-indicator {
  z-index: 1;
  position: relative;
}

/* === Gallery Parallax === */
.gallery-item {
  will-change: transform;
  overflow: hidden;
}

/* === Section Heading Reveal Animations === */
.heading-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.heading-reveal.heading-visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Memorial Counter === */
.memorial-counter {
  margin: 1.5rem 0;
  text-align: center;
}

.memorial-counter-label {
  font-family: var(--font-french);
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}

.memorial-counter-value {
  font-family: var(--font-french);
  font-size: 1.35rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.memorial-counter-value .counter-number {
  color: var(--color-accent);
  font-weight: 600;
}

/* === Visually Hidden (Accessibility / SEO) === */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* === Skip Navigation (Accessibility) === */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-accent);
  color: var(--color-bg);
  padding: 0.8rem 1.5rem;
  font-family: var(--font-french);
  font-size: 1rem;
  text-decoration: none;
  z-index: 200;
  transition: top 0.2s ease;
}

.skip-nav:focus {
  top: 0;
}

/* === Sticky Nav Scrolled State === */
.site-nav.nav-scrolled {
  background: rgba(10, 10, 10, 0.97);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

/* === Mobile Slide-in Drawer & Overlay === */
.nav-overlay {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-overlay.active {
  opacity: 1;
}

/* === Cookie Consent Banner === */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  background: rgba(17, 17, 17, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--color-border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transform: translateY(0);
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.cookie-banner.hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.cookie-text {
  font-family: var(--font-french);
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0;
}

.cookie-accept {
  background: var(--color-accent);
  color: var(--color-bg);
  border: none;
  padding: 0.5rem 1.5rem;
  font-family: var(--font-french);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.cookie-accept:hover {
  background: #d4b275;
}

.cookie-buttons {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-decline {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-text-muted);
  padding: 0.5rem 1.5rem;
  font-family: var(--font-french);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

.cookie-decline:hover {
  border-color: var(--color-text);
  color: var(--color-text);
}

/* === Family Tree SVG === */
.family-tree-svg {
  width: 100%;
  height: auto;
  display: block;
  max-width: 1100px;
  margin: 0 auto;
}

.tree-svg-node {
  fill: rgba(255,255,255,0.02);
  stroke: var(--color-border);
  stroke-width: 1.5;
  transition: filter 0.3s ease;
}

.tree-svg-node:hover {
  filter: drop-shadow(0 0 8px rgba(196, 162, 101, 0.2));
  stroke: rgba(196, 162, 101, 0.4);
}

.tree-svg-node-edith {
  fill: rgba(196, 162, 101, 0.08);
  stroke: var(--color-accent);
  stroke-width: 2;
}

.tree-svg-node-edith:hover {
  filter: drop-shadow(0 0 12px rgba(196, 162, 101, 0.35));
}

.tree-svg-name {
  fill: var(--color-text);
  font-family: var(--font-french);
  font-size: 14px;
  font-weight: 600;
}

.tree-svg-name-edith {
  fill: var(--color-accent);
  font-size: 16px;
}

.tree-svg-detail {
  fill: var(--color-text-muted);
  font-family: var(--font-french);
  font-size: 11px;
}

.tree-svg-marriage {
  fill: var(--color-text-muted);
  font-family: var(--font-french);
  font-size: 11px;
  font-style: italic;
}

.tree-svg-memorial-marker {
  fill: var(--color-red);
  font-size: 12px;
}

.tree-svg-line {
  stroke: var(--color-accent-dim);
  stroke-width: 1.5;
  opacity: 0.5;
}

.tree-svg-leaf {
  fill: rgba(255,255,255,0.02);
  stroke: var(--color-border);
  stroke-width: 1;
  transition: filter 0.3s ease;
}

.tree-svg-leaf:hover {
  filter: drop-shadow(0 0 6px rgba(196, 162, 101, 0.15));
  stroke: rgba(196, 162, 101, 0.3);
}

.tree-svg-leaf-highlight {
  stroke: var(--color-accent);
  stroke-width: 1.5;
  fill: rgba(196, 162, 101, 0.06);
}

.tree-svg-child {
  fill: var(--color-text);
  font-family: var(--font-french);
  font-size: 12px;
  font-weight: 600;
}

.tree-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
}

.family-tree-svg {
  min-width: 900px;
}

/* === Map Tooltips === */
.map-wrapper {
  position: relative;
}

.map-tooltip {
  position: absolute;
  display: none;
  background: rgba(15, 15, 15, 0.95);
  border: 1px solid var(--color-accent-dim);
  border-radius: 4px;
  padding: 0.5rem 0.8rem;
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.map-tooltip.visible {
  display: block;
}

.map-tooltip strong {
  display: block;
  font-family: var(--font-french);
  font-size: 0.85rem;
  color: var(--color-accent);
  margin-bottom: 0.15rem;
}

.map-tooltip span {
  font-family: var(--font-french);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* === Gallery Filters === */
.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.gallery-filter-btn {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-family: var(--font-french);
  font-size: 0.9rem;
  padding: 0.5rem 1.3rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.03em;
}

.gallery-filter-btn:hover {
  border-color: var(--color-accent-dim);
  color: var(--color-text);
}

.gallery-filter-btn.active {
  background: var(--color-accent);
  color: var(--color-bg);
  border-color: var(--color-accent);
}

.gallery-hidden {
  display: none !important;
}

/* === Testimonials Section === */
.testimonials-section {
  padding: 7rem 0 6rem;
  background: var(--color-bg);
  position: relative;
}

.testimonials-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, var(--color-bg), transparent);
  pointer-events: none;
  z-index: 1;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 960px;
  margin: 0 auto;
}

.testimonial-card {
  background: rgba(196, 162, 101, 0.03);
  border: 1px solid rgba(196, 162, 101, 0.1);
  border-radius: 4px;
  padding: 2.2rem 1.8rem;
  text-align: center;
  transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
  border-color: rgba(196, 162, 101, 0.28);
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(0,0,0,0.2);
}

.testimonial-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(196, 162, 101, 0.1);
  border: 1px solid var(--color-accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.2rem;
  font-family: var(--font-french);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-accent);
}

.testimonial-quote {
  font-family: var(--font-french);
  font-size: 1rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 1.2rem;
}

.testimonial-name {
  font-family: var(--font-french);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 0.2rem;
}

.testimonial-relation {
  font-family: var(--font-french);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* === Donations Section === */
.donations-section {
  padding: 7rem 0 6rem;
  background: var(--color-bg);
  position: relative;
}

.donations-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, var(--color-bg-warm), transparent);
  pointer-events: none;
  z-index: 1;
}

.donations-intro {
  text-align: center;
  color: var(--color-text-muted);
  font-family: var(--font-french);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

.donations-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 780px;
  margin: 0 auto;
}

.donation-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  padding: 2.8rem 2rem;
  background: rgba(196, 162, 101, 0.025);
  border: 1px solid rgba(196, 162, 101, 0.12);
  border-radius: 4px;
  transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}

.donation-card:hover {
  border-color: rgba(196, 162, 101, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(196,162,101,0.06);
}

.donation-icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.donation-card h3 {
  font-family: var(--font-french);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 0.6rem;
}

.donation-card p {
  font-family: var(--font-french);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: 1.2rem;
}

.donation-link-text {
  font-family: var(--font-french);
  font-size: 0.9rem;
  color: var(--color-accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.donation-card:hover .donation-link-text {
  border-bottom-color: var(--color-accent);
}

@media (max-width: 768px) {
  .donations-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* === FAQ Section === */
.faq-section {
  padding: 7rem 0 6rem;
  background: var(--color-bg);
  position: relative;
}

.faq-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, var(--color-bg-warm), transparent);
  pointer-events: none;
  z-index: 1;
}

.faq-list {
  max-width: 780px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 1.6rem;
  padding: 1.8rem 2rem;
  background: rgba(196, 162, 101, 0.03);
  border: 1px solid rgba(196, 162, 101, 0.1);
  border-left: 2px solid rgba(196, 162, 101, 0.2);
  border-radius: 0 4px 4px 0;
  transition: border-color 0.35s ease, transform 0.35s ease;
}

.faq-item:hover {
  border-left-color: rgba(196, 162, 101, 0.5);
  transform: translateX(3px);
}

.faq-item h3 {
  font-family: var(--font-french);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 0.8rem;
}

.faq-item p {
  font-family: var(--font-french);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text-muted);
}

.faq-item em {
  font-style: italic;
  color: var(--color-accent);
}

/* === Memorial Candle === */
.candle-section {
  padding: 6rem 0 5rem;
  background: var(--color-bg);
  text-align: center;
  position: relative;
}

.candle-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 160px;
  background: radial-gradient(ellipse at 50% 0%, rgba(196,162,101,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.candle-intro {
  font-family: var(--font-french);
  color: var(--color-text-muted);
  font-size: 1.05rem;
  font-style: italic;
  margin-bottom: 2.8rem;
  letter-spacing: 0.02em;
}

.candle-display {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.candle-flame-wrapper {
  cursor: pointer;
  padding: 1rem;
  transition: transform 0.3s;
}

.candle-flame-wrapper:hover {
  transform: scale(1.08);
}

.candle-body {
  width: 40px;
  height: 100px;
  background: linear-gradient(to bottom, #f5e6c8, #e8d5a8);
  border-radius: 4px 4px 6px 6px;
  position: relative;
  margin: 0 auto;
  box-shadow: 0 0 20px rgba(196,162,101,0.15);
}

.candle-body::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 12px;
  background: #555;
}

.candle-flame {
  position: absolute;
  top: -45px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 36px;
  background: radial-gradient(ellipse at bottom, #ffd54f 0%, #ff9800 40%, transparent 70%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  opacity: 0;
  transition: opacity 0.8s;
}

.candle-flame.lit {
  opacity: 1;
  animation: flicker-candle 2s ease-in-out infinite alternate;
}

.candle-flame.lit::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(255,213,79,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

@keyframes flicker-candle {
  0% { transform: translateX(-50%) scale(1) rotate(-1deg); }
  25% { transform: translateX(-50%) scale(1.04) rotate(1deg); }
  50% { transform: translateX(-50%) scale(0.97) rotate(-0.5deg); }
  75% { transform: translateX(-50%) scale(1.02) rotate(0.5deg); }
  100% { transform: translateX(-50%) scale(1) rotate(-1deg); }
}

.candle-count {
  font-family: var(--font-french);
  font-size: 1.1rem;
  color: var(--color-accent);
  margin: 1.5rem 0 0.25rem;
}

.candle-count .count-number {
  font-size: 1.6rem;
  font-weight: 600;
}

.candle-action {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  transition: opacity 0.5s;
}

.candle-action.hidden {
  opacity: 0;
}

/* === Animated Map Routes === */
.journey-svg .animated-route {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 2s ease-in-out;
}

.journey-svg .animated-route.hidden {
  stroke-dashoffset: var(--dash-length);
}

/* === Floating Share === */
.floating-share {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 0.5rem;
}

.floating-share-toggle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #0a0a0a;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  transition: transform 0.3s, background 0.3s;
  outline: none;
}

.floating-share-toggle:focus-visible {
  box-shadow: 0 4px 15px rgba(0,0,0,0.4), 0 0 0 3px var(--color-accent), 0 0 0 5px var(--color-bg);
}

.floating-share-toggle:hover {
  transform: scale(1.1);
  background: #d4b275;
}

.floating-share-toggle.active {
  transform: rotate(45deg);
}

.floating-share-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}

.floating-share-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.floating-share-item {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-bg-warm);
  color: var(--color-text);
  border: 1px solid rgba(196,162,101,0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, transform 0.2s;
}

.floating-share-item:hover {
  background: var(--color-accent);
  color: #0a0a0a;
  transform: scale(1.1);
}

@media (max-width: 600px) {
  .floating-share { bottom: 1rem; right: 1rem; }
  .floating-share-toggle { width: 46px; height: 46px; }
  .floating-share-item { width: 40px; height: 40px; }
}

/* === Print Stylesheet === */
@media print {
  *, *::before, *::after {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body {
    padding: 0;
    font-size: 12pt;
    line-height: 1.6;
  }

  .site-nav, .share-bar, .back-to-top, .scroll-indicator, .nav-hamburger,
  .lightbox, .video-wrapper, .reader-wrapper, .guestbook-section,
  .youtube-facade, .reading-progress, .footer-qr, .loading-screen,
  .hero-particles, .cookie-banner, .skip-nav {
    display: none !important;
  }

  .hero {
    min-height: auto;
    padding: 2rem 0;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .section-divider {
    break-after: avoid;
  }

  section {
    break-inside: avoid;
    padding: 1.5rem 0;
  }

  a {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-item img {
    max-height: 200px;
    object-fit: contain;
  }

  h2 {
    color: black !important;
    font-size: 1.5rem;
  }

  .context-number {
    color: black !important;
  }

  .hero-title {
    color: black !important;
    opacity: 1 !important;
  }
}

/* === AIO Citation-worthy Stats === */
/* === AIO/SEO-only content: visually hidden, crawlable === */
.aio-stats,
.aio-answers,
.key-terms-section {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.aio-stats .container {
  max-width: 700px;
  columns: 2;
  column-gap: 2rem;
}

.aio-stat {
  font-family: var(--font-french);
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  break-inside: avoid;
  margin-bottom: 0.3rem;
}

.aio-stat strong {
  color: var(--color-text);
}

.aio-stat em {
  color: var(--color-accent);
}

@media (max-width: 600px) {
  .aio-stats .container {
    columns: 1;
  }
}

/* === AIO Direct Answer Paragraphs === */

.aio-answer {
  font-family: var(--font-french);
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  max-width: 800px;
  margin: 0 auto 1.2rem;
  padding: 0.8rem 1.2rem;
  border-left: 2px solid var(--color-accent-dim);
  background: rgba(196, 162, 101, 0.03);
  border-radius: 0 4px 4px 0;
}

.aio-answer strong {
  color: var(--color-text);
}

.aio-answer em {
  color: var(--color-accent);
}

.aio-answer a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(196, 162, 101, 0.3);
  transition: border-color 0.3s ease;
}

.aio-answer a:hover {
  border-bottom-color: var(--color-accent);
}

/* === Key Historical Terms (Glossary) === */
.key-terms-section {
  padding: 4rem 0;
  background: var(--color-bg);
}

.key-terms-section h2 {
  font-family: var(--font-french);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--color-accent);
  text-align: center;
  margin-bottom: 2rem;
  letter-spacing: 0.02em;
}

.key-terms-list {
  max-width: 800px;
  margin: 0 auto;
}

.key-term {
  margin-bottom: 1.2rem;
  padding: 0.8rem 1rem;
  border-left: 2px solid var(--color-accent-dim);
  background: var(--color-surface);
  border-radius: 0 4px 4px 0;
}

.key-term dt {
  font-family: var(--font-french);
  font-size: 1.05rem;
  color: var(--color-text);
  margin-bottom: 0.3rem;
}

.key-term dd {
  font-family: var(--font-french);
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--color-text-muted);
  margin-left: 0;
}

.key-term dd a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(196, 162, 101, 0.3);
}

.key-term dd a:hover {
  border-bottom-color: var(--color-accent);
}

/* === Footer updated timestamp === */
.footer-updated {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  opacity: 0.5;
  margin-top: 0.5rem;
}

@media (max-width: 768px) {
  .aio-answer {
    font-size: 0.95rem;
    padding: 0.6rem 1rem;
  }

  .key-term {
    padding: 0.6rem 0.8rem;
  }
}

/* ============================================================
   DESIGN REFINEMENTS v5 — Premium Memorial Aesthetics
   ============================================================ */

/* --- Reading progress bar — slightly more refined --- */
.reading-progress {
  height: 2px;
  background: linear-gradient(to right, var(--color-accent-dim), var(--color-accent));
}

/* --- Bio summary snippet — more museum-label feel --- */
.bio-summary-snippet {
  border-left: 2px solid rgba(196, 162, 101, 0.3);
  border-radius: 0 6px 6px 0;
  border-top: none;
  border-right: none;
  border-bottom: none;
  border: none;
  border-left: 2px solid rgba(196, 162, 101, 0.3);
  background: rgba(196, 162, 101, 0.03);
}

/* --- Wiki card hover lift --- */
.wiki-card {
  transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}

.wiki-card:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}

/* --- Context links row more breathing room --- */
.context-links {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
}

/* --- Gallery filter buttons more refined --- */
.gallery-filter-btn {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  padding: 0.5rem 1.4rem;
  border-radius: 2px;
  transition: background 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

/* --- Scroll indicator refined --- */
.scroll-indicator span {
  width: 1px;
  background: linear-gradient(to bottom, var(--color-accent-dim), transparent);
  opacity: 0.6;
}

/* --- Back to top button more refined --- */
.back-to-top {
  border-radius: 3px;
  width: 40px;
  height: 40px;
}

/* --- Share bar buttons more refined --- */
.share-btn {
  border-radius: 3px;
  border-color: rgba(42, 37, 32, 0.8);
}

/* --- Lightbox image border more refined --- */
.lightbox-content img {
  border-color: rgba(196, 162, 101, 0.15);
  box-shadow: 0 0 80px rgba(0,0,0,0.6);
}

/* --- Reader wrapper more refined --- */
.reader-wrapper {
  border-color: rgba(196, 162, 101, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(196,162,101,0.06);
}

/* --- Bio dates line more refined --- */
.bio-dates {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(196, 162, 101, 0.08);
  font-family: var(--font-french);
  letter-spacing: 0.06em;
  font-size: 0.9rem;
}

/* --- Tree node inner more refined --- */
.tree-node-inner {
  border-color: rgba(42, 37, 32, 0.8);
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.tree-node-inner:hover {
  border-color: rgba(196,162,101,0.28);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* --- Mobile: h2 heading underline scales nicely --- */
@media (max-width: 768px) {
  h2 {
    letter-spacing: 0.04em;
    margin-bottom: 2.5rem;
  }

  h2::after {
    width: 36px;
    margin-top: 0.8rem;
  }

  .about, .biography, .video-section, .context, .timeline,
  .journey-map, .read, .gallery, .endorsements, .letters-section,
  .testimonials-section, .guestbook-section, .quotes-section,
  .rabbi-section, .donations-section, .faq-section, .family-tree-section {
    padding: 4rem 0 3rem;
  }
  .candle-section { padding: 3rem 0; }

  .hero-portrait img {
    width: 200px;
    height: 200px;
  }

  .quote-text::before {
    display: none;
  }

  .foreword-quote::before {
    display: none;
  }

  .faq-item:hover {
    transform: none;
  }
}

@media (max-width: 480px) {
  h2 {
    font-size: 1.65rem;
    letter-spacing: 0.03em;
  }

  .hero-portrait img {
    width: 170px;
    height: 170px;
  }

  .bio-summary-snippet {
    margin-left: 0.8rem;
    margin-right: 0.8rem;
  }
}

/* ============================================================
   DESIGN REFINEMENTS v7 — Targeted Visual Polish
   ============================================================ */

/* --- Subtle gold divider between sections --- */
.about, .video-section, .context, .timeline, .journey-map,
.read, .gallery, .endorsements, .letters-section,
.testimonials-section, .rabbi-section, .quotes-section,
.donations-section, .family-tree-section, .guestbook-section, .faq-section {
  border-top: 1px solid rgba(196, 162, 101, 0.08);
}

/* --- Rabbi & Shlomo: wrap text in visual container --- */
.rabbi-content {
  background: rgba(196, 162, 101, 0.025);
  border: 1px solid rgba(196, 162, 101, 0.08);
  border-radius: 6px;
  padding: 2.5rem 2.8rem;
}

.rabbi-content p {
  margin-bottom: 1.4rem;
}

.rabbi-content p:last-child {
  margin-bottom: 0;
}

/* --- Book covers subtle 3D effect --- */
.book-card {
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.book-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(196, 162, 101, 0.06);
}

.book-cover img {
  border-radius: 3px;
  box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.4);
}

/* --- Quotes carousel: less empty space --- */
.quotes-carousel {
  min-height: 140px;
}

.carousel-track {
  min-height: 120px;
}

/* --- Endorsement honor box refined --- */
.endorsement-honor {
  background: rgba(196, 162, 101, 0.04);
  border: 1px solid rgba(196, 162, 101, 0.12);
  border-radius: 6px;
  padding: 1.8rem 2rem;
  max-width: 700px;
  margin: 2rem auto 0;
}

/* --- Donation cards refined --- */
.donation-card {
  background: rgba(196, 162, 101, 0.025);
  border: 1px solid rgba(196, 162, 101, 0.1);
  border-radius: 6px;
}

/* --- FAQ items tighter --- */
.faq-item {
  border-color: rgba(196, 162, 101, 0.06);
}

/* --- Letters preview grid: subtle shadow on images --- */
.letters-grid-preview img {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  border-radius: 2px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.letters-grid-preview img:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* --- About section: quote stands out more --- */
.about-text p:first-of-type {
  background: rgba(196, 162, 101, 0.03);
  padding: 1.2rem 1.6rem;
  border-radius: 0 4px 4px 0;
}

/* --- Testimonials cards refined --- */
.testimonial-card {
  background: rgba(196, 162, 101, 0.025);
  border: 1px solid rgba(196, 162, 101, 0.08);
  border-radius: 6px;
}

/* --- Footer: more compact --- */
.site-footer {
  padding-top: 2rem;
  padding-bottom: 1.5rem;
}

/* --- Cookie banner less intrusive --- */
.cookie-banner {
  backdrop-filter: blur(10px);
  background: rgba(26, 26, 26, 0.95) !important;
  border-top: 1px solid rgba(196, 162, 101, 0.15);
}

/* ============================================================
   DESIGN REFINEMENTS v8 — Premium Visual Upgrade
   ============================================================ */

/* --- Scroll-reveal animation --- */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
}

.reveal.visible {
  animation: revealUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal.visible:nth-child(2) { animation-delay: 0.08s; }
.reveal.visible:nth-child(3) { animation-delay: 0.16s; }
.reveal.visible:nth-child(4) { animation-delay: 0.24s; }

/* --- Stats/context numbers: gradient gold text --- */
.context-number {
  font-family: var(--font-french) !important;
  font-size: 3.2rem !important;
  background: linear-gradient(135deg, #c4a265 0%, #e8d5a8 45%, #c4a265 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(196, 162, 101, 0.15));
}

/* --- Context cards: more depth --- */
.context-card {
  background: linear-gradient(145deg, rgba(196,162,101,0.035) 0%, rgba(255,255,255,0.012) 100%) !important;
}

/* --- Bio chapter cards: left accent bar glow --- */
.bio-chapter {
  border-left: 3px solid rgba(196,162,101,0.25) !important;
  overflow: hidden;
}

.bio-chapter::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 0% 0%, rgba(196,162,101,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.bio-chapter {
  position: relative;
}

/* --- Bio icon glow --- */
.bio-icon {
  filter: drop-shadow(0 0 8px rgba(196,162,101,0.2));
}

/* --- Foreword quote: elegant left line glow --- */
.foreword-quote {
  border-inline-start-color: var(--color-accent) !important;
  box-shadow: -4px 0 20px -6px rgba(196,162,101,0.15);
}

html[dir="rtl"] .foreword-quote {
  box-shadow: 4px 0 20px -6px rgba(196,162,101,0.15);
}

/* --- Testimonial avatar: subtle glow ring --- */
.testimonial-avatar {
  box-shadow: 0 0 0 3px rgba(196,162,101,0.08), 0 0 16px rgba(196,162,101,0.1);
}

.testimonial-card:hover .testimonial-avatar {
  box-shadow: 0 0 0 3px rgba(196,162,101,0.2), 0 0 24px rgba(196,162,101,0.15);
  transition: box-shadow 0.4s ease;
}

/* --- Timeline dots: pulse animation --- */
@keyframes timelinePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196,162,101,0.3); }
  50% { box-shadow: 0 0 0 6px rgba(196,162,101,0); }
}

.timeline-dot {
  animation: timelinePulse 3s ease-in-out infinite;
}

/* --- Hero h2 (section heading) shimmer on the underline --- */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

h2::after {
  width: 64px !important;
  height: 2px !important;
  background: linear-gradient(90deg, transparent, var(--color-accent-dim), var(--color-accent), var(--color-accent-dim), transparent) !important;
  background-size: 200% 100%;
  animation: shimmer 6s ease-in-out infinite;
  opacity: 0.7 !important;
  border-radius: 1px;
}

/* --- Gallery photos: uniform aspect ratio & overlay --- */
.gallery-item {
  overflow: hidden;
  border-radius: 4px;
}

.gallery-item img {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), filter 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* --- About quote: decorative side accent bar --- */
.about-text p:first-of-type {
  border-left: 3px solid rgba(196,162,101,0.35) !important;
  padding-left: 1.8rem !important;
}

html[dir="rtl"] .about-text p:first-of-type {
  border-left: none !important;
  border-right: 3px solid rgba(196,162,101,0.35) !important;
  padding-left: 1.6rem !important;
  padding-right: 1.8rem !important;
}

/* --- Bio chapter: RTL flip accent to right --- */
html[dir="rtl"] .bio-chapter {
  border-left: 1px solid rgba(196,162,101,0.1) !important;
  border-right: 3px solid rgba(196,162,101,0.25) !important;
}

html[dir="rtl"] .bio-chapter::after {
  background: radial-gradient(ellipse at 100% 0%, rgba(196,162,101,0.04) 0%, transparent 60%);
}

/* --- FAQ items: smooth expand feel --- */
.faq-item {
  transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease, background 0.4s ease !important;
}

.faq-item:hover {
  background: rgba(196,162,101,0.02);
}

/* --- Reading progress bar: gradient --- */
.reading-progress {
  background: linear-gradient(90deg, var(--color-accent-dim), var(--color-accent), var(--color-accent-dim)) !important;
  height: 2px !important;
}

/* --- Hero portrait: soft glow behind image --- */
.hero-portrait {
  filter: drop-shadow(0 0 40px rgba(196,162,101,0.08));
}

/* --- Hero CTA button: refined gold outline style --- */
.hero-cta {
  border: 1px solid rgba(196,162,101,0.5) !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase;
  font-size: 0.88rem !important;
  padding: 1.1rem 3.6rem !important;
  border-radius: 2px;
}

/* --- Section subtitle / descriptive text more elegant --- */
.bio-subtitle,
.letters-subtitle,
.context-text {
  letter-spacing: 0.03em;
}

/* --- Candle section: warm background glow --- */
.candle-section {
  background: radial-gradient(ellipse at 50% 30%, rgba(196,162,101,0.04) 0%, transparent 60%), var(--color-bg) !important;
}

/* --- Memorial counter: refined typography --- */
#memorial-counter-value {
  font-family: var(--font-french);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

#memorial-counter-value .counter-number {
  font-weight: 700;
  color: var(--color-accent);
  font-size: 1.6rem;
}

/* --- Footer: elegant divider above --- */
.site-footer {
  border-top: 1px solid rgba(196,162,101,0.06) !important;
}

/* --- Smooth scrollbar (webkit) --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(196,162,101,0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(196,162,101,0.35);
}

/* --- Family tree: warmer background --- */
.family-tree-section {
  background: radial-gradient(ellipse at 50% 50%, rgba(196,162,101,0.02) 0%, transparent 70%), var(--color-bg) !important;
}

/* --- Guestbook form inputs: refined focus state --- */
.guestbook-section input:focus,
.guestbook-section textarea:focus {
  border-color: var(--color-accent) !important;
  box-shadow: 0 0 0 3px rgba(196,162,101,0.08);
  outline: none;
}

/* --- Book section warm gradient bg --- */
.read {
  background: radial-gradient(ellipse at 50% 40%, rgba(196,162,101,0.03) 0%, transparent 50%), var(--color-bg-warm) !important;
}

/* ============================================================
   PREMIUM BOOK SECTION REDESIGN — "Million Dollar" Treatment
   Taschen / Phaidon catalog quality
   ============================================================ */

/* --- Section heading: high-end publisher catalog feel --- */
/* Fondation Louis Vuitton gallery treatment — museum-lit glass vitrine */

.read > .container > h2 {
  font-family: var(--font-french);
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  font-weight: 200;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: transparent;
  background: linear-gradient(
    168deg,
    rgba(196, 162, 101, 0.5) 0%,
    var(--color-accent) 35%,
    #dbc68a 50%,
    var(--color-accent) 65%,
    rgba(196, 162, 101, 0.5) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  margin-bottom: 1.4rem;
  position: relative;
  padding-bottom: 0;
  text-shadow: none;
}

.read > .container > h2::after {
  width: 60px !important;
  height: 1px !important;
  background: linear-gradient(
    to right,
    transparent,
    rgba(196, 162, 101, 0.4) 20%,
    rgba(196, 162, 101, 0.6) 50%,
    rgba(196, 162, 101, 0.4) 80%,
    transparent
  ) !important;
  animation: none !important;
  opacity: 1 !important;
  margin-top: 1.6rem !important;
}

/* --- Intro text: Vogue-weight colophon --- */
.read .read-intro {
  font-family: var(--font-french);
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 300;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  line-height: 2;
  max-width: 560px;
  margin: 0 auto 4.5rem;
  text-align: center;
  position: relative;
  padding: 0 1.5rem;
  opacity: 0.85;
}

/* --- Book editions container: the museum display --- */
.read .book-editions {
  display: flex;
  flex-wrap: wrap;
  gap: 3.2rem;
  margin: 0 auto 4rem;
  padding: 4rem 2rem 2.5rem;
  justify-content: center;
  position: relative;
  max-width: 1260px;
}

/* --- The shelf: a single hairline of light, not furniture --- */
.read .book-editions::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  max-width: 1100px;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(196, 162, 101, 0.08) 10%,
    rgba(196, 162, 101, 0.22) 30%,
    rgba(196, 162, 101, 0.32) 50%,
    rgba(196, 162, 101, 0.22) 70%,
    rgba(196, 162, 101, 0.08) 90%,
    transparent 100%
  );
  border-radius: 0;
  box-shadow:
    0 1px 12px rgba(196, 162, 101, 0.06),
    0 0 40px rgba(196, 162, 101, 0.03);
  z-index: 1;
}

/* Shelf glow halo beneath the line */
.read .book-editions::before {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  max-width: 900px;
  height: 16px;
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(196, 162, 101, 0.05) 0%,
    transparent 80%
  );
  z-index: 0;
  border-radius: 0;
  pointer-events: none;
}

/* --- Each book wrapper: generous gallery pedestal --- */
.read .book-edition-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 210px;
  position: relative;
  z-index: 3;
  padding-bottom: 2.8rem;
}

/* --- Museum spotlight beneath each book --- */
.read .book-edition-wrap::after {
  content: '';
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 40px;
  background: radial-gradient(
    ellipse at 50% 20%,
    rgba(196, 162, 101, 0.08) 0%,
    rgba(196, 162, 101, 0.03) 40%,
    transparent 75%
  );
  filter: blur(8px);
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.read .book-edition-wrap:hover::after {
  background: radial-gradient(
    ellipse at 50% 20%,
    rgba(196, 162, 101, 0.14) 0%,
    rgba(196, 162, 101, 0.06) 40%,
    transparent 75%
  );
}

/* --- The book link: 3D perspective container --- */
.read .book-edition {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--color-text);
  perspective: 1000px;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.read .book-edition:hover {
  transform: translateY(-5px);
}

/* --- Book cover: gallery-scale 3D physical book --- */
.read .book-cover {
  position: relative;
  width: 180px;
  height: 255px;
  border-radius: 1px 5px 5px 1px;
  overflow: visible;
  margin-bottom: 1.6rem;
  transform-style: preserve-3d;
  transform: rotateY(-6deg);
  transition:
    transform 0.7s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.7s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow:
    5px 5px 15px rgba(0, 0, 0, 0.4),
    10px 12px 40px rgba(0, 0, 0, 0.25),
    -1px 0 4px rgba(0, 0, 0, 0.1);
}

/* Cover image styling — subdued gallery lighting at rest */
.read .book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1px 5px 5px 1px;
  position: relative;
  z-index: 2;
  filter: brightness(0.92) saturate(0.95) contrast(1.02);
  transition: filter 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Hover: warm overhead spotlight illumination */
.read .book-edition:hover .book-cover img {
  filter: brightness(1.08) saturate(1.08) contrast(1.04);
}

/* 3D book spine — left edge, richer leather texture */
.read .book-cover::before {
  content: '';
  position: absolute;
  top: 0;
  left: -16px;
  width: 16px;
  height: 100%;
  background: linear-gradient(to right,
    rgba(50, 40, 25, 1),
    rgba(72, 58, 36, 0.95) 25%,
    rgba(85, 70, 44, 0.9) 50%,
    rgba(55, 44, 28, 0.95) 75%,
    rgba(40, 32, 20, 1)
  );
  transform: rotateY(90deg);
  transform-origin: right center;
  border-radius: 2px 0 0 2px;
  z-index: 1;
  box-shadow: inset -1px 0 8px rgba(0, 0, 0, 0.35);
}

/* Page edges — visible from the right side */
.read .book-cover::after {
  /* Override the "Read" overlay — MUST keep, placed first so
     positional properties below can re-declare after inset resets them */
  display: block;
  inset: auto;
  font-size: 0;
  opacity: 1;
  pointer-events: none;
  color: transparent;
  font-family: inherit;
  font-weight: normal;
  letter-spacing: normal;
  text-transform: none;
  /* Page-edge styling — after inset reset */
  content: '';
  position: absolute;
  top: 4px;
  right: -4px;
  width: 4px;
  height: calc(100% - 8px);
  background:
    repeating-linear-gradient(to bottom,
      rgba(232, 224, 212, 0.55) 0px,
      rgba(215, 205, 190, 0.35) 1px,
      rgba(232, 224, 212, 0.45) 2px
    );
  border-radius: 0 2px 2px 0;
  z-index: 1;
  box-shadow: 1px 0 4px rgba(0, 0, 0, 0.12);
}

/* Hover: book tilts gently toward viewer + warm golden top-light */
.read .book-edition:hover .book-cover {
  transform: rotateY(-2deg) rotateX(1.5deg) scale(1.03);
  box-shadow:
    3px 6px 20px rgba(0, 0, 0, 0.45),
    6px 14px 50px rgba(0, 0, 0, 0.3),
    0 -8px 30px rgba(196, 162, 101, 0.07),
    0 0 60px rgba(196, 162, 101, 0.1),
    0 0 120px rgba(196, 162, 101, 0.04);
}

/* Warm light bloom on hover — as if spot-lit from above */
.read .book-edition:hover .book-cover img {
  box-shadow:
    inset 0 -40px 50px rgba(0, 0, 0, 0.08),
    inset 0 20px 40px rgba(196, 162, 101, 0.08);
}

/* Bottom page edges (thickness of book) */
.read .book-cover img::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 3px;
  right: 3px;
  height: 5px;
  background: linear-gradient(to bottom,
    rgba(210, 200, 185, 0.35),
    rgba(190, 180, 160, 0.2)
  );
  border-radius: 0 0 2px 2px;
}

/* --- Book edition title: Vogue-light typography --- */
.read .book-edition-title {
  font-family: var(--font-french);
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--color-text);
  text-align: center;
  line-height: 1.4;
  margin-bottom: 0.35rem;
  letter-spacing: 0.03em;
  transition: color 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  max-width: 200px;
}

.read .book-edition:hover .book-edition-title {
  color: var(--color-accent);
}

/* RTL title styling — Hebrew/Yiddish */
.read .book-edition-title[dir="rtl"] {
  font-family: var(--font-hebrew);
  font-size: 1.08rem;
  letter-spacing: 0;
  direction: rtl;
  unicode-bidi: bidi-override;
}

/* --- Book edition subtitle: whisper-weight --- */
.read .book-edition-subtitle {
  font-family: var(--font-french);
  font-size: 0.74rem;
  font-style: italic;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.4;
  margin-bottom: 0.35rem;
  letter-spacing: 0.04em;
  opacity: 0.65;
  font-weight: 300;
}

/* --- Book edition label: ghost-weight language badge --- */
.read .book-edition-label {
  font-family: var(--font-french);
  font-size: 0.62rem;
  color: var(--color-accent-dim);
  margin-top: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  opacity: 0.45;
  font-weight: 400;
  transition: opacity 0.5s ease, color 0.5s ease;
}

.read .book-edition:hover .book-edition-label {
  opacity: 0.85;
  color: var(--color-accent);
}

/* --- Flipbook button: invisible until needed --- */
.read .flipbook-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 0.8rem;
  padding: 5px 14px;
  font-family: var(--font-french);
  font-size: 0.65rem;
  color: var(--color-accent-dim);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 16px;
  transition:
    opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1),
    color 0.5s ease,
    border-color 0.5s ease,
    background 0.5s ease,
    box-shadow 0.5s ease;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  opacity: 0;
  font-weight: 400;
}

/* Show on parent hover */
.read .book-edition-wrap:hover .flipbook-btn {
  opacity: 0.6;
  border-color: rgba(196, 162, 101, 0.1);
}

.read .flipbook-btn svg {
  width: 12px;
  height: 12px;
  opacity: 0.5;
  transition: opacity 0.4s ease;
}

.read .flipbook-btn:hover {
  opacity: 1 !important;
  color: var(--color-accent);
  border-color: rgba(196, 162, 101, 0.35);
  background: rgba(196, 162, 101, 0.04);
  box-shadow: 0 0 20px rgba(196, 162, 101, 0.06);
}

.read .flipbook-btn:hover svg {
  opacity: 0.9;
}

/* --- Original note: refined --- */
.read .read-original-note {
  font-family: var(--font-french);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--color-text-muted);
  opacity: 0.55;
  letter-spacing: 0.04em;
  margin-top: 4rem;
  font-weight: 300;
}

/* ============================================================
   MOBILE: Luxury horizontal scroll with peek effect
   ============================================================ */
@media (max-width: 600px) {
  .read .book-editions {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    gap: 2.2rem;
    /* Peek: left padding shows content, right lets next book peek in */
    padding: 2.5rem calc(50vw - 95px) 1.5rem;
    margin-bottom: 2rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Fade edges for peek invitation */
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0%,
      black 8%,
      black 92%,
      transparent 100%
    );
    mask-image: linear-gradient(
      to right,
      transparent 0%,
      black 8%,
      black 92%,
      transparent 100%
    );
  }

  .read .book-editions::-webkit-scrollbar {
    display: none;
  }

  /* Shelf adapts to scroll — stays as hairline */
  .read .book-editions::after {
    width: 100%;
    max-width: none;
    left: 0;
    transform: none;
    border-radius: 0;
  }

  .read .book-editions::before {
    width: 100%;
    max-width: none;
    left: 0;
    transform: none;
  }

  .read .book-edition-wrap {
    width: 170px;
    flex-shrink: 0;
    scroll-snap-align: center;
    padding-bottom: 2rem;
  }

  .read .book-cover {
    width: 150px;
    height: 213px;
    transform: rotateY(-5deg);
  }

  .read .book-cover::before {
    width: 12px;
    left: -12px;
  }

  .read .book-edition:hover .book-cover {
    transform: rotateY(-2deg) scale(1.02);
  }

  .read .book-edition-title {
    font-size: 0.88rem;
  }

  .read .book-edition-subtitle {
    font-size: 0.7rem;
  }

  .read .book-edition-label {
    font-size: 0.58rem;
  }

  .read > .container > h2 {
    font-size: 1.8rem;
    letter-spacing: 0.16em;
  }

  .read .read-intro {
    font-size: 0.98rem;
    margin-bottom: 3rem;
    line-height: 1.9;
  }

  /* Flipbook always visible on touch devices */
  .read .flipbook-btn {
    opacity: 0.45;
    border-color: rgba(196, 162, 101, 0.08);
  }
}

/* Tablet adjustments — gallery spacing */
@media (min-width: 601px) and (max-width: 900px) {
  .read .book-editions {
    gap: 2.5rem;
    max-width: 1000px;
  }

  .read .book-edition-wrap {
    width: 190px;
  }

  .read .book-cover {
    width: 160px;
    height: 227px;
  }
}

/* --- Reduced motion: respect user preference --- */
@media (prefers-reduced-motion: reduce) {
  .read .book-cover {
    transform: none;
    transition: none;
  }

  .read .book-edition:hover .book-cover {
    transform: none;
  }

  .read .book-edition:hover {
    transform: none;
  }

  .read .flipbook-btn {
    opacity: 0.5;
    transition: none;
  }

  .read .book-edition-wrap::after {
    transition: none;
  }
}

/* --- Journey map cards --- */
.journey-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.journey-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

/* --- Mobile v8 adjustments --- */
@media (max-width: 768px) {
  .context-number {
    font-size: 2.4rem !important;
  }

  .bio-chapter {
    border-inline-start-width: 2px !important;
  }

  #memorial-counter-value .counter-number {
    font-size: 1.35rem;
  }
}

@media (max-width: 480px) {
  .context-number {
    font-size: 2rem !important;
  }
}

/* --- Timeline items: staggered reveal --- */
.timeline-item.reveal.visible {
  animation: revealUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.timeline-item:nth-child(1).reveal.visible { animation-delay: 0s; }
.timeline-item:nth-child(2).reveal.visible { animation-delay: 0.1s; }
.timeline-item:nth-child(3).reveal.visible { animation-delay: 0.2s; }
.timeline-item:nth-child(4).reveal.visible { animation-delay: 0.3s; }
.timeline-item:nth-child(5).reveal.visible { animation-delay: 0.4s; }
.timeline-item:nth-child(6).reveal.visible { animation-delay: 0.5s; }

/* --- Cookie banner: fade-out animation --- */
@keyframes cookieFadeOut {
  0% { opacity: 1; transform: translateY(0); }
  90% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(100%); pointer-events: none; }
}

/* auto-dismiss removed for GDPR compliance */

/* ============================================================
   DESIGN REFINEMENTS v9 — Final Polish to 10/10
   ============================================================ */

/* --- Hero parallax depth --- */
.hero::before {
  background-attachment: fixed;
}

.hero {
  background-attachment: fixed;
}

/* --- Video wrapper & cards: overrides removed, styles consolidated in main video section --- */

/* --- Gallery: vignette overlay for uniform look --- */
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.2) 100%);
  pointer-events: none;
  z-index: 1;
  border-radius: 4px;
  transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
  opacity: 0.3;
}

.gallery-item .gallery-label {
  z-index: 2;
}

/* --- Gallery: consistent borders --- */
.gallery-item {
  border: 1px solid rgba(196,162,101,0.06) !important;
  border-radius: 4px !important;
}

/* --- Quotes carousel: more dramatic --- */
.quote-text {
  font-size: clamp(1.3rem, 2.8vw, 1.65rem) !important;
  line-height: 1.9 !important;
}

.quote-text::before {
  font-size: 5.5rem !important;
  opacity: 0.12 !important;
  color: var(--color-accent) !important;
}

/* --- Endorsement foreword: stronger visual weight --- */
.foreword-quote {
  padding: 2.5rem 3rem !important;
  background: linear-gradient(135deg, rgba(196,162,101,0.04), rgba(196,162,101,0.015)) !important;
}

.foreword-quote p {
  font-size: 1.15rem !important;
  line-height: 1.9 !important;
}

/* --- Section transitions: smoother gradient blends --- */
.video-section::before,
.journey-map::before,
.gallery::before,
.endorsements::before,
.family-tree-section::before {
  height: 180px !important;
}

.about::before,
.timeline::before,
.read::before,
.rabbi-section::before,
.quotes-section::before,
.guestbook-section::before {
  height: 180px !important;
}

/* --- Hero scroll indicator: elegant pulse --- */
@keyframes scrollPulse {
  0%, 100% { opacity: 0.5; transform: translateY(0); }
  50% { opacity: 0.8; transform: translateY(6px); }
}

.scroll-indicator {
  animation: scrollPulse 2.5s ease-in-out infinite;
}

/* --- Bio summary snippet: elegant card --- */
.bio-summary-snippet {
  background: linear-gradient(135deg, rgba(196,162,101,0.03), rgba(196,162,101,0.01));
  border: 1px solid rgba(196,162,101,0.08);
  border-radius: 12px;
  padding: 2.2rem 2.5rem !important;
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Context links: refined pill buttons --- */
.context-links a {
  border-radius: 20px !important;
  padding: 0.5rem 1.3rem !important;
}

/* --- Tree: gold connecting lines --- */
.tree-line {
  background: linear-gradient(to bottom, rgba(196,162,101,0.3), rgba(196,162,101,0.1));
}

.tree-horizontal-line {
  background: linear-gradient(to right, rgba(196,162,101,0.1), rgba(196,162,101,0.3), rgba(196,162,101,0.1));
}

/* --- Donation cards: warmer --- */
.donation-card {
  background: linear-gradient(145deg, rgba(196,162,101,0.04), rgba(196,162,101,0.015)) !important;
}

/* --- Guestbook section: warm inviting bg --- */
.guestbook-section {
  background: radial-gradient(ellipse at 50% 30%, rgba(196,162,101,0.025) 0%, transparent 60%), var(--color-bg-warm) !important;
}

/* --- Nav: more premium feel --- */
.site-nav {
  background: rgba(10, 10, 10, 0.96) !important;
  border-bottom: 1px solid rgba(196,162,101,0.06) !important;
}

/* --- Letters grid: subtle reveal on hover --- */
.letters-grid-preview img {
  border: 1px solid rgba(196,162,101,0.06);
}

/* --- Hebrew video card: override removed, styles consolidated in main video section --- */

/* --- Global focus-visible for keyboard accessibility --- */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* --- Print styles: clean output --- */
@media print {
  .site-nav, .reading-progress, .cookie-banner, .share-sidebar,
  .back-to-top, .scroll-indicator, .hero-particles,
  .candle-section, .donation-section, .floating-share,
  .memorial-counter, .faq-section, .share-bar, .guestbook-form {
    display: none !important;
  }
  body { background: white; color: black; }
  h2 { color: #333; }
  h2::after { display: none; }
  a { color: #333; text-decoration: underline; }
  .lightbox { display: none !important; }
}

/* --- Reduced motion: respect user preference --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* --- Mobile v9: video wrapper --- */
@media (max-width: 768px) {
  .foreword-quote {
    padding: 1.8rem 1.5rem !important;
  }

  .foreword-quote p {
    font-size: 1.05rem !important;
  }

  .bio-summary-snippet {
    padding: 1.5rem 1.2rem !important;
  }
}

/* === Touch/click feedback === */
.book-edition:active,
.context-card:active,
.bio-chapter:active,
.wiki-card:active,
.faq-item:active,
.gallery-item:active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

/* --- Video section: language-based toggle --- */
/* Hebrew video hidden by default, shown only in Hebrew */
.hebrew-video-card { display: none; }
html[lang="he"] .hebrew-video-card { display: block; }
/* Main YouTube hidden in Hebrew (replaced by Hebrew subtitle video) */
html[lang="he"] .video-wrapper { display: none; }
