/* ==========================================================
   Photon Production: shared styles (EN + AR)
   ========================================================== */

:root {
  /* ---- Theme: very dark purple background, white text, logo and buttons ---- */
  --bg: #0e0a16;               /* very dark purple */
  --bg-2: #130e1d;
  --surface: #1a1426;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f5f3f8;
  --text-2: #cdc8d6;
  --muted: #a29bb2;
  --dim: #625a73;
  --accent: #ffffff;
  --on-accent: #0e0a16;
  --glow: rgba(255, 255, 255, 0.28);
  --glow-rgb: 255, 255, 255;
  --glow-k: 1;
  --veil-rgb: 14, 10, 22;
  --overlay: rgba(9, 6, 15, 0.93);
  --em-from: #ffffff;
  --em-to: #9a8fb3;
  --panel-a: #221935;
  --panel-b: #0e0a16;
  --logo-invert: invert(0);

  --font-display: "Syne", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Brand mark ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand { min-width: 0; }
.brand-mark { height: 32px; width: auto; flex: none; filter: var(--logo-invert) drop-shadow(0 0 10px rgba(var(--glow-rgb), calc(0.245 * var(--glow-k)))); }
.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; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 15px;
  text-transform: uppercase;
}
.brand-by { font-size: 11px; color: var(--muted); letter-spacing: 0.04em; margin-top: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600; font-size: 15px;
  transition: transform .4s var(--ease), background .3s, color .3s, box-shadow .3s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 0 var(--glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 40px -8px var(--glow); }
.btn-ghost { border: 1px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--text); transform: translateY(-2px); }

/* ==========================================================
   Language gate (root index.html)
   ========================================================== */
.gate {
  min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center;
  position: relative; overflow: hidden;
  padding: 32px 16px;
  text-align: center;
}
.gate::before {
  content: ""; position: absolute; inset: -20%;
  background:
    radial-gradient(circle at 50% 45%, rgba(var(--glow-rgb), calc(0.154 * var(--glow-k))), transparent 38%),
    radial-gradient(circle at 50% 50%, rgba(var(--glow-rgb), calc(0.04 * var(--glow-k))), transparent 60%);
  animation: breathe 7s ease-in-out infinite;
}
.gate-inner { position: relative; display: grid; justify-items: center; gap: 28px; }
.gate-logo { width: clamp(190px, 28vw, 280px); height: auto; filter: var(--logo-invert) drop-shadow(0 0 40px rgba(var(--glow-rgb), calc(0.175 * var(--glow-k)))); }
.gate-mark { width: 120px; height: auto; filter: var(--logo-invert) drop-shadow(0 0 30px rgba(var(--glow-rgb), calc(0.21 * var(--glow-k)))); }
.gate-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(30px, 7vw, 64px);
  letter-spacing: 0.12em; text-transform: uppercase; line-height: 1;
  margin: 0;
}
.gate-by { color: var(--muted); font-size: 14px; letter-spacing: .06em; margin-top: -6px; }
.gate-prompt { color: var(--dim); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; margin-top: 18px; }
.gate-prompt span { display: block; letter-spacing: 0; font-family: "IBM Plex Sans Arabic", sans-serif; font-size: 15px; margin-top: 4px; text-transform: none; }
.gate-choices { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.gate-choice {
  min-width: 170px; padding: 18px 28px;
  border: 1px solid var(--line-2); border-radius: 16px;
  display: grid; gap: 2px; text-align: center;
  background: rgba(var(--glow-rgb), calc(.02 * var(--glow-k)));
  transition: border-color .3s, transform .4s var(--ease), background .3s;
}
.gate-choice strong { font-size: 20px; font-weight: 600; }
.gate-choice small { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.gate-choice.ar strong { font-family: "IBM Plex Sans Arabic", sans-serif; }
.gate-choice:hover { border-color: var(--accent); background: rgba(var(--glow-rgb), calc(0.042 * var(--glow-k))); transform: translateY(-3px); }
.gate-remember { display: inline-flex; align-items: center; gap: 8px; color: var(--dim); font-size: 13px; cursor: pointer; }
.gate-remember input { accent-color: var(--accent); }

@keyframes breathe { 0%,100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }

/* ==========================================================
   Header / nav
   ========================================================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(var(--veil-rgb), .78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-color: var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.nav-links { display: flex; align-items: center; gap: 34px; font-size: 14px; }
.nav-links a { color: var(--muted); transition: color .25s; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 50%; bottom: -8px; width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent); transform: translateX(-50%); box-shadow: 0 0 8px var(--glow);
}
.nav-right { display: flex; align-items: center; gap: 14px; }
.lang-switch {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  border: 1px solid var(--line-2); border-radius: 999px;
  padding: 6px 14px; font-size: 14px; color: var(--muted);
  transition: color .25s, border-color .25s;
}
.lang-switch:hover { color: var(--text); border-color: var(--text); }
.nav-cta { padding: 10px 18px; font-size: 14px; }
.menu-btn { display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); place-items: center; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after {
  display: block; width: 16px; height: 1.5px; background: var(--text); position: relative; transition: transform .3s, background .3s;
}
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -5px; } .menu-btn span::after { top: 5px; }
.menu-open .menu-btn span { background: transparent; }
.menu-open .menu-btn span::before { transform: translateY(5px) rotate(45deg); }
.menu-open .menu-btn span::after { transform: translateY(-5px) rotate(-45deg); }

/* ==========================================================
   Hero
   ========================================================== */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: 140px 0 72px; overflow: hidden; isolation: isolate;
}
.hero-mosaic {
  position: absolute; inset: -10% -10%; z-index: -2;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  transform: rotate(-8deg) scale(1.15);
  opacity: .8;
}
.mosaic-col { display: flex; flex-direction: column; gap: 14px; animation: drift 60s linear infinite; }
.mosaic-col:nth-child(even) { animation-direction: reverse; animation-duration: 75s; }
.mosaic-col img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; filter: saturate(.85); }
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 15% 85%, rgba(var(--veil-rgb), .7), transparent),
    linear-gradient(180deg, rgba(var(--veil-rgb), .7) 0%, rgba(var(--veil-rgb), .35) 30%, rgba(var(--veil-rgb), .75) 68%, var(--bg) 100%);
}
.hero::after {
  content: ""; position: absolute; z-index: -1; width: 60vw; height: 60vw; max-width: 820px; max-height: 820px;
  right: -12vw; top: -14vw; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--glow-rgb), calc(0.14 * var(--glow-k))), transparent 62%);
  animation: breathe 9s ease-in-out infinite;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--glow); }
