/* Bayt Misr Production studio site. Light editorial cinema with dark screening-room sections. */

:root {
  --paper: #EEE9E1;
  --paper-2: #E4DED4;
  --ink: #141414;
  --ink-2: #5E5A54;
  --rec: #E2321B;
  --line: rgba(20, 20, 20, .14);
  --line-dark: rgba(238, 233, 225, .18);
  --gut: 16px;
  --head-h: 64px;
  --mono: "IBM Plex Mono", "IBM Plex Sans Arabic", ui-monospace, monospace;
  --ease: cubic-bezier(.6, 0, .2, 1);
}
@media (min-width: 768px) { :root { --gut: 40px; } }
@media (min-width: 1100px) { :root { --gut: 56px; } }

html[lang="ar"] {
  --f-head: "Cairo", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --f-body: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --lh-body: 1.65;
  --w-head: 800;
}
html[lang="en"] {
  --f-head: "Instrument Serif", Georgia, serif;
  --f-body: "IBM Plex Sans", system-ui, sans-serif;
  --lh-body: 1.55;
  --w-head: 400;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: var(--lh-body);
  overflow-x: hidden;
  overflow-x: clip;
}
body:not(.has-hero) main { padding-top: var(--head-h); }
img, video, svg { max-width: 100%; }
img { display: block; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--rec); outline-offset: 3px; }
.dark :focus-visible, .hdr :focus-visible, .menu :focus-visible, .player :focus-visible, .lightbox :focus-visible { outline-color: var(--rec); }

.skip { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 300; background: var(--ink); color: var(--paper); padding: 10px 14px; }
.skip:focus { top: 8px; }

.mono {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1.5;
}
/* Arabic letters join, so tracking would break the words. Latin snippets keep it. */
html[lang="ar"] .mono:not(.latin):not([dir="ltr"]) { letter-spacing: 0; text-transform: none; font-size: 13px; }

.dark { background: var(--ink); color: var(--paper); }
.rule { border-top: 1px solid var(--line); }
.dark.rule { border-top-color: var(--line-dark); }

.rec-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rec);
  flex: none;
}

.hdr {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--head-h);
  padding-inline: var(--gut);
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: transform .35s var(--ease), background-color .3s, color .3s;
}
body.has-hero .hdr:not(.is-solid) { background: transparent; color: var(--paper); border-bottom-color: transparent; }
.hdr.is-hidden { transform: translateY(-100%); }
.hdr-brand { font-family: var(--f-head); font-weight: var(--w-head); font-size: 20px; text-decoration: none; white-space: nowrap; margin-inline-end: auto; }
html[lang="ar"] .hdr-brand { font-size: 19px; }
.hdr-nav { display: none; gap: 28px; }
.hdr-nav a, .hdr-lang, .hdr-menu, .menu-lang {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
}
html[lang="ar"] .hdr-nav a, html[lang="ar"] .hdr-menu { letter-spacing: 0; text-transform: none; font-size: 14px; }
.hdr-nav a { padding: 8px 0; border-bottom: 1px solid transparent; }
.hdr-nav a[aria-current="page"], .hdr-nav a:hover { border-bottom-color: currentColor; }
.hdr-lang { padding: 10px 4px; min-width: 44px; text-align: center; }
html[lang="en"] .hdr-lang { font-family: "IBM Plex Sans Arabic", sans-serif; text-transform: none; letter-spacing: 0; font-size: 14px; }
.hdr-menu { background: none; border: 0; padding: 10px 0; min-height: 44px; cursor: pointer; }
@media (min-width: 900px) {
  .hdr-nav { display: flex; }
  .hdr-menu { display: none; }
  .hdr-brand { margin-inline-end: 0; }
  .hdr-nav { margin-inline-end: auto; margin-inline-start: 40px; }
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--ink);
  color: var(--paper);
  padding: 88px var(--gut) 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}
