/* ---------- Tokens ---------- */
:root, [data-theme="light"] {
  --bg: #f6f3fb;
  --surface: #ffffff;
  --surface-2: #efe9f7;
  --text: #17121f;
  --muted: #6b6178;
  --line: #e4dcef;
  --accent: #8700ff;
  --accent-2: #b766ff;
  --accent-soft: #ede0ff;
  --grad: linear-gradient(120deg, #7660ff 0%, #b766ff 50%, #f393ff 100%);
  --on-accent: #ffffff;
  --dark-btn: #17121f;
  --on-dark-btn: #ffffff;
  --shadow: 0 10px 40px rgba(60, 20, 120, .08);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0f0a17;
  --surface: #1a1325;
  --surface-2: #231a31;
  --text: #f4f1fa;
  --muted: #a99bbf;
  --line: #2e2340;
  --accent: #b766ff;
  --accent-2: #d5b3ff;
  --accent-soft: #2a1a42;
  --on-accent: #ffffff;
  --dark-btn: #f4f1fa;
  --on-dark-btn: #17121f;
  --shadow: 0 10px 40px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
:root {
  --radius: 18px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.lang-ar { --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif; }

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease; overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; letter-spacing: -0.02em; }
.lang-ar h1, .lang-ar h2, .lang-ar h3, .lang-ar h4 { letter-spacing: 0; line-height: 1.35; }
h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; }
h3 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
section { padding-block: 64px; }
.lead { color: var(--muted); font-size: clamp(17px, 1.6vw, 19px); }
.bar { display: block; width: 48px; height: 4px; border-radius: 4px; background: var(--grad); margin-bottom: 18px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 10px; border: 0; background: var(--accent);
  color: var(--on-accent); font-weight: 700; text-decoration: none; font-size: 16px;
  transition: transform .15s ease, box-shadow .15s ease, background .2s;
  box-shadow: 0 6px 20px rgba(135, 0, 255, .25);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(135, 0, 255, .35); }
.btn.dark { background: var(--dark-btn); color: var(--on-dark-btn); box-shadow: none; }
.btn.sm { padding: 9px 16px; font-size: 15px; }
.btn.big { font-size: clamp(16px, 2.2vw, 20px); padding: 16px 26px; word-break: break-all; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  display: inline-grid; place-items: center; transition: border-color .2s;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] #rprev svg, [dir="rtl"] #rnext svg { transform: scaleX(-1); }
.i-moon { display: none; }
[data-theme="dark"] .i-sun { display: none; }
[data-theme="dark"] .i-moon { display: block; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.hbar { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { font-weight: 800; font-size: 26px; text-decoration: none; letter-spacing: -0.03em; font-family: "Plus Jakarta Sans", var(--font); }
.logo i { color: var(--accent); font-style: normal; }
.nav { display: flex; gap: 26px; margin-inline: auto; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--text); }
.bar-end { display: flex; align-items: center; gap: 10px; }
.lang { font-size: 14px; color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); }
.lang:hover { color: var(--text); border-color: var(--accent); }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; padding-top: 72px; }
.name { font-size: clamp(56px, 9vw, 118px); font-weight: 800; line-height: .95; letter-spacing: -0.045em; margin: 0 0 18px; }
.lang-ar .name { line-height: 1.15; letter-spacing: 0; }
.name span { display: block; }
.name .dot { display: inline-block; width: .18em; height: .18em; border-radius: 50%; background: var(--grad); margin-inline-start: .06em; }
.role { font-size: clamp(18px, 2vw, 22px); font-weight: 700; margin: 0 0 6px; }
.rotate { font-size: clamp(17px, 1.8vw, 20px); color: var(--muted); margin: 0 0 14px; }
.words { position: relative; display: inline-grid; color: var(--accent); font-weight: 700; }
.words span { grid-area: 1 / 1; opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s; white-space: nowrap; }
.words span.on { opacity: 1; transform: none; }
.hero .lead { max-width: 52ch; margin: 0; }
.hero-media {
  position: relative; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden;
  background: #000; box-shadow: var(--shadow); outline: 1px solid var(--line);
}
.hero-media::before { content: ""; position: absolute; inset: -2px; border-radius: 24px; padding: 2px; background: var(--grad); z-index: -1; }
.badge {
  position: absolute; inset-inline-start: 14px; bottom: 14px; z-index: 3;
  background: rgba(15, 10, 23, .7); color: #fff; font-size: 13px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; display: flex; align-items: center; gap: 8px; backdrop-filter: blur(6px);
}
.badge i { width: 8px; height: 8px; border-radius: 50%; background: #ff4d6d; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- Auto media (shared) ---------- */
.auto { position: relative; overflow: hidden; background: #000; }
.auto > img { width: 100%; height: 100%; object-fit: cover; transition: opacity .4s; }
.auto iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.auto.bg iframe { pointer-events: none; transform: scale(1.02); }
.auto iframe, .r-media iframe { opacity: 0; transition: opacity .5s; }
.auto.live iframe, .r-media.live iframe { opacity: 1; }
.auto.live > img, .r-media.live img { opacity: 0; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding-top: 24px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.stat b { display: block; font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; direction: ltr; }
.lang-ar .stat b { text-align: right; }
.stat span { color: var(--muted); font-size: 15px; }

/* ---------- Channels marquee ---------- */
.channels { padding-block: 24px 48px; }
.kicker { color: var(--muted); font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 16px; }
.lang-ar .kicker { text-transform: none; letter-spacing: 0; font-size: 16px; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.track { display: flex; gap: 12px; width: max-content; animation: scroll 55s linear infinite; padding-block: 4px; }
[dir="rtl"] .track { animation-name: scroll-rtl; }
.marquee:hover .track { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(-50%); } }
@keyframes scroll-rtl { to { transform: translateX(50%); } }
.chan {
  display: flex; align-items: center; gap: 10px; text-decoration: none; background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 18px 6px 6px; transition: border-color .2s, transform .2s;
  white-space: nowrap;
}
[dir="rtl"] .chan { padding: 6px 6px 6px 18px; }
.chan:hover { border-color: var(--accent); transform: translateY(-2px); }
.chan img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.chan span { display: flex; flex-direction: column; line-height: 1.2; }
.chan b { font-size: 15px; }
.chan small { color: var(--muted); font-size: 12.5px; direction: ltr; text-align: start; }

/* ---------- Section head ---------- */
.sec-head { margin-bottom: 32px; }
.sh-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.sec-head h2 { margin: 0; }
.sec-head p { color: var(--muted); margin: 6px 0 0; }
.arrows { display: flex; gap: 8px; }

/* ---------- Reels slider ---------- */
.reels-sec { padding-bottom: 40px; }
.reels {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 4px max(16px, calc((100% - 1200px) / 2)) 24px; scrollbar-width: none;
}
.reels::-webkit-scrollbar { display: none; }
.reel { flex: 0 0 clamp(200px, 22vw, 250px); scroll-snap-align: start; }
.r-media {
  position: relative; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: #000;
  border: 1px solid var(--line); transition: transform .3s, box-shadow .3s;
}
.r-media img { width: 100%; height: 100%; object-fit: cover; transition: opacity .4s; }
.r-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.reel.playing .r-media { box-shadow: 0 0 0 3px var(--accent), var(--shadow); }

.r-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; font-weight: 600; }
.r-meta small { color: var(--muted); font-weight: 500; margin-inline-start: auto; direction: ltr; }
.r-av { width: 24px; height: 24px; border-radius: 50%; }

/* ---------- Projects ---------- */
.projects { display: flex; flex-direction: column; gap: 40px; }
.project {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 44px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(20px, 3vw, 40px);
}
.project.flip .p-text { order: 2; }
.tag { display: inline-block; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }
.p-chans { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.p-chans .chan { padding-block: 4px; }
.p-chans .chan img { width: 32px; height: 32px; }
.p-chans .chan b { font-size: 14px; }
.p-text > p { color: var(--muted); margin: 0 0 18px; }
.p-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-bottom: 4px; }
.fact b { font-size: 22px; font-weight: 800; color: var(--accent); direction: ltr; display: inline-block; }
.fact span { color: var(--muted); font-size: 14px; margin-inline-start: 6px; }
.tools { display: flex; gap: 6px; }
.tool { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 14px; font-family: "Plus Jakarta Sans", sans-serif; direction: ltr; }
.t-pr { background: #2a0a4a; color: #e2a6ff; }
.t-ae { background: #1d1748; color: #b9b2ff; }
.t-ps { background: #0a2340; color: #49b6ff; }
.t-dv { background: #1b1b22; color: #ffd36b; }
.p-media { aspect-ratio: 16 / 9; border-radius: 16px; box-shadow: var(--shadow); }
.sound {
  position: absolute; inset-inline-end: 12px; bottom: 12px; z-index: 3; display: flex; align-items: center; gap: 6px;
  background: rgba(15, 10, 23, .75); color: #fff; border: 0; border-radius: 999px; padding: 7px 14px 7px 10px;
  font-size: 13px; font-weight: 600; backdrop-filter: blur(6px);
}
.sound svg { width: 16px; height: 16px; }
.eps { margin-top: 20px; }
.eps h4 { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.ep-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.ep { flex: 0 0 96px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; opacity: .7; transition: opacity .2s, border-color .2s; }
.ep img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.ep:hover { opacity: 1; }
.ep.on { border-color: var(--accent); opacity: 1; }

/* ---------- Motion ---------- */
.motion-p { max-width: 68ch; margin: -12px 0 28px; }
.m-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.m-item { margin: 0; }
.m-media { aspect-ratio: 16 / 9; border-radius: 16px; }
.m-item figcaption { font-weight: 600; margin-top: 10px; font-size: 15px; }

/* ---------- Services / steps ---------- */
.svc-grid, .steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.svc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.svc h3, .steps h3 { font-size: 19px; }
.svc p, .steps p { color: var(--muted); margin: 0; font-size: 15.5px; }
.n { display: block; font-weight: 800; font-size: 14px; color: var(--accent); margin-bottom: 10px; }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { border-top: 3px solid var(--line); padding-top: 18px; }
.steps li:first-child { border-image: var(--grad) 1; }

/* ---------- Quote ---------- */
.quote { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(26px, 5vw, 56px); position: relative; overflow: hidden; }
.quote::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 5px; background: var(--grad); }
.quote blockquote { margin: 0 0 24px; font-size: clamp(19px, 2.2vw, 25px); line-height: 1.55; font-weight: 500; }
.quote figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.quote figcaption img { width: 48px; height: 48px; border-radius: 50%; }
.quote figcaption span { display: flex; flex-direction: column; line-height: 1.3; }
.quote small { color: var(--muted); font-size: 14px; }
.quote figcaption a { color: var(--accent); font-weight: 600; font-size: 15px; text-decoration: none; margin-inline-start: auto; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.a-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.a-list li { display: flex; gap: 10px; align-items: center; font-size: 18px; }
.a-list li::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--grad); transform: rotate(45deg); flex: none; }
.about .lead { margin-bottom: 18px; }
.a-card { display: grid; place-items: center; }
.frame { position: relative; width: min(340px, 100%); aspect-ratio: 4 / 5; border-radius: 26px; background: var(--grad); display: grid; place-items: center; box-shadow: var(--shadow); }
.mono { font-family: "IBM Plex Sans Arabic", serif; font-size: 190px; font-weight: 700; color: #fff; line-height: 1; text-shadow: 0 10px 40px rgba(60, 0, 120, .35); }
.frame .c { position: absolute; width: 34px; height: 34px; border: 3px solid rgba(255, 255, 255, .8); }
.c.tl { top: 16px; left: 16px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.c.tr { top: 16px; right: 16px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.c.bl { bottom: 16px; left: 16px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.c.br { bottom: 16px; right: 16px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }

/* ---------- CTA ---------- */
.cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-block: 72px; border-top: 1px solid var(--line); }
.cta h2 { margin: 0; max-width: 20ch; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--surface-2); }
.f-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: 28px; padding-block: 44px; }
.f-grid h4 { font-size: 15px; margin-bottom: 12px; }
.f-grid a:not(.logo) { display: block; color: var(--muted); text-decoration: none; font-size: 15px; margin-bottom: 6px; }
.f-grid a:hover { color: var(--accent); }
.f-grid p { margin: 8px 0 0; }
.f-grid small { color: var(--muted); }
.copy { text-align: center; color: var(--muted); font-size: 14px; margin: 0; padding: 18px 16px 26px; border-top: 1px solid var(--line); }

/* ---------- Dialog ---------- */
dialog#player { width: min(1100px, 100vw - 32px); padding: 0; border: 0; border-radius: 18px; background: #000; overflow: visible; }
dialog#player::backdrop { background: rgba(10, 5, 20, .88); }
.frame-v { aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; }
.frame-v iframe { width: 100%; height: 100%; border: 0; }
.x { position: absolute; top: -48px; inset-inline-end: 0; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: #000; font-size: 24px; line-height: 1; }

/* ---------- Reveal ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.rv.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 44px; }
  .project, .project.flip { grid-template-columns: 1fr; gap: 24px; }
  .project.flip .p-text, .project .p-text { order: 2; }
  .svc-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .m-grid { grid-template-columns: 1fr 1fr; }
  .about { grid-template-columns: 1fr; gap: 32px; }
  .f-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  section { padding-block: 48px; }
  .nav { display: none; }
  .bar-end { margin-inline-start: auto; }
  .bar-end .btn.sm { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .svc-grid, .steps, .m-grid { grid-template-columns: 1fr; }
  .reel { flex-basis: 62vw; }
  .sh-row { align-items: flex-start; }
  .quote figcaption a { margin-inline-start: 0; }
  .cta { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .track { animation: none; }
  .rv { opacity: 1; transform: none; transition: none; }
}

/* Vertical player + reels padding */
dialog#player.vert { width: min(400px, 100vw - 32px); }
dialog#player.vert .frame-v { aspect-ratio: 9 / 16; max-height: 82vh; margin-inline: auto; }
.reels { scroll-padding-inline: max(16px, calc((100% - 1200px) / 2)); }
.reel { cursor: pointer; }
.auto iframe { pointer-events: none; }

/* Crop the cinematic letterbox in the hero clip */
.hero-media > img, .hero-media iframe { transform: scale(1.34); }
.project > *, .hero > *, .about > * { min-width: 0; }

/* ===== v2.1: work blends into the page, no separate boxes ===== */
.projects { gap: 0; }
.project, .project.flip {
  background: none; border: 0; border-radius: 0; padding: 56px 0;
  border-top: 1px solid var(--line); grid-template-columns: 1fr 1.3fr; gap: 56px;
}
.project.flip { grid-template-columns: 1.3fr 1fr; }
.project:first-child { border-top: 0; padding-top: 8px; }
.project h3 { font-size: clamp(28px, 3.2vw, 40px); }
.p-media { border-radius: 20px; }

.stats { gap: 0; }
.stat { background: none; border: 0; border-radius: 0; padding: 6px 24px; border-inline-start: 2px solid var(--line); }
.stat:first-child { border-image: var(--grad) 1; }

.quote { background: none; border: 0; border-radius: 0; padding: 8px 0 8px 32px; overflow: visible; }
[dir="rtl"] .quote { padding: 8px 32px 8px 0; }
.quote::before { border-radius: 4px; }
.quote blockquote { font-size: clamp(21px, 2.6vw, 30px); }

/* Three strengths */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.pillar h3 { font-size: 24px; margin-bottom: 8px; }
.pillar p { color: var(--muted); margin: 0 0 14px; font-size: 16px; }
.pl-media { aspect-ratio: 16 / 9; border-radius: 16px; margin-bottom: 18px; box-shadow: var(--shadow); }
.pillar .n { font-size: 15px; }

@media (max-width: 1000px) {
  .project, .project.flip { grid-template-columns: 1fr; gap: 24px; padding: 40px 0; }
  .pillars { grid-template-columns: 1fr; gap: 44px; }
}
@media (max-width: 720px) {
  .stat { padding: 10px 16px; }
  .stats { row-gap: 18px; }
}

/* ===== v2.2: gradients & animation ===== */
/* Animated gradient mesh behind the page */
.mesh { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.mesh i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; will-change: transform; }
.mesh .b1 { width: 46vw; height: 46vw; top: -14vw; inset-inline-end: -10vw; background: #b766ff; animation: drift1 22s ease-in-out infinite alternate; }
.mesh .b2 { width: 38vw; height: 38vw; top: 30vh; inset-inline-start: -16vw; background: #7660ff; animation: drift2 26s ease-in-out infinite alternate; }
.mesh .b3 { width: 30vw; height: 30vw; bottom: -12vw; inset-inline-end: 18vw; background: #f393ff; animation: drift3 30s ease-in-out infinite alternate; }
[data-theme="light"] .mesh i { opacity: .28; }
[data-theme="dark"] .mesh i { opacity: .22; }
@keyframes drift1 { to { transform: translate(-8vw, 10vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(10vw, -6vh) scale(.9); } }
@keyframes drift3 { to { transform: translate(-12vw, -14vh) scale(1.2); } }

/* Moving gradient used on text, buttons and bars */
.grad-text, .words span, .stat b {
  background: linear-gradient(100deg, #7660ff, #b766ff, #f393ff, #b766ff, #7660ff);
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 8s linear infinite;
}
@keyframes shimmer { to { background-position: 300% 0; } }
.btn:not(.dark) {
  background: linear-gradient(100deg, #7660ff, #8700ff, #b766ff, #f393ff, #8700ff);
  background-size: 250% 100%; background-position: 0 0; transition: background-position .6s ease, transform .15s ease, box-shadow .15s ease;
}
.btn:not(.dark):hover { background-position: 100% 0; }
.bar { background: linear-gradient(90deg, #7660ff, #f393ff, #7660ff); background-size: 200% 100%; animation: shimmer 4s linear infinite; }

/* Scroll progress */
.progress { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 50; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); }
[dir="rtl"] .progress { transform-origin: 100% 50%; }

/* Hero entrance */
.name .ln { display: block; overflow: hidden; padding-bottom: .04em; }
.name .ln > span { display: inline-block; transform: translateY(105%); animation: rise .9s cubic-bezier(.2,.8,.2,1) forwards; }
.name .ln:nth-child(2) > span { animation-delay: .12s; }
.name .dot { transform: scale(0); animation: pop .5s .7s cubic-bezier(.3,1.6,.5,1) forwards, glow 2.4s 1.3s ease-in-out infinite; }
@keyframes rise { to { transform: none; } }
@keyframes pop { to { transform: scale(1); } }
@keyframes glow { 50% { box-shadow: 0 0 0 .08em rgba(183, 102, 255, .25); } }
.hero .role, .hero .rotate, .hero .lead, .hero .ctas { opacity: 0; animation: fadeUp .8s ease forwards; }
.hero .role { animation-delay: .35s; } .hero .rotate { animation-delay: .45s; }
.hero .lead { animation-delay: .55s; } .hero .ctas { animation-delay: .65s; }
.hero-media { opacity: 0; animation: zoomIn 1.1s .3s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes zoomIn { from { opacity: 0; transform: scale(.94) rotate(-1deg); } to { opacity: 1; transform: none; } }
.hero-media::before { background: linear-gradient(120deg, #7660ff, #f393ff, #b766ff, #7660ff); background-size: 300% 300%; animation: shimmer 6s linear infinite; }

/* Reveal: section bars grow, grids stagger */
.sec-head .bar { width: 0; transition: width .8s cubic-bezier(.2,.8,.2,1) .1s; }
.sec-head.in .bar, .a-text.in .bar, .cta.in .bar { width: 48px; }
.a-text .bar, .cta .bar { width: 0; transition: width .8s ease .1s; }
.pillars .pillar:nth-child(2), .stats .stat:nth-child(2) { transition-delay: .12s; }
.pillars .pillar:nth-child(3), .stats .stat:nth-child(3) { transition-delay: .24s; }
.stats .stat:nth-child(4) { transition-delay: .36s; }
.project.rv { transform: translateY(40px); }
.project.rv.in { transform: none; }

/* Media hover */
.p-media, .pl-media, .m-media, .r-media { transition: transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .5s; }
.p-media:hover, .pl-media:hover, .m-media:hover { transform: translateY(-4px) scale(1.015); box-shadow: 0 18px 50px rgba(135, 0, 255, .25); }
.reel:hover .r-media { transform: translateY(-6px); }

/* Footer & CTA glow */
.cta { position: relative; }
.cta h2 .grad-text { animation-duration: 6s; }

@media (prefers-reduced-motion: reduce) {
  .mesh i, .grad-text, .words span, .stat b, .bar, .hero-media::before { animation: none !important; }
  .name .ln > span, .name .dot { animation: none; transform: none; }
  .hero .role, .hero .rotate, .hero .lead, .hero .ctas, .hero-media { animation: none; opacity: 1; }
  .sec-head .bar, .a-text .bar, .cta .bar { width: 48px; transition: none; }
}

/* ===== Color grading before/after ===== */
.color-sec { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.color-sec > * { min-width: 0; }
.c-text .lead { margin-bottom: 20px; }
.ba {
  position: relative; width: min(380px, 100%); aspect-ratio: 9 / 16; margin-inline: auto;
  border-radius: 22px; overflow: hidden; background: #000; box-shadow: var(--shadow);
  touch-action: pan-y; user-select: none;
}
.ba video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ba-after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
[dir="rtl"] .ba-after { clip-path: inset(0 var(--pos) 0 0); }
.ba-handle { position: absolute; top: 0; bottom: 0; inset-inline-start: var(--pos); width: 3px; margin-inline-start: -1.5px; background: #fff; pointer-events: none; box-shadow: 0 0 12px rgba(0,0,0,.4); }
.ba-handle span {
  position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  background: linear-gradient(120deg, #7660ff, #f393ff); box-shadow: 0 6px 20px rgba(0,0,0,.35); border: 3px solid #fff;
}
.ba-handle span::before, .ba-handle span::after { content: ""; position: absolute; top: 50%; width: 0; height: 0; margin-top: -6px; border: 6px solid transparent; }
.ba-handle span::before { left: 5px; border-right-color: #fff; }
.ba-handle span::after { right: 5px; border-left-color: #fff; }
.ba-tag { position: absolute; top: 14px; z-index: 2; background: rgba(15,10,23,.7); color: #fff; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; pointer-events: none; }
.t-before { inset-inline-start: 14px; }
.t-after { inset-inline-end: 14px; background: linear-gradient(120deg, #7660ff, #b766ff); }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 3; }
[dir="rtl"] .ba-range { direction: rtl; }
@media (max-width: 1000px) { .color-sec { grid-template-columns: 1fr; gap: 32px; } }

.ba-after, .ba-handle { transition: clip-path .5s ease, inset-inline-start .5s ease; }
.ba.dragging .ba-after, .ba.dragging .ba-handle { transition: none; }

/* ===== Reels: moving strip with fade edges, hover to play ===== */
.reels-marquee {
  overflow: hidden; padding-block: 8px 28px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.reels-track { display: flex; gap: 18px; width: max-content; animation: scroll 90s linear infinite; }
[dir="rtl"] .reels-track { animation-name: scroll-rtl; }
.reels-marquee:hover .reels-track { animation-play-state: paused; }
.reels-track .reel { flex: 0 0 clamp(190px, 18vw, 236px); }
.reel .r-media::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%;
  background: rgba(255,255,255,.9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6v12l10-6z' fill='%238700ff'/%3E%3C/svg%3E") center / 24px no-repeat;
  box-shadow: 0 8px 24px rgba(0,0,0,.3); transition: opacity .3s, transform .3s; pointer-events: none;
}
.reel.playing .r-media::after { opacity: 0; transform: scale(.6); }
.reel.playing .r-media { transform: translateY(-6px) scale(1.03); box-shadow: 0 0 0 3px var(--accent), 0 18px 40px rgba(135,0,255,.3); }
@media (max-width: 720px) { .reels-track .reel { flex-basis: 52vw; } .reels-track { animation-duration: 70s; } }
@media (prefers-reduced-motion: reduce) {
  .reels-track { animation: none; }
  .reels-marquee { overflow-x: auto; }
}

/* ===== v3: content check banner & about photo ===== */
.check-box {
  position: fixed; inset-inline: 16px; bottom: 16px; z-index: 100; max-width: 640px; margin-inline: auto;
  background: #0f5132; color: #fff; padding: 14px 18px; border-radius: 14px; font-size: 15px; box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
.check-box.bad { background: #7a1020; }
.check-box ul { margin: 8px 0 0; padding-inline-start: 20px; }
.check-box li { margin-bottom: 4px; direction: ltr; text-align: start; }
.frame.photo { background: var(--grad); padding: 6px; }
.frame.photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 22px; }
#app:empty { min-height: 100vh; }

/* Motion: when there are 4 items, feature the first one full width */
.m-grid:has(> .m-item:nth-child(4)) > .m-item:first-child { grid-column: 1 / -1; }
.m-grid:has(> .m-item:nth-child(4)) > .m-item:first-child .m-media { aspect-ratio: 21 / 9; }
.m-grid:has(> .m-item:nth-child(4)) > .m-item:first-child figcaption { font-size: 18px; }
@media (max-width: 720px) { .m-grid > .m-item:first-child .m-media { aspect-ratio: 16 / 9 !important; } }

/* ===== AI works: clearly marked ===== */
.ai-sec { position: relative; }
.ai-sec::before {
  content: ""; position: absolute; inset: 24px -16px; z-index: -1; border-radius: 32px;
  background:
    radial-gradient(600px 240px at 15% 0%, rgba(118, 96, 255, .16), transparent 70%),
    radial-gradient(500px 260px at 90% 100%, rgba(243, 147, 255, .14), transparent 70%);
  border: 1px dashed color-mix(in srgb, var(--accent) 35%, transparent);
}
.ai-p { max-width: 68ch; margin: -12px 0 28px; }
.ai-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; align-items: start; }
.ai-media { aspect-ratio: 16 / 9; border-radius: 16px; box-shadow: var(--shadow); }
.ai-item.vert .ai-media { aspect-ratio: 9 / 16; }
.ai-badge {
  position: absolute; top: 12px; inset-inline-start: 12px; z-index: 3; color: #fff; font-weight: 800; font-size: 12px;
  letter-spacing: .06em; padding: 5px 11px; border-radius: 999px;
  background: linear-gradient(100deg, #7660ff, #b766ff, #f393ff); background-size: 200% 100%; animation: shimmer 5s linear infinite;
  box-shadow: 0 4px 14px rgba(135, 0, 255, .35);
}
.ai-body { padding-top: 14px; }
.ai-body h3 { font-size: 20px; margin-bottom: 6px; }
.ai-body p { color: var(--muted); margin: 0 0 10px; font-size: 15.5px; }
.ai-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-tool { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); direction: ltr; }
.ai-media:hover { transform: translateY(-4px) scale(1.015); box-shadow: 0 18px 50px rgba(135, 0, 255, .25); }
.ai-media { transition: transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .5s; }
@media (max-width: 1000px) { .ai-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .ai-grid { grid-template-columns: 1fr; } .ai-sec::before { inset: 12px -8px; } }
@media (prefers-reduced-motion: reduce) { .ai-badge { animation: none; } }

/* ===== AI Lab v2: featured film + compact row ===== */
.ai-feature { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: center; margin-bottom: 36px; }
.ai-feature > * { min-width: 0; }
.ai-feature.vert { grid-template-columns: minmax(0, 360px) 1fr; }
.ai-feature .ai-media { border-radius: 20px; }
.ai-feature.vert .ai-media { aspect-ratio: 9 / 16; }
.ai-feature .ai-body { padding: 0; }
.ai-feature h3 { font-size: clamp(26px, 3vw, 36px); }
.ai-feature .ai-body p { font-size: 17px; }
.ai-more .kicker { margin-bottom: 14px; }
.ai-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.ai-mini { display: flex; gap: 14px; align-items: center; }
.ai-mini .ai-media { flex: 0 0 46%; border-radius: 12px; }
.ai-mini .ai-media.vert { flex-basis: 30%; aspect-ratio: 9 / 16; }
.ai-mini-body b { display: block; font-size: 15px; margin-bottom: 4px; }
.ai-mini-body p { color: var(--muted); font-size: 13.5px; margin: 0 0 6px; }
.ai-mini .ai-badge { font-size: 10px; padding: 3px 8px; top: 8px; inset-inline-start: 8px; }
.ai-badge.sm { font-size: 10px; padding: 3px 8px; top: 10px; inset-inline-start: 10px; }
.r-media .ai-badge.sm { z-index: 4; }
.ai-tag { background: linear-gradient(100deg, #7660ff, #f393ff); color: #fff; margin-inline-start: 6px; }
@media (max-width: 1000px) { .ai-feature, .ai-feature.vert { grid-template-columns: 1fr; gap: 20px; } .ai-feature.vert .ai-media { max-width: 360px; } }

/* Self-hosted preview video + Instagram placeholder */
.auto video.pv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s; }
.auto.live video.pv { opacity: 1; }
.ig-ph { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; color: #fff;
  background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fd5949 35%, #d6249f 60%, #285aeb 100%); }
.ig-ph svg { width: 44px; height: 44px; fill: none; stroke: #fff; stroke-width: 1.8; }
.ig-ph b { font-size: 14px; }
dialog#player .frame-v video { width: 100%; height: 100%; background: #000; display: block; }
dialog#player.ig { width: min(420px, 100vw - 32px); }
dialog#player.ig .frame-v { aspect-ratio: auto; height: min(760px, 86vh); background: #fff; }
.ai-row { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.ai-mini .ai-media.vert { flex-basis: 34%; }

/* Projects with vertical (9:16) videos */
.project.vert, .project.vert.flip { grid-template-columns: 1fr minmax(0, 380px); }
.project.vert.flip { grid-template-columns: minmax(0, 380px) 1fr; }
.project.vert .p-media { aspect-ratio: 9 / 16; width: 100%; max-width: 380px; justify-self: center; }
.project.vert .ep { flex-basis: 64px; }
.project.vert .ep img { aspect-ratio: 9 / 16; }
@media (max-width: 1000px) { .project.vert, .project.vert.flip { grid-template-columns: 1fr; } .project.vert .p-media { max-width: 360px; } }

/* Crawlable static copy of the content (replaced by the script on load).
   Hidden only when JavaScript runs, so visitors never see a flash. */
.js .ssr { visibility: hidden; }
.ssr { padding-block: 40px; }
.ssr section { padding-block: 16px; }
.ssr ul { padding-inline-start: 20px; }