.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(42px, 8.4vw, 124px);
  line-height: .95; letter-spacing: -0.02em;
  margin: 22px 0 28px; max-width: 13ch;
}
.hero h1 em, .contact .section-title em {
  font-style: normal; color: var(--text);
  background: linear-gradient(180deg, var(--em-from) 35%, var(--em-to) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 28px rgba(var(--glow-rgb), calc(.22 * var(--glow-k))));
}
.hero-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.hero-lead { max-width: 520px; color: var(--text-2); font-size: clamp(16px, 1.6vw, 19px); margin: 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.scroll-hint {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  width: 22px; height: 36px; border: 1.5px solid var(--line-2); border-radius: 12px;
}
.scroll-hint::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; border-radius: 2px;
  background: var(--accent); transform: translateX(-50%); animation: scrollDot 2s ease-in-out infinite;
}
@keyframes scrollDot { 0% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 12px); } }

/* ---------- Client marquee ---------- */
.clients { border-block: 1px solid var(--line); padding: 26px 0; overflow: hidden; }
.clients-track { display: flex; gap: 56px; width: max-content; animation: marquee 45s linear infinite; }
.clients-track span {
  font-family: var(--font-display); font-size: clamp(18px, 2vw, 24px); font-weight: 600;
  color: var(--dim); white-space: nowrap; display: inline-flex; align-items: center; gap: 56px;
}
.clients-track span::after { content: "✦"; font-size: 12px; color: var(--accent); opacity: .7; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================
   Sections
   ========================================================== */
.section { padding: clamp(80px, 11vw, 150px) 0; overflow-x: clip; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; margin-bottom: 48px; }
.section-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(34px, 5.2vw, 72px); line-height: 1; letter-spacing: -0.02em;
  margin: 14px 0 0;
}
.section-sub { color: var(--muted); max-width: 440px; margin: 0; }

