/* =============================================================================
   Heritage of Israel — cinematic museum theme
   ============================================================================= */
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-italic.woff") format("woff");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Frank Ruhl Libre";
  src: url("../fonts/frank-ruhl-libre.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --font-display: "Cormorant Garamond", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --font-sans: "Source Sans 3", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-hebrew: "Frank Ruhl Libre", "Times New Roman", serif;

  --bg: #f3ece0;
  --bg-warm: #e9dfce;
  --surface: #fffaf2;
  --ink: #1a2330;
  --ink-muted: #5c564c;
  --line: #d8ccb8;
  --line-strong: #c3b49a;

  --blue: #1b365d;
  --blue-deep: #0e1a30;
  --blue-soft: #e6eef7;
  --gold: #c4a15a;
  --gold-bright: #e2c37a;
  --gold-soft: #f3e6d0;
  --night: #070b16;
  --night-soft: #121a2b;

  --header-bg: color-mix(in srgb, #0b1220 72%, transparent);
  --header-fg: #f4efe6;
  --header-muted: #c9c0b0;

  --focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--gold);

  --nav-h: 4.4rem;
  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.25rem);
  --radius: 16px;
  --shadow: 0 18px 50px -28px rgb(14 26 48 / 0.45);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c111c;
    --bg-warm: #101828;
    --surface: #161d2c;
    --ink: #f3eee4;
    --ink-muted: #b7b0a4;
    --line: #2a3344;
    --line-strong: #3c4658;

    --blue: #9eb6d8;
    --blue-deep: #d5e0f0;
    --blue-soft: #1b2738;
    --gold: #d4b56a;
    --gold-bright: #efd59a;
    --gold-soft: #2b2418;

    --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold);
    --shadow: 0 18px 50px -24px rgb(0 0 0 / 0.7);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 0.5rem);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

img, svg { max-width: 100%; display: block; }

button { font: inherit; color: inherit; }

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--blue-deep); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  text-wrap: balance;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  color: var(--blue-deep);
}

h1 { font-size: clamp(2.8rem, 7.2vw, 6.2rem); font-weight: 600; }
h2 { font-size: clamp(1.95rem, 3.6vw, 3.1rem); }
h3 { font-size: 1.4rem; letter-spacing: 0; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus); }

::selection { background: var(--gold-soft); color: var(--ink); }

/* Grain + cursor glow sit above the page, never intercept clicks */
.grain {
  position: fixed;
  inset: 0;
  z-index: 400;
  pointer-events: none;
  opacity: 0.055;
  background: url("../images/grain.png") repeat;
  mix-blend-mode: overlay;
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 28rem;
  height: 28rem;
  margin: -14rem 0 0 -14rem;
  pointer-events: none;
  z-index: 3;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(226 195 122 / 0.22) 0%, rgb(27 54 93 / 0.08) 38%, transparent 68%);
  opacity: 0;
  transition: opacity 0.4s ease;
  will-change: transform;
}

.cursor-glow.is-on { opacity: 1; }

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 200;
  background: transparent;
  pointer-events: none;
}

.scroll-progress__bar {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #8a6a2e, #e2c37a, #f4e4b4);
}

/* =============================================================================
   Utilities
   ============================================================================= */
.wrap {
  width: min(100% - var(--gutter) * 2, var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 0.85rem;
  z-index: 300;
  background: var(--gold);
  color: var(--night);
  padding: 0.55rem 0.9rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transform: translateY(-160%);
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: none;
  color: var(--night);
}

.muted { color: var(--ink-muted); }

.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;
}

.section {
  position: relative;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0  clamp(3.75rem, 8vw, 6.75rem);
}

.section--warm { background: var(--bg-warm); }

.section-rail {
  position: sticky;
  top: var(--nav-h);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0;
  padding: 0.55rem max(var(--gutter), calc((100% - var(--wrap)) / 2));
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid transparent;
}

.section--warm .section-rail {
  background: color-mix(in srgb, var(--bg-warm) 86%, transparent);
}

.section-rail.is-stuck {
  border-bottom-color: var(--line);
}

.section-rail .num {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border: 1px solid var(--gold);
  border-radius: 50%;
  letter-spacing: 0;
  font-size: 0.68rem;
}

.section-head {
  max-width: 42rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.85rem);
}

.section-kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.7rem;
}

.lead {
  font-size: 1.2rem;
  color: var(--ink-muted);
}

