/* ==========================================================================
   086 · ILTA (إستهلال — Ilta Main Titles) — 1:1 Opening Title Sequence Scrubber & Showcase
   Forest Emerald #0B2A24 · Pastel Beats #F5D9DA / #F5DFA0 / #F5F2C8 · Neon #8E6CFF -> #FF6BD5
   ========================================================================== */

:root {
  --green-deep: #0B2A24;
  --green: #12433A;
  --purple: #5B2A7A;
  --paper: #F5F2C8;
  --news: #F1EEDA;
  --road-sky: #F5D9DA;
  --ink: #151515;
  --hud: #F4EFE4;
  --grad: linear-gradient(135deg, #8E6CFF, #FF6BD5);
  --title: 'Cairo', system-ui, sans-serif;
  --sans: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  background: #000000;
  color: var(--hud);
  font-family: var(--sans);
  letter-spacing: 0;
}

body {
  background: #000000;
  color: var(--hud);
  font-family: var(--sans);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; letter-spacing: 0; }
.bidi { unicode-bidi: isolate; font-family: var(--mono); }

/* Top 2px Neon Progress Rail */
.il-rail {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 95;
  background: rgba(255, 255, 255, 0.12);
}

.il-rail-bar {
  height: 100%;
  width: 9%;
  background: var(--grad);
  transition: width 0.15s linear;
}

/* Fixed HUD Bar */
.il-hud {
  position: fixed;
  top: 3px;
  inset-inline: 0;
  z-index: 90;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(8, 12, 14, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.il-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--title);
  font-weight: 900;
  font-size: 20px;
  white-space: nowrap;
}

.il-logo b {
  font-size: 25px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.il-timecode {
  font-family: var(--mono);
  font-size: 12.5px;
  color: #E2E8F0;
  white-space: nowrap;
}

.il-hud-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.il-pill-grad {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--grad);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 13px;
  border: none;
  cursor: pointer;
}

.il-pill-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
  font-size: 12.5px;
  cursor: pointer;
}

/* ======================== 1. PINNED 11-BEAT OPENING TITLE STAGE ======================== */
.il-scroll-track {
  position: relative;
  height: 360vh;
}

.il-film-stage {
  position: sticky;
  top: 0;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 86px 28px 24px;
  transition: background 0.45s ease, color 0.35s ease;
}

/* Floating Math & Story Formula Plaques */
.il-formula-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.il-fx {
  position: absolute;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
  transition: transform 0.4s ease;
}

.il-scene-art {
  position: relative;
  z-index: 3;
  max-width: 1160px;
  width: 100%;
  margin: auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
}

.il-h1 {
  font-family: var(--title);
  font-size: clamp(2.2rem, 4.4vw, 3.85rem);
  font-weight: 900;
  line-height: 1.14;
  margin-bottom: 14px;
}

.il-vector-box {
  aspect-ratio: 16 / 10.5;
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  background: #0B2A24;
  position: relative;
}

.il-vector-box svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* 11-Beat Bottom Scrubber Bar */
.il-beat-dock {
  position: relative;
  z-index: 5;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  background: rgba(11, 14, 18, 0.84);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: #F4EFE4;
}

.il-beat-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.il-beat-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #E2E8F0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.il-beat-btn.active {
  background: var(--grad);
  border-color: transparent;
  color: #FFFFFF;
}

/* ======================== 2. CAST & CREW 4-COLUMN GRID (#0E0F12) ======================== */
.il-cast-strip {
  background: #0E0F12;
  color: #F4EFE4;
  padding: 92px 28px;
}

.il-container {
  max-width: 1160px;
  margin: 0 auto;
}

.il-h2 {
  font-family: var(--title);
  font-size: clamp(1.95rem, 3.6vw, 3rem);
  font-weight: 900;
  line-height: 1.18;
}

.il-grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.il-cast-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 38px;
}

.il-cast-card {
  background: #15161B;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
}

.il-cast-art {
  aspect-ratio: 4 / 4.4;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.il-cast-body {
  padding: 16px 18px 20px;
}

/* ======================== 3. EPISODE GUIDE ON RULED NOTEBOOK PAPER (#F5F2C8) ======================== */
.il-paper-strip {
  background-color: var(--paper);
  background-image: repeating-linear-gradient(
    180deg,
    transparent 0px,
    transparent 31px,
    rgba(130, 120, 80, 0.22) 32px
  );
  color: var(--ink);
  padding: 92px 28px;
}

.il-eps-table {
  margin-top: 34px;
  border-top: 2px solid rgba(30, 25, 15, 0.25);
}

.il-ep-row {
  padding: 18px 8px;
  border-bottom: 1px solid rgba(60, 50, 30, 0.2);
  display: grid;
  grid-template-columns: 64px 1.1fr 1.8fr 86px;
  align-items: center;
  gap: 16px;
}

.il-ep-num {
  font-family: var(--title);
  font-weight: 900;
  font-size: 22px;
  color: #6B3FA0;
}

/* ======================== 4. WATCH SHOWCASE RADIAL INDIGO (#1B1B4A -> #0A0A14) ======================== */
.il-watch-strip {
  background: radial-gradient(circle at 30% 30%, #1B1B4A 0%, #0A0A14 76%);
  color: #FFFFFF;
  padding: 92px 28px;
}

.il-watch-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  align-items: center;
}

.il-stills-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.il-still-card {
  aspect-ratio: 3 / 4.2;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12px;
  font-weight: 700;
}

.il-still-card:nth-child(2) { transform: translateY(-16px); }

/* Footer */
.il-footer {
  background: #000000;
  color: #E2E8F0;
  padding: 56px 28px 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.il-showcase-nav {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .il-timecode { display: none; }
  .il-scene-art,
  .il-cast-grid,
  .il-watch-grid,
  .il-ep-row {
    grid-template-columns: 1fr;
  }
}
