/* Inner pages of the memorial site. Same world as the home page: limestone ground, basalt ink,
   Frank Ruhl Libre throughout, the beret red only on actions. Groups are separated by space and tone steps, never by lines. */
:root {
  color-scheme: light;
  --bg: #ecebe6;
  --paper: #f5f5f3;
  --stone: #dfddd5;
  --ink: #1a1a17;
  --muted: #55554d;
  --dark: #1c1c19;
  --dark-ink: #f1f1ee;
  --dark-muted: #b3b1a6;
  --accent: #a3202f;
  --accent-ink: #ffffff;
  --f: "Frank Ruhl Libre", "David Libre", "Times New Roman", serif;
  --s-small: 1rem;
  --s-body: clamp(1.125rem, 1.07rem + 0.25vw, 1.25rem);
  --s-lead: clamp(1.3125rem, 1.15rem + 0.7vw, 1.75rem);
  --s-head: clamp(2.25rem, 1.6rem + 2.6vw, 3.75rem);
  --m: clamp(16px, 3vw, 48px);
  --sec: clamp(64px, 8vw, 120px);
  --read: 40rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
:root.hc { --bg: #fff; --paper: #fff; --stone: #eee; --ink: #000; --muted: #222; --dark: #000; --accent: #a00016; }
html.fs1 { font-size: 112.5%; } html.fs2 { font-size: 125%; } html.fs-1 { font-size: 93.75%; }
html.ul a { text-decoration: underline !important; }
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: #b9b6aa var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f); font-size: var(--s-body); line-height: 1.65; caret-color: var(--accent); }
::selection { background: #e6c3c7; color: var(--ink); }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }
a { color: var(--accent); text-underline-offset: 5px; text-decoration-thickness: 1px; }
a:hover { text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2 { font-weight: 400; line-height: 1.1; letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: var(--s-head); }
h3 { font-size: var(--s-lead); font-weight: 500; line-height: 1.3; text-wrap: balance; }
.skip { position: absolute; inset-inline-start: 1rem; top: -5rem; background: var(--ink); color: var(--bg); padding: .5rem 1rem; z-index: 50; }
.skip:focus { top: 1rem; }
.wrap { max-width: 76rem; margin-inline: auto; padding-inline: var(--m); }
.read { max-width: var(--read); }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.muted { color: var(--muted); }
.sub-line { color: var(--muted); font-size: var(--s-small); margin-top: -.4rem; }
.mini-h { font-size: var(--s-body); font-weight: 500; }

/* header */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--paper); }
.head-row { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; }
.brand { display: flex; align-items: center; gap: .7rem; margin-inline-end: auto; color: var(--ink); text-decoration: none; font-size: var(--s-small); font-weight: 500; line-height: 1.15; }
.brand img { width: 40px; height: 40px; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul { display: flex; gap: .2rem; }
.nav a, .nav button.sub { display: block; padding: .5rem .8rem; color: var(--ink); text-decoration: none; font: inherit; font-size: var(--s-small); background: none; border: 0; cursor: pointer; transition: background-color .2s, color .2s; }
.nav a:hover, .nav button.sub:hover { background: var(--bg); }
.nav a[aria-current="page"] { color: var(--accent); }
.nav li { position: relative; }
.nav button.sub::after { content: ""; display: inline-block; width: .4em; height: .4em; border-inline-end: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-inline-start: .5em; }
.nav .drop { display: none; position: absolute; inset-inline-start: 0; top: 100%; min-width: 13rem; background: var(--paper); padding: .4rem; box-shadow: 0 16px 32px -16px rgba(0,0,0,.35); }
.nav li.open > .drop { display: block; }
.menu-btn { display: none; background: var(--bg); border: 0; color: var(--ink); font: inherit; font-size: var(--s-small); padding: .5rem 1rem; cursor: pointer; }
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; inset-inline: 0; top: 100%; background: var(--paper); padding: .5rem var(--m) 1.25rem; max-height: 80vh; overflow: auto; box-shadow: 0 16px 32px -20px rgba(0,0,0,.35); }
  .site-head.open .nav { display: block; }
  .nav > ul { flex-direction: column; }
  .nav .drop { position: static; display: block; box-shadow: none; padding: 0 1rem 0 0; background: none; }
  .nav button.sub { color: var(--muted); cursor: default; padding-top: 1rem; }
  .nav button.sub::after { content: none; }
}

/* page opening */
.page-hero { background: var(--paper); }
.hero-in { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.5rem, 5vw, 4rem); display: flex; flex-direction: column; gap: 1rem; }
.page-hero h1 { font-size: var(--s-head); font-weight: 300; max-width: 20ch; }
.lede { font-size: var(--s-lead); line-height: 1.45; color: var(--muted); max-width: 46ch; }

