/* =========================================================================
   Vibrations from Gaza — official film site
   Aesthetic: editorial-cinematic, reverent. Laurel green / bone / terracotta.
   Display: Fraunces. Body & captions: IBM Plex Sans / Plex Sans Arabic.
   Motif: felt vibration — concentric ripples + seismic divider lines.
   All motion respects prefers-reduced-motion.
   ========================================================================= */

:root {
  /* palette */
  --ink:        #14110d;   /* warm near-black */
  --ink-soft:   #2c2820;
  --bone:       #f4efe6;   /* warm off-white */
  --bone-dim:   #e7ddcd;
  --laurel:     #2c3d31;   /* deep muted award-laurel green */
  --laurel-deep:#1a2620;
  --laurel-line:#43564a;
  --terracotta: #a8481f;   /* earthy red of the couches — AA-safe under white text */
  --terracotta-d:#82371a;  /* deeper: hover fills + eyebrow/link text on light bg */
  --sand:       #cbb892;
  --muted:      #585143;   /* warm gray — AA on bone and bone-dim */

  /* type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --arabic: "IBM Plex Sans Arabic", "IBM Plex Sans", sans-serif;

  /* scale */
  --measure: 64ch;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --section-y: clamp(4.5rem, 10vw, 9rem);
  --radius: 2px;

  --shadow: 0 24px 60px -28px rgba(20, 17, 13, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ----- reset ----- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.15rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bone);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* ----- typography ----- */
h1, h2, h3 { font-family: var(--display); font-weight: 460; line-height: 1.04; letter-spacing: -0.012em; font-optical-sizing: auto; }
.eyebrow {
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
[lang="ar"] { font-family: var(--arabic); }

/* ----- layout helpers ----- */
.wrap { width: min(100% - 2 * var(--gutter), 1200px); margin-inline: auto; }
.narrow { width: min(100% - 2 * var(--gutter), 820px); margin-inline: auto; }
.section { padding-block: var(--section-y); position: relative; }
.section--bone { background: var(--bone); }
.stack > * + * { margin-top: 1.1em; }

/* seismic divider line — the "vibration" motif as a hairline waveform */
.seism { height: 18px; width: 100%; color: var(--laurel-line); opacity: 0.6; }
.seism svg { width: 100%; height: 100%; display: block; }

/* ===================== skip link ===================== */
.skip {
  position: absolute; left: 1rem; top: -5rem;
  background: var(--ink); color: var(--bone);
  padding: 0.7rem 1.1rem; z-index: 200; border-radius: var(--radius);
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 1rem; }

/* ===================== header ===================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--gutter);
  background: color-mix(in srgb, var(--bone) 96%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand .mark { width: 26px; height: 26px; flex: none; color: var(--terracotta); }
.brand b { font-family: var(--display); font-weight: 500; font-size: 1.06rem; letter-spacing: -0.01em; }
.brand small { display: block; font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); font-family: var(--body); }

.nav { display: flex; align-items: center; gap: clamp(0.6rem, 2vw, 1.9rem); }
.nav a:not(.btn) { text-decoration: none; font-size: 0.92rem; font-weight: 500; color: var(--ink-soft); padding: 0.3rem 0; position: relative; }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 0;
  background: var(--terracotta); transition: width 0.28s var(--ease);
}
.nav a:not(.btn):hover::after, .nav a:not(.btn):focus-visible::after { width: 100%; }

.nav-toggle { display: none; }

/* ===================== buttons ===================== */
.btn {
  --bg: var(--terracotta); --fg: #fff;
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--bg); color: var(--fg);
  font-family: var(--body); font-weight: 600; font-size: 0.96rem; letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer; border: 0;
  padding: 0.85rem 1.5rem; border-radius: var(--radius);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { background: var(--terracotta-d); transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgba(143, 63, 32, 0.7); }
.btn--ghost { --bg: transparent; --fg: var(--bone); border: 1.5px solid color-mix(in srgb, var(--bone) 55%, transparent); }
.btn--ghost:hover { --bg: color-mix(in srgb, var(--bone) 14%, transparent); border-color: var(--bone); box-shadow: none; }
.btn--ink { --bg: var(--ink); --fg: var(--bone); }
.btn--ink:hover { --bg: #000; box-shadow: 0 12px 24px -12px rgba(0,0,0,0.6); }
.btn--lg { padding: 1.05rem 2rem; font-size: 1.05rem; }
.btn .arrow { transition: transform 0.2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ===================== hero ===================== */
.hero {
  position: relative; min-height: min(94vh, 880px);
  display: flex; align-items: flex-end;
  color: var(--bone); isolation: isolate;
  padding: var(--gutter); padding-bottom: clamp(2.5rem, 6vw, 5rem);
}
.hero__img { position: absolute; inset: 0; z-index: -2; }
.hero__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.hero::after { /* legibility scrim */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(16,20,17,0.86) 0%, rgba(16,20,17,0.36) 40%, rgba(16,20,17,0.08) 70%, rgba(16,20,17,0.22) 100%),
    linear-gradient(to right, rgba(16,20,17,0.5), rgba(16,20,17,0) 60%);
}
.hero__inner { width: min(100%, 1200px); margin-inline: auto; max-width: 100%; }
.hero__laurel { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--sand); margin-bottom: 1.2rem; }
.hero__laurel svg { width: 16px; height: 16px; }
.hero h1 {
  font-size: clamp(2.9rem, 1.6rem + 6vw, 6.4rem);
  font-weight: 420; line-height: 0.98; letter-spacing: -0.02em;
  text-wrap: balance; max-width: 16ch;
  text-shadow: 0 2px 30px rgba(0,0,0,0.35);
}
.hero h1 .ar { display: block; font-family: var(--arabic); font-weight: 400; font-size: 0.46em; color: var(--bone-dim); letter-spacing: 0; margin-bottom: 0.35rem; opacity: 0.92; }
.hero__logline { font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.4rem); max-width: 46ch; margin-top: 1.4rem; color: color-mix(in srgb, var(--bone) 92%, transparent); }
.hero__meta { margin-top: 1.2rem; font-size: 0.85rem; letter-spacing: 0.04em; color: color-mix(in srgb, var(--bone) 78%, transparent); display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.hero__meta span { white-space: nowrap; }
.hero__cta { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* hero ripple motif (subtle, behind content, bottom-left) */
.hero__ripple {
  position: absolute; left: -8vw; bottom: -8vw; width: 46vw; max-width: 620px; aspect-ratio: 1; z-index: -1;
  opacity: 0.16; pointer-events: none; color: var(--bone);
}
.hero__ripple circle { fill: none; stroke: currentColor; stroke-width: 1; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .hero__ripple circle { animation: ripple 6s var(--ease) infinite; }
  .hero__ripple circle:nth-child(2) { animation-delay: 1.5s; }
  .hero__ripple circle:nth-child(3) { animation-delay: 3s; }
  .hero__ripple circle:nth-child(4) { animation-delay: 4.5s; }
}
@keyframes ripple { 0% { transform: scale(0.2); opacity: 0; } 18% { opacity: 0.7; } 100% { transform: scale(1); opacity: 0; } }

/* ===================== awards band ===================== */
.awards { background: var(--laurel-deep); color: var(--bone); position: relative; }
.awards .seism { color: var(--laurel-line); opacity: 0.45; }
.awards__head { text-align: center; max-width: 60ch; margin-inline: auto; }
.awards__head .eyebrow { color: var(--sand); }
.awards__head h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem); margin-top: 0.7rem; }
.awards__head p { color: color-mix(in srgb, var(--bone) 80%, transparent); margin-top: 1rem; }
.awards__composite { width: min(100%, 760px); margin: 2.6rem auto 0; }
.awards__composite img { width: 100%; filter: brightness(0) invert(1); opacity: 0.92; }
.awards__list { list-style: none; padding: 0; margin: 3rem auto 0; width: min(100%, 920px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0.2rem 2.5rem; }
.awards__list li { display: flex; gap: 0.9rem; padding: 0.95rem 0; border-top: 1px solid var(--laurel-line); align-items: baseline; }
.awards__list .tag { flex: none; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--laurel-deep); background: var(--sand); padding: 0.2rem 0.5rem; border-radius: var(--radius); margin-top: 0.15rem; }
.awards__list .tag--sel { background: transparent; color: var(--sand); border: 1px solid var(--laurel-line); }
.awards__list b { font-weight: 600; font-family: var(--display); font-size: 1.08rem; }
.awards__list span.where { display: block; color: color-mix(in srgb, var(--bone) 66%, transparent); font-size: 0.9rem; }

/* ===================== trailer ===================== */
.trailer { text-align: center; }
.trailer h2 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.7rem); }
.trailer .eyebrow { color: var(--terracotta-d); }
.trailer__frame:focus-within { outline: 3px solid var(--terracotta); outline-offset: 3px; }
.trailer__frame {
  margin: 2.2rem auto 0; width: min(100%, 980px);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  background: var(--ink); aspect-ratio: 16 / 9;
}
.trailer__frame video, .trailer__frame iframe { width: 100%; height: 100%; display: block; border: 0; object-fit: cover; }
.trailer__note { margin-top: 1.1rem; font-size: 0.88rem; color: var(--muted); }

