/* ============================================================
   ADAM — COLLECTIVE MEMORY 26S
   ============================================================ */

/* ---- Hebrew face: Atlas when supplied, Heebo as graceful fallback ---- */
@font-face {
  font-family: "Atlas";
  src: url("fonts/Atlas.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #f1ede4;            /* cream foreground */
  --ink-soft: rgba(240, 236, 227, 0.62);
  --ink-faint: rgba(240, 236, 227, 0.34);
  --ink-ghost: rgba(240, 236, 227, 0.12);
  --bg: #07070a;
  --hair: rgba(240, 236, 227, 0.16);
  --glass: rgba(14, 14, 18, 0.42);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --sans: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
  --hebrew: "Atlas", "Heebo", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;

  --pad: clamp(22px, 4vw, 64px);

  /* ── Logo size — edit these two values to resize the wordmark ── */
  --logo-width-desktop: 150px;
  --logo-width-mobile: 104px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[lang="he"] body { font-family: var(--hebrew); }

img { display: block; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* ============================================================
   STAGE & VIDEO LAYERS
   ============================================================ */
#stage {
  position: fixed;
  inset: 0;
  background: var(--bg);
  overflow: hidden;
}

.vlayer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.vlayer video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  background: var(--bg);
}

/* z-order is driven by JS via these classes */
.vlayer.is-back   { z-index: 1; }
.vlayer.is-front  { z-index: 2; }
.vlayer.is-bridge { z-index: 3; } /* transition rides on top */

.vlayer[hidden] { display: none; }

/* A subtle, even cinematic vignette + grade over everything */
#grade {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(130% 100% at 50% 22%, transparent 38%, rgba(0,0,0,0.34) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.30) 0%, transparent 22%, transparent 62%, rgba(0,0,0,0.46) 100%);
  mix-blend-mode: normal;
}

/* ============================================================
   CINEMATIC PLACEHOLDER (shown only when a video file is absent)
   ============================================================ */
.placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #08080b;
}
.placeholder::before {
  /* slow drifting light so the stand-in feels alive, like a loop */
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(48% 60% at 50% 42%, var(--ph-glow, rgba(120,120,130,0.30)), transparent 70%);
  animation: drift 14s var(--ease) infinite alternate;
}
.placeholder::after {
  /* fine film grain */
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
  pointer-events: none;
}
@keyframes drift {
  from { transform: translate3d(-4%, -2%, 0) scale(1.05); }
  to   { transform: translate3d(4%, 3%, 0) scale(1.12); }
}

.placeholder .ph-year {
  position: relative;
  font-size: clamp(96px, 20vw, 320px);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(240,236,227,0.16);
  user-select: none;
}
html[lang="he"] .placeholder .ph-year { font-family: var(--sans); }

.placeholder .ph-tag {
  position: absolute;
  left: var(--pad);
  bottom: calc(var(--pad) + 6px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 9px;
  direction: ltr;
}
.placeholder .ph-tag::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-faint);
  animation: blink 2.4s steps(1) infinite;
}
@keyframes blink { 0%,60%{opacity:1;} 61%,100%{opacity:0.25;} }

/* per-era tints */
.placeholder[data-tint="earth"]    { --ph-glow: rgba(150,118,86,0.34); }
.placeholder[data-tint="rust"]     { --ph-glow: rgba(156,92,60,0.34); }
.placeholder[data-tint="amber"]    { --ph-glow: rgba(176,140,70,0.34); }
.placeholder[data-tint="concrete"] { --ph-glow: rgba(96,108,124,0.34); }
.placeholder[data-tint="cool"]     { --ph-glow: rgba(120,150,158,0.32); }

/* ============================================================
   UI LAYER
   ============================================================ */
#ui {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}
#ui > * { pointer-events: auto; }
/* These two layers must be click-through so the hotspots beneath the panel
   stay clickable in BOTH languages (panel switches sides by language).
   Higher specificity (2 ids) beats the `#ui > *` rule above. */
#ui > #text-panel { pointer-events: none; }
#ui > #hotspots { pointer-events: none; }

/* ---- Logo (fixed, top-leading) ---- */
.logo {
  position: fixed;
  top: clamp(20px, 3vh, 34px);
  left: var(--pad);
  z-index: 8;
  width: var(--logo-width-desktop);
  height: auto;
  opacity: 0.96;
  transition: opacity 0.6s var(--ease);
}
html[lang="he"] .logo { left: var(--pad); right: auto; } /* wordmark stays leading-left */

