/* ==========================================================================
   site — page-level components (zBrush: [site], loaded after zCanvas).
   Every rule targets BOTH the class and its descendants, because a zolo block
   whose only child is one leaf event renders as that leaf element carrying the
   _zClass, while a block with children renders as a <div> wrapper.
   ========================================================================== */

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: clamp(420px, 78vh, 760px);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--dark);
  isolation: isolate;
}

.hero-media,
.hero-media img,
.hero-media svg {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-media { z-index: 0; }

.hero::after {
  content: "";
  grid-area: 1 / 1;
  z-index: 1;
  background:
    linear-gradient(to top, rgba(10, 9, 8, .82) 0%, rgba(10, 9, 8, .34) 45%, rgba(10, 9, 8, .12) 100%);
}

.hero-text {
  grid-area: 1 / 1;
  z-index: 2;
  align-self: end;
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding: clamp(36px, 7vw, 92px) var(--gutter);
  color: var(--paper);
}

.hero-name,
.hero-name h1, .hero-name h2 {
  font-family: var(--serif);
  font-size: clamp(2.9rem, 10vw, 6rem);
  font-weight: 300;
  line-height: 1.02;
  color: var(--paper);
  margin: 0;
}

.hero-roles {
  margin-top: clamp(12px, 2vw, 22px);
  font-size: clamp(.86rem, 1.6vw, 1.02rem);
  font-weight: 300;
  letter-spacing: .2em;
  color: color-mix(in srgb, #ffffff 78%, transparent);
}

/* ── Section headings ──────────────────────────────────────────────────── */
.section-title,
.section-title h1, .section-title h2, .section-title h3 {
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ── Page head (section pages) ─────────────────────────────────────────── */
.page-head {
  max-width: var(--page);
  margin-inline: auto;
  padding: clamp(52px, 9vw, 118px) var(--gutter) clamp(24px, 4vw, 48px);
  border-bottom: 1px solid var(--line-soft);
}

.page-title,
.page-title h1 {
  font-size: clamp(2.1rem, 6vw, 3.9rem);
  font-weight: 300;
  line-height: 1.06;
  margin: 0;
}

.page-lead {
  margin-top: clamp(14px, 2vw, 22px);
  max-width: 52ch;
  font-size: clamp(1.02rem, 1.9vw, 1.18rem);
  color: var(--ink-soft);
}

.page-head-error .page-lead { margin-bottom: 28px; }

/* ── Intro ─────────────────────────────────────────────────────────────── */
/* Full page measure so the intro shares its reading edge with every other
   section; the text itself is capped in `ch` instead. */
.intro-lead,
.intro-lead p {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3.4vw, 2.05rem);
  font-weight: 300;
  line-height: 1.42;
  color: var(--ink);
  margin: 0;
  max-width: 30ch;
}

.intro-body,
.intro-body p {
  margin-top: clamp(18px, 3vw, 30px);
  font-size: 1.04rem;
  color: var(--ink-soft);
  max-width: 58ch;
}

/* ── Work grid (cards) ─────────────────────────────────────────────────── */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: clamp(26px, 3.4vw, 46px) clamp(20px, 2.6vw, 36px);
}

.work-card { display: block; }

.work-card-media,
.work-card-media img,
.work-card-media svg {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--paper-warm);
}
.work-card-media {
  overflow: hidden;
  margin-bottom: 18px;
}
.work-card-media img,
.work-card-media svg {
  transition: transform .7s var(--ease), filter .7s var(--ease);
}
.work-card:hover .work-card-media img,
.work-card:hover .work-card-media svg {
  transform: scale(1.035);
  filter: brightness(1.06);
}

.work-card-meta {
  font-size: .74rem;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--muted);
}

.work-card-title,
.work-card-title h3 {
  font-family: var(--serif);
  font-size: clamp(1.24rem, 2.2vw, 1.55rem);
  font-weight: 400;
  line-height: 1.22;
  margin: 8px 0 6px;
}

.work-card-role {
  font-size: .93rem;
  color: var(--ink-soft);
}

/* ── Entry list (archival rows on section pages) ───────────────────────── */
.entry-list { display: block; }

/* Two entry sections in a row (Plays then Directing) would otherwise stack
   two full section paddings into one enormous gap. */
.section-entries + .section-entries { padding-top: 0; }

.work-entry {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 60px);
  align-items: start;
  padding-block: clamp(34px, 5vw, 62px);
  border-top: 1px solid var(--line-soft);
}
.work-entry:first-child { border-top: 0; padding-top: 0; }