.gold-text {
  background: linear-gradient(120deg, #8a6a2e 0%, #e2c37a 42%, #f7e7b0 50%, #c4a15a 78%, #8a6a2e 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.js .reveal {
  opacity: 0;
  transform: translateY(1.15rem) scale(0.985);
  filter: blur(6px);
  transition: opacity 0.85s ease, transform 0.85s ease, filter 0.85s ease;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }

/* =============================================================================
   Header
   ============================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: var(--header-bg);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid rgb(244 239 230 / 0.08);
  box-shadow: inset 0 3px 0 var(--gold);
  color: var(--header-fg);
}

.site-header.is-scrolled {
  box-shadow: inset 0 3px 0 var(--gold), 0 10px 30px -20px rgb(0 0 0 / 0.55);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - var(--gutter) * 2, var(--wrap));
  margin-inline: auto;
  height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--header-fg);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.28rem;
  letter-spacing: 0.01em;
}
.brand:hover { color: var(--header-fg); }

.brand-mark {
  width: 1.85rem;
  height: 1.85rem;
  color: var(--gold-bright);
  flex-shrink: 0;
}
.brand-mark svg { width: 100%; height: 100%; }

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

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

.nav-links a {
  display: inline-flex;
  padding: 0.4rem 0.62rem;
  color: var(--header-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
  border-radius: 4px;
}
.nav-links a:hover,
.nav-links a.is-active {
  color: var(--header-fg);
}

.nav-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid rgb(244 239 230 / 0.22);
  border-radius: 4px;
  background: rgb(244 239 230 / 0.06);
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--header-fg);
}

.nav-toggle__bars { position: relative; width: 1.1rem; height: 0.85rem; }
.nav-toggle__bars span {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}
.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-toggle__bars span:nth-child(3) { bottom: 0; top: auto; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  top: 50%; transform: translateY(-50%) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) {
  top: 50%; bottom: auto; transform: translateY(-50%) rotate(-45deg);
}

@media (max-width: 959px) {
  .nav-toggle { display: inline-flex; }

  .nav-panel {
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    z-index: 90;
    background: #0b1220;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 1.25rem var(--gutter) 2rem;
    overflow: auto;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.28s ease, visibility 0.28s ease;
  }
  .nav-panel.is-open { transform: none; visibility: visible; }

  .nav-links, .nav-links li, .nav-links a { width: 100%; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0.4rem; }
  .nav-links a {
    display: flex;
    padding: 0.95rem 1rem;
    font-size: 1.1rem;
    background: rgb(244 239 230 / 0.04);
    border: 1px solid rgb(244 239 230 / 0.12);
    color: var(--header-fg);
  }
}

/* =============================================================================
   Cinematic hero
   ============================================================================= */
.hero {
  position: relative;
  min-height: calc(100svh - 0px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #f4efe6;
  background:
    radial-gradient(ellipse 90% 55% at 50% 100%, rgb(226 181 87 / 0.55) 0%, rgb(154 98 30 / 0.28) 22%, transparent 58%),
    radial-gradient(ellipse 50% 40% at 80% 20%, rgb(80 110 180 / 0.18), transparent 60%),
    linear-gradient(180deg, #050814 0%, #0a1230 42%, #15274d 68%, #1b2e4a 82%, #2a3348 100%);
  overflow: hidden;
}

.hero__stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero__hebrew {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  font-family: var(--font-hebrew);
  color: rgb(244 239 230 / 0.07);
  line-height: 1;
  user-select: none;
}

.hero__hebrew span {
  position: absolute;
  white-space: nowrap;
}

.hero__hebrew .w1 {
  top: 14%;
  right: 6%;
  font-size: clamp(5rem, 18vw, 14rem);
}

.hero__hebrew .w2 {
  top: 38%;
  left: -2%;
  font-size: clamp(3.5rem, 12vw, 9rem);
}

.hero__star {
  position: absolute;
  top: 10%;
  left: 50%;
  width: min(38vw, 14.5rem);
  height: auto;
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
  opacity: 0.9;
}

/* Desktop: star as a right-hand hero visual, clear of the headline */
@media (min-width: 960px) {
  .hero__content {
    max-width: min(40rem, 54%);
  }

  .hero__star {
    left: auto;
    right: max(var(--gutter), calc((100% - var(--wrap)) / 2));
    top: 22%;
    transform: none;
    width: min(30vw, 23rem);
    opacity: 0.95;
    z-index: 2;
  }

  .hero__hebrew .w1 {
    top: 8%;
    right: 2%;
    font-size: clamp(4rem, 11vw, 8.5rem);
  }
}

.star-path {
  fill: none;
  stroke: #e2c37a;
  stroke-width: 1.6;
  stroke-linejoin: miter;
  stroke-linecap: butt;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.js:not(.reduced-motion) .star-path {
  animation: drawStar 1.85s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.js:not(.reduced-motion) .star-path:nth-child(2) {
  animation-delay: 0.18s;
}

.reduced-motion .star-path,
.no-js .star-path,
html:not(.js) .star-path {
  stroke-dashoffset: 0;
}

@keyframes drawStar {
  to { stroke-dashoffset: 0; }
}

.hero__content {
  position: relative;
  z-index: 3;
  padding: 0 0 clamp(11rem, 22vh, 16rem);
  max-width: 52rem;
}

.hero__content .section-kicker {
  color: var(--gold-bright);
}

.hero__content h1 {
  color: #f7f1e6;
  margin-bottom: 0.7em;
  text-shadow: 0 8px 40px rgb(0 0 0 / 0.35);
}

.hero__content .lead {
  color: rgb(244 239 230 / 0.82);
  max-width: 36rem;
  font-size: clamp(1.08rem, 2vw, 1.3rem);
}

.hero-title .word {
  display: inline-block;
  white-space: nowrap;
  margin-right: 0.28em;
}

.hero-title .char {
  display: inline-block;
  opacity: 1;
}

.js:not(.reduced-motion) .hero-title .char {
  opacity: 0;
  transform: translateY(0.65em);
  filter: blur(8px);
  animation: charIn 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: calc(var(--i, 0) * 38ms + 400ms);
}

@keyframes charIn {
  to { opacity: 1; transform: none; filter: none; }
}

.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  margin-top: 2rem;
  text-decoration: none;
  color: rgb(244 239 230 / 0.78);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.scroll-cue:hover { color: #f4efe6; }

.scroll-cue__mouse {
  width: 1.15rem;
  height: 1.85rem;
  border: 1px solid rgb(244 239 230 / 0.55);
  border-radius: 999px;
  position: relative;
}
.scroll-cue__mouse::after {
  content: "";
  position: absolute;
  top: 0.3rem;
  left: 50%;
  width: 3px;
  height: 6px;
  border-radius: 2px;
  background: var(--gold-bright);
  transform: translateX(-50%);
}
.js:not(.reduced-motion) .scroll-cue__mouse::after {
  animation: cueDot 1.6s ease-in-out infinite;
}

@keyframes cueDot {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  70% { opacity: 0; transform: translateX(-50%) translateY(0.55rem); }
  100% { opacity: 0; transform: translateX(-50%) translateY(0); }
}

.hero__skyline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: auto;
  z-index: 2;
  pointer-events: none;
  color: #070b14;
  filter: drop-shadow(0 -8px 18px rgb(226 181 87 / 0.18));
  will-change: transform;
}

@media (prefers-color-scheme: dark) {
  .hero__skyline { color: #05070d; }
}

/* =============================================================================
   Identity
   ============================================================================= */
.prose-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2.5rem;
}
.prose-grid .intro {
  grid-column: 1 / -1;
  max-width: 48rem;
  font-size: 1.18rem;
}

.memory-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.3rem 1.4rem;
  box-shadow: var(--shadow);
}

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

/* =============================================================================
   Timeline
   ============================================================================= */
.timeline-wrap {
  position: relative;
  padding-left: 0.2rem;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0.4rem;
  border-left: 2px solid var(--line);
  position: relative;
}

.timeline__fill {
  position: absolute;
  top: 0;
  left: 0.4rem;
  width: 2px;
  height: 0%;
  margin-left: -2px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  transform-origin: top;
  border-radius: 2px;
  z-index: 1;
}

.timeline li {
  position: relative;
  padding: 0 0 1.95rem 1.7rem;
}
.timeline li:last-child { padding-bottom: 0.2rem; }

.timeline li::before {
  content: "";
  position: absolute;
  left: -0.48rem;
  top: 0.48rem;
  width: 0.78rem;
  height: 0.78rem;
  border-radius: 50%;
  background: var(--bg-warm);
  border: 2px solid var(--gold);
  z-index: 2;
  box-shadow: 0 0 0 0 rgb(226 181 87 / 0);
  transition: box-shadow 0.4s ease, background 0.3s ease;
}

.timeline li.is-active::before,
.timeline li.is-passed::before {
  background: var(--gold);
  box-shadow: 0 0 0 5px rgb(226 181 87 / 0.22);
}

.timeline__date {
  margin: 0 0 0.2rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.timeline h3 { margin-bottom: 0.35rem; font-size: 1.32rem; }
.timeline p { color: var(--ink-muted); max-width: 46rem; }

/* =============================================================================
   Hebrew
   ============================================================================= */
.alphabet-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0 0 1.6rem;
  padding: 0.7rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 1rem;
  color: var(--ink-muted);
}

.alphabet-stat .count {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
  background: linear-gradient(120deg, #8a6a2e, #e2c37a, #8a6a2e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  min-width: 1.6ch;
  display: inline-block;
  text-align: center;
}

.word-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  perspective: 1200px;
}

.word-card {
  background: transparent;
  border: 0;
  padding: 0;
  text-align: center;
  cursor: pointer;
  border-radius: var(--radius);
  min-height: 12.5rem;
  position: relative;
}

.word-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 12.5rem;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.word-card.is-flipped .word-card__inner {
  transform: rotateY(180deg);
}

@media (hover: hover) and (pointer: fine) {
  .js:not(.reduced-motion) .word-card:hover .word-card__inner,
  .js:not(.reduced-motion) .word-card:focus-visible .word-card__inner {
    transform: rotateY(180deg);
  }
}

.word-card__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.word-card__back {
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 50% 0%, rgb(226 181 87 / 0.16), transparent 55%),
    var(--surface);
  border-color: color-mix(in srgb, var(--gold) 45%, var(--line));
}

.word-card .he {
  font-family: var(--font-hebrew);
  font-size: clamp(1.85rem, 3vw, 2.45rem);
  line-height: 1.3;
  color: var(--blue-deep);
  margin-bottom: 0.3rem;
}

.word-card .tl {
  display: block;
  font-style: italic;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.word-card .hint {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0.6rem 0 0;
}

.word-card__back p { font-size: 0.98rem; color: var(--ink-muted); }

/* Static fallback (no js / reduced motion): show meaning, no 3D */
.reduced-motion .word-card,
html:not(.js) .word-card {
  cursor: default;
  min-height: 0;
}
.reduced-motion .word-card__inner,
html:not(.js) .word-card__inner {
  transform: none;
  min-height: 0;
}
.reduced-motion .word-card__face,
html:not(.js) .word-card__face {
  position: relative;
  inset: auto;
  transform: none;
  backface-visibility: visible;
}
.reduced-motion .word-card__front .hint,
html:not(.js) .word-card__front .hint { display: none; }
.reduced-motion .word-card__back,
html:not(.js) .word-card__back {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0.2rem 0.6rem 0.8rem;
}

@media (max-width: 899px) {
  .word-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 479px) {
  .word-grid { grid-template-columns: 1fr; }
}

/* =============================================================================
   Holidays
   ============================================================================= */
.holiday-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.25rem;
}

.holiday {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.3rem 1.3rem 1.3rem 1.3rem;
  isolation: isolate;
  overflow: hidden;
}

.holiday::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(130deg, var(--gold-bright), var(--blue), var(--gold), var(--gold-bright));
  background-size: 220% 220%;
  pointer-events: none;
  z-index: -1;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.85;
}

.js:not(.reduced-motion) .holiday::before {
  animation: borderShift 10s linear infinite;
}

.holiday::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--radius) - 1px);
  background: var(--surface);
  z-index: -1;
}