/* ===================== story / split sections ===================== */
.split { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 880px) { .split { grid-template-columns: 1fr 1fr; } .split--reverse > .split__media { order: 2; } }
.split__media { position: relative; }
.split__media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.split__media figcaption { font-size: 0.8rem; color: var(--muted); margin-top: 0.7rem; font-style: italic; }
.split__media .frame-accent { position: absolute; inset: 0; border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); border-radius: var(--radius); transform: translate(14px, 14px); z-index: -1; }
.split__body .eyebrow { color: var(--terracotta-d); }
.split__body h2 { font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3rem); margin-top: 0.7rem; }
.split__body .lead { font-size: 1.12em; }
.pullquote { font-family: var(--display); font-size: clamp(1.3rem, 1rem + 1.6vw, 1.9rem); line-height: 1.3; color: var(--laurel);
  border-left: 3px solid var(--terracotta); padding-left: 1.2rem; margin-top: 1.6rem; font-style: italic; }
.signoff { margin-top: 1.6rem; font-family: var(--display); font-style: italic; color: var(--ink-soft); }

/* context strip — the children + Atfaluna */
.context { background: var(--bone-dim); }
.context__grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); }
@media (min-width: 760px) { .context__grid { grid-template-columns: 1.1fr 1fr; } }
.context h2 { font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.4rem); }
.context .eyebrow { color: var(--terracotta-d); }
.figures { display: flex; gap: 2rem; flex-wrap: wrap; margin-top: 1.4rem; }
.figures div { }
.figures b { display: block; font-family: var(--display); font-size: clamp(1.8rem, 1.4rem + 2vw, 2.8rem); color: var(--laurel); line-height: 1; }
.figures span { font-size: 0.85rem; color: var(--muted); }
.names { font-family: var(--display); font-size: 1.15rem; line-height: 1.7; color: var(--ink-soft); }

