/* ===== Stellar motion layer ===== */

/* ---------- HERO: original layout, gently alive ---------- */
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.hero-bg video { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.04); }
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to left, #1d1d1bf2 0%, #1d1d1bcc 38%, #1d1d1b59 70%, #1d1d1b66 100%),
    linear-gradient(to top, #1d1d1b 0%, transparent 28%);
}
html[dir="ltr"] .hero-bg::after {
  background:
    linear-gradient(to right, #1d1d1bf2 0%, #1d1d1bcc 38%, #1d1d1b59 70%, #1d1d1b66 100%),
    linear-gradient(to top, #1d1d1b 0%, transparent 28%);
}
.hero > .hero-type, .hero > .hero-art, .hero > .hero-bottom { position: relative; z-index: 2; }
.hero > .hero-bottom { position: absolute; }
@media (max-width: 760px) {
  .hero-bg::after { background: linear-gradient(180deg, #1d1d1be6 0%, #1d1d1bb3 50%, #1d1d1bf2 100%); }
}
.hero-card-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.8s; }
.hero-card-video.in-view { opacity: 1; }
#hero-art .hero-card { animation: float 6.6s ease-in-out infinite; animation-delay: var(--float-delay, 0s); }
@keyframes float { 50% { translate: 0 -12px; } }
.reel-view { display: grid; place-items: center; background: #000; }
.reel-view video { width: 100%; max-height: 78vh; display: block; }

/* ---------- SEVEN WORLDS ---------- */
.worlds { position: relative; height: calc(var(--n, 8) * 100vh); background: #1d1d1b; }
.worlds-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.worlds-row { display: flex; height: 100%; will-change: transform; }
.world {
  flex: 0 0 100vw;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 4vw;
  padding: 120px 6% 110px;
  position: relative;
  overflow: hidden;
}
.world-copy { position: relative; z-index: 2; max-width: 560px; transform: translateX(calc(var(--d, 0) * -12vw)); }
html[dir="ltr"] .world-copy { transform: translateX(calc(var(--d, 0) * 12vw)); }
.world-count { font-size: 15px; letter-spacing: 0.08em; color: var(--acc); font-variant-numeric: tabular-nums; }
.world-count i { font-style: normal; opacity: 0.55; }
.world h2 {
  font-size: clamp(42px, 5.4vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 18px 0 14px;
  color: var(--ink);
}
.world-line { font-size: clamp(20px, 2vw, 30px); color: var(--acc); margin: 0 0 18px; font-weight: 500; }
.world-desc { font-size: 16px; line-height: 1.85; opacity: 0.82; max-width: 470px; margin: 0; }
.world-swatches { display: flex; align-items: center; gap: 6px; margin: 28px 0; }
.world-swatches span { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 1px #00000022, 0 0 0 1px #ffffff22; }
.world-swatches small { margin-inline-start: 12px; font-size: 13px; opacity: 0.75; }
.world-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.world-cta, .world-ghost {
  font: inherit;
  font-size: 14px;
  padding: 15px 22px;
  border-radius: 3px;
  cursor: pointer;
}
.world-cta { background: var(--ink); color: var(--bg); border: 1px solid var(--ink); }
.world-ghost { background: transparent; color: var(--ink); border: 1px solid color-mix(in srgb, var(--ink) 40%, transparent); }
.world-cta:hover, .world-ghost:hover { background: var(--acc); border-color: var(--acc); color: var(--bg); }
.world-art { --sx: -1; position: relative; height: min(68vh, 640px); }
.world-card {
  position: absolute;
  top: 50%;
  width: 40%;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #0003;
  cursor: pointer;
  box-shadow: 0 30px 60px -20px #0008;
  transition: box-shadow 0.3s;
}
.world-card img, .world-card video { width: 100%; height: 100%; object-fit: cover; display: block; }
.world-card.c0 { left: 4%; transform: translate(calc(var(--d, 0) * var(--sx) * 22vw), calc(-50% + 30px)) rotate(-7deg); }
.world-card.c1 { left: 30%; width: 44%; z-index: 2; transform: translate(calc(var(--d, 0) * var(--sx) * 34vw), -54%); }
.world-card.c2 { left: 58%; transform: translate(calc(var(--d, 0) * var(--sx) * 48vw), calc(-50% + 50px)) rotate(6deg); }
.world-card:hover { box-shadow: 0 40px 80px -20px #000a; }
.world-card:focus-visible, .world-cta:focus-visible, .world-ghost:focus-visible, .worlds-dots button:focus-visible { outline: 3px solid var(--acc, #6ea8d6); outline-offset: 3px; }

.world-intro { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.world-intro h2 { font-size: clamp(52px, 7vw, 120px); }
.world-hint { display: inline-block; margin-top: 34px; font-size: 14px; color: #6ea8d6; }
.world-hint::after { content: " ←"; display: inline-block; animation: nudge 1.6s ease-in-out infinite; }
html[dir="ltr"] .world-hint::after { content: " →"; }
@keyframes nudge { 50% { transform: translateX(-8px); } }
html[dir="ltr"] .world-hint::after { animation-name: nudge-r; }
@keyframes nudge-r { 50% { transform: translateX(8px); } }
.world-mosaic { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; transform: rotate(-4deg); }
.world-mosaic span { aspect-ratio: 3 / 4; border-radius: 4px; overflow: hidden; padding: 10%; display: grid; place-items: center; }
.world-mosaic span:nth-child(odd) { transform: translateY(30px); }
.world-mosaic img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; box-shadow: 0 12px 24px -10px #0009; }

.worlds-dots {
  position: absolute;
  bottom: 26px;
  inset-inline: 6%;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  z-index: 5;
}
.worlds-dots button {
  font: inherit;
  font-size: 12px;
  border: 1px solid #ffffff40;
  background: #1d1d1b99;
  color: #f6f2ed;
  padding: 7px 12px 7px 26px;
  border-radius: 30px;
  cursor: pointer;
  position: relative;
  backdrop-filter: blur(6px);
}
html[dir="rtl"] .worlds-dots button { padding: 7px 26px 7px 12px; }
.worlds-dots button::before {
  content: "";
  position: absolute;
  inset-inline-start: 9px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 1px #ffffff55;
}
.worlds-dots button.active { background: #f6f2ed; color: #1d1d1b; }
.worlds-bar { position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: #ffffff1a; z-index: 5; }
.worlds-bar span { display: block; height: 100%; background: #6ea8d6; transform-origin: var(--origin, right); transform: scaleX(0); }
html[dir="ltr"] .worlds-bar span { --origin: left; }

/* ---------- GALLERY: living tiles ---------- */
.creative-image .tile-video { opacity: 0; transition: opacity 0.6s; z-index: 1; }
.creative-image.in-view .tile-video { opacity: 1; }
.creative-image .tile-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.9s ease;
  z-index: 1;
}
.creative-image .tile-frame.show { opacity: 1; }
.frame-dots { position: absolute; bottom: 14px; inset-inline-start: 16px; display: flex; gap: 5px; z-index: 3; }
.frame-dots i { width: 6px; height: 6px; border-radius: 50%; background: #ffffff70; }
.has-frames[style*="--k: 0"] .frame-dots i:nth-child(1),
.has-frames:not([style]) .frame-dots i:nth-child(1),
.has-frames[style*="--k: 1"] .frame-dots i:nth-child(2),
.has-frames[style*="--k: 2"] .frame-dots i:nth-child(3),
.has-frames[style*="--k: 3"] .frame-dots i:nth-child(4),
.has-frames[style*="--k: 4"] .frame-dots i:nth-child(5) { background: #fff; }
.creative-image .format-badge, .creative-image .open-art { z-index: 3; }
.creative-image.drift > img { animation: drift 14s ease-in-out infinite alternate; animation-play-state: paused; }
.creative-image.drift.in-view > img { animation-play-state: running; }
@keyframes drift { from { transform: scale(1) translateY(0); } to { transform: scale(1.08) translateY(-2%); } }

/* ---------- CONTENT PLAN: filmstrip ---------- */
.plan-strip { margin: 50px -7% 60px; display: grid; gap: 14px; overflow: hidden; direction: ltr; }
.strip-row { overflow: hidden; }
.strip-track { display: flex; gap: 14px; width: max-content; animation: strip 140s linear infinite; animation-play-state: paused; }
.strip-row.rev .strip-track { animation-direction: reverse; }
.plan-strip.running .strip-track { animation-play-state: running; }
.plan-strip:hover .strip-track { animation-play-state: paused; }
@keyframes strip { to { transform: translateX(calc(-50% - 7px)); } }
.strip-slide {
  position: relative;
  width: clamp(240px, 24vw, 340px);
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #d9d9cc;
  cursor: zoom-in;
  box-shadow: 0 14px 30px -18px #0007;
}
.strip-slide img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.strip-slide:hover img { transform: scale(1.05); }
.strip-slide span {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 11px;
  background: #1d1d1bcc;
  color: #fff;
  padding: 3px 7px;
  border-radius: 2px;
  font-variant-numeric: tabular-nums;
}
.strip-slide:focus-visible { outline: 3px solid #32678f; outline-offset: 2px; }

/* ---------- CHANNELS: devices ---------- */
.devices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 0.55fr)) minmax(0, 1.5fr);
  gap: 22px;
  align-items: end;
  margin: 50px 0 60px;
}
.devices figure { margin: 0; }
.phone-screen {
  position: relative;
  aspect-ratio: 9 / 18.5;
  border-radius: 26px;
  overflow: hidden;
  background: #111;
  border: 7px solid #1d1d1b;
  box-shadow: 0 24px 50px -24px #000a;
}
.phone-screen::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 34%;
  height: 16px;
  margin-left: -17%;
  border-radius: 10px;
  background: #1d1d1b;
  z-index: 2;
}
.phone-screen video, .screen-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.phone-ui {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-size: 10px;
  color: #fff;
  background: #0006;
  padding: 3px 8px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}
.screen-frame {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #111;
  border: 7px solid #1d1d1b;
  box-shadow: 0 24px 50px -24px #000a;
}
.devices figcaption { margin-top: 14px; display: grid; gap: 3px; }
.devices figcaption b { font-weight: 600; font-size: 15px; }
.devices figcaption span { font-size: 13px; opacity: 0.7; }

/* ---------- JOURNEY imagery ---------- */
.journey > div { display: flex; flex-direction: column; }
.step-art {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 3px;
  margin: -10px -6px 18px;
}
.step-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s; filter: saturate(0.9); }
.journey > div.active .step-art img, .journey > div:hover .step-art img { transform: scale(1.06); filter: none; }

/* ---------- WORD BAND ---------- */
.word-band { direction: ltr; background: #1d1d1b; overflow: hidden; padding: 34px 0; border-block: 1px solid #ffffff14; }
.band-track {
  display: flex;
  align-items: center;
  gap: 42px;
  width: max-content;
  animation: band 60s linear infinite;
  font-family: Tajawal, "DIN Next LT Arabic", sans-serif;
  font-size: clamp(48px, 7vw, 110px);
  font-weight: 700;
  line-height: 1.2;
}
.band-track span { color: transparent; -webkit-text-stroke: 1.4px #6ea8d6; }
.band-track span:nth-child(4n + 1) { color: #f6f2ed; -webkit-text-stroke: 0; }
.band-track i { font-style: normal; font-size: 0.32em; color: #6ea8d6; }
@keyframes band { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* ---------- ACCOUNT GRID on Instagram ---------- */
.ig-wrap { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 60px; align-items: start; margin: 10px 0 40px; }
.ig-phone { background: #111; border-radius: 42px; padding: 11px; box-shadow: 0 40px 80px -30px #0008; }
.ig-screen { background: #fff; color: #111; border-radius: 32px; overflow: hidden; padding-bottom: 6px; font-size: 13px; }
.ig-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px; font-size: 15px; }
.ig-top b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 75%; }
.ig-back { font-size: 26px; line-height: 1; }
html[dir="rtl"] .ig-back { transform: scaleX(-1); }
.ig-dots { letter-spacing: 1px; font-weight: 700; }
.ig-profile { display: flex; align-items: center; gap: 28px; padding: 8px 16px; }
.ig-avatar { width: 84px; height: 84px; border-radius: 50%; padding: 3px; background: conic-gradient(#feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5, #feda75); flex: none; }
.ig-avatar img, .ig-avatar span { width: 100%; height: 100%; border-radius: 50%; border: 3px solid #fff; display: grid; place-items: center; background: #fff; object-fit: contain; padding: 6px; font-weight: 700; font-size: 17px; }
.ig-avatar img.ig-logo { padding: 0; object-fit: cover; }
.ig-stats { display: flex; gap: 22px; }
.ig-stats div { display: grid; text-align: center; }
.ig-stats b { font-size: 17px; }
.ig-stats small { font-size: 12px; color: #444; }
.ig-bio { padding: 4px 16px 10px; }
.ig-bio b { font-size: 13px; }
.ig-bio p { margin: 2px 0 0; font-size: 13px; line-height: 1.5; opacity: 1; color: #222; }
.ig-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 16px 12px; }
.ig-buttons span { background: #efefef; border-radius: 8px; text-align: center; padding: 7px 0; font-weight: 600; font-size: 13px; }
.ig-buttons .ig-follow { background: #0095f6; color: #fff; }
.ig-tabs { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #dbdbdb; }
.ig-tabs span { display: grid; place-items: center; padding: 9px 0; color: #8e8e8e; }
.ig-tabs span.on { color: #111; box-shadow: inset 0 -1.5px 0 #111; }
.ig-tabs svg { width: 22px; height: 22px; }
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.ig-tile { position: relative; aspect-ratio: 3 / 4; padding: 0; border: 0; overflow: hidden; background: #eee; cursor: pointer; display: block; }
.ig-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter 0.2s; }
.ig-tile:hover img { filter: brightness(0.85); }
.ig-tile i { position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; color: #fff; filter: drop-shadow(0 1px 2px #0008); }
.ig-tile i svg { width: 100%; height: 100%; display: block; }
.ig-tile:focus-visible { outline: 3px solid #0095f6; outline-offset: -3px; }
.ig-list > p { font-size: 15px; margin: 0 0 22px; max-width: 460px; }
.ig-list button { display: flex; gap: 16px; align-items: baseline; width: 100%; text-align: start; background: none; border: 0; border-top: 1px solid #1d1d1b22; padding: 16px 0; color: inherit; cursor: pointer; }
.ig-list button:hover b { color: var(--brand-accent, #32678f); }
.ig-n { font-size: 12px; opacity: 0.55; font-variant-numeric: tabular-nums; }
.ig-list b { display: block; font-size: 18px; font-weight: 600; }
.ig-list small { font-size: 12px; opacity: 0.65; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .devices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .devices .screen { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .ig-wrap { grid-template-columns: 1fr; gap: 26px; }
  .ig-phone { max-width: 360px; margin: 0 auto; width: 100%; }
  .ig-list b { font-size: 16px; }
  .world {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    align-items: start;
    gap: 10px;
    padding: 100px 7% 80px;
  }
  .world h2 { font-size: 38px; margin: 10px 0 8px; }
  .world-line { font-size: 19px; margin-bottom: 8px; }
  .world-desc { display: none; }
  .world-intro .world-desc { display: block; font-size: 15px; }
  .world-swatches { margin: 14px 0; }
  .world-swatches span { width: 22px; height: 22px; }
  .world-cta, .world-ghost { padding: 11px 15px; font-size: 13px; }
  .world-art { height: 100%; min-height: 40vh; }
  .world-card { width: 46%; }
  .world-card.c1 { width: 52%; left: 24%; }
  .world-card.c0 { left: 0; }
  .world-card.c2 { left: 54%; }
  .world-mosaic { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .worlds-dots { display: none; }

  .plan-strip { margin-inline: -7%; }
  .strip-slide { width: 220px; }
  .devices { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .phone-screen { border-width: 5px; border-radius: 18px; }
  .phone-screen::before { height: 10px; top: 6px; }
  .devices figcaption b { font-size: 12px; }
  .devices figcaption span { font-size: 11px; }
  .step-art { margin: 0 0 12px; }
  .word-band { padding: 20px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .strip-track, .band-track, .world-hint::after, #hero-art .hero-card { animation: none !important; }
  .creative-image.drift > img { animation: none; }
  .worlds { height: auto; }
  .worlds-sticky { position: static; height: auto; overflow: visible; }
  .worlds-row { flex-direction: column; transform: none !important; }
  .world { flex-basis: auto; min-height: 100vh; }
  .world-copy, .world-card { --d: 0 !important; }
  .worlds-dots, .worlds-bar { display: none; }
}

html[dir="ltr"] .world-art { --sx: 1; }