/* sections */
main section { padding-block: var(--sec); }
main section:nth-of-type(even) { background: var(--paper); }
.sec-head { display: flex; flex-direction: column; gap: .8rem; margin-bottom: 2.25rem; }
.prose { display: flex; flex-direction: column; gap: 1.1em; max-width: var(--read); }
.prose h3 { margin-top: .8em; }
.two { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
@media (max-width: 760px) { .two { grid-template-columns: minmax(0, 1fr); } }
blockquote.big { font-size: var(--s-lead); line-height: 1.5; font-weight: 300; max-width: 40ch; }
blockquote.big cite { display: block; font-style: normal; font-size: var(--s-small); color: var(--muted); margin-top: .8rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 2rem 2.5rem; }
.item h3 { font-size: var(--s-body); margin-bottom: .3rem; }
.item p { color: var(--muted); font-size: var(--s-small); }
.link-more, .text-link { font-size: var(--s-body); color: var(--ink); }
.link-more:hover, .text-link:hover { color: var(--accent); }
.out::after { content: " ↗"; font-size: .85em; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 1.5rem; background: var(--ink); color: var(--bg); font: 500 var(--s-small)/1 var(--f); text-decoration: none; border: 0; cursor: pointer; transition: transform .25s var(--ease), background-color .25s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: none; }
.btn.solid { background: var(--accent); color: var(--accent-ink); }
.btn.solid:hover { background: #8a1726; }
.btns { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.callout { background: var(--stone); padding: clamp(1.5rem, 4vw, 2.5rem); display: flex; flex-direction: column; gap: 1rem; }
main section:nth-of-type(even) .callout { background: var(--bg); }
.callout h2 { font-size: var(--s-lead) !important; font-weight: 500; }

/* monument timeline: the years carry the order */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: clamp(2.5rem, 5vw, 4rem); }
.timeline li { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 1.5rem; }
.timeline .yr { font-size: var(--s-lead); font-weight: 500; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.3; }
.timeline .body { display: flex; flex-direction: column; gap: 1em; max-width: var(--read); }
@media (max-width: 560px) { .timeline li { grid-template-columns: minmax(0, 1fr); gap: .4rem; } }

/* video and article links */
.media-list { display: flex; flex-direction: column; gap: 6px; }
.vlink { display: flex; gap: 1rem; align-items: center; padding: .85rem 1rem; text-decoration: none; color: var(--ink); background: var(--paper); transition: background-color .2s; }
main section:nth-of-type(even) .vlink { background: var(--bg); }
.vlink:hover { background: var(--stone) !important; }
.vlink .play { flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--accent); display: grid; place-items: center; transition: transform .25s var(--ease); }
.vlink:hover .play { transform: scale(1.08); }
.vlink .play::before { content: ""; border-inline-end: .7rem solid #fff; border-block: .42rem solid transparent; margin-inline-start: -.18rem; }
.vlink .t { min-width: 0; display: flex; flex-direction: column; }
.vlink .t b { font-weight: 500; line-height: 1.4; }
.vlink .t small { color: var(--muted); font-size: .9rem; }
.doc { display: flex; flex-direction: column; gap: 1rem; padding-block: 2.5rem; }
.doc:first-of-type { padding-top: 0; }
.doc + .doc { margin-top: 1.5rem; }
details.key { background: var(--paper); padding: .9rem 1.2rem; max-width: var(--read); }
details.key summary { cursor: pointer; font-weight: 500; font-size: var(--s-small); }
.key-list { margin: .8rem 0 0; padding: 0; list-style: none; font-variant-numeric: tabular-nums; font-size: var(--s-small); }
.key-list li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: .6rem; padding-block: .15rem; }
.key-list li.day { display: block; font-weight: 500; margin-top: .8rem; color: var(--accent); }
.key-list time { direction: ltr; text-align: end; color: var(--muted); }

/* company pages */
.co-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.co-nav a { padding: .55rem 1rem; background: var(--paper); color: var(--ink); text-decoration: none; font-size: var(--s-small); transition: background-color .2s; }
.co-nav a:hover { background: var(--stone); }
.co-nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.names-jump { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.names-jump a { display: block; padding: .3rem .8rem; background: var(--paper); color: var(--ink); text-decoration: none; font-size: var(--s-small); transition: background-color .2s, color .2s; }
.names-jump a:hover { background: var(--ink); color: var(--bg); }
.fallen { padding-block: clamp(2.5rem, 5vw, 3.5rem); display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); gap: 1.5rem clamp(2rem, 5vw, 4rem); scroll-margin-top: 5.5rem; }
.fallen + .fallen { padding-top: 0; }
.fallen .name h2 { font-size: var(--s-lead); font-weight: 500; }
.fallen .name .zl { color: var(--muted); }
.fallen .name .izkor { display: inline-block; margin-top: .5rem; font-size: var(--s-small); }
.fallen .text { display: flex; flex-direction: column; gap: 1em; max-width: var(--read); padding-top: .2rem; }
.fallen .pending { color: var(--muted); }
@media (max-width: 760px) {
  .fallen { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .fallen .name { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0 1rem; align-items: end; }
  .fallen .name .ph-fig { grid-row: 1 / span 4; margin-bottom: 0; }
}

/* people and contact */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: 6px; list-style: none; padding: 0; margin: 0; }
.people li { padding: 1.1rem 1.2rem; background: var(--paper); }
main section:nth-of-type(even) .people li { background: var(--bg); }
.people b { display: block; font-weight: 500; font-size: var(--s-body); }
.people span { color: var(--muted); font-size: var(--s-small); }
.contact-rows { display: flex; flex-direction: column; gap: 1.1rem; }
.crow { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1rem; }
.crow .lbl { width: 5rem; color: var(--muted); font-size: var(--s-small); }
.crow .val { font-size: var(--s-lead); user-select: all; direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.crow .val.rtl { direction: rtl; }
.copy { font: inherit; font-size: .9rem; padding: .3rem .8rem; border: 0; background: var(--stone); color: var(--ink); cursor: pointer; transition: background-color .2s; }
.copy:hover { background: var(--ink); color: var(--bg); }
.reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: 2.5rem; }
.reviews figure { display: flex; flex-direction: column; gap: .8rem; }
.reviews blockquote { margin: 0; line-height: 1.6; }
.reviews figcaption { color: var(--muted); font-size: var(--s-small); }

/* image slots (placeholder only while a file is missing) */
.ph-fig { margin: 0; min-width: 0; }
.ph-fig img { width: 100%; height: auto; background: var(--stone); }
.ph { display: none; aspect-ratio: var(--r, 4/3); max-width: 100%; background: var(--stone); color: var(--muted); flex-direction: column; align-items: center; justify-content: center; gap: .35rem; text-align: center; padding: .9rem; font-size: .9rem; line-height: 1.4; outline: 2px dashed #bdb9ad; outline-offset: -8px; }
.ph-ic { display: none; }
.ph code, .gallery-note code { direction: ltr; unicode-bidi: isolate; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8rem; color: var(--ink); background: var(--paper); padding: .15rem .4rem; overflow-wrap: anywhere; }
.ph-fig.missing img { display: none; }
.ph-fig.missing .ph { display: flex; }
.ph-fig.portrait { width: 100%; max-width: 10rem; margin-bottom: 1rem; }
.ph-fig.portrait img { aspect-ratio: 150 / 190; object-fit: cover; filter: grayscale(1); transition: filter .4s var(--ease); }
.fallen:hover .ph-fig.portrait img { filter: grayscale(0) sepia(.12); }
.ph-fig.portrait .ph { font-size: .78rem; padding: .5rem; }
.ph-fig.portrait code { white-space: nowrap; font-size: .68rem; }
.ph-fig.cover { width: 8rem; flex: none; }
.book-row { display: flex; gap: 1.5rem; align-items: flex-start; }
@media (max-width: 560px) { .book-row { flex-direction: column; } }
.pair { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: 10px; }
.gallery .ph-fig.missing { display: none; }
.gallery-note { margin-top: 1rem; background: var(--stone); padding: 1rem 1.25rem; color: var(--muted); font-size: var(--s-small); }
.gallery.has-any + .gallery-note { display: none; }

/* close (shared with the home page) */
.close { background: var(--dark); color: var(--dark-ink); padding: 72px var(--m) 28px; display: flex; flex-direction: column; gap: 56px; }
.close-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 2rem var(--m); max-width: 76rem; width: 100%; margin-inline: auto; }
.close h2 { font-size: var(--s-body); font-weight: 500; margin-bottom: .6rem; }
.close p, .close a { font-size: var(--s-small); line-height: 1.7; color: var(--dark-ink); }
.close-brand { display: flex; gap: 1rem; align-items: flex-start; }
.close-brand img { width: 56px; height: 56px; flex: none; }
.close nav { display: flex; flex-wrap: wrap; gap: .2rem 1.2rem; align-content: start; }
.close nav h2 { width: 100%; }
.close a { text-decoration: none; transition: color .2s; }
.close a:hover { color: #e4a1a8; text-decoration: underline; text-underline-offset: 4px; }
.close-meta { display: flex; flex-wrap: wrap; gap: .5rem 2rem; color: var(--dark-muted); font-size: var(--s-small); max-width: 76rem; width: 100%; margin-inline: auto; }
.close-meta p { margin-inline-end: auto; color: var(--dark-muted) !important; }
@media (max-width: 760px) { .close-grid { grid-template-columns: 1fr; } }

/* accessibility widget */
.a11y { position: fixed; inset-inline-start: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 30; }
.a11y > button { width: 2.8rem; height: 2.8rem; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); cursor: pointer; display: grid; place-items: center; transition: transform .2s var(--ease); }
.a11y > button:hover { transform: scale(1.06); }
.a11y > button svg { width: 1.5rem; height: 1.5rem; }
.a11y .panel { position: absolute; bottom: 3.4rem; inset-inline-start: 0; background: var(--paper); padding: .6rem; display: flex; flex-direction: column; gap: .2rem; min-width: 11rem; box-shadow: 0 12px 30px -12px rgba(0,0,0,.5); }
.a11y .panel button { text-align: start; font: inherit; font-size: 1rem; background: none; border: 0; padding: .4rem .55rem; color: inherit; cursor: pointer; }
.a11y .panel button:hover { background: var(--stone); }
.a11y .panel b { font-size: 1rem; color: var(--muted); padding: .2rem .55rem; font-weight: 500; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; } html { scroll-behavior: auto; } }
h2.mini-h { font-size: var(--s-body); font-weight: 500; line-height: 1.4; }
h2.as-h3, .item h2 { font-size: var(--s-lead); font-weight: 500; line-height: 1.3; }
.item h2 { font-size: var(--s-body); margin-bottom: .3rem; }
.callout h2.as-h3 { font-size: var(--s-lead); }