/* ===================== gallery ===================== */
.gallery { background: var(--ink); color: var(--bone); }
.gallery .eyebrow { color: var(--sand); }
.gallery__head { max-width: 56ch; }
.gallery__head h2 { font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3rem); margin-top: 0.6rem; }
.gallery__head p { color: color-mix(in srgb, var(--bone) 72%, transparent); margin-top: 0.9rem; }
.gallery__grid { display: grid; gap: 1rem; margin-top: 2.6rem; grid-template-columns: repeat(6, 1fr); }
.gallery__grid figure { position: relative; overflow: hidden; border-radius: var(--radius); margin: 0; background: var(--laurel-deep); }
.gallery__grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.gallery__grid figure:hover img { transform: scale(1.04); }
.gallery__grid figcaption {
  position: absolute; inset: auto 0 0 0; padding: 1.4rem 1rem 0.9rem;
  font-size: 0.82rem; line-height: 1.4;
  background: linear-gradient(to top, rgba(16,20,17,0.92), transparent);
  color: color-mix(in srgb, var(--bone) 92%, transparent);
}
.g-a { grid-column: span 4; aspect-ratio: 16 / 10; }
.g-b { grid-column: span 2; aspect-ratio: 3 / 4; }
.g-c { grid-column: span 2; aspect-ratio: 1 / 1; }
.g-d { grid-column: span 2; aspect-ratio: 1 / 1; }
.g-e { grid-column: span 2; aspect-ratio: 1 / 1; }
@media (max-width: 720px) {
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .g-a { grid-column: span 2; aspect-ratio: 16 / 10; }
  .g-b, .g-c, .g-d, .g-e { grid-column: span 1; aspect-ratio: 1 / 1; }
}