.menu-close { position: absolute; top: 12px; inset-inline-end: var(--gut); background: none; border: 0; min-height: 44px; padding: 10px 0; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
html[lang="ar"] .menu-close { letter-spacing: 0; text-transform: none; font-size: 14px; }
.menu-nav { display: flex; flex-direction: column; gap: 4px; }
.menu-nav a { font-family: var(--f-head); font-weight: var(--w-head); font-size: clamp(40px, 12vw, 72px); line-height: 1.2; text-decoration: none; }
.menu-nav a[aria-current="page"] { color: var(--rec); }
.menu-lang { align-self: flex-start; padding: 12px 0; }
html[lang="en"] .menu-lang { font-family: "IBM Plex Sans Arabic", sans-serif; text-transform: none; letter-spacing: 0; font-size: 18px; }

.wa, .tc {
  position: fixed;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 40;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--line-dark);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.wa {
  inset-inline-end: var(--gut);
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
}
.wa.show { opacity: 1; pointer-events: auto; }
.wa.is-away { opacity: 0; pointer-events: none; transform: translateY(12px); }
.tc {
  inset-inline-start: var(--gut);
  height: 44px;
  padding: 0 12px;
  pointer-events: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  max-width: calc(100vw - 2 * var(--gut) - 150px);
}
.tc-time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tc i { font-style: normal; color: var(--rec); animation: colon 1s steps(1) infinite; }
.tc-slate { padding-inline-start: 10px; border-inline-start: 1px solid var(--line-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[lang="ar"] .tc-slate { letter-spacing: 0; text-transform: none; font-family: var(--f-body); }
@keyframes colon { 50% { opacity: 0; } }

.cursor { position: fixed; left: 0; top: 0; z-index: 150; pointer-events: none; will-change: transform; }
.cursor-box {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--w, 30px);
  height: var(--h, 30px);
  translate: -50% -50%;
  transition: width .3s var(--ease), height .3s var(--ease);
  mix-blend-mode: difference;
  color: #fff;
}
.cursor-box i { position: absolute; width: 10px; height: 10px; border: 0 solid currentColor; }
.cursor-box i:nth-child(1) { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.cursor-box i:nth-child(2) { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.cursor-box i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.cursor-box i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.cursor-dot { position: absolute; left: 0; top: 0; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--rec); transition: opacity .2s; }
.cursor.is-framing { transition: transform .28s var(--ease); }
.cursor-label { position: absolute; left: 0; top: 0; translate: -50% -50%; font-family: var(--mono); font-size: 11px; letter-spacing: .18em; color: var(--paper); background: var(--ink); padding: 3px 7px; opacity: 0; transition: opacity .2s; }
.cursor.is-framing .cursor-dot { opacity: 0; }
.cursor.is-framing .cursor-label { opacity: 1; }
html.has-cursor, html.has-cursor a, html.has-cursor button { cursor: none; }

.shutter { position: fixed; inset: 0; z-index: 200; pointer-events: none; visibility: hidden; transition: visibility 0s linear .46s; --o: -175px; }
.shutter svg { display: block; width: 100%; height: 100%; max-width: none; }
.shutter polygon { fill: var(--paper); stroke: var(--paper); stroke-width: 2; transform-origin: 0 0; transform: rotate(var(--r)) translateY(var(--o)); transition: transform .42s var(--ease); }
.shutter.is-active { visibility: visible; transition-delay: 0s; }
.shutter.is-closed { --o: 0px; }
.shutter.is-closed polygon { transition-duration: .38s; }
html.shutter-in .shutter { visibility: visible; --o: 0px; transition-delay: 0s; }
html.shutter-in .shutter polygon { transition: none; }

.mark, .joe { direction: ltr; unicode-bidi: isolate; }
.mark { display: block; width: 112px; height: 24px; color: var(--paper); }
.mark-corner { position: absolute; inset-block-start: 10px; inset-inline-start: 10px; color: var(--paper); pointer-events: none; }
.mark-corner .mark { width: 84px; height: 18px; }
.joe { display: block; width: min(100%, 720px); height: auto; color: currentColor; overflow: visible; }
.js .joe[data-reveal] .l { opacity: 0; }
.js .joe[data-reveal].in .l { opacity: 1; transition: opacity 0s linear calc(var(--i) * 60ms); }
.js .joe[data-reveal] .rec-mark { opacity: 0; }
.js .joe[data-reveal].in .rec-mark { opacity: 1; animation: blink2 .9s steps(1) 1; }
@keyframes blink2 { 0%, 25% { opacity: 1; } 25.1%, 50% { opacity: 0; } 50.1%, 75% { opacity: 1; } 75.1%, 90% { opacity: 0; } 90.1%, 100% { opacity: 1; } }

.sub { font-family: var(--f-head); font-weight: var(--w-head); font-size: clamp(36px, 7vw, 96px); line-height: 1.1; display: block; }
html[lang="ar"] .sub { line-height: 1.35; }
.sub-rule { display: block; width: 72px; height: 1px; background: currentColor; margin-bottom: 14px; transform-origin: left center; }
html[dir="rtl"] .sub-rule { transform-origin: right center; }
.js .sub:not(.in) .sub-rule { transform: scaleX(0); }
.js .sub.in .sub-rule { transition: transform .3s var(--ease); }
.js .sub .w { display: inline-block; opacity: 0; transform: translateY(.35em); }
.js .sub.in .w { opacity: 1; transform: none; transition: opacity .45s linear calc(200ms + var(--d)), transform .6s var(--ease) calc(200ms + var(--d)); }

.sec { padding: clamp(56px, 9vw, 128px) var(--gut); }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: clamp(28px, 4vw, 56px); flex-wrap: wrap; }
.link-mono { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; padding: 12px 0; border-bottom: 1px solid currentColor; text-decoration: none; }
html[lang="ar"] .link-mono { letter-spacing: 0; text-transform: none; font-size: 14px; }

.btn-rec {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.btn-rec:hover { background: var(--paper); color: var(--ink); }
.btn-rec .rec-dot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.btn-big { background: var(--paper); color: var(--ink); font-family: var(--f-head); font-weight: var(--w-head); font-size: clamp(20px, 3.4vw, 36px); min-height: 72px; padding: 0 32px; border-color: var(--paper); }
.btn-big:hover { background: transparent; color: var(--paper); }
/* The booking button is a WhatsApp action, so it carries WhatsApp green. */
.cta .btn-big { background: #25D366; color: #fff; border-color: #25D366; text-shadow: 0 1px 2px rgba(0, 60, 20, .45); }
.cta .btn-big:hover { background: #1EBE5A; border-color: #1EBE5A; color: #fff; }
.cta .btn-big .rec-dot { background: #E53935; box-shadow: 0 0 0 2px #fff; }

/* svh, not dvh: dvh follows the iOS toolbar, so the hero resized on every toolbar or screenshot change and shifted the page below it. */
.hero { position: relative; height: 100vh; height: 100svh; overflow: hidden; }
.hero-frames { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: clamp(8px, 1.6vw, 24px); padding-top: 56px; }
.frame { position: relative; height: 56%; aspect-ratio: 9 / 16; overflow: hidden; background: #1f1f1f; }
.frame-side { opacity: .5; }
.frame-main { height: 86%; }
.frame-main::after { content: ""; position: absolute; inset: 0; background: rgba(20, 20, 20, .26); }
.frame-poster { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.frame-video { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-over {
  position: absolute;
  inset: 0;
  padding: calc(var(--head-h) + 16px) var(--gut) calc(76px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: end;
  align-items: end;
  pointer-events: none;
}
.hero-over > * { pointer-events: auto; }
.hero-mark, .hero-name, .hero-line { grid-column: 1 / -1; }
.hero-mark { margin-bottom: 8px; }
.hero-name { font-family: var(--f-head); font-weight: var(--w-head); font-size: clamp(72px, 19vw, 300px); line-height: .85; letter-spacing: -.01em; }
/* Cairo's waw drops well below the baseline at 300px, so the line needs room under it */
html[lang="ar"] .hero-name { line-height: 1.05; padding-bottom: .1em; }
.hero-line { font-size: clamp(17px, 2vw, 22px); max-width: 28em; margin: 16px 0 24px; }
.hero .btn-rec { justify-self: start; }
.scroll-cue { display: flex; flex-direction: column; align-items: center; gap: 8px; justify-self: end; }
.scroll-cue i { width: 1px; height: 36px; background: currentColor; transform-origin: top; animation: cue 2s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

@media (max-width: 760px) {
  .hero-frames { padding-top: 0; display: block; }
  .frame-side { display: none; }
  .frame-main { position: absolute; inset: 0; height: auto; aspect-ratio: auto; }
  .frame-main::after { background: rgba(20, 20, 20, .34); }
}

.intro { padding: clamp(72px, 12vw, 180px) var(--gut); }
.intro-line { font-family: var(--f-head); font-weight: var(--w-head); font-size: clamp(34px, 6.4vw, 92px); line-height: 1.12; max-width: 17em; }
html[lang="ar"] .intro-line { line-height: 1.4; }
.intro-line, .cta-title, .hero-line { text-wrap: balance; }
.intro-mono { margin-top: 36px; color: var(--ink-2); }

.cards { display: grid; gap: 28px 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .cards { grid-template-columns: repeat(3, 1fr); gap: 36px 20px; } }
@media (min-width: 1100px) {
  .cards-home { grid-template-columns: repeat(6, 1fr); gap: 20px; }
  .cards-films { grid-template-columns: repeat(4, 1fr); gap: 48px 24px; }
  .cards-films .card:nth-child(4n + 2) { margin-top: 40px; }
  .cards-films .card:nth-child(4n + 4) { margin-top: 80px; }
}
.card { display: block; text-decoration: none; text-align: start; background: none; border: 0; padding: 0; cursor: pointer; min-width: 0; }
.card-media { position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden; background: var(--paper-2); }
.card-media img, .card-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-video { opacity: 0; transition: opacity .35s; }
.card-video.is-playing { opacity: 1; }
/* Scroll-driven parallax: the media is 12% larger than its frame and slides within the extra 6% each side.
   Only frames within ~200px of the viewport (is-near) get the transform and a layer, so the GPU holds a handful
   of layers (a layer per photo made iPhone Safari reload the tab) and nothing repaints while scrolling. */
html.fx .is-near img, html.fx .is-near .card-video { transform: translate(0, calc(var(--py, 0) * 1%)) scale(1.12); will-change: transform; }
html.fx .ph.is-near { translate: 0 calc(var(--dr, 0) * 1px); }

/* Touch devices: the framing cursor is replaced by brackets and a PLAY label drawn inside the focused card. */
.card.is-live .card-media::before {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: difference;
  --b: linear-gradient(#fff, #fff);
  background:
    var(--b) 0 0 / 10px 1.5px, var(--b) 0 0 / 1.5px 10px,
    var(--b) 100% 0 / 10px 1.5px, var(--b) 100% 0 / 1.5px 10px,
    var(--b) 0 100% / 10px 1.5px, var(--b) 0 100% / 1.5px 10px,
    var(--b) 100% 100% / 10px 1.5px, var(--b) 100% 100% / 1.5px 10px;
  background-repeat: no-repeat;
}
.card.is-live .card-media::after {
  content: "PLAY";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  translate: -50% -50%;
  pointer-events: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--paper);
  background: var(--ink);
  padding: 3px 7px;
}
@media (pointer: fine) { .card.is-live .card-media::before, .card.is-live .card-media::after { content: none; } }
.js .card.rise, .js .ph.rise { opacity: 0; transform: translateY(40px); transition: opacity .7s ease-out, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--col, 0) * 70ms); }
.js .card.rise.in, .js .ph.rise.in { opacity: 1; transform: none; }
.card-media canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.card-meta { display: flex; flex-direction: column; gap: 2px; padding-top: 12px; }
.card-title { font-family: var(--f-head); font-weight: var(--w-head); font-size: 20px; line-height: 1.25; }
.card-cat { color: var(--ink-2); display: flex; align-items: center; gap: 8px; }

.strip {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  background: var(--ink);
  color: var(--paper);
  margin-inline: calc(var(--gut) * -1);
  scrollbar-width: thin;
  scrollbar-color: var(--ink-2) var(--ink);
  user-select: none;
  -webkit-user-select: none;
}
.strip.is-dragging { scroll-snap-type: none; cursor: grabbing; }
.cell { position: relative; flex: none; scroll-snap-align: start; padding: 28px 8px 46px; }
.cell::before, .cell::after { content: ""; position: absolute; inset-inline: 0; height: 10px; background: repeating-linear-gradient(90deg, var(--paper) 0 10px, transparent 10px 22px); opacity: .85; }
.cell::before { top: 9px; }
.cell::after { bottom: 9px; }
.cell img { height: clamp(220px, 46vw, 440px); width: auto; max-width: none; -webkit-user-drag: none; }
.cell figcaption { position: absolute; bottom: 25px; inset-inline-start: 12px; font-size: 10px; color: var(--paper); line-height: 1; }
.cell a { display: block; }

.gear-sec { padding-bottom: 0; }
.gear { height: 230vh; height: 230svh; position: relative; margin-inline: calc(var(--gut) * -1); }
.gear-stick { position: sticky; top: 0; height: 100vh; height: 100dvh; padding: calc(var(--head-h) + 12px) var(--gut) 76px; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.gear-frame { position: relative; height: 100%; max-height: 62dvh; aspect-ratio: 4 / 5; max-width: 100%; justify-self: start; overflow: hidden; background: var(--paper-2); }
.gear-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gear-a { object-fit: contain; padding: 6%; }
.gear-b { clip-path: inset(0 calc((1 - var(--wipe, 0)) * 100%) 0 0); }
html[dir="rtl"] .gear-b { clip-path: inset(0 0 0 calc((1 - var(--wipe, 0)) * 100%)); }
.gear-label { display: grid; font-family: var(--f-head); font-weight: var(--w-head); font-size: clamp(30px, 8vw, 64px); line-height: 1.15; }
.gl { grid-area: 1 / 1; display: flex; flex-direction: column; transition: opacity .2s; }
.gl-a { transition-delay: 0s; }
.gl-b { transition-delay: .12s; }
.gl .mono { color: var(--rec); margin-bottom: 6px; }
.gl-b { opacity: 0; }
.gear.is-shot .gl-a { opacity: 0; }
.gear.is-shot .gl-b { opacity: 1; }
.gear.is-shot .gl-a { transition-delay: 0s; }
.gear:not(.is-shot) .gl-b { transition-delay: 0s; }
.gear:not(.is-shot) .gl-a { transition-delay: .12s; }
@media (min-width: 900px) {
  .gear-stick { grid-template-rows: none; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; padding-bottom: 40px; }
  .gear-frame { max-height: 74dvh; }
  .gear-label { font-size: clamp(44px, 6vw, 96px); justify-self: end; text-align: end; }
  .gl { align-items: flex-end; }
}

.credits { padding: clamp(80px, 10vw, 140px) var(--gut); overflow: hidden; }
.credits-head { margin-bottom: clamp(40px, 6vw, 80px); }
.credits-head .mono { color: var(--rec); margin-bottom: 14px; }
.credits-line { margin-top: 16px; font-size: 18px; opacity: .8; }
/* 21 logos: 3 columns on phones and tablets, 7 on desktop, so every row is full at both. */
.credits-roll { --bw: 94px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 12px; padding-bottom: 24px; }
@media (min-width: 600px) { .credits-roll { --bw: 130px; gap: 40px 24px; } }
@media (min-width: 1000px) { .credits-roll { --bw: min(150px, 10vw); grid-template-columns: repeat(7, 1fr); gap: 56px 20px; } }
.logo { display: grid; place-items: center; min-height: calc(var(--bw) * .373 + 16px); }
.logo img { width: calc(var(--fw, 1) * var(--bw)); max-width: 100%; height: auto; }
.js .logo.rise { opacity: 0; transform: translateY(28px); transition: opacity .7s ease-out, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--col, 0) * 70ms); }
.js .logo.rise.in { opacity: 1; transform: none; }

.bts { position: relative; padding: clamp(80px, 10vw, 140px) var(--gut); }
.bts-line { font-size: clamp(18px, 2.4vw, 26px); max-width: 24em; margin-bottom: 40px; opacity: .85; }
.bts-grid { columns: 2; column-gap: 12px; }
@media (min-width: 900px) { .bts-grid { columns: 3; column-gap: 20px; } }
.bts-item { break-inside: avoid; margin-bottom: 12px; position: relative; background: #1f1f1f; }
@media (min-width: 900px) { .bts-item { margin-bottom: 20px; } }
.bts-item img, .bts-video { display: block; width: 100%; height: auto; }
.bts-video { aspect-ratio: 9 / 16; object-fit: cover; }

.grain { isolation: isolate; overflow: hidden; }
.grain::after {
  content: "";
  position: absolute;
  inset: -60px;
  z-index: 1;
  pointer-events: none;
  opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .8s steps(5) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-30px, 20px); } 40% { transform: translate(24px, -26px); } 60% { transform: translate(-18px, -30px); } 80% { transform: translate(30px, 14px); } 100% { transform: translate(0, 0); } }

.timeline { display: grid; gap: 0; border-inline-start: 1px solid var(--ink); }
.clip { position: relative; padding: 4px 0 36px 0; padding-inline-start: 24px; }
.clip::before { content: ""; position: absolute; inset-inline-start: -5px; top: 10px; width: 9px; height: 9px; background: var(--rec); }
.clip-top { display: flex; gap: 14px; align-items: baseline; color: var(--ink-2); }
.clip-top b { font-weight: 500; color: var(--ink); font-size: 14px; }
.clip-title { font-family: var(--f-head); font-weight: var(--w-head); font-size: clamp(28px, 3vw, 40px); line-height: 1.2; margin: 6px 0 8px; }
.clip-line { color: var(--ink-2); max-width: 26em; }
@media (min-width: 900px) {
  .timeline { grid-template-columns: repeat(6, 1fr); border-inline-start: 0; border-top: 1px solid var(--ink); }
  .clip { padding: 28px 18px 8px 0; padding-inline-start: 0; padding-inline-end: 18px; }
  .clip::before { inset-inline-start: 0; top: -5px; }
  .clip-top { margin-top: 0; }
  .clip::after { content: ""; display: block; height: 6px; background: var(--ink); width: calc(48% + var(--i) * 9%); margin-top: 20px; opacity: .85; }
  .clip-title { font-size: clamp(22px, 2vw, 32px); }
}

.shoot-list { font-family: var(--f-head); font-weight: var(--w-head); font-size: clamp(30px, 5.6vw, 80px); line-height: 1.25; }
html[lang="ar"] .shoot-list { line-height: 1.6; }
.shoot-item { display: inline; }
.sl { display: inline-block; margin-inline: .5em; color: var(--rec); font-size: .5em; vertical-align: middle; }

.cta { padding: clamp(96px, 14vw, 200px) var(--gut); }
.cta-title { font-family: var(--f-head); font-weight: var(--w-head); font-size: clamp(40px, 9vw, 140px); line-height: 1.1; max-width: 12em; margin-bottom: 48px; }
html[lang="ar"] .cta-title { line-height: 1.35; }

.ftr { background: var(--ink); color: var(--paper); padding: clamp(56px, 8vw, 110px) var(--gut) calc(96px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-dark); }
.ftr-end { margin-bottom: clamp(40px, 6vw, 80px); }
.ftr-end .joe { width: min(100%, 900px); }
.ftr-grid { display: grid; gap: 20px 40px; grid-template-columns: 1fr; padding-bottom: 32px; border-bottom: 1px solid var(--line-dark); }
@media (min-width: 768px) { .ftr-grid { grid-template-columns: 2fr 1fr 2fr auto; align-items: start; } }
.ftr-name { font-family: var(--f-head); font-weight: var(--w-head); font-size: 24px; }
.ftr-grid a { display: inline-block; padding: 8px 0; text-decoration: none; }
.ftr-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.ftr-wa, .ftr-lang { border-bottom: 1px solid var(--line-dark); width: fit-content; }
.ftr-line { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; color: rgba(238, 233, 225, .72); }
.ftr-line a { text-decoration: none; padding: 8px 0; }

.page-head { padding: clamp(40px, 7vw, 100px) var(--gut) 32px; }
.page-title { font-family: var(--f-head); font-weight: var(--w-head); font-size: clamp(56px, 12vw, 180px); line-height: 1; margin-bottom: 32px; }
html[lang="ar"] .page-title { line-height: 1.3; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; background: transparent; border: 1px solid var(--line); border-color: rgba(20, 20, 20, .35); font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; transition: background-color .2s, color .2s; }
html[lang="ar"] .chip { letter-spacing: 0; text-transform: none; font-size: 14px; font-family: var(--f-body); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.films, .sec[data-photos] { padding-top: 8px; }

.masonry { columns: 2; column-gap: 10px; }
@media (min-width: 768px) { .masonry { columns: 3; column-gap: 14px; } }
@media (min-width: 1100px) { .masonry { columns: 4; column-gap: 16px; } }
.ph { display: block; overflow: hidden; width: 100%; margin: 0 0 10px; padding: 0; border: 0; background: var(--paper-2); cursor: pointer; break-inside: avoid; }
@media (min-width: 768px) { .ph { margin-bottom: 14px; } }
.ph img { width: 100%; height: auto; }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(20, 20, 20, .97); color: var(--paper); display: grid; place-items: center; touch-action: pan-y; }
.lb-img { max-width: 100vw; max-height: calc(100dvh - 120px); width: auto; height: auto; object-fit: contain; }
.lb-count { position: absolute; inset-block-end: 22px; inset-inline-start: 50%; translate: -50% 0; }
html[dir="rtl"] .lb-count { translate: 50% 0; }
.lb-close { position: absolute; top: 14px; inset-inline-end: var(--gut); min-height: 44px; background: none; border: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
html[lang="ar"] .lb-close { letter-spacing: 0; text-transform: none; font-size: 14px; }
.lb-prev, .lb-next { position: absolute; top: 50%; translate: 0 -50%; width: 48px; height: 48px; background: rgba(20, 20, 20, .6); border: 1px solid var(--line-dark); display: grid; place-items: center; cursor: pointer; }
.lb-prev { left: 8px; }
.lb-next { right: 8px; }
html[dir="rtl"] .lb-prev { left: auto; right: 8px; }
html[dir="rtl"] .lb-next { right: auto; left: 8px; }

.about-head { padding: clamp(40px, 7vw, 100px) var(--gut) clamp(56px, 8vw, 120px); display: grid; gap: 32px; }
.about-head .page-title { margin-bottom: 0; }
.about-portrait img { width: 100%; height: auto; }
.about-copy { display: grid; gap: 20px; font-size: clamp(17px, 1.5vw, 20px); max-width: 38em; }
.about-copy p:first-child { font-family: var(--f-head); font-weight: var(--w-head); font-size: clamp(24px, 2.6vw, 38px); line-height: 1.3; }
.about-copy p:first-child { text-wrap: pretty; }
html[lang="ar"] .about-copy p:first-child { line-height: 1.6; font-size: clamp(21px, 2.2vw, 30px); }
@media (min-width: 900px) {
  .about-head { grid-template-columns: repeat(12, 1fr); gap: 0 24px; align-items: start; }
  .about-head .page-title { grid-column: 1 / -1; margin-bottom: 56px; }
  .about-portrait { grid-column: 1 / span 5; position: sticky; top: calc(var(--head-h) + 24px); }
  .about-copy { grid-column: 7 / -1; }
}
.gear-names { display: flex; flex-wrap: wrap; gap: 12px 40px; font-size: 14px; }
.gear-names li { padding-bottom: 8px; border-bottom: 1px solid var(--line); }

.cover { position: relative; height: 100vh; height: 100svh; overflow: hidden; }
.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover::after { content: ""; position: absolute; inset: 0; background: rgba(20, 20, 20, .34); }
.cover-mark { position: absolute; z-index: 2; top: calc(var(--head-h) + 12px); inset-inline-end: var(--gut); }
.cover-over { position: absolute; z-index: 2; inset: auto 0 0 0; padding: 0 var(--gut) calc(76px + env(safe-area-inset-bottom)); display: grid; gap: 10px; }
.cover-title { font-family: var(--f-head); font-weight: var(--w-head); font-size: clamp(56px, 14vw, 220px); line-height: .95; }
html[lang="ar"] .cover-title { line-height: 1.2; }

.film-sec { padding: clamp(64px, 10vw, 140px) var(--gut); display: grid; justify-items: center; gap: 16px; }
.film-label { color: var(--ink-2); justify-self: start; }
.film-frame { position: relative; width: min(86vw, 440px, calc((100dvh - 150px) * 9 / 16)); aspect-ratio: 9 / 16; overflow: hidden; background: var(--ink); }
.film-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.film-play { position: absolute; inset: 0; width: 100%; background: transparent; border: 0; cursor: pointer; }
.film-play::after { content: attr(data-play); position: absolute; inset-inline-end: 12px; bottom: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .18em; background: var(--ink); color: var(--paper); padding: 6px 10px; }
html[lang="ar"] .film-play::after { letter-spacing: 0; font-size: 13px; }
.stills { padding: 0 var(--gut) clamp(64px, 10vw, 140px); display: grid; gap: 16px; }
.still { width: min(100%, 720px); height: auto; justify-self: center; }
.endtitle { padding: clamp(96px, 16vw, 220px) var(--gut); display: grid; gap: 28px; }
.endtitle .joe { width: min(100%, 1000px); }
.next { position: relative; display: grid; gap: 28px; padding: clamp(56px, 8vw, 100px) var(--gut) calc(96px + env(safe-area-inset-bottom)); text-decoration: none; border-top: 1px solid var(--line-dark); }
.next-media { width: min(60vw, 280px); }
.next-text { display: grid; gap: 12px; align-content: end; }
.next-title { font-family: var(--f-head); font-weight: var(--w-head); font-size: clamp(44px, 9vw, 140px); line-height: 1; }
html[lang="ar"] .next-title { line-height: 1.3; }
@media (min-width: 900px) {
  .next { grid-template-columns: 1fr auto; align-items: end; }
  .next-media { order: 2; width: 300px; }
}

.player { position: fixed; inset: 0; z-index: 100; background: rgba(20, 20, 20, .98); overflow: hidden; }
.player-blur { display: none; position: absolute; inset: -10%; width: 120%; height: 120%; object-fit: cover; filter: blur(48px) saturate(1.1); opacity: .45; }
@media (min-aspect-ratio: 1/1) { .player-blur { display: block; } }
.player-frame { position: relative; z-index: 1; height: 100%; display: grid; place-items: center; }
.player-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: transparent; }
@media (max-aspect-ratio: 1/1) { .player-video { top: 72px; height: calc(100% - 72px); } }
.player-close { position: absolute; z-index: 2; top: 14px; inset-inline-end: var(--gut); min-height: 44px; padding: 0 14px; background: var(--ink); color: var(--paper); border: 1px solid var(--line-dark); font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
html[lang="ar"] .player-close { letter-spacing: 0; text-transform: none; font-size: 14px; }

a, button, [data-card] { -webkit-tap-highlight-color: transparent; }

body.is-locked { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0s !important; transition-delay: 0s !important; }
  .gear { height: auto; --wipe: 1; }
  .gear-stick { position: static; height: auto; min-height: 0; padding-block: 24px; }
  .gl-a { opacity: 0; }
  .gl-b { opacity: 1; }
  .js .logo.rise, .js .card.rise, .js .ph.rise { opacity: 1; transform: none; }
  .js .sub .w, .js .joe[data-reveal] .l, .js .joe[data-reveal] .rec-mark { opacity: 1; transform: none; }
  .js .sub:not(.in) .sub-rule { transform: none; }
}

html[lang="en"] .hero-name { padding-bottom: .16em; }

/* Motion layer. Except for the logo lanes, which the script only builds when motion is allowed, every rule
   here sits under html.mo, set by the head script unless the visitor asked for reduced motion. Transforms,
   opacity and clip-path only. */

/* Masked line reveal: each word sits in a clipping box and its text slides up from below. Arabic words are
   never cut into letters, and the words of one rendered line share a delay so Arabic reads as line by line. */
html.mo .mw { display: inline-block; vertical-align: top; overflow: hidden; padding: .18em .08em; margin: -.18em -.08em; }
html.mo .mi { display: block; transform: translate(0, 105%); }
html.mo .is-in .mi { transform: none; transition: transform .9s cubic-bezier(.2, .7, .1, 1) calc(var(--b, 0ms) + var(--d, 0ms)); }
/* The hero text is hidden until it is split; if the script never runs it shows itself after 2.5s. */
html.mo .hero-name:not(.is-split), html.mo .hero-line:not(.is-split) { visibility: hidden; animation: moShow 0s 2.5s forwards; }
@keyframes moShow { to { visibility: visible; } }
html.mo .hero-name { transform-origin: 0 100%; }
html.mo[dir="rtl"] .hero-name { transform-origin: 100% 100%; }
html.mo .hero-line .mi { --b: 380ms; }

/* Intro words start faint; the script raises their opacity as the line scrolls up. */
html.mo .fw { opacity: .18; }

/* Frames open from the bottom edge while the picture settles inside them. The scale property composes with
   the parallax transform, so 1.116 x 1.12 starts at about 1.25 and ends at the usual 1.12. */
html.mo .card.rise, html.mo .ph.rise, html.mo .logo.rise { opacity: 1; transform: none; transition: none; }
/* The photo clip sits on the img, not on .ph: a frame clipped to nothing reports no intersection, so the
   observer that adds .in never fired for it. */
html.mo .card.rise .card-media, html.mo .ph.rise img { clip-path: inset(0); transition: clip-path 1s cubic-bezier(.2, .7, .1, 1) calc(var(--col, 0) * 80ms); }
html.mo .card.rise:not(.in) .card-media, html.mo .ph.rise:not(.in) img { clip-path: inset(100% 0 0 0); }
html.mo .card.rise .card-media img, html.mo .card.rise .card-video, html.mo .ph.rise img { scale: 1; transition: scale 1.4s cubic-bezier(.2, .7, .1, 1) calc(var(--col, 0) * 80ms); }
html.mo .ph.rise img { transition: clip-path 1s cubic-bezier(.2, .7, .1, 1) calc(var(--col, 0) * 80ms), scale 1.4s cubic-bezier(.2, .7, .1, 1) calc(var(--col, 0) * 80ms); }
html.mo .card.rise:not(.in) .card-media img, html.mo .card.rise:not(.in) .card-video, html.mo .ph.rise:not(.in) img { scale: 1.116; }
html.mo .card.rise .card-meta { transition: opacity .7s ease-out, transform .8s cubic-bezier(.2, .7, .1, 1); transition-delay: calc(300ms + var(--col, 0) * 80ms); }
html.mo .card.rise:not(.in) .card-meta { opacity: 0; transform: translateY(14px); }
html.mo .card.rise.in.done .card-media, html.mo .ph.rise.in.done img { clip-path: none; }

/* Mono labels: English letters appear in sequence (--k), Arabic labels fade and rise as a whole. */
html.mo .kc { opacity: 0; transition: opacity 0s linear calc(var(--k, 0) * 28ms); }
html.mo .is-in .kc { opacity: 1; }
html.mo .kick-fade { opacity: 0; transform: translateY(10px); transition: opacity .7s ease-out, transform .8s cubic-bezier(.2, .7, .1, 1); }
html.mo .kick-fade.is-in { opacity: 1; transform: none; }

/* The lanes are moved by the script (translate on .marq-track); here only layout, edge fade and entry. */
.credits-roll.is-marquee { display: block; padding-bottom: 0; margin-inline: calc(var(--gut) * -1); --mg: 28px; }
@media (min-width: 600px) { .credits-roll.is-marquee { --mg: 40px; } }
@media (min-width: 1000px) { .credits-roll.is-marquee { --mg: 56px; } }
.marq { direction: ltr; overflow: hidden; list-style: none; margin: 0; padding: 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); opacity: 0; transform: translateX(var(--ent, 60px)); transition: opacity .9s ease-out, transform 1.1s cubic-bezier(.2, .7, .1, 1); }
.marq.is-in { opacity: 1; transform: none; }
.marq + .marq { margin-top: clamp(16px, 2.4vw, 32px); transition-delay: .12s; }
.marq-track { display: flex; width: max-content; margin: 0; padding: 0; list-style: none; will-change: transform; }
.marq-track .logo { flex: none; width: calc(var(--bw) * 1.3); margin-inline-end: var(--mg); }
.marq-track .logo img { opacity: .5; transition: opacity .35s; }
@media (hover: hover) { .marq-track .logo:hover img { opacity: 1; } }

/* Text kept for screen readers while its visible copy is split into animated letters. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