/* ---------- Work grid ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter {
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-2);
  font-size: 13px; color: var(--muted); transition: all .25s;
}
.filter:hover { color: var(--text); border-color: var(--text); }
.filter[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.filter .count { opacity: .55; margin-inline-start: 4px; font-variant-numeric: tabular-nums; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; grid-auto-flow: dense; }
.card {
  position: relative; display: block; text-align: start; width: 100%;
  border-radius: var(--radius); overflow: hidden; background: var(--surface);
  transition: opacity .4s, transform .5s var(--ease);
}
.card.is-featured { grid-column: span 2; grid-row: span 2; }
.card { color: #fff; }
.card-media { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #111; }
.card.is-featured, .card.is-wide { min-height: 220px; }
.card.is-featured .card-media, .card.is-wide .card-media { position: absolute; inset: 0; aspect-ratio: auto; height: auto; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), filter .5s; }
.card:hover .card-media img { transform: scale(1.06); filter: brightness(.7); }
.card-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.82));
}
.play {
  position: absolute; left: 50%; top: 50%; z-index: 2;
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.12); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.25);
  transform: translate(-50%, -50%) scale(.85); opacity: 0;
  transition: opacity .35s, transform .5s var(--ease), background .3s;
}
.play svg { width: 22px; height: 22px; margin-left: 3px; fill: #fff; }
.card:hover .play, .card:focus-visible .play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.card:hover .play { background: var(--accent); border-color: var(--accent); }
.card:hover .play svg { fill: var(--on-accent); }
.card-info {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 18px 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
}
.card-title { font-weight: 600; font-size: 17px; line-height: 1.25; margin: 0; }
.card.is-featured .card-title { font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 34px); }
.card-meta { font-size: 12.5px; color: rgba(255,255,255,.65); margin-top: 4px; }
.card-tags { position: absolute; top: 14px; left: 14px; z-index: 2; display: flex; gap: 6px; flex-wrap: wrap; }
.card.is-wide { grid-column: span 2; }
.tag {
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 6px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.14);
  white-space: nowrap;
}
.badge-vertical {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 6px; background: rgba(0,0,0,.55);
}
.card.is-hidden { display: none; }
.work-foot { margin-top: 44px; display: flex; justify-content: center; }

/* ---------- Services ---------- */
.services { background: var(--bg-2); border-block: 1px solid var(--line); }
.service-list { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.service {
  padding: 36px 28px 40px; border-inline-end: 1px solid var(--line);
  position: relative; overflow: hidden; transition: background .4s;
}
.service:last-child { border-inline-end: 0; }
.service::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease);
}
.service:hover { background: rgba(var(--glow-rgb), calc(.02 * var(--glow-k))); }
.service:hover::before { transform: scaleX(1); }
.service-num { font-size: 12px; color: var(--dim); letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.service-icon { width: 44px; height: 44px; margin: 26px 0 22px; color: var(--accent); }
.service h3 { font-family: var(--font-display); font-size: 24px; line-height: 1.15; margin: 0 0 12px; }
.service p { color: var(--muted); margin: 0 0 22px; font-size: 15px; }
.service ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.service li { display: flex; gap: 10px; align-items: baseline; }
.service li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: none; transform: translateY(-2px); }
.tools { margin-top: 56px; display: flex; align-items: center; gap: 14px 28px; flex-wrap: wrap; color: var(--dim); font-size: 14px; }
.tools strong { color: var(--muted); font-weight: 500; letter-spacing: .16em; text-transform: uppercase; font-size: 12px; }
.tools span { color: var(--text); opacity: .75; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.portrait { position: relative; max-width: 440px; }
.portrait-frame {
  aspect-ratio: 4/5; border-radius: 20px; overflow: hidden; background: var(--surface);
  border: 1px solid var(--line);
}
.portrait-frame { position: relative; isolation: isolate; }   /* keep the photo's layering inside the frame */
.portrait-frame:has(> img) .monogram { display: none; }       /* logo placeholder only when there is no photo */
.portrait-frame img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; filter: grayscale(.2) contrast(1.05); }
.monogram {
  position: absolute; inset: 0; display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 46%, rgba(var(--glow-rgb), calc(0.245 * var(--glow-k))), transparent 34%),
    radial-gradient(circle at 70% 85%, rgba(var(--glow-rgb), calc(0.06 * var(--glow-k))), transparent 50%),
    linear-gradient(160deg, var(--panel-a), var(--panel-b));
}
.monogram img { width: 58%; height: auto; filter: var(--logo-invert) drop-shadow(0 0 40px rgba(var(--glow-rgb), calc(0.245 * var(--glow-k)))); }
.portrait::after {
  content: ""; position: absolute; width: 70%; height: 70%; right: -14%; bottom: -14%; z-index: -1;
  background: radial-gradient(circle, rgba(var(--glow-rgb), calc(0.196 * var(--glow-k))), transparent 65%);
}
.portrait-tag {
  position: absolute; left: -16px; bottom: 28px;
  background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 12px;
  font-size: 13px; font-weight: 600; line-height: 1.3; box-shadow: 0 20px 40px -12px rgba(0,0,0,.6);
}
.portrait-tag small { display: block; font-weight: 400; opacity: .65; }
.about-text p { color: var(--text-2); font-size: clamp(16px, 1.4vw, 18px); margin: 0 0 18px; max-width: 60ch; }
.about-text p.lead { color: var(--text); font-size: clamp(20px, 2vw, 26px); line-height: 1.4; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 40px; }
.stat { background: var(--bg); padding: 22px 20px; }
.stat b { display: block; font-family: var(--font-display); font-size: clamp(28px, 3vw, 40px); line-height: 1; color: var(--text); }
.stat b i { font-style: normal; color: var(--accent); }
.stat span { font-size: 13px; color: var(--muted); }