/* ---- Language toggle (top-trailing) ---- */
.lang {
  position: fixed;
  top: clamp(18px, 3vh, 32px);
  right: var(--pad);
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
}
.lang button {
  color: var(--ink-faint);
  letter-spacing: 0.14em;
  padding: 4px 2px;
  transition: color 0.4s var(--ease);
}
.lang button[aria-pressed="true"] { color: var(--ink); }
.lang .sep { color: var(--ink-ghost); }
html[lang="he"] .lang .he-label { font-family: var(--hebrew); letter-spacing: 0; }

/* About button — sits in the same top-right cluster as the toggle */
.about-btn {
  color: var(--ink-faint);
  letter-spacing: 0.14em;
  padding: 4px 2px;
  transition: color 0.4s var(--ease);
}
.about-btn:hover { color: var(--ink); }
html[lang="he"] .about-btn { font-family: var(--hebrew); letter-spacing: 0; }

/* ============================================================
   TEXT PANEL
   ============================================================ */
.text-panel {
  position: fixed;
  top: auto;
  bottom: clamp(120px, 16vh, 180px);
  width: min(560px, 38vw);
  max-width: 560px;
  z-index: 7;
  pointer-events: none; /* clicks pass through to hotspots beneath */
  transition: opacity 0.45s var(--ease), transform 0.45s cubic-bezier(.16,1,.3,1);
}
.text-panel.lang-en { left: clamp(56px, 6vw, 104px);  right: auto; direction: ltr; text-align: left;  }
.text-panel.lang-he { right: clamp(56px, 6vw, 104px); left: auto;  direction: rtl; text-align: right; font-family: var(--hebrew); }
/* soft cinematic readability halo behind the lower text — no hard box */
.text-panel::before {
  content: "";
  position: absolute;
  inset: -28px -36px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at center,
    rgba(0,0,0,0.34), rgba(0,0,0,0.08) 55%, transparent 78%);
  filter: blur(12px);
}

.text-panel .meta {
  font-size: 11px;
  letter-spacing: 0.28em;
  color: rgba(240,236,227,0.95);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 14px; /* sits directly above the year — normal flow, no transform */
  text-shadow: 0 1px 12px rgba(0,0,0,0.35);
}
html[lang="he"] .text-panel .meta { letter-spacing: 0.16em; font-weight: 700; font-family: var(--hebrew); }

.text-panel .year {
  font-size: clamp(13px, 1vw, 15px);
  letter-spacing: 0.4em;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
html[lang="he"] .text-panel .year { letter-spacing: 0.2em; }

.text-panel .title {
  font-size: clamp(30px, 3.4vw, 52px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin-bottom: clamp(20px, 3.4vh, 30px);
  text-wrap: balance;
}
html[lang="he"] .text-panel .title { font-weight: 700; letter-spacing: 0; line-height: 1.12; }

.text-panel .body {
  max-width: 560px;
  color: rgba(240,236,227,0.82);
  font-size: clamp(13.5px, 0.98vw, 15.5px);
  line-height: 1.58;
  font-weight: 500;
  text-shadow: 0 1px 14px rgba(0,0,0,0.38);
}
html[lang="he"] .text-panel .body { line-height: 1.78; font-size: clamp(14px, 1vw, 16px); font-weight: 600; color: rgba(240,236,227,0.86); }

/* keyed crossfade for text on look change */
.text-panel .swap { transition: opacity 0.5s var(--ease); }
.text-panel.is-swapping .swap { opacity: 0; }

/* dimmed during transitions — fade fully out + slight lift, so the text
   swaps while hidden and fades back in on the next look (no abrupt jump) */
#ui.is-transitioning .text-panel { opacity: 0; transform: translateY(8px); }

/* ============================================================
   HOTSPOTS
   ============================================================ */
#hotspots {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 6;
  pointer-events: none;
  transition: opacity 0.55s var(--ease);
}
#ui.is-transitioning #hotspots { opacity: 0; }
/* while a hover preview is open, lift the whole hotspot layer above the
   arrows (z9) and text panel (z7) so the zoom video dominates everything */
#hotspots.preview-active { z-index: 200; }

.hotspot {
  position: absolute;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  opacity: 1;
  transition: opacity 0.6s var(--ease);
}
.hotspot.is-enter { opacity: 0; }
/* hovered pin rises above every sibling pin so its preview is never
   covered by a nearby plus icon */
.hotspot.is-hovering { z-index: 210; }

.hotspot .ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.28);
  background:
    radial-gradient(circle at 30% 25%,
      rgba(255,255,255,0.40),
      rgba(255,255,255,0.10) 36%,
      rgba(255,255,255,0.03) 74%);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.34),
    inset 0 -1px 0 rgba(255,255,255,0.08),
    0 8px 22px rgba(0,0,0,0.30);
  transition: border-color 0.5s var(--ease), transform 0.5s var(--ease), background 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.hotspot .plus {
  position: relative;
  width: 13px; height: 13px;
}
.hotspot .plus::before, .hotspot .plus::after {
  content: "";
  position: absolute;
  background: rgba(255,255,255,0.95);
  border-radius: 999px;
  box-shadow: 0 0 6px rgba(0,0,0,0.45);
}
.hotspot .plus::before { left: 50%; top: 0; width: 1px; height: 100%; transform: translateX(-50%); }
.hotspot .plus::after  { top: 50%; left: 0; height: 1px; width: 100%; transform: translateY(-50%); }