@keyframes borderShift {
  to { background-position: 100% 100%; }
}

.holiday:hover,
.holiday:focus-within {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 40%, transparent), 0 12px 40px -20px rgb(196 161 90 / 0.55);
}

.holiday__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.35rem;
}

.holiday-icon {
  width: 2.2rem;
  height: 2.2rem;
  color: var(--gold);
  flex-shrink: 0;
}
.holiday-icon svg { width: 100%; height: 100%; }

.holiday h3 { margin: 0 0 0.15rem; }

.holiday .he {
  font-family: var(--font-hebrew);
  font-weight: 500;
  color: var(--gold);
  font-size: 1.05rem;
  margin: 0 0 0.55rem;
  text-align: right;
}

.holiday p { color: var(--ink-muted); font-size: 1.02rem; }

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

/* =============================================================================
   Places
   ============================================================================= */
.place-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.05rem;
  perspective: 1400px;
}

.place {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
  transition: transform 0.18s ease, box-shadow 0.25s ease;
}

.place__art {
  height: 7.6rem;
  background:
    linear-gradient(180deg, #152445 0%, #1b365d 55%, #c4a15a 160%);
  color: #070b14;
  display: grid;
  place-items: end stretch;
  overflow: hidden;
}

.place__art svg {
  width: 100%;
  height: 7.6rem;
}

.place__body { padding: 1.1rem 1.15rem 1.25rem; }
.place h3 { margin-bottom: 0.1rem; }
.place .he {
  font-family: var(--font-hebrew);
  color: var(--ink-muted);
  font-size: 0.98rem;
  margin: 0 0 0.5rem;
}
.place p { color: var(--ink-muted); font-size: 1.02rem; }

@media (max-width: 899px) {
  .place-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 559px) {
  .place-grid { grid-template-columns: 1fr; }
}

/* =============================================================================
   Culture
   ============================================================================= */
.culture-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
}