/* ---------- Contact ---------- */
.contact { position: relative; overflow: hidden; text-align: center; border-top: 1px solid var(--line); }
.contact::before {
  content: ""; position: absolute; left: 50%; top: 100%; width: 1100px; height: 1100px; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(var(--glow-rgb), calc(0.112 * var(--glow-k))), transparent 60%); pointer-events: none;
}
.contact .section-title { font-size: clamp(42px, 9vw, 130px); margin: 18px 0 26px; }
.contact-lead { color: var(--muted); max-width: 520px; margin: 0 auto 40px; }
.email-row { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.email-link {
  font-family: var(--font-display); font-size: clamp(22px, 3.4vw, 40px); font-weight: 600;
  border-bottom: 2px solid var(--line-2); padding-bottom: 4px; transition: border-color .3s, color .3s;
  word-break: break-all;
}
.email-link:hover { color: var(--accent); border-color: var(--accent); }
.copy-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2);
  display: grid; place-items: center; transition: border-color .25s, background .25s; position: relative;
}
.copy-btn svg { width: 18px; height: 18px; }
.copy-btn:hover { border-color: var(--text); }
.copy-btn.copied { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.copy-toast {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(4px);
  font-size: 12px; background: var(--text); color: var(--bg); padding: 5px 10px; border-radius: 6px;
  opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; white-space: nowrap;
}
.copy-btn.copied .copy-toast { opacity: 1; transform: translateX(-50%) translateY(0); }
.contact-actions { margin-top: 40px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 30px 0; font-size: 13px; color: var(--dim); }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 22px; }
.footer-links a:hover { color: var(--text); }