/* ===================== screenings / educators ===================== */
.screen .eyebrow { color: var(--terracotta-d); }
.screen h2 { font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3rem); margin-top: 0.6rem; max-width: 18ch; }
.screen__cards { display: grid; gap: 1.2rem; margin-top: 2.6rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); border-radius: var(--radius); padding: 1.6rem 1.5rem; background: #fff; }
.card h3 { font-size: 1.25rem; }
.card p { font-size: 0.95rem; color: var(--ink-soft); margin-top: 0.5rem; }
.card a { color: var(--terracotta-d); font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }
.card .who { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

/* ===================== accessibility note ===================== */
.access { background: var(--laurel); color: var(--bone); }
.access__grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (min-width: 760px) { .access__grid { grid-template-columns: auto 1fr; } }
.access__icon { width: 64px; height: 64px; color: var(--sand); flex: none; }
.access .eyebrow { color: var(--sand); }
.access h2 { font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2.2rem); margin-top: 0.5rem; }
.access p { color: color-mix(in srgb, var(--bone) 84%, transparent); margin-top: 0.8rem; max-width: 60ch; }
.access ul { margin-top: 1rem; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.access li { font-size: 0.82rem; border: 1px solid var(--laurel-line); padding: 0.35rem 0.8rem; border-radius: 999px; }

/* ===================== final CTA ===================== */
.finale { background: var(--terracotta); color: #fff; text-align: center; }
.finale h2 { font-size: clamp(2rem, 1.4rem + 3vw, 3.6rem); max-width: 18ch; margin-inline: auto; }
.finale p { margin-top: 1rem; color: rgba(255,255,255,0.9); max-width: 48ch; margin-inline: auto; }
.finale .btn { margin-top: 2rem; }
.finale .btn--ink { box-shadow: 0 18px 40px -18px rgba(0,0,0,0.5); }
.finale small { display: block; margin-top: 1.2rem; font-size: 0.82rem; color: #fff; }
.finale a.plain { color: #fff; }

/* ===================== footer ===================== */
.site-footer { background: var(--laurel-deep); color: color-mix(in srgb, var(--bone) 80%, transparent); padding-block: clamp(3rem, 7vw, 5rem); font-size: 0.9rem; }
.site-footer a { color: var(--bone); text-decoration: none; border-bottom: 1px solid var(--laurel-line); }
.site-footer a:hover { border-color: var(--sand); }
.footer__top { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer__brand b { font-family: var(--display); font-size: 1.3rem; color: var(--bone); display: block; }
.footer__brand .ar { font-family: var(--arabic); color: var(--sand); }
.footer h4 { font-family: var(--body); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sand); margin-bottom: 0.9rem; font-weight: 600; }
.footer ul { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.credits { margin-top: 2.5rem; border-top: 1px solid var(--laurel-line); padding-top: 1.5rem; }
.credits summary { cursor: pointer; font-family: var(--display); font-size: 1.05rem; color: var(--bone); }
.credits__body { margin-top: 1rem; columns: 2; column-gap: 2.5rem; font-size: 0.84rem; line-height: 1.7; color: color-mix(in srgb, var(--bone) 72%, transparent); }
@media (max-width: 600px) { .credits__body { columns: 1; } }
.credits__body b { color: var(--bone); font-family: var(--body); font-weight: 600; }
.footer__legal { margin-top: 2.5rem; border-top: 1px solid var(--laurel-line); padding-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; justify-content: space-between; font-size: 0.8rem; color: color-mix(in srgb, var(--bone) 78%, transparent); }

/* ===================== scroll reveal ===================== */
/* Reveal is gated on .js (added by inline script) so content is ALWAYS visible
   if JavaScript is disabled or fails — animation is pure enhancement. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js [data-reveal-stagger] > * { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
  .js [data-reveal-stagger].is-in > * { opacity: 1; transform: none; }
  .js [data-reveal-stagger].is-in > *:nth-child(2) { transition-delay: 0.08s; }
  .js [data-reveal-stagger].is-in > *:nth-child(3) { transition-delay: 0.16s; }
  .js [data-reveal-stagger].is-in > *:nth-child(4) { transition-delay: 0.24s; }
  .js [data-reveal-stagger].is-in > *:nth-child(5) { transition-delay: 0.32s; }
}

/* ===================== mobile nav ===================== */
@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; background: none; border: 0; cursor: pointer; color: var(--ink);
  }
  .nav-toggle svg { width: 24px; height: 24px; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px);
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 1.4rem;
    background: var(--laurel-deep); color: var(--bone);
    padding: var(--gutter);
    opacity: 0; visibility: hidden; transform: translateX(16px);
    transition: opacity 0.3s var(--ease), transform 0.35s var(--ease), visibility 0.35s var(--ease); z-index: 150;
  }
  .nav a { color: var(--bone); font-size: 1.2rem; }
  .nav .btn { color: #fff; }
  body.nav-open .nav { opacity: 1; visibility: visible; transform: translateX(0); }
  body.nav-open .nav-overlay { opacity: 1; pointer-events: auto; }
  .nav-overlay { position: fixed; inset: 0; background: rgba(16,20,17,0.5); opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease); z-index: 140; }
}
@media (min-width: 821px) { .nav-overlay { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
