/* Emil Swaid · site built on the jimmychin.com structure (research/clone-jimmychin/BRIEF.md), mirrored for RTL.
   Palette "נורת הקלטה": ground replaces white, ink replaces black, orange replaces the red seal.
   Type: Kraza (display, wide tracking), Bebas Neue (Latin names), Rechov (UI + text). */
@font-face { font-family: "Kraza"; src: url("../fonts/BaobabKraza-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Bebas"; src: url("../fonts/BebasNeue-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Rechov"; src: url("../fonts/BaobabRechov-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Rechov"; src: url("../fonts/BaobabRechov-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Rechov"; src: url("../fonts/BaobabRechov-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ground: #F5F3EF; --surface: #E9E6E0; --ink: #26201C; --ink-2: #3A332E; --support: #69625D; --faint: #756D67; /* 4.6:1 on the ground: small grey text stays readable (was #9A928B, 2.8:1) */ --accent: #CD4726;
  --rule: #D6D1C9; --dim: rgba(38, 32, 28, .72);
  --display: "Kraza", "Bebas", "Arial Narrow", sans-serif;
  --latin: "Bebas", "Arial Narrow", sans-serif;
  --ui: "Rechov", "Heebo", "Segoe UI", Arial, sans-serif;
  --ease: cubic-bezier(.55, .055, .675, .19);   /* easeInCubic */
  --swing: cubic-bezier(.37, 0, .63, 1);   /* jQuery / Velocity swing */
  --out-cubic: cubic-bezier(.215, .61, .355, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }
/* no grey-blue flash on taps (Android draws one on every tapped link and button); keyboard focus keeps its own ring */
html { -webkit-tap-highlight-color: transparent; }
body { background: var(--ground); color: var(--ink); font-family: var(--ui); font-size: 16px; line-height: 1.6; direction: rtl; -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; transition: color .2s ease-in-out; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- header: menu + icon (right), mark (centre), line + contact (left); the sides swapped 29.11 ---------- */
.hdr { position: absolute; z-index: 40; top: 30px; inset-inline: 0; height: 34px; display: flex; align-items: center; justify-content: space-between; color: var(--ink); pointer-events: none; }
.hdr > * { pointer-events: auto; }
.hdr .menu-side { display: flex; align-items: center; position: relative; }
.hdr .contact { margin-inline-start: auto; flex-direction: row-reverse; }   /* the line on the outer (left) edge */
.hdr.light { color: #fff; }
.hdr .contact { display: flex; align-items: center; gap: 20px; font-weight: 500; font-size: 16px; letter-spacing: .04em; }
.hdr .contact::before { content: ""; width: 40px; height: 1px; background: currentColor; transition: width .3s ease-in-out; }
.hdr .contact:hover::before { width: 50px; }
.hdr .mark { position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 46px; transition: opacity .4s var(--swing); }
.panel-hover .hdr .mark { opacity: 0; }
/* page change (any link to another page, the mark included): an ink sheet slides in from the right (.9s), and the next
   page starts under it and slides it off to the left. The home works / stills clicks use their ground sheet the same
   way (from the right / from the left). The arrival class is set in the head before first paint. */
.page-sheet { position: fixed; inset: 0; z-index: 95; background: var(--ink); transform: translateX(100%); transition: transform .9s var(--swing); pointer-events: none; }
.page-sheet.go { transform: none; }
html.sheet-in::after { content: ""; position: fixed; inset: 0; z-index: 95; background: var(--ink); pointer-events: none; animation: sheet-off .9s var(--swing) .1s forwards; }
html.sheet-ground::after, html.sheet-ground-rev::after { background: var(--ground); }
html.sheet-ground-rev::after { animation-name: sheet-off-r; }
html.sheet-in .landing { display: none; }
@keyframes sheet-off { to { transform: translateX(-100%); } }
@keyframes sheet-off-r { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { html.sheet-in::after { display: none; } }
/* home → works / stills, as in the source (/ MOTION, STILLS click): the panel has taken the screen, then the next page
   itself slides in over it from the panel's side (1.3s cubic-bezier(.55,.055,.675,.19)) and the old view stays put
   under it: no empty sheet, nothing slides away afterwards. Browsers with cross-page view transitions only; the
   others keep the ground sheet (site.js). The head script turns every other page change's transition off. */
@view-transition { navigation: auto; }
/* home → story: the portrait is already full on the home panel, so the story page simply fades in over it */
html.vt-fade::view-transition-old(root) { animation: none; }
html.vt-fade::view-transition-new(root) { animation: vt-fade .6s ease both; }
@keyframes vt-fade { from { opacity: 0; } }
/* a link to the page you are on does nothing (the menu word, the mark on the home: Shahar 30.11) */
a[aria-current="page"] { pointer-events: none; cursor: default; }
html.vt-left .landing, html.vt-right .landing { display: none; }   /* no black intro when the home slides in */
/* works from the home panel: the home film plays on above the old page and is uncovered by the incoming page,
   its clip moving with the slide (same 1.3s curve), so the film never freezes */
.vt-film { display: none; }
html.vt-filming .vt-film { display: block; position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 100; pointer-events: none; view-transition-name: home-film; }
html.vt-filming::view-transition-group(home-film) { animation: none; }
html.vt-filming::view-transition-new(home-film) { animation: vt-film-r 1.3s cubic-bezier(.55, .055, .675, .19) both; }
@keyframes vt-film-r { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 100% 0 0); } }
html.vt-right::view-transition-old(root), html.vt-left::view-transition-old(root) { animation: none; mix-blend-mode: normal; }
html.vt-right::view-transition-new(root) { animation: vt-in-r 1.3s cubic-bezier(.55, .055, .675, .19) both; mix-blend-mode: normal; }
html.vt-left::view-transition-new(root) { animation: vt-in-l 1.3s cubic-bezier(.55, .055, .675, .19) both; mix-blend-mode: normal; }
@keyframes vt-in-r { from { transform: translateX(100%); } to { transform: none; } }
@keyframes vt-in-l { from { transform: translateX(-100%); } to { transform: none; } }
.hdr .mark img { width: 46px; height: auto; }
.hdr .menu-btn { display: flex; flex-direction: row-reverse; align-items: center; gap: 20px; font-weight: 500; font-size: 16px; letter-spacing: .04em; position: relative; z-index: 3; }
.menu-btn > span:first-child { transition: opacity .3s ease-in-out; }
.menu-open .menu-btn > span:first-child { opacity: 0; }
.icon { position: relative; width: 40px; height: 1px; background: currentColor; transition: background .3s ease-in-out; }
.icon::before, .icon::after { content: ""; position: absolute; inset-inline-start: 0; width: 40px; height: 1px; background: currentColor; transition: .3s ease-in-out; }
.icon::before { top: -8px; } .icon::after { top: 8px; }
.menu-open .icon { background: transparent; }
.menu-open .icon::before, .menu-open .icon::after { width: 20px; top: 0; }
.menu-open .icon::before { transform: rotate(45deg); } .menu-open .icon::after { transform: rotate(-45deg); }
/* the inline nav slides in beside the menu button, towards the middle (from the right) */
.nav { position: absolute; top: 2px; right: 128px; opacity: 0; visibility: hidden; transform: translateX(50px); z-index: 2; transition: opacity .3s ease-in-out, transform .3s ease-in-out, visibility .3s; }
.menu-open .nav { opacity: 1; visibility: visible; transform: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; width: max-content; white-space: nowrap; }
.nav li { font-size: 16px; letter-spacing: .04em; }
.nav li + li::before { content: "/"; padding: 0 10px; opacity: .8; }
/* menu words: dimmed text that fills with solid colour from the right (reading direction) on hover and on the
   current page (Shahar: a fill instead of the source's strike line, in Emil's tally red). Used by the footer list too. */
.nav a, .slash a { --base: rgba(255, 255, 255, .55); --fill: var(--accent); color: transparent; -webkit-text-fill-color: transparent;
  background: linear-gradient(to left, var(--fill) 50%, var(--base) 50%) 0 0 / 200% 100% no-repeat; -webkit-background-clip: text; background-clip: text;
  transition: background-position .45s var(--swing); }
.nav a:hover, .nav a:focus-visible, .nav a[aria-current="page"], .slash a:hover, .slash a:focus-visible { background-position: 100% 0; }
.dim { position: fixed; inset: 0; background: var(--dim); opacity: 0; pointer-events: none; z-index: 30; transition: opacity .3s ease-in-out; }
.menu-open .dim { opacity: 1; pointer-events: auto; }
.menu-open .hdr { color: #fff; }

/* phone menu: a full panel that slides in */
.mnav { position: fixed; inset: 0; z-index: 60; background: var(--ground); transform: translateX(100%); visibility: hidden; transition: transform .5s ease-in-out, visibility 0s .5s; display: none; flex-direction: column; padding: 26px 28px calc(30px + env(safe-area-inset-bottom, 0px)); }
.mnav .close { align-self: flex-start; font-size: 30px; line-height: 1; width: 44px; height: 44px; }
.mnav ul { list-style: none; margin: 60px 0 0; padding: 0; display: grid; gap: 14px; text-align: right; }
.mnav a { font-family: var(--display); font-size: 40px; line-height: 1.05; letter-spacing: .12em; }
/* Emil's mark at the head of the panel, on the same centre line as the icons at its foot, level with the close button */
.mnav-mark { position: absolute; top: 26px; left: 50%; transform: translateX(-50%); height: 44px; display: grid; place-items: center; padding-inline: 6px; }
.mnav-mark img { width: 40px; height: auto; display: block; }
.mnav .mnav-mark::before { display: none !important; }   /* not the current-page dash of the list */
/* centred in the empty space under the list, both ways (Shahar 30.11) */
.mnav .social { margin: auto 0; align-self: center; padding: 30px 0 0;   /* the top padding matches the menu's own foot padding, so the gap above equals the gap to the screen's edge */ list-style: none; display: flex; justify-content: center; gap: 18px; }
.mnav .social a { display: grid; place-items: center; width: 48px; height: 48px; color: #B33C1F; transition: color .3s ease-in-out, transform .3s var(--swing); }   /* the accent darkened to 5.3:1 */
.mnav .social a:active { transform: scale(.9); }
.mnav .social svg { width: 27px; height: 27px; fill: currentColor; }
.mnav-open .mnav { transform: none; visibility: visible; transition: transform .5s ease-in-out, visibility 0s; }

/* ---------- shared page frame for inner pages ---------- */
.page { height: 100vh; height: 100svh; overflow: hidden; position: relative; }
/* the "בית" rail (source: .home_link / .motion_home_link): a 51px strip at the right edge (mirrored), opaque in the
   page colour so nothing shows through it, with a 1px rule on its inner side and the word turned on its side */
.homelink { position: absolute; z-index: 6; right: 0; width: 51px; display: flex; align-items: center; justify-content: center; background: var(--ground); border-left: 1px solid var(--rule); }
.homelink a { writing-mode: vertical-rl; font-size: 16px; color: var(--faint); letter-spacing: .06em; padding: 14px 12px; }
.homelink a:hover { color: var(--ink); }
.scroll-hint { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: .06em; color: var(--faint); }
.scroll-hint svg { width: 28px; height: 10px; stroke: currentColor; fill: none; }
.scroll-hint:hover { color: var(--ink); }

/* ---------- lightbox (films and photos) ---------- */
.lb { position: fixed; inset: 0; z-index: 80; background: var(--ground); display: flex; align-items: center; justify-content: center; padding: 80px 90px 60px; opacity: 0; visibility: hidden; transition: opacity .5s var(--swing), visibility .5s; }
.lb.dark { background: #15110F; color: #fff; }
.lb.open { opacity: 1; visibility: visible; }
.lb .stage { position: relative; width: 100%; height: 100%; cursor: pointer; }
.lb .stage img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; cursor: default; transition: opacity .8s var(--swing); }
.lb video, .lb img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.lb video { width: min(100%, 1280px); background: #000; }
.lb .x { position: absolute; top: 26px; left: 28px; font-size: 34px; line-height: 1; width: 48px; height: 48px; }
.lb .prev, .lb .next { position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; display: grid; place-items: center; }
.lb .prev { right: 18px; } .lb .next { left: 18px; }
.lb .prev svg, .lb .next svg { width: 34px; height: 12px; stroke: currentColor; fill: none; }
.lb .cap { position: absolute; bottom: 22px; inset-inline: 0; text-align: center; font-size: 14px; letter-spacing: .06em; color: var(--support); }
.lb.dark .cap { color: #B7AEA6; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; } }

/* ---------- phone ---------- */
@media (max-width: 1024px) {
  .hdr { top: 18px; height: 30px; padding-inline: 0; }
  .hdr .contact, .hdr .menu-btn { font-size: 13px; gap: 14px; }
  .hdr .contact::before { width: 30px; }
  .hdr .mark { width: 34px; } .hdr .mark img { width: 34px; }
  .nav, .dim { display: none; }
  .mnav { display: flex; }
  .page { height: auto; overflow: visible; }
  .homelink { display: none; }
  /* touch: every header control gets a 44px tall target without moving (padding out, margin back in) */
  .hdr .contact, .hdr .menu-btn { padding-block: 12px; margin-block: -12px; }
  .hdr .mark { padding: 6px; margin: -6px; box-sizing: content-box; }
  .mnav a[aria-current="page"] { color: var(--accent); }
  .mnav a[aria-current="page"]::before { content: ""; display: inline-block; width: 26px; height: 2px; background: currentColor; vertical-align: middle; margin-inline-end: 14px; }
  /* lightbox on a phone: the photo takes the width, the arrows sit under it */
  .lb { padding: 70px 8px 76px; }
  .lb .prev, .lb .next { top: auto; bottom: 14px; transform: none; width: 48px; height: 48px; }
  .lb .prev { right: 22%; } .lb .next { left: 22%; }
  .lb .cap { bottom: 28px; font-size: 13px; }
  .lb .x { top: 12px; left: 10px; }
}

/* ---------- footer of the scrolling pages (source: the /about footer) ---------- */
.foot-site { border-top: 1px solid var(--rule); }
.foot-site .row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 60px; }
.foot-site .contact { display: flex; align-items: center; gap: 20px; font-weight: 500; letter-spacing: .04em; }
.foot-site .contact::before { content: ""; width: 40px; height: 1px; background: currentColor; margin-inline-start: -60px; transition: width .3s ease-in-out; }
.foot-site .contact:hover::before { width: 50px; }
.slash { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; font-size: 15px; letter-spacing: .04em; }
.slash li + li::before { content: "/"; padding: 0 10px; color: var(--faint); }
.slash a { --base: var(--support); --fill: var(--accent); }   /* the footer menu fills in the brand red, like the top one (Shahar 30.11) */
.foot-site .dark { background: var(--ink); color: #D9D2CB; font-size: 13px; letter-spacing: .08em; }
.foot-site .dark p { margin: 0; }
/* the last line of every page: accessibility and privacy, then Baobab's credit with its tree (as on NUIKA) */
.site-credit { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 22px; font-size: 12px; letter-spacing: .03em; }
.site-credit .legal { margin: 0; display: flex; gap: 16px; }
.site-credit .legal a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: color .3s ease-in-out, text-decoration-color .3s ease-in-out; }
.site-credit .legal a:hover, .site-credit .legal a:focus-visible { text-decoration-color: currentColor; }
.baobab-credit { display: inline-flex; align-items: center; gap: .45em; margin: 0; font-size: 12px; line-height: 1.4; color: inherit; opacity: .85; }
.baobab-credit-mark { height: 1.25em; width: auto; flex: none; }
/* on the full-screen pages it sits in the bottom corner */
.site-credit.corner { position: fixed; z-index: 6; bottom: 10px; left: 24px; color: var(--faint); transition: opacity .4s var(--swing); }
.home .site-credit.corner { color: rgba(255, 255, 255, .8); }
.panels.hovering ~ .site-credit, .panels.leaving ~ .site-credit, .menu-open .site-credit.corner { opacity: 0; pointer-events: none; }
@media (max-width: 760px) { .site-credit.corner { left: 0; right: 0; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); justify-content: center; font-size: 11px; } }
/* on a phone the works and stills pages scroll down, so there the line closes the page instead of floating over it */
@media (max-width: 760px) { body:not(.home) .site-credit.corner { position: static; padding: 26px 16px calc(26px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--rule); } }
.foot-site .totop { font-weight: 500; color: #fff; letter-spacing: .08em; display: flex; align-items: center; gap: 20px; }
.foot-site .totop::after { content: ""; width: 40px; height: 1px; background: currentColor; margin-inline-end: -60px; }
@media (max-width: 1024px) {
  .foot-site .row { flex-direction: column; align-items: flex-start; padding: 22px 20px; }
  .foot-site .contact::before, .foot-site .totop::after { display: none; }
  /* one line, centred (Shahar 30.11): the separate צור קשר goes, the list already ends with it, and the words
     shrink with the screen so the five always fit */
  .foot-site .row:first-child { align-items: center; padding-block: 26px; }
  .foot-site .row:first-child .contact { display: none; }
  .slash { flex-wrap: nowrap; white-space: nowrap; font-size: clamp(12px, 3.85vw, 15px); letter-spacing: .02em; }
  .slash li + li::before { padding: 0 clamp(6px, 2.2vw, 10px); }
  .slash a { display: inline-block; padding-block: 10px; }   /* a taller touch target, the line itself unchanged */
  .foot-site .dark { align-items: center; text-align: center; gap: 18px; }
  .foot-site .dark .site-credit { flex-direction: column; justify-content: center; gap: 10px; }
  .foot-site .dark .site-credit .legal { justify-content: center; }
}

/* ---------- closing call (end of the story and the article; the films' end card and window) ---------- */
.cta { padding: clamp(70px, 9vw, 120px) 24px; display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }
.cta p { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(34px, 3.4vw, 52px); line-height: 1.1; letter-spacing: .1em; text-wrap: balance; }
.cta a { font-weight: 500; font-size: 15px; letter-spacing: .06em; border: 1px solid var(--ink); padding: 13px 34px; transition: background-color .3s ease-in-out, color .3s ease-in-out; }
.cta a:hover, .cta a:focus-visible { background: var(--ink); color: var(--ground); }
.lb .lb-cta { position: absolute; top: 34px; right: 34px; font-weight: 500; font-size: 14px; letter-spacing: .04em; color: #fff; padding-bottom: 3px; border-bottom: 1px solid var(--accent); }
.lb .lb-cta:hover { color: #F2B9A9; }
@media (max-width: 1024px) { .lb .lb-cta { top: 22px; right: 18px; font-size: 13px; } }