/* ===== audio: מסבירן */
.listen{display:grid;gap:.4rem;margin:0 0 1.25rem;padding:.75rem .9rem .85rem;background:var(--stone);border-radius:6px;max-width:34rem}
.listen-label{margin:0;font-size:.95rem;font-weight:600;color:var(--ink)}
.listen-label::before{content:"";display:inline-block;width:.55rem;height:.55rem;margin-inline-end:.45rem;border-radius:50%;background:var(--accent,#a3202f);vertical-align:.08em}
.stack>.listen{margin:0}
.listen audio{width:100%;height:40px;color-scheme:light;display:block}
.hc .listen{background:transparent;outline:2px solid currentColor}
/* ===== motion layer (Emil Kowalski principles): strong ease-out, short durations, press feedback,
   hover only on real pointers, popovers grow from their trigger, reduced motion keeps opacity ===== */
:root { --ease: cubic-bezier(0.23, 1, 0.32, 1); --ease-io: cubic-bezier(0.77, 0, 0.175, 1); }
.btn, .copy, .a11y > button, .co-row, .co-nav a, .names-jump a, .vlink {
  transition: transform 160ms var(--ease), background-color 200ms ease, color 200ms ease; }
.btn:hover, .a11y > button:hover, .slip:hover, .faces a:hover img, .vlink:hover .play { transform: none; }
.btn:active, .copy:active, .a11y > button:active, .co-row:active, .co-nav a:active, .names-jump a:active, .vlink:active { transform: scale(0.97); }
.faces img { transition: filter 200ms ease, transform 200ms var(--ease); }
.vlink .play { transition: transform 200ms var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); }
  .btn:active { transform: translateY(0) scale(0.97); }
  .faces a:hover img { transform: translateY(-3px); }
  .slip:hover { transform: translateY(-6px); }
  .slip:nth-child(2):hover { transform: translateY(-6px) rotate(1deg); }
  .slip:nth-child(5):hover { transform: translateY(-6px) rotate(-1.2deg); }
  .vlink:hover .play { transform: scale(1.08); }
  .a11y > button:hover { transform: scale(1.06); }
}
.slip { transition: transform 200ms var(--ease); }