.hotspot .pulse {
  position: absolute;
  inset: 50%;
  width: 7px; height: 7px;
  margin: -3.5px;
  border-radius: 50%;
  border: 1px solid rgba(240,236,227,0.5);
  animation: pulse 3.2s var(--ease) infinite;
}
@keyframes pulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  70%  { transform: scale(3.6); opacity: 0; }
  100% { transform: scale(3.6); opacity: 0; }
}
.hotspot:hover .ring {
  border-color: rgba(255,255,255,0.5);
  transform: scale(1.08);
  background:
    radial-gradient(circle at 30% 25%,
      rgba(255,255,255,0.56),
      rgba(255,255,255,0.16) 38%,
      rgba(255,255,255,0.05) 76%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.45),
    inset 0 -1px 0 rgba(255,255,255,0.10),
    0 10px 28px rgba(0,0,0,0.34);
}
.hotspot:hover .pulse { animation-play-state: paused; opacity: 0; }

/* desktop hover preview — lazy-loads the hotspot's zoom video.
   Position (left / top / bottom) is set by JS (positionPreview) so it is
   always edge-safe; here we only handle size, look, and fade. */
.hotspot .preview {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 14px);
  width: 132px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
  z-index: 210;
}
.hotspot:hover .preview { opacity: 1; }
.hotspot .pv-media {
  display: block;
  width: 132px;
  height: 166px;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background:
    linear-gradient(135deg,
      rgba(255,255,255,0.16),
      rgba(255,255,255,0.04) 38%,
      rgba(255,255,255,0.12) 72%,
      rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 18px 50px rgba(0,0,0,0.30);
}
/* refracted liquid-glass edge */
.hotspot .pv-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  padding: 1px;
  background:
    linear-gradient(135deg,
      rgba(255,255,255,0.55),
      rgba(255,255,255,0.08) 28%,
      rgba(255,255,255,0.28) 58%,
      rgba(255,255,255,0.04) 78%,
      rgba(255,255,255,0.35));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
}
.hotspot .pv-media video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center center;
  display: block;
}
.hotspot .pv-ph {
  position: absolute; inset: 0;
  background: radial-gradient(60% 58% at 50% 44%, var(--ph-glow, rgba(120,120,130,0.3)), #0c0c10 76%);
}
.hotspot .pv-ph[data-tint="earth"]    { --ph-glow: rgba(150,118,86,0.42); }
.hotspot .pv-ph[data-tint="rust"]     { --ph-glow: rgba(156,92,60,0.42); }
.hotspot .pv-ph[data-tint="amber"]    { --ph-glow: rgba(176,140,70,0.42); }
.hotspot .pv-ph[data-tint="concrete"] { --ph-glow: rgba(96,108,124,0.42); }
.hotspot .pv-ph[data-tint="cool"]     { --ph-glow: rgba(120,150,158,0.4); }
.hotspot .pv-cap {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
}
html[lang="he"] .hotspot .pv-cap { font-family: var(--hebrew); letter-spacing: 0; text-transform: none; font-size: 11px; }
@media (hover: none) { .hotspot .preview { display: none; } }

/* editing aid — only present when HOTSPOT_DEBUG = true */
.hotspot .hs-debug {
  position: absolute;
  left: 50%; top: calc(100% + 6px);
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: #7fd4ff;
  background: rgba(0,0,0,0.62);
  padding: 2px 6px;
  border-radius: 2px;
  pointer-events: none;
}

/* ============================================================
   DETAIL MODAL
   ============================================================ */
#detail {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5,5,7,0.74);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
#detail.is-open { display: flex; }

.detail-card {
  width: min(880px, 90vw);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
#detail.is-open .detail-card { animation: cardIn 0.5s var(--ease); }
@keyframes cardIn { from { transform: translateY(14px); } to { transform: translateY(0); } }

.detail-media {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  background:
    linear-gradient(135deg,
      rgba(255,255,255,0.16),
      rgba(255,255,255,0.04) 38%,
      rgba(255,255,255,0.12) 72%,
      rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 24px 60px rgba(0,0,0,0.34);
  overflow: hidden;
}
.detail-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  padding: 1px;
  background:
    linear-gradient(135deg,
      rgba(255,255,255,0.55),
      rgba(255,255,255,0.08) 28%,
      rgba(255,255,255,0.28) 58%,
      rgba(255,255,255,0.04) 78%,
      rgba(255,255,255,0.35));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
}
.detail-media video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.detail-media .placeholder { background: #0c0c10; }
.detail-media .placeholder .ph-year { font-size: clamp(54px, 9vw, 120px); }

.detail-text { padding-block: 8px; }
.detail-text .d-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  margin-bottom: 16px;
}
.detail-text .d-title {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: 14px;
}
.detail-text .d-body {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
  max-width: 38ch;
}
html[lang="he"] .detail-card { direction: rtl; }
html[lang="he"] .detail-text { font-family: var(--hebrew); text-align: right; }
html[lang="he"] .detail-text .d-eyebrow { font-family: var(--mono); }

/* ============================================================
   ABOUT MODAL — same liquid-glass language as the detail modal
   ============================================================ */
#about {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5,5,7,0.74);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 24px;
}
#about.is-open { display: flex; }

.about-card {
  position: relative;
  width: min(640px, calc(100vw - 48px));
  padding: clamp(34px, 5vw, 56px);
  border-radius: 8px;
  background:
    linear-gradient(135deg,
      rgba(255,255,255,0.16),
      rgba(255,255,255,0.04) 38%,
      rgba(255,255,255,0.12) 72%,
      rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 24px 60px rgba(0,0,0,0.36);
}
.about-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  padding: 1px;
  background:
    linear-gradient(135deg,
      rgba(255,255,255,0.55),
      rgba(255,255,255,0.08) 28%,
      rgba(255,255,255,0.28) 58%,
      rgba(255,255,255,0.04) 78%,
      rgba(255,255,255,0.35));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
}
#about.is-open .about-card { animation: cardIn 0.5s var(--ease); }
.about-title {
  position: relative;
  z-index: 2;
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: clamp(18px, 2.4vh, 26px);
}
.about-body {
  position: relative;
  z-index: 2;
  color: rgba(240,236,227,0.84);
  font-size: clamp(14px, 1vw, 15.5px);
  line-height: 1.7;
  font-weight: 450;
  white-space: pre-line;
}
html[lang="he"] #about .about-card { direction: rtl; text-align: right; }
html[lang="he"] .about-title { font-weight: 700; letter-spacing: 0; }
html[lang="he"] .about-body { font-family: var(--hebrew); line-height: 1.85; font-weight: 600; }

.detail-close {
  position: fixed;
  top: clamp(20px, 3vh, 34px);
  right: var(--pad);
  z-index: 21;
  width: 42px; height: 42px;
  border: 1px solid var(--hair);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink);
  background: var(--glass);
  backdrop-filter: blur(8px);
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.detail-close:hover { border-color: var(--ink-faint); transform: rotate(90deg); }

/* ============================================================
   ARROWS
   ============================================================ */
.nav-arrow {
  position: fixed;
  top: 40%;
  transform: translateY(-50%);
  z-index: 9;
  width: clamp(48px, 4vw, 58px);
  height: clamp(48px, 4vw, 58px);
  border-radius: 50%;
  border: 1px solid var(--hair);
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: opacity 0.5s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease), transform 0.4s var(--ease);
}
.nav-arrow:hover { border-color: var(--ink-faint); background: rgba(20,20,26,0.6); }
.nav-arrow.prev { left: var(--pad); }
.nav-arrow.next { right: var(--pad); }
.nav-arrow svg { width: 17px; height: 17px; }
.nav-arrow[disabled] { opacity: 0; pointer-events: none; }
#ui.is-transitioning .nav-arrow { opacity: 0.2; pointer-events: none; }