.culture-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.5rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.culture-card::after {
  content: "";
  position: absolute;
  top: -2rem;
  right: -2rem;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(196 161 90 / 0.16), transparent 70%);
  pointer-events: none;
}

.culture-card h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.culture-card h3 svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--gold);
  flex-shrink: 0;
}
.culture-card p { color: var(--ink-muted); }

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

/* =============================================================================
   Resources
   ============================================================================= */
.resource-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.resource-list li {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.resource-list li:hover {
  border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
  transform: translateX(0.25rem);
}

.resource-list a {
  font-weight: 700;
  text-decoration: none;
  color: var(--blue-deep);
}
.resource-list a:hover { text-decoration: underline; }

.resource-list p {
  margin-top: 0.25rem;
  color: var(--ink-muted);
  font-size: 1rem;
}

.ext { font-size: 0.8em; font-weight: 500; color: var(--ink-muted); }

/* =============================================================================
   Footer
   ============================================================================= */
.site-footer {
  border-top: 1px solid rgb(244 239 230 / 0.08);
  background:
    radial-gradient(ellipse 80% 80% at 80% 120%, rgb(196 161 90 / 0.18), transparent 50%),
    #0a101c;
  color: #f3eee4;
  padding: 3rem 0 1.8rem;
}

.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: inherit; }
.site-footer .brand { color: inherit; }
.site-footer .brand-mark { color: var(--gold-bright); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  align-items: start;
}