/* popovers grow from their trigger; enter softly, leave at once */
.nav .drop { transform-origin: top right; transition: opacity 160ms ease-out, transform 160ms var(--ease); }
@starting-style { .nav li.open > .drop { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.a11y .panel { transform-origin: bottom right; transition: opacity 180ms ease-out, transform 180ms var(--ease); }
@starting-style { .a11y .panel { opacity: 0; transform: translateY(6px) scale(0.96); } }
@media (max-width: 860px) {
  .site-head .nav { transform-origin: top center; transition: opacity 180ms ease-out, transform 180ms var(--ease); }
  @starting-style { .site-head.open .nav { opacity: 0; transform: translateY(-6px); } }
}

/* section entrances: shorter travel, shorter time */
.js [data-in] > * { transform: translateY(12px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.js [data-in].in > *:nth-child(2) { transition-delay: 60ms; } .js [data-in].in > *:nth-child(3) { transition-delay: 120ms; } .js [data-in].in > *:nth-child(4) { transition-delay: 180ms; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.co-panel.enter .co-stone, .co-panel.enter .faces li { animation: rise 300ms var(--ease) both; }
.co-panel.enter .faces li { animation-delay: min(calc(var(--i, 0) * 18ms + 60ms), 360ms); }

/* reduced motion: keep the fades, drop the travel */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 200ms !important; animation-duration: 200ms !important; transition-delay: 0s !important; animation-delay: 0s !important; }
  .js [data-in] > *, .btn:hover, .btn:active, .slip, .slip:hover, .faces a:hover img, .vlink:hover .play, .battle-bg { transform: none !important; }
  @keyframes rise { from { opacity: 0; } to { opacity: 1; } }
  .fade img { transition: none !important; }
}