.work-entry-media,
.work-entry-media img,
.work-entry-media svg {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--paper-warm);
}
.work-entry-media { overflow: hidden; }

.work-entry-body { max-width: 62ch; }

.work-entry-meta {
  font-size: .74rem;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--muted);
}

.work-entry-title,
.work-entry-title h2 {
  font-size: clamp(1.55rem, 3.4vw, 2.25rem);
  font-weight: 300;
  line-height: 1.14;
  margin: 10px 0 2px;
}

.work-entry-role {
  font-size: .95rem;
  color: var(--accent);
  letter-spacing: .02em;
  margin-bottom: 14px;
}

.work-entry-summary,
.work-entry-summary p {
  color: var(--ink-soft);
  margin: 0 0 14px;
}

.work-entry-credits {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.7;
}

.work-entry-press,
.work-entry-press p {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-style: italic;
  font-weight: 300;
  line-height: 1.55;
  color: var(--ink);
  margin: 22px 0 6px;
}
.work-entry-press {
  border-inline-start: 2px solid var(--accent);
  padding-inline-start: 18px;
}

.work-entry-press-source {
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-inline-start: 20px;
}

/* ── Film: video grid + in-page lightbox ───────────────────────────────── */
/* 300px keeps three across at the site's page measure, matching the home
   grid's rhythm; 340 tipped it to two and left an orphan card per row. */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(28px, 3.4vw, 52px) clamp(20px, 2.6vw, 36px);
}

.video-card-frame {
  position: relative;
  overflow: hidden;
  background: var(--dark);
  margin-bottom: 18px;
}

.video-card-still,
.video-card-still img,
.video-card-still svg {
  width: 100%;
  aspect-ratio: 16 / 9;          /* the brief's ratio, held everywhere */
  object-fit: cover;
  display: block;
  transition: transform .7s var(--ease), opacity .5s var(--ease);
}
.video-card:hover .video-card-still img,
.video-card:hover .video-card-still svg { transform: scale(1.04); opacity: .8; }

/* The play affordance sits over the still and is only rendered when the row
   actually has a video_url (zGate) — no dead play buttons. */
.video-card-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.video-play-btn {
  pointer-events: auto;
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--paper);
  background: rgba(16, 14, 12, .42);
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(3px);
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.video-play-btn:hover {
  background: rgba(16, 14, 12, .72);
  transform: scale(1.06);
}

.video-card-logline {
  margin-top: 8px;
  font-size: .95rem;
  color: var(--ink-soft);
  max-width: 46ch;
}

/* Lightbox — the modal the play button opens. zOS owns the overlay + card;
   these rules re-skin that card for video and hold the player at 16:9.
   Scoped with :has() so the contact-form modal keeps the normal paper card. */
.zModal-card:has(.video-lightbox) {
  width: min(1080px, 100%);
  background: var(--dark);
  color: var(--paper);
  padding: 18px;
  border-radius: 4px;
}

.video-lightbox { width: 100%; }

.lightbox-title,
.lightbox-title h2 {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  font-weight: 400;
  color: var(--paper);
  margin-bottom: 14px;
}

/* The ratio is held by the CONTAINER and the player is stretched into it, so
   it survives whatever wrapper zEmbed puts around the iframe.
   Sized by HEIGHT, not width: the modal card is capped at 80vh, so a
   width-driven 16:9 box gets squashed on a short screen. Height-first keeps
   the ratio exact and lets the card shrink to fit it. */
/* `!important` is load-bearing here, not laziness: the embed renderer stamps
   its own INLINE width on the player when it mounts, and an inline style beats
   any selector. Measured in the test browser — without it the box comes out
   1044px (the card's full width, ratio broken); with it, 814x458 = exact 16:9.
   The width is DERIVED from the height the card can spare, because a block box
   with `width: auto` fills its container and ignores the ratio entirely. */
.lightbox-embed,
.lightbox-embed iframe {
  width: min(100%, calc((80vh - 118px) * 16 / 9)) !important;
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
  max-height: none;
  display: block;
  margin-inline: auto;
  border: 0;
  background: #000;
}

/* ── Contact form: the two framework strings, in Hebrew ────────────────── */
/* `Submit` (form_renderer sets submitButton.textContent directly) and `Saved`
   (a hardcoded per-verb constant in the dialog result mapper) have no
   authoring hook in zolo — checked in both sources. They are relabelled here
   at the presentation layer.
   Why not a plugin: routing the insert through `@zfunc` + the SDK's
   data.insert reaches the ADAPTER directly and skips the schema validation
   layer — a public contact form would lose its email-format and
   minimum-length checks in exchange for one translated word. Not a trade
   worth making, so the declarative validated insert stays.
   Caveat: the English text remains in the DOM, so a screen reader may still
   announce it. A `zMeta.zScripts` JS plugin could rename the nodes properly
   if that ever matters more than the simplicity of no JS at all. */