/* ==========================================================
   Lightbox
   ========================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 70px 16px 24px;
  background: var(--overlay); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-inner { width: min(1200px, 100%); display: grid; gap: 18px; transform: translateY(14px) scale(.98); transition: transform .5s var(--ease); }
.lightbox.open .lightbox-inner { transform: none; }
.player {
  position: relative; width: 100%; margin: 0 auto;
  border-radius: 12px; overflow: hidden; background: #000; box-shadow: 0 40px 120px -30px rgba(0,0,0,.9);
}
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lightbox-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin: 0 auto; width: 100%; }
.lightbox-meta h3 { font-family: var(--font-display); font-size: clamp(20px, 2.4vw, 28px); margin: 0; }
.lightbox-meta p { margin: 4px 0 0; color: var(--muted); font-size: 14px; max-width: 70ch; }
.lightbox-meta a { font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.lightbox-meta a:hover { color: var(--text); }
.lightbox-close {
  position: absolute; top: 16px; right: 16px; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line-2); display: grid; place-items: center; transition: background .25s, transform .4s var(--ease);
}
.lightbox-close:hover { background: var(--text); color: var(--bg); transform: rotate(90deg); }
.lightbox-close svg { width: 18px; height: 18px; }
.no-scroll { overflow: hidden; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1080px) {
  .service-list { grid-template-columns: repeat(2, 1fr); }
  .service:nth-child(2) { border-inline-end: 0; }
  .service:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none; }
  .menu-btn { display: grid; }
  .menu-open .nav-links {
    display: flex; position: fixed; inset: 76px 0 auto 0; flex-direction: column; gap: 0;
    background: rgba(var(--veil-rgb), .97); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px;
  }
  .menu-open .nav-links a { padding: 16px 0; font-size: 20px; color: var(--text); border-bottom: 1px solid var(--line); }
  .menu-open .nav-links a.active::after { display: none; }
  .menu-open .site-header { background: rgba(var(--veil-rgb), .97); }
  .about-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 340px; }
  .hero-mosaic { grid-template-columns: repeat(3, 1fr); }
  .mosaic-col:nth-child(4) { display: none; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .card.is-featured, .card.is-wide { grid-column: auto; grid-row: auto; }
  .card.is-featured, .card.is-wide { min-height: 0; }
  .card.is-featured .card-media, .card.is-wide .card-media { position: relative; aspect-ratio: 16/9; }
  .play { opacity: 1; transform: translate(-50%, -50%) scale(.8); }
  .service-list { grid-template-columns: 1fr; }
  .service { border-inline-end: 0; border-bottom: 1px solid var(--line); padding: 30px 4px 34px; }
  .stats { grid-template-columns: 1fr 1fr 1fr; }
  .stat { padding: 16px 12px; }
  .brand-name { font-size: 12px; letter-spacing: .08em; }
  .brand-by { font-size: 10px; }
  .brand { gap: 9px; }
  .brand-mark { height: 26px; }
  .nav { gap: 10px; }
  .nav-right { gap: 8px; }
  .lang-switch { padding: 5px 11px; }
  .hero { padding-bottom: 80px; }
  .portrait-tag { left: 12px; }
  .filters { overflow-x: auto; flex-wrap: nowrap; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: none; }
  .section-head { margin-bottom: 32px; }
  .lightbox-close { top: 12px; right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================
   Page transitions (logo page → site)
   ========================================================== */
.gate-curtain { position: fixed; inset: 0; z-index: 30; pointer-events: none; opacity: 0; }
.zoom-layer { position: fixed; inset: 0; z-index: 20; pointer-events: none; overflow: hidden; }
.zoom-ghost { position: absolute; }                 /* absolute inside the fixed, clipped layer */
.zoom-img {
  display: block; width: 100%; height: 100%; opacity: 0;
  transform-origin: 50% 25%;                         /* zoom into the centre of the logo icon */
  will-change: transform, opacity, filter;
}
.gate-curtain { background: var(--bg); }

@media (prefers-reduced-motion: no-preference) {
  /* Logo page: entrance */
  .gate-logo    { animation: logoIn 1.3s var(--ease) both; }
  .gate-by      { animation: riseIn .9s .35s var(--ease) both; }
  .gate-choices { animation: riseIn .9s .5s var(--ease) both; }

  /* Logo page: exit (fast zoom with motion blur) */
  .leaving .gate-by, .leaving .gate-choices { animation: sinkOut .14s ease-in both; }
  .leaving .gate-logo    { visibility: hidden; }          /* the ghost copies take over */
  .leaving .zoom-img.lead  { animation: zoomLead  .34s cubic-bezier(.6, 0, .9, .3) both; }
  .leaving .zoom-img.trail { animation: zoomTrail .34s cubic-bezier(.6, 0, .9, .3) both; }
  .leaving .gate::before { animation: fadeOutQuick .3s ease-in both; }
  .leaving .gate-curtain { animation: fadeIn .1s .27s ease-in both; }

  /* Site: entrance after the zoom (only when arriving from the logo page) */
  html.from-gate body::after {
    content: ""; position: fixed; inset: 0; z-index: 300; pointer-events: none;
    background: var(--bg); animation: fadeOut .45s ease-out both;
  }
  /* Site: hero entrance */
  html.intro .hero-mosaic    { animation: mosaicIn 1.4s var(--ease) both; }
  html.intro .hero .eyebrow  { animation: riseIn .8s .2s var(--ease) both; }
  html.intro .hero h1        { animation: riseIn .9s .28s var(--ease) both; }
  html.intro .hero-bottom    { animation: riseIn .9s .45s var(--ease) both; }
  html.intro .site-header    { animation: dropIn .8s .45s var(--ease) both; }
}

