/* Project Qumran — English / Hebrew (owner request, 2026-10)
   1) the language toggle under the Get Involved pill
   2) Hebrew fonts (html.lang-he, set pre-paint by the head snippet; js/lang.js
      swaps the text). The LAYOUT mirror is generated, not written here: see
      the note at the end of this file. */

/* ---------- the toggle ----------------------------------------------------
   Not the gold pill: gold serif EN | עב, the nav links' dark halo. It
   hangs under the pill (absolute) so the pill and the bar keep their
   exact geometry. */
.nav-cta-wrap { position: relative; }

.lang-toggle {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  /* the pill overhangs its li by 8px: 18 leaves ~10px of air under the
     pill (owner, 2026-10-21: the first 2px read too close) */
  margin-top: 16px;   /* + the buttons' 4px top padding = the same spot as before */
  /* "EN | עב" (owner's style, 2026-10-21): gold serif caps, a thin gold
     upright between, the Hebrew in Frank Ruhl - one fixed mark, so it
     reads left-to-right on the Hebrew pages too */
  direction: ltr;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  /* a soft SHADOW behind the pair, not a box (owner, 2026-10-21: the
     framed glass box was rejected): the warm-dark halo family, no border,
     edges feathered out by a wide same-colour box-shadow so it reads as
     shade on the photo rather than a shape */
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(25, 22, 19, .42);
  box-shadow: 0 0 14px 8px rgba(25, 22, 19, .42);
  font-family: "Cormorant Garamond", "EB Garamond", serif;
  font-size: 19px;
  font-weight: 500;
  line-height: 1;
  color: var(--gold-bright);
  text-shadow:
    0 0 3px rgba(25, 22, 19, .95),
    0 1px 3px rgba(25, 22, 19, .9),
    0 2px 9px rgba(25, 22, 19, .75);
}
/* TWO buttons (owner, 2026-10-21): EN goes to English, עב to Hebrew. The
   current language carries a thin gold underline; hovering the other one
   lights it and draws its underline out from the centre. */
.lang-toggle .lt-btn {
  position: relative;
  background: none;
  border: 0;
  margin: 0;
  padding: 4px 3px 6px;
  font: inherit;
  line-height: 1;
  color: inherit;
  text-shadow: inherit;
  cursor: pointer;
  transition: color .2s ease, text-shadow .2s ease;
}
.lang-toggle .lt-btn::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 0;
  height: 1px;
  background: currentColor;
  box-shadow: 0 0 3px rgba(25, 22, 19, .9);
  transform: scaleX(0);
  transform-origin: center;
}
.lang-toggle .lt-btn.is-current { cursor: default; }
.lang-toggle .lt-btn.is-current::after { transform: none; opacity: .75; }
.lang-toggle .lt-btn:not(.is-current):hover,
.lang-toggle .lt-btn:not(.is-current):focus-visible {
  color: #FBE3AE;
  text-shadow:
    0 0 3px rgba(25, 22, 19, .95),
    0 1px 3px rgba(25, 22, 19, .9),
    0 0 12px rgba(232, 184, 92, .55);
}
.lang-toggle .lt-btn:not(.is-current):hover::after,
.lang-toggle .lt-btn:not(.is-current):focus-visible::after { transform: none; }
.lang-toggle .lt-btn:not(.is-current):active { color: var(--gold); }
.lang-toggle .lt-btn:focus-visible { outline: 1px solid var(--gold-bright); outline-offset: 2px; }
/* the underline draws (motion layer only - reduced motion just shows it) */
.motion .lang-toggle .lt-btn::after { transition: transform .28s var(--m-ease-out, ease-out); }
.motion .lang-toggle .lt-btn:not(.is-current) { transition: color .2s ease, text-shadow .2s ease, transform .2s ease; }
.motion .lang-toggle .lt-btn:not(.is-current):hover { transform: translateY(-1px); }