.zDialog-actions .zBtn[type="submit"] { font-size: 0; }
.zDialog-actions .zBtn[type="submit"]::after {
  content: "שליחה";
  font-size: .95rem;
  letter-spacing: .04em;
}

.zModal-card .zSignal-success .zSignal-text { font-size: 0; }
.zModal-card .zSignal-success .zSignal-text::after {
  content: "ההודעה נשלחה — תודה!";
  font-size: .95rem;
}

/* ── Detail: statement + awards ────────────────────────────────────────── */
.section-work-logline .work-detail-summary { max-width: 46ch; }

.work-statement,
.work-statement p {
  font-family: var(--serif);
  font-size: clamp(1.08rem, 2.1vw, 1.34rem);
  font-weight: 300;
  line-height: 1.68;
  color: var(--ink);
  max-width: 56ch;
}

.work-awards {
  font-size: .97rem;
  line-height: 1.9;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ── Entry → detail link ───────────────────────────────────────────────── */
.entry-link-wrap { margin-top: 20px; }

.entry-link {
  display: inline-block;
  font-size: .87rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
.entry-link:hover { border-bottom-color: var(--ink); }

/* ── Production detail page (/work/<slug>) ─────────────────────────────── */
.work-head { padding-bottom: clamp(20px, 3vw, 36px); }

.work-back { margin-bottom: clamp(20px, 3vw, 32px); }

.back-link {
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .3s var(--ease);
}
.back-link::before { content: "\2190\00a0"; }        /* ← */
.back-link:hover { color: var(--ink); }
:where(.ltr) .back-link::before,
.site-header.ltr ~ * .back-link::before { content: "\2190\00a0"; }

.work-detail-meta {
  font-size: .76rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.work-detail-role {
  margin-top: 12px;
  font-size: 1.02rem;
  color: var(--accent);
  letter-spacing: .02em;
}

.section-work-lead {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.work-lead-image,
.work-lead-image img,
.work-lead-image svg {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--paper-warm);
}
.work-lead-image { overflow: hidden; }

.work-detail-summary,
.work-detail-summary p {
  font-family: var(--serif);
  font-size: clamp(1.12rem, 2.2vw, 1.42rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink);
}

.section-work-video { max-width: var(--page); }

.work-embed,
.work-embed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: var(--dark);
  display: block;
}

/* Gallery — an even contact sheet. Every still keeps the same frame, which is
   how an archive reads; a "hero span" on the first shot only produced a
   staircase of mismatched heights. */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(16px, 2.2vw, 30px);
}

.gallery-shot { display: block; }

.gallery-shot-img,
.gallery-shot-img img,
.gallery-shot-img svg {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--paper-warm);
}
.gallery-shot-img { overflow: hidden; }

.gallery-shot-caption {
  margin-top: 9px;
  font-size: .8rem;
  color: var(--muted);
  letter-spacing: .03em;
}

/* Credits and press keep the page's reading edge and cap the TEXT instead —
   a centred narrow section would sit on a different margin to everything
   above it. */
.work-detail-credits {
  font-size: .97rem;
  line-height: 1.9;
  color: var(--ink-soft);
  max-width: 62ch;
}

.section-work-press .press-quote,
.section-work-press .press-source { max-width: 52ch; }

/* ── Discipline links (home) ───────────────────────────────────────────── */
.path-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.path-link {
  font-family: var(--serif);
  font-size: clamp(1.02rem, 2vw, 1.22rem);
  padding: 13px 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.path-link:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* ── Poems: original and translation, read together ────────────────────── */
/* The loop wraps every row in its own element, so `.poem + .poem` never
   matches — the poems are not siblings, their wrappers are. Separate the
   WRAPPERS instead; without this the previous poem's source line collides
   with the next poem's title. */
.poem-list > * + * {
  display: block;
  margin-top: clamp(44px, 6vw, 84px);
  padding-top: clamp(40px, 5vw, 72px);
  border-top: 1px solid var(--line-soft);
}

.poem-title,
.poem-title h2 {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.8vw, 1.85rem);
  font-weight: 400;
  margin-bottom: clamp(18px, 2.6vw, 30px);
}