.footer-blurb {
  margin-top: 0.85rem;
  max-width: 26rem;
  opacity: 0.86;
  font-size: 1rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-weight: 600;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 2.2rem;
  padding-top: 1.15rem;
  border-top: 1px solid color-mix(in srgb, #f3eee4 16%, transparent);
  font-size: 0.9rem;
  opacity: 0.8;
}

@media (max-width: 699px) {
  .footer-grid { grid-template-columns: 1fr; }
  .resource-list li:hover { transform: none; }
}

/* =============================================================================
   404
   ============================================================================= */
.page-404 {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem var(--gutter);
  background:
    radial-gradient(ellipse 70% 50% at 50% 100%, rgb(196 161 90 / 0.2), transparent 55%),
    linear-gradient(180deg, #070b16, #121a2b);
  color: #f4efe6;
}

.page-404 h1 { color: #f4efe6; }

.page-404 .code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 14vw, 8rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(120deg, #8a6a2e, #e2c37a, #f7e7b0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.2rem;
}

.page-404 .muted { color: rgb(244 239 230 / 0.7); }

.page-404 .btn {
  display: inline-flex;
  margin-top: 1.25rem;
  padding: 0.75rem 1.3rem;
  background: linear-gradient(120deg, #c4a15a, #e2c37a);
  color: #0b1220;
  text-decoration: none;
  font-weight: 700;
  border-radius: 4px;
}
.page-404 .btn:hover { color: #0b1220; }

/* =============================================================================
   Reduced motion
   ============================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .cursor-glow,
  .js:not(.reduced-motion) .scroll-cue__mouse::after { display: none; }

  .resource-list li:hover { transform: none; }
}

@media print {
  .js .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
  .hero { min-height: auto; padding: 3rem 0; }
  .hero__stars, .cursor-glow, .grain, .scroll-progress { display: none; }
}