@keyframes logoIn     { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes riseIn     { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes sinkOut    { to { opacity: 0; transform: translateY(18px); } }
@keyframes dropIn     { from { opacity: 0; transform: translateY(-18px); } to { opacity: 1; transform: none; } }
@keyframes zoomLead {
  0%   { opacity: 1; transform: scale(1);   filter: blur(0); }
  12%  { opacity: 1; transform: scale(.95); filter: blur(0); }
  60%  { opacity: 1; transform: scale(4);   filter: blur(.2px); }
  100% { opacity: 0; transform: scale(26);  filter: blur(.6px); }
}
@keyframes zoomTrail {
  0%   { opacity: 0; transform: scale(1);   filter: blur(0); }
  12%  { opacity: 0; transform: scale(.95); filter: blur(0); }
  28%  { opacity: 1; }
  60%  { opacity: 1; transform: scale(4);   filter: blur(.2px); }
  100% { opacity: 0; transform: scale(26);  filter: blur(.6px); }
}
}
@keyframes fadeOutQuick { to { opacity: 0; } }
@keyframes fadeIn  { to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes mosaicIn {
  from { opacity: 0;  transform: rotate(-8deg) scale(1.4); }
  to   { opacity: .8; transform: rotate(-8deg) scale(1.15); }
}

/* ==========================================================
   Arabic / right-to-left
   ========================================================== */
:root[lang="ar"] {
  --font-display: "Alexandria", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif;
}
/* Letter-spacing breaks Arabic letter joining */
:root[lang="ar"] :is(.eyebrow, .tag, .filter, .badge-vertical, .tools strong, .section-title, .hero h1,
  .card-title, .btn, .gate-prompt, .stat b, .service h3, .brand-by) { letter-spacing: 0; }
:root[lang="ar"] .brand-name { font-family: "Syne", "Segoe UI", sans-serif; }   /* Latin wordmark stays as in the logo */
:root[lang="ar"] .lang-en { font-family: "Inter", "Segoe UI", sans-serif; }
:root[lang="ar"] .hero h1 { line-height: 1.25; font-size: clamp(40px, 7.4vw, 108px); max-width: 14ch; }
:root[lang="ar"] .section-title { line-height: 1.3; }
:root[lang="ar"] .contact .section-title { line-height: 1.25; }
:root[lang="ar"] body { line-height: 1.8; }
:root[lang="ar"] .hero-lead, :root[lang="ar"] .about-text p { line-height: 1.9; }
:root[lang="ar"] .card-title { font-family: var(--font-body); }
:root[lang="ar"] .card.is-featured .card-title { font-family: "Syne", var(--font-display); }

/* Mirror things that sit on one side */
[dir="rtl"] .clients { direction: ltr; }          /* marquee scrolls the same way in both languages */
[dir="rtl"] .card-tags { left: auto; right: 14px; }
[dir="rtl"] .badge-vertical { right: auto; left: 14px; }
[dir="rtl"] .portrait-tag { left: auto; right: -16px; }
[dir="rtl"] .portrait::after { right: auto; left: -14%; }
[dir="rtl"] .hero::after { right: auto; left: -12vw; }
[dir="rtl"] .service::before { transform-origin: right; }
[dir="rtl"] .lightbox-close { right: auto; left: 16px; }
@media (max-width: 640px) {
  [dir="rtl"] .portrait-tag { right: 12px; }
  [dir="rtl"] .lightbox-close { left: 12px; }
}
[dir="rtl"] [data-lb-title], [dir="rtl"] .card-title { text-align: right; }   /* English titles still sit on the right */

/* Plain project list for visitors and search engines without JavaScript */
.noscript-work { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.noscript-work a { color: var(--text); }
.noscript-work span { color: var(--muted); margin-inline-start: 8px; }

/* WhatsApp: floating chat button on phones and tablets */
.wa-float { display: none; }
@media (max-width: 860px) {
  .wa-float {
    display: flex; align-items: center; justify-content: center;
    position: fixed; z-index: 60; width: 56px; height: 56px; border-radius: 50%;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px)); inset-inline-end: 18px;
    background: #25d366; color: #fff;
    box-shadow: 0 10px 30px -6px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .12) inset;
    transition: transform .25s var(--ease), opacity .25s var(--ease);
  }
  .wa-float svg { width: 28px; height: 28px; }
  .wa-float:active { transform: scale(.94); }
  /* Out of the way while the menu or a video is open */
  .menu-open .wa-float, .no-scroll .wa-float { opacity: 0; pointer-events: none; }
}