/* Two columns on a wide screen, stacked below it. `start` alignment keeps the
   two versions line-for-line at the top, which is the whole point of showing
   them together. */
.poem-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

/* The poem's own line breaks are real newlines in the data — honour them
   instead of collapsing them like ordinary prose. */
.poem-text,
.poem-text p {
  white-space: pre-line;
  font-family: var(--serif);
  font-size: clamp(1.08rem, 2.1vw, 1.34rem);
  font-weight: 300;
  line-height: 2.05;
  color: var(--ink);
  margin: 0;
}

/* The translation sits a step back from the original — same measure, quieter
   voice, so the eye knows which is which without a label. */
.poem-secondary .poem-text,
.poem-secondary .poem-text p {
  color: var(--muted);
  font-size: clamp(1rem, 1.9vw, 1.18rem);
}

.poem-source {
  margin-top: clamp(16px, 2.4vw, 26px);
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* A download beside a written work reads as an action, not another nav link. */
.entry-doc { color: var(--accent); }
.entry-doc:hover { border-bottom-color: var(--accent); }
.entry-link-wrap { display: flex; flex-wrap: wrap; gap: 14px 26px; }

/* ── About page ────────────────────────────────────────────────────────── */
.section-bio {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.bio-portrait,
.bio-portrait img,
.bio-portrait svg {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--paper-warm);
}
.bio-portrait { position: sticky; top: 96px; overflow: hidden; }

.bio-text { max-width: 66ch; }
.bio-text .section-title:not(:first-child) { margin-top: clamp(32px, 5vw, 54px); }

.bio-short,
.bio-short p {
  font-family: var(--serif);
  font-size: clamp(1.14rem, 2.3vw, 1.42rem);
  font-weight: 300;
  line-height: 1.6;
}

.bio-full,
.bio-full p { color: var(--ink-soft); }
.bio-full blockquote {
  border-inline-start: 2px solid var(--line);
  padding-inline-start: 18px;
  color: var(--muted);
  font-style: italic;
}

.download-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.download-link {
  font-size: .95rem;
  letter-spacing: .04em;
  padding: 11px 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.download-link:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.section-press { max-width: var(--page-narrow); }

.press-quote,
.press-quote p {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3vw, 1.72rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.5;
  margin: 0;
}
.press-quote {
  border-inline-start: 2px solid var(--accent);
  padding-inline-start: 22px;
  margin-top: clamp(24px, 4vw, 40px);
}
.press-quote:first-of-type { margin-top: 0; }

.press-source {
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-inline-start: 24px;
  margin-top: 10px;
}

.section-contact { max-width: var(--page-narrow); }

.contact-details {
  display: grid;
  gap: 8px;
  margin-bottom: 28px;
}

/* The address is a markdown link, so the styling lands on the <a> inside. */
.contact-mail a,
.contact-link {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3.2vw, 1.9rem);
  border-bottom: 1px solid var(--line);
  justify-self: start;
  transition: border-color .3s var(--ease);
}
.contact-mail a:hover,
.contact-link:hover { border-bottom-color: var(--ink); }
.contact-mail p { margin: 0; }

.contact-agent {
  font-size: .93rem;
  color: var(--muted);
}

.contact-btn,
.contact-btn button {
  font-family: var(--sans);
  font-size: .95rem;
  letter-spacing: .06em;
  padding: 13px 32px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: opacity .3s var(--ease);
}
.contact-btn:hover,
.contact-btn button:hover { opacity: .84; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .section-bio { grid-template-columns: 1fr; }
  .bio-portrait { position: static; max-width: 320px; }
}

/* Entries hold their two columns down to ~720px. Stacking them any earlier
   turns a tablet page into a column of half-metre-tall photographs. */
@media (max-width: 720px) {
  .work-entry { grid-template-columns: 1fr; gap: 20px; }
  .section-work-lead { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid > :first-child { grid-column: auto; }
  .work-entry-media,
  .work-entry-media img,
  .work-entry-media svg { aspect-ratio: 3 / 2; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  /* The header wraps to three rows on a phone — sticky would eat a tenth of
     the viewport on every scroll, so let it scroll away instead. */
  .site-header { position: static; padding-block: 13px; gap: 10px; }
  .site-nav { gap: 12px 16px; }
  .nav-link { font-size: .88rem; }
  .work-grid { grid-template-columns: 1fr; }
  .work-entry-media, .work-entry-media img, .work-entry-media svg { aspect-ratio: 3 / 2; }
}

/* ── Motion ────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
