/* ============================================================
   بدلك — storyboard · design tokens
   ============================================================ */
:root {
  --bg: oklch(1 0 0);
  --surface: oklch(0.975 0.012 220);
  --sky: oklch(0.87 0.055 230);
  --sky-soft: oklch(0.955 0.018 225);
  --brand: oklch(0.52 0.11 205);
  --brand-2: oklch(0.64 0.10 190);
  --brand-deep: oklch(0.42 0.105 212);
  --ink: oklch(0.22 0.03 215);
  --muted: oklch(0.45 0.04 212);
  --mint: oklch(0.86 0.09 165);
  --mint-deep: oklch(0.42 0.11 160);
  --line: oklch(0.91 0.02 220);

  --font-display: "Lalezar", "Cairo", "Segoe UI", Tahoma, sans-serif;
  --font-body: "Cairo", "Segoe UI", Tahoma, sans-serif;

  --r: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --z-head: 10;
  --z-nav: 20;
  --z-progress: 30;
}

/* ============================================================
   reset + base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--sky); color: var(--brand-deep); }

:focus-visible {
  outline: 3px solid var(--brand-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: min(1100px, 100% - 2 * clamp(1.25rem, 5vw, 2.5rem));
  margin-inline: auto;
}

.center { text-align: center; }

strong { font-weight: 800; }

h2 {
  font-family: var(--font-display);
  font-size: clamp(2.375rem, 6vw, 4.25rem);
  font-weight: 400;
  line-height: 1.15;
  text-wrap: balance;
  margin-block: 1.1rem 1rem;
}

p { max-width: 62ch; text-wrap: pretty; }

/* ============================================================
   progress + header
   ============================================================ */
.progress {
  position: fixed;
  inset-inline: 0;
  top: 0;
  height: 5px;
  z-index: var(--z-progress);
  pointer-events: none;
}
.progress i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--brand-deep);
  transform: scaleX(0);
  transform-origin: right center;
}

.site-head {
  position: sticky;
  top: 0;
  z-index: var(--z-head);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.site-head.scrolled {
  border-color: var(--line);
  box-shadow: 0 8px 28px -18px oklch(0.22 0.03 215 / 0.35);
}

.head-inner {
  width: min(1100px, 100% - 2 * clamp(1.25rem, 5vw, 2.5rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
}

.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand-mark { width: 40px; height: auto; }
.brand span {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
  color: var(--brand-deep);
}

/* ============================================================
   buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.4;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-sm { padding: 0.5rem 1.15rem; font-size: 0.925rem; }

.btn-primary {
  background: var(--brand-deep);
  color: oklch(1 0 0);
}
.btn-primary:hover {
  background: oklch(0.37 0.105 212);
  box-shadow: 0 14px 30px -14px oklch(0.42 0.105 212 / 0.55);
}

.btn-ghost {
  background: transparent;
  border-color: var(--brand-deep);
  color: var(--brand-deep);
}
.btn-ghost:hover {
  background: var(--sky-soft);
  border-color: oklch(0.37 0.105 212);
  color: oklch(0.37 0.105 212);
}

/* ============================================================
   hero
   ============================================================ */
.hero {
  position: relative;
  background: var(--sky);
  overflow: hidden;
  padding-block: clamp(3.5rem, 9vw, 6rem) clamp(4.5rem, 10vw, 7rem);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(to bottom, transparent 0 46px, oklch(0.42 0.105 212 / 0.06) 46px 47px),
    repeating-linear-gradient(to left, transparent 0 46px, oklch(0.42 0.105 212 / 0.06) 46px 47px);
  pointer-events: none;
}

.frame-deco {
  position: absolute;
  border: 2px dashed oklch(0.42 0.105 212 / 0.28);
  border-radius: 14px;
  pointer-events: none;
}
.deco-a { width: 190px; height: 130px; top: 3rem; inset-inline-end: 3vw; transform: rotate(4deg); }
.deco-b { width: 240px; height: 160px; bottom: 2.5rem; inset-inline-start: 2vw; transform: rotate(-5deg); }
.deco-c { width: 120px; height: 90px; top: 10rem; inset-inline-start: 10vw; transform: rotate(-2deg); }

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}

.clapper { width: 96px; height: auto; margin-block: 1.6rem 0.6rem; animation: bob 6s ease-in-out infinite; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.75rem, 8vw, 6rem);
  line-height: 1.12;
  text-wrap: balance;
  margin: 0;
}
.hero h1 em { font-style: normal; color: var(--brand-deep); }

.hero-lead {
  max-width: 56ch;
  margin-top: 1.3rem;
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  color: oklch(0.30 0.045 220);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 2.2rem;
}

.scroll-cue {
  margin-top: 3.2rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: oklch(0.30 0.045 220);
}
.scroll-cue svg { animation: bob 2.4s var(--ease) infinite; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}

/* ============================================================
   scenes
   ============================================================ */
.scene { padding-block: clamp(4rem, 10vw, 7.5rem); }

.scene-1 { background: var(--bg); }
.scene-2 { background: var(--sky-soft); }
.scene-3 { background: var(--brand-deep); color: oklch(0.975 0.012 220); }
.scene-4 { background: var(--bg); }
.scene-5 { background: var(--sky); }
.scene-6 {
  background: linear-gradient(180deg, oklch(0.30 0.09 235), var(--brand-deep));
  color: oklch(0.975 0.012 220);
}
.scene-6 h2 { color: var(--bg); }
.scene-6 .scene-copy .lead { color: oklch(0.9 0.02 220); }

.scene-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
}