.lang-toggle .lt-en { letter-spacing: .04em; font-weight: 700; }   /* bold (owner, 2026-10-21, asked twice): the 700 cut comes from its own tiny text=EN font link on every page */
.lang-toggle .lt-he { font-family: "Frank Ruhl Libre", "David", serif; font-size: 19px; font-weight: 500; }
.lang-toggle .lt-sep {
  width: 1px;
  height: 18px;
  background: var(--gold-bright);
  box-shadow: 0 0 3px rgba(25, 22, 19, .9);
}

/* the bar wraps below 1200: the toggle joins the row instead of hanging */
@media (max-width: 1200px) {
  .nav-cta-wrap { display: flex; align-items: center; gap: 14px; }
  .lang-toggle { position: static; transform: none; margin: 0; }
}

/* ---------- Hebrew mode ---------------------------------------------------- */
/* The owner's Hebrew type plan (2026-10-21; the brand Garamonds have no
   Hebrew glyphs):
     main titles, section headings, navigation -> David Libre
     (second plan, same day - it replaced Frank Ruhl Libre)
     body text, small labels                   -> Noto Serif Hebrew
     (owner, 2026-11-02 - it replaced Assistant after a one-paragraph trial)
   The variables carry the plan: --f-display (titles, taglines, quotes) is
   David Libre; --f-body and --f-smallcaps (the Latin small-caps LABEL face:
   buttons, tabs, captions, roles, field labels, cites, footer) are
   Noto Serif Hebrew. The headings and nav items that the English set in small
   caps are pulled back to David Libre by the list below. */
html.lang-he {
  --he-serif: "David Libre", "David", "Times New Roman", serif;
  --he-text: "Noto Serif Hebrew", "David Libre", "David", serif;
  --f-display: var(--he-serif);
  --f-smallcaps: var(--he-text);
  --f-body: var(--he-text);
}
/* titles + section headings + navigation that use the small-caps face */
html.lang-he .brand-word .bw-name,
html.lang-he .nav ul a,
html.lang-he .hero-copy h1,
html.lang-he .hero-projects h1,
html.lang-he .dl-title,
html.lang-he .nl-hero h1,
html.lang-he .sc-heading,
html.lang-he .team-card h2,
html.lang-he .project-card h2,
html.lang-he .pillar h2,
html.lang-he .promo-title,
html.lang-he .together-list h3 { font-family: var(--he-serif); }
/* display-face items that are labels or running text, not titles */
html.lang-he .team-cols .role,
html.lang-he .nl-done { font-family: var(--he-text); }
/* Hebrew has no italics or small caps: letter-spacing and slanted styles
   built for Latin small caps would only distort it */
html.lang-he body * { letter-spacing: normal !important; font-style: normal !important; }

/* EVERYTHING ELSE about the Hebrew layout is the generated mirror: in
   Hebrew the gate loads each stylesheet's .rtl.css twin (tools/gen-rtl.js)
   and sets <html dir="rtl">, so the whole page flips onto the right side
   with exactly the English geometry. No hand-written mirror rules here. */

/* ---------- Hebrew copy-length re-balances ---------------------------------
   Mirroring keeps the English geometry; only where the Hebrew copy is a
   different length does an owner "equal air" rule need re-measuring. */
@media (min-width: 1201px) {
  /* watch: the Hebrew copy is a different length from the English, so the copy
     block re-centres in the 544px hero (David Libre, 2026-11-12: the owner's
     3-line headline + 2-line lede = 334px block, top 105 = 105/105 air,
     as English is 90/91) */
  html.lang-he .wh-copy { top: 105px; }
}

/* Projects hero: the owner's Hebrew title is ONE line (2026-11-12) where the
   English stacks two, so it sits 52px lower - same 27px down to the pinned
   ornament as English (h1 bottom 219 / ornament 246 at 1700px) */
@media (min-width: 1201px) {
  html.lang-he .hero-projects h1 { top: 78px; }
}