/* ============================================================
   TIMELINE (minimal typographic index, bottom-center)
   ============================================================ */
.timeline {
  position: fixed;
  bottom: clamp(28px, 4.8vh, 56px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(26px, 4.5vw, 72px);
  white-space: nowrap;
  pointer-events: none; /* index, not a nav bar */
  direction: ltr;
}
.timeline .tl-dot { display: none; }
.tl-item {
  position: relative;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(240, 236, 227, 0.28);
  background: none;
  border: 0;
  padding: 4px 2px;
  cursor: pointer;
  pointer-events: auto;
  transition: color 0.35s var(--ease), transform 0.35s cubic-bezier(.16,1,.3,1);
}
.tl-item:hover { color: rgba(240, 236, 227, 0.6); }
.tl-item.active { color: rgba(240, 236, 227, 0.95); transform: translateY(-1px); }
.tl-item::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: rgba(240, 236, 227, 0.75);
  transition: width 0.35s cubic-bezier(.16,1,.3,1);
}
.tl-item.active::after { width: 22px; }
.tl-item.he-label { font-family: var(--hebrew); font-size: 12px; letter-spacing: 0; text-transform: none; }

/* ============================================================
   LANDING
   ============================================================ */
#landing {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--pad);
  transition: opacity 1s var(--ease), visibility 1s var(--ease);
}
#landing.is-gone { opacity: 0; visibility: hidden; }
#landing::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(60% 50% at 50% 50%, rgba(150,140,120,0.06), transparent 70%);
  pointer-events: none;
}
.landing-logo {
  height: clamp(34px, 6vh, 64px);
  width: auto;
  margin-bottom: clamp(34px, 6vh, 60px);
  animation: landingRise 0.9s var(--ease) 0.1s;
}
.landing-copy {
  max-width: 620px;
  color: var(--ink-soft);
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.7;
  white-space: pre-line;
  animation: landingRise 0.9s var(--ease) 0.28s;
}
html[lang="he"] .landing-copy { font-family: var(--hebrew); line-height: 1.85; direction: rtl; }
.landing-enter {
  margin-top: clamp(34px, 6vh, 56px);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 14px 26px;
  border: 1px solid var(--hair);
  border-radius: 2px;
  animation: landingRise 0.9s var(--ease) 0.46s;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease), gap 0.4s var(--ease);
}
.landing-enter:hover { border-color: var(--ink-faint); background: rgba(255,255,255,0.03); gap: 18px; }
html[lang="he"] .landing-enter { font-family: var(--hebrew); letter-spacing: 0.06em; }
.landing-lang {
  position: absolute;
  top: clamp(18px, 3vh, 32px);
  right: var(--pad);
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
/* transform-only: resting state stays fully visible even if the animation never runs */
@keyframes landingRise { from { transform: translateY(16px); } to { transform: translateY(0); } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 820px) {
  :root { --pad: 18px; }
  .logo { width: var(--logo-width-mobile); }
  .text-panel { width: auto; max-width: min(76vw, 420px); top: auto; bottom: clamp(96px, 16vh, 150px); }
  .text-panel .title { font-size: clamp(24px, 7vw, 34px); }
  .text-panel .meta { margin-bottom: 14px; }
  .text-panel .body {
    font-size: 13px; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
    overflow: hidden;
  }
  html[lang="he"] .text-panel .body { -webkit-line-clamp: 5; }
  .nav-arrow { top: auto; bottom: clamp(24px, 4.5vh, 44px); transform: none; width: 44px; height: 44px; }
  .timeline { gap: 8px; bottom: 80px; }
  .timeline .rule { width: 14px; }
  .timeline .node { font-size: 10px; letter-spacing: 0.1em; }
  .detail-card { grid-template-columns: 1fr; gap: 20px; max-height: 86vh; }
  .detail-media { aspect-ratio: 16 / 11; }
  .hotspot { width: 40px; height: 40px; }
}