.scene-copy p { margin-bottom: 1rem; }
.scene-copy .scene-lead { font-size: 1.2rem; }
.scene-3 h2 { color: var(--bg); }
.scene-3 .scene-copy p { color: oklch(0.97 0.01 220); }

.scene-visual .illus {
  width: 100%;
  max-width: 460px;
  height: auto;
  margin-inline: auto;
}

.shot-frame {
  max-width: 460px;
  margin-inline: auto;
  border: 2px dashed var(--brand-2);
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg);
}
.shot-frame img {
  width: 100%;
  height: auto;
  display: block;
}
.shot-frame figcaption {
  padding: 0.75rem 1.2rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  border-top: 1.5px dashed var(--brand-2);
}

.video-frame {
  max-width: 780px;
  margin: 2.2rem auto 0;
  padding: 10px;
  border-radius: 24px;
  background: oklch(0.16 0.04 240 / 0.9);
  border: 2px dashed var(--brand-2);
  box-shadow: 0 30px 70px oklch(0 0 0 / 0.4);
}
.video-frame video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  background: #000;
}

/* ============================================================
   bat fly-ins (scene 1 ⇄ scene 2)
   ============================================================ */
.bat-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 12;
}

.bat {
  position: absolute;
  left: var(--sx);
  top: var(--sy);
  width: clamp(56px, 9vw, 130px);
  height: auto;
  opacity: 0;
  will-change: transform, opacity;
  animation: bat-fly var(--dur) var(--ease, ease-in) var(--delay) both;
}

@keyframes bat-fly {
  0%   { transform: translate(0, 0) rotate(var(--rot0)) scale(var(--scale)); opacity: 0; }
  7%   { opacity: 1; }
  50%  { transform: translate(calc(var(--dx) * 0.5 + var(--sway)), calc(var(--dy) * 0.5)) rotate(var(--rot0)) scale(var(--scale)); opacity: 1; }
  93%  { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot1)) scale(var(--scale)); opacity: 0; }
}

.scene-2 .illus { max-width: 360px; }

/* slate — film label */
.slate {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0.42rem 1rem;
  border-radius: 999px;
  background: var(--brand-deep);
  color: var(--bg);
  font-size: 0.8125rem;
  font-weight: 700;
}
.slate b { font-size: 0.875rem; }
.slate-dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.65; }
.slate i {
  font-style: normal;
  font-size: 0.6875rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  background: oklch(1 0 0 / 0.16);
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
}
.slate-on-dark { background: var(--bg); color: var(--brand-deep); }
.slate-on-dark i { background: var(--sky-soft); }

/* chips (scene 2) */
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.4rem;
}
.chip {
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  background: var(--bg);
  border: 1.5px solid var(--brand-2);
  color: var(--brand-deep);
  font-size: 0.875rem;
  font-weight: 700;
}

/* film strip divider */
.film-strip {
  height: 16px;
  background-image: radial-gradient(circle, oklch(0.42 0.105 212 / 0.5) 2.5px, transparent 3.2px);
  background-size: 18px 16px;
  background-repeat: repeat-x;
  background-position: center;
}

/* ============================================================
   step frames
   ============================================================ */
.scene-4 .center p { margin-inline: auto; }

.step-frames {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: clamp(0.9rem, 2vw, 1.4rem);
}

.frame {
  position: relative;
  background: var(--bg);
  border: 1.5px dashed var(--brand-2);
  border-radius: var(--r);
  padding: 1.5rem 1.1rem 1.4rem;
  text-align: center;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.frame:hover {
  transform: translateY(-5px);
  border-color: var(--brand-deep);
  box-shadow: 0 18px 36px -22px oklch(0.42 0.105 212 / 0.5);
}

.frame-num {
  position: absolute;
  top: -0.8rem;
  inset-inline-start: 1.1rem;
  background: var(--brand-deep);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.frame svg {
  width: 88px;
  height: auto;
  margin: 0.6rem auto 0.9rem;
}

.frame h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  text-wrap: balance;
}
.frame p {
  margin: 0.35rem auto 0;
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.6;
}

.proof-note {
  margin: 2.2rem auto 0;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
  max-width: 52ch;
}

/* ============================================================
   credits
   ============================================================ */
.credits {
  background: var(--bg);
  padding-top: clamp(4rem, 9vw, 6.5rem);
}

.clapper-sm { width: 64px; margin: 0 auto 1rem; animation: none; }

.credits-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 400;
  color: var(--brand-deep);
  margin: 0;
}

.credits-sub { margin: 0.4rem auto 2.8rem; color: var(--muted); font-weight: 600; }
.credits-sub strong { color: var(--ink); }

.team-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  max-width: 820px;
  margin: 0 auto;
}
.team-list li {
  text-align: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--ink);
  padding: 0.8rem 1rem;
  border: 1.5px dashed var(--brand-2);
  border-radius: 16px;
  background: var(--surface);
}
.team-list li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-2);
  margin-inline-end: 0.6rem;
  vertical-align: middle;
}

.closing {
  margin: 3rem auto 0;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--brand-deep);
}

.site-foot {
  margin-top: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--line);
  padding-block: 1.4rem;
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 600;
}
.foot-inner a { color: var(--brand-deep); font-weight: 800; }
.foot-inner a:hover { text-decoration: underline; }

/* ============================================================
   shot nav (desktop)
   ============================================================ */
.shot-nav {
  position: fixed;
  top: 50%;
  inset-inline-end: auto;
  inset-inline-start: 1.25rem;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: var(--z-nav);
}

.shot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--brand-2);
  background: var(--bg);
  color: var(--brand-deep);
  font-size: 0.6875rem;
  font-weight: 800;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.shot:hover { transform: scale(1.1); border-color: var(--brand-deep); }
.shot.active { background: var(--brand-deep); border-color: var(--brand-deep); color: var(--bg); }

.shot-label {
  position: absolute;
  inset-inline-end: calc(100% + 0.7rem);
  top: 50%;
  transform: translateY(-50%) translateX(4px);
  white-space: nowrap;
  background: var(--brand-deep);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.shot:hover .shot-label { opacity: 1; transform: translateY(-50%) translateX(0); }

/* ============================================================
   reveals (js-anim only)
   ============================================================ */
.reveal { transition: opacity 0.65s var(--ease), transform 0.65s var(--ease); }

.js-anim .reveal { opacity: 0; transform: translateY(26px); }
.js-anim .reveal.is-in { opacity: 1; transform: translateY(0); }

.js-anim .hero .reveal:nth-child(2) { transition-delay: 0.08s; }
.js-anim .hero .reveal:nth-child(3) { transition-delay: 0.16s; }
.js-anim .hero .reveal:nth-child(4) { transition-delay: 0.24s; }
.js-anim .hero .reveal:nth-child(5) { transition-delay: 0.32s; }
.js-anim .hero .reveal:nth-child(6) { transition-delay: 0.4s; }

.js-anim .scene-head .reveal, .js-anim .scene-copy .reveal:nth-child(1) { transition-delay: 0s; }
.js-anim .scene-copy .reveal:nth-child(2) { transition-delay: 0.1s; }
.js-anim .scene-copy .reveal:nth-child(3) { transition-delay: 0.18s; }
.js-anim .scene-copy .reveal:nth-child(4) { transition-delay: 0.26s; }
.js-anim .scene-copy .reveal:nth-child(5) { transition-delay: 0.34s; }
.js-anim .scene-visual { transition-delay: 0.12s; }

.js-anim .step-frames .frame:nth-child(1) { transition-delay: 0.05s; }
.js-anim .step-frames .frame:nth-child(2) { transition-delay: 0.12s; }
.js-anim .step-frames .frame:nth-child(3) { transition-delay: 0.19s; }
.js-anim .step-frames .frame:nth-child(4) { transition-delay: 0.26s; }
.js-anim .step-frames .frame:nth-child(5) { transition-delay: 0.33s; }

.js-anim .team-list li:nth-child(1) { transition-delay: 0.05s; }
.js-anim .team-list li:nth-child(2) { transition-delay: 0.1s; }
.js-anim .team-list li:nth-child(3) { transition-delay: 0.15s; }
.js-anim .team-list li:nth-child(4) { transition-delay: 0.2s; }
.js-anim .team-list li:nth-child(5) { transition-delay: 0.25s; }
.js-anim .team-list li:nth-child(6) { transition-delay: 0.3s; }
.js-anim .team-list li:nth-child(7) { transition-delay: 0.35s; }
.js-anim .team-list li:nth-child(8) { transition-delay: 0.4s; }

/* ============================================================
   responsive
   ============================================================ */
@media (max-width: 920px) {
  .shot-nav { display: none; }
  .deco-b, .deco-c { display: none; }
}

@media (max-width: 800px) {
  .scene-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .scene-visual { order: -1; }
  .scene-visual .illus { max-width: 340px; }
  .hero h1 { font-size: clamp(2.5rem, 12vw, 4rem); }
  .scene-3 .scene-grid { gap: 2.2rem; }
}

@media (max-width: 420px) {
  .head-cta { display: none; }
}

/* ============================================================
   reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .js-anim .reveal { opacity: 1; transform: none; }
  .bat { animation: none !important; opacity: 0 !important; }
}
