/* =========================================================
   Rival Studios — public site
   Brand: blue #0194BA · green #92C47B
   ========================================================= */
:root {
  --blue: #0194ba;
  --blue-l: #3cc6ea;
  --blue-d: #016a86;
  --green: #92c47b;
  --green-l: #b8e6a0;
  --green-d: #5f9a46;
  --ink: #060912;
  --ink-2: #0b1120;
  --text: #e9f0f7;
  --muted: #95a3b6;
  --line: rgba(255, 255, 255, .1);
  --glass: rgba(255, 255, 255, .055);
  --glass-2: rgba(255, 255, 255, .025);
  --grad: linear-gradient(120deg, var(--blue-l), var(--green));
  --grad-btn: linear-gradient(120deg, #24b7da, #a5d88c);
  --radius: 22px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: 'Sora', system-ui, sans-serif;
  --display: 'Barlow Condensed', 'Sora', sans-serif;
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.rtl { --font: 'Cairo', system-ui, sans-serif; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { margin: 0 0 1em; }
.ic { width: 1.15em; height: 1.15em; flex: none; }
.muted { color: var(--muted); }
::selection { background: var(--blue); color: #fff; }

.container { width: min(1200px, 100% - 40px); margin-inline: auto; }

/* ---------- glass ---------- */
.glass {
  background: linear-gradient(135deg, var(--glass), var(--glass-2));
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 24px 60px -28px rgba(0, 0, 0, .7);
  border-radius: var(--radius);
}

/* ---------- ambient background ---------- */
.bg-scene { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
/* soft glows are painted as radial gradients — no filter: blur(), which is very expensive on big layers */
.orb { position: absolute; border-radius: 50%; will-change: transform, translate; }
.orb-blue { width: 76vw; height: 76vw; background: radial-gradient(circle, rgba(1, 148, 186, .34), rgba(1, 148, 186, .12) 35%, transparent 68%); top: 18%; inset-inline-start: -30vw; animation: float1 26s ease-in-out infinite; }
.orb-green { width: 64vw; height: 64vw; background: radial-gradient(circle, rgba(95, 154, 70, .32), rgba(95, 154, 70, .1) 35%, transparent 68%); top: 55%; inset-inline-end: -26vw; animation: float2 30s ease-in-out infinite; }
.orb-mix { width: 52vw; height: 52vw; background: radial-gradient(circle, rgba(27, 58, 107, .4), transparent 68%); top: -8%; inset-inline-end: 2vw; animation: float1 34s ease-in-out infinite reverse; }
@keyframes float1 { 50% { transform: translate(4vw, -3vh); } }
@keyframes float2 { 50% { transform: translate(-5vw, 4vh); } }
.grain {
  position: absolute; inset: 0; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- buttons ---------- */
.btn {
  --pad: 14px 26px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: var(--pad); border-radius: 999px; font-weight: 600; font-size: .95rem; letter-spacing: .01em;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), background .3s, border-color .3s, color .3s;
  position: relative; white-space: nowrap;
}
.btn .ic { transition: transform .4s var(--ease); }
.rtl .btn .ic { transform: scaleX(-1); }
.btn:hover .ic { transform: translateX(4px); }
.rtl .btn:hover .ic { transform: scaleX(-1) translateX(4px); }
.btn-primary { background: var(--grad-btn); color: #04131b; box-shadow: 0 10px 30px -10px rgba(1, 148, 186, .7); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(146, 196, 123, .65); }
.btn-ghost { border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .04); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn-ghost:hover { border-color: var(--blue-l); background: rgba(60, 198, 234, .1); transform: translateY(-2px); }
.btn-sm { --pad: 9px 16px; font-size: .85rem; }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-header { position: fixed; top: 0; inset-inline: 0; z-index: 50; padding-top: 14px; transition: padding .4s var(--ease), transform .5s var(--ease); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 12px 10px 22px; border-radius: 20px; transition: background .4s, box-shadow .4s; }
.rtl .header-inner { padding: 10px 22px 10px 12px; }
.site-header:not(.scrolled) .header-inner { background: rgba(255, 255, 255, .025); box-shadow: none; }
.site-header.scrolled { padding-top: 8px; }
.site-header.hidden { transform: translateY(-120%); }
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { height: 32px; width: auto; max-width: none; }
.main-nav { position: relative; display: flex; gap: 4px; }
.main-nav a { position: relative; z-index: 1; padding: 8px 16px; font-size: .9rem; color: var(--muted); border-radius: 999px; transition: color .3s; }
.main-nav a:hover, .main-nav a.active { color: #fff; }
.nav-indicator { position: absolute; top: 0; height: 100%; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); transition: left .5s var(--ease), width .5s var(--ease), opacity .3s; opacity: 0; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); font-weight: 700; font-size: .85rem; transition: border-color .3s, background .3s; font-family: 'Cairo', 'Sora', sans-serif; }
.lang-btn:hover { border-color: var(--green); background: rgba(146, 196, 123, .1); }
.menu-btn { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); place-items: center; }
.menu-btn .ic { width: 22px; height: 22px; }

.mobile-nav { position: fixed; inset: 10px; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; opacity: 0; visibility: hidden; transform: scale(.97); transition: .45s var(--ease); background: rgba(8, 12, 24, .82); }
.mobile-nav.open { opacity: 1; visibility: visible; transform: none; }
.mobile-nav a:not(.btn) { font-size: 1.6rem; font-weight: 600; padding: 6px 20px; }
.mobile-nav .btn { margin-top: 16px; }
.menu-close { position: absolute; top: 18px; inset-inline-end: 18px; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; }

/* ---------- hero ---------- */
.hero {
  --mx: 0; --my: 0; /* -1..1, set by JS */
  position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center;
  overflow: hidden; isolation: isolate; padding: 120px 0 90px;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(12, 30, 60, .55), transparent 70%), var(--ink);
}
.stars { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -3; }
/* .beams and .hero-spot are moved by JS (inline transform) — no CSS variables, no transitions */
.beams { position: absolute; inset: -20%; z-index: -2; pointer-events: none; will-change: transform; }
/* each beam is a stretched ellipse whose gradient already fades out softly: no blur filter or blend mode needed */
.beam { position: absolute; top: 50%; left: 50%; width: 140vmax; height: 30vmin; opacity: .5; transform-origin: center; will-change: transform, opacity; }
.beam-1 { background: radial-gradient(closest-side, rgba(60, 198, 234, .5), rgba(1, 148, 186, .22) 45%, transparent); transform: translate(-50%, -50%) rotate(-28deg); animation: beam1 18s ease-in-out infinite; }
.beam-2 { background: radial-gradient(closest-side, rgba(146, 196, 123, .42), rgba(146, 196, 123, .14) 45%, transparent); transform: translate(-50%, -50%) rotate(22deg); height: 20vmin; opacity: .38; animation: beam2 22s ease-in-out infinite; }
.beam-3 { background: radial-gradient(closest-side, rgba(60, 198, 234, .38), transparent); transform: translate(-50%, -30%) rotate(-8deg); height: 10vmin; opacity: .3; animation: beam3 16s ease-in-out infinite; }
.beam-4 { background: radial-gradient(closest-side, rgba(184, 230, 160, .32), transparent); transform: translate(-50%, -70%) rotate(48deg); height: 8vmin; opacity: .22; animation: beam1 26s ease-in-out infinite reverse; }
@keyframes beam1 { 50% { transform: translate(-50%, -46%) rotate(-22deg); opacity: .6; } }
@keyframes beam2 { 50% { transform: translate(-48%, -54%) rotate(28deg); opacity: .48; } }
@keyframes beam3 { 50% { transform: translate(-52%, -34%) rotate(-14deg); opacity: .4; } }
.hero.is-alt .beam-2 { opacity: .6; }
.hero.is-alt .beam-1 { opacity: .32; }
.hero-spot {
  position: absolute; left: 50%; top: 50%; width: 1200px; height: 1200px; margin: -600px 0 0 -600px; z-index: -1; pointer-events: none;
  border-radius: 50%; background: radial-gradient(circle, rgba(60, 198, 234, .09), transparent 50%); will-change: transform;
}
.hero-content { text-align: center; display: flex; flex-direction: column; align-items: center; will-change: translate, opacity; }
.hero-phrase { position: relative; cursor: default; outline: none; padding: 0 2vw; perspective: 900px; }
.hero-title {
  font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase;
  font-size: clamp(5rem, 19vw, 17rem); line-height: .82; letter-spacing: .01em;
  transform-style: preserve-3d; will-change: transform; /* tilt is set by JS */
}
.hero-word {
  position: relative; display: inline-block; padding: 0 .06em;
  background: linear-gradient(100deg, #fff 0%, #e6f7ff 30%, var(--blue-l) 48%, var(--green-l) 62%, #fff 82%);
  background-size: 250% 100%; background-position: 50% 50%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: background-position 1.2s var(--ease);
  filter: drop-shadow(0 0 30px rgba(1, 148, 186, .25));
}
.hero-word::after {
  content: attr(data-text); position: absolute; inset: 0; padding: 0 .06em; z-index: -1;
  color: transparent; -webkit-text-stroke: 1px rgba(146, 196, 123, .35);
  translate: var(--wx, 0 0); transform: translateZ(-40px);
}
.hero.is-alt .hero-word { background-position: 8% 50%; }

.hero-swap {
  display: grid; margin-top: clamp(10px, 2vw, 22px);
  font-weight: 300; font-size: clamp(1.15rem, 3.2vw, 2.35rem); letter-spacing: .32em; text-transform: uppercase;
  will-change: transform; /* drift is set by JS */
}
.rtl .hero-swap { letter-spacing: 0; font-weight: 600; text-transform: none; font-size: clamp(1.3rem, 3.6vw, 2.6rem); }
.swap { grid-area: 1 / 1; white-space: nowrap; }
.swap .ch { display: inline-block; white-space: pre; transition: transform .7s var(--ease), opacity .6s var(--ease), filter .6s var(--ease); transition-delay: calc(var(--i) * 22ms); }
.swap-a .ch { color: #dfe8f2; }
.swap-b .ch { opacity: 0; transform: translateY(.7em) rotateX(-70deg); filter: blur(8px);
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 500; }
.rtl .swap-b .ch { font-weight: 700; }
.hero.is-alt .swap-a .ch { opacity: 0; transform: translateY(-.7em) rotateX(70deg); filter: blur(8px); }
.hero.is-alt .swap-b .ch { opacity: 1; transform: none; filter: none; }

.hero-tagline { max-width: 640px; margin: clamp(28px, 4vw, 44px) auto 0; color: var(--muted); font-size: clamp(.95rem, 1.4vw, 1.1rem); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 30px; }
.hero .reveal { transition-delay: calc(var(--d, 0s) + .2s); }
.hero-title, .hero-swap { animation: heroIn 1.6s var(--ease) both; }
.hero-swap { animation-delay: .25s; }
@keyframes heroIn { from { opacity: 0; filter: blur(14px); translate: 0 30px; } }

.scroll-cue { position: absolute; bottom: 26px; left: 50%; translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.scroll-cue span { width: 22px; height: 36px; border: 1.5px solid rgba(255, 255, 255, .3); border-radius: 12px; position: relative; }
.scroll-cue span::after { content: ''; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 3px; background: var(--green); animation: wheel 2s var(--ease) infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- marquee ---------- */
.marquee { border-block: 1px solid var(--line); background: rgba(255, 255, 255, .02); overflow: hidden; padding: 18px 0; -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: marquee 50s linear infinite; }
.rtl .marquee-track { animation-direction: reverse; }
.marquee span { display: inline-flex; align-items: center; gap: 14px; font-family: var(--display); font-style: italic; font-weight: 700; font-size: 1.6rem; text-transform: uppercase; color: rgba(255, 255, 255, .5); white-space: nowrap; }
.rtl .marquee span { font-family: var(--font); font-style: normal; font-size: 1.3rem; }
.marquee .ic { color: var(--green); width: 22px; height: 22px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding: clamp(80px, 11vw, 140px) 0; position: relative; }
.section-head { margin-bottom: 48px; max-width: 720px; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head.split { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--green); font-size: .8rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; margin-bottom: 14px; }
.rtl .kicker { letter-spacing: 0; font-size: .95rem; }
.kicker::before { content: ''; width: 28px; height: 1.5px; background: var(--grad); }
.section-title { font-size: clamp(2rem, 4.4vw, 3.3rem); font-weight: 700; letter-spacing: -.02em; margin-bottom: 20px; }
.section-head .section-title { margin-bottom: 0; }
.rtl .section-title { letter-spacing: 0; font-weight: 800; }
.section-title.sm { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.lead { color: #c3cfdc; font-size: 1.05rem; }

/* ---------- reveal animations ---------- */
.reveal {
  opacity: 0; transform: translateY(28px); filter: blur(6px);
  transition: opacity .9s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s), filter .9s var(--ease) var(--d, 0s),
              border-color .4s, box-shadow .6s var(--ease), background .4s;
}
.reveal.in { opacity: 1; transform: none; filter: none; }
.reveal.done { --d: 0s; }
.reveal.done.tilt { transition-duration: .9s, .5s, .9s, .4s, .6s, .4s; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.checklist { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.checklist li { display: flex; align-items: center; gap: 14px; }
.checklist li > span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(146, 196, 123, .14); border: 1px solid rgba(146, 196, 123, .35); color: var(--green-l); flex: none; }
.checklist .ic { width: 15px; height: 15px; }
.about-visual { position: relative; }
.about-frame { position: relative; aspect-ratio: 5 / 4; overflow: hidden; display: grid; place-items: center; padding: 0; }
.about-frame img { width: 100%; height: 100%; object-fit: cover; }
.about-frame .about-logo { width: 62%; height: auto; object-fit: contain; filter: drop-shadow(0 20px 50px rgba(1, 148, 186, .35)); animation: bob 8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px); } }
.frame-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(400px circle at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, .1), transparent 50%); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 14px; }
.stat { padding: 20px 22px; border-radius: 18px; }
.stat strong { display: block; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 2.6rem; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat small { color: var(--muted); font-size: .85rem; }

/* ---------- services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service-card { position: relative; padding: 30px 28px; overflow: hidden; transform-style: preserve-3d; }
.service-card:hover { border-color: rgba(60, 198, 234, .35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 30px 70px -30px rgba(1, 148, 186, .55); }
.card-glow { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(380px circle at var(--x, 50%) var(--y, 50%), rgba(60, 198, 234, .14), rgba(146, 196, 123, .06) 40%, transparent 65%); border-radius: inherit; }
.service-card:hover .card-glow, .contact-form:hover .card-glow { opacity: 1; }
.service-img { margin: -30px -28px 22px; aspect-ratio: 16 / 9; overflow: hidden; }
.service-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.service-card:hover .service-img img { transform: scale(1.05); }
.service-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, rgba(1, 148, 186, .5), rgba(146, 196, 123, .35)); border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 10px 30px -10px rgba(1, 148, 186, .6); margin-bottom: 22px; transition: transform .6s var(--ease); }
.service-icon .ic { width: 26px; height: 26px; }
.service-icon.sm { width: 48px; height: 48px; margin: 0; flex: none; }
.service-card:hover .service-icon { transform: translateZ(30px) rotate(-6deg); }
.service-num { position: absolute; top: 24px; inset-inline-end: 26px; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 2.4rem; color: rgba(255, 255, 255, .06); line-height: 1; }
.service-card h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 10px; }
.service-card p { color: var(--muted); font-size: .95rem; }
.service-card ul { list-style: none; padding: 16px 0 0; margin: 4px 0 0; border-top: 1px solid var(--line); display: grid; gap: 7px; }
.service-card li { font-size: .88rem; color: #c7d3df; display: flex; gap: 10px; align-items: center; }
.service-card li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--grad); flex: none; }

.minor-service { display: flex; align-items: center; gap: 20px; padding: 20px 26px; margin-top: 20px; border-style: dashed; border-color: rgba(146, 196, 123, .3); }
.minor-service > div:nth-child(2) { flex: 1; }
.minor-service small { color: var(--green); font-size: .75rem; letter-spacing: .15em; text-transform: uppercase; }
.rtl .minor-service small { letter-spacing: 0; }
.minor-service h4 { font-size: 1.1rem; margin: 2px 0 4px; }
.minor-service p { margin: 0; color: var(--muted); font-size: .92rem; }

.process { margin-top: clamp(80px, 10vw, 120px); }
.process-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; position: relative; }
.process-steps::before { content: ''; position: absolute; top: 44px; inset-inline: 8%; height: 1px; background: linear-gradient(90deg, transparent, var(--blue), var(--green), transparent); opacity: .5; }
.process-steps li { padding: 26px 24px; border-radius: 18px; position: relative; }
.step-n { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--ink-2); border: 1px solid rgba(60, 198, 234, .45); font-size: .8rem; font-weight: 600; color: var(--blue-l); margin-bottom: 16px; box-shadow: 0 0 0 6px rgba(6, 9, 18, .9); }
.process-steps strong { display: block; font-size: 1.05rem; margin-bottom: 6px; }
.process-steps p { margin: 0; color: var(--muted); font-size: .9rem; }

/* ---------- portfolio ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px; border-radius: 999px; }
.filters button { padding: 8px 16px; border-radius: 999px; font-size: .85rem; color: var(--muted); transition: .35s var(--ease); }
.filters button:hover { color: #fff; }
.filters button.active { background: var(--grad-btn); color: #04131b; font-weight: 600; }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.work-card { position: relative; display: block; width: 100%; text-align: start; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3.4; border: 1px solid var(--line); background: var(--ink-2); }
.work-card.featured { grid-column: span 2; aspect-ratio: auto; min-height: 100%; }
.work-card.in:hover { transform: translateY(-6px); border-color: rgba(146, 196, 123, .35); box-shadow: 0 30px 60px -30px rgba(1, 148, 186, .6); }
.work-card.in.fade { opacity: 0; transform: scale(.94); filter: blur(4px); }
.work-card.hide { display: none; }
.work-media { position: absolute; inset: 0; }
.work-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.work-card:hover .work-media img { transform: scale(1.07); }
.work-placeholder { width: 100%; height: 100%; display: grid; place-items: center; transition: transform 1.1s var(--ease); }
.work-card:hover .work-placeholder { transform: scale(1.06); }
.work-placeholder .ic { width: 70px; height: 70px; color: rgba(255, 255, 255, .55); stroke-width: 1.1; }
.ph-0 { background: radial-gradient(circle at 30% 20%, rgba(60, 198, 234, .55), transparent 60%), radial-gradient(circle at 80% 90%, rgba(146, 196, 123, .45), transparent 55%), #0b1424; }
.ph-1 { background: radial-gradient(circle at 70% 30%, rgba(146, 196, 123, .55), transparent 55%), radial-gradient(circle at 20% 90%, rgba(1, 148, 186, .5), transparent 60%), #0c1620; }
.ph-2 { background: linear-gradient(140deg, rgba(1, 148, 186, .55), rgba(10, 18, 34, .2) 60%), radial-gradient(circle at 90% 90%, rgba(184, 230, 160, .4), transparent 50%), #0a1220; }
.ph-3 { background: conic-gradient(from 210deg at 60% 40%, rgba(1, 148, 186, .5), rgba(146, 196, 123, .45), rgba(1, 148, 186, .1), rgba(1, 148, 186, .5)), #0b1220; }
.work-info { position: absolute; inset-inline: 12px; bottom: 12px; padding: 14px 16px; border-radius: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; transform: translateY(6px); transition: transform .6s var(--ease); background: rgba(8, 12, 22, .45); }
.work-card:hover .work-info { transform: none; }
.work-info h3 { font-size: 1.02rem; font-weight: 600; }
.work-info small { color: var(--muted); font-size: .8rem; }
.work-arrow { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); flex: none; transition: background .4s, transform .6s var(--ease), color .4s; }
.work-card:hover .work-arrow { background: var(--grad-btn); color: #04131b; transform: rotate(45deg); }
.rtl .work-arrow .ic { transform: scaleX(-1); }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; visibility: hidden; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(3, 6, 14, .7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity .5s var(--ease); }
.lb-panel { position: relative; width: min(980px, 100%); max-height: calc(100vh - 40px); overflow: auto; display: grid; grid-template-columns: 1.5fr 1fr; padding: 0; opacity: 0; transform: translateY(30px) scale(.97); transition: .6s var(--ease); background: rgba(14, 20, 36, .75); }
.lightbox.open { visibility: visible; }
.lightbox.open .lb-backdrop { opacity: 1; }
.lightbox.open .lb-panel { opacity: 1; transform: none; }
.lb-media { min-height: 320px; background: var(--ink-2); display: grid; gap: 4px; }
.lb-media img { width: 100%; height: 100%; object-fit: cover; }
.lb-media .work-placeholder { min-height: 360px; }
.lb-body { padding: 34px 30px; }
.lb-title { font-size: 1.6rem; margin-bottom: 6px; }
.lb-meta { color: var(--green); display: block; margin-bottom: 16px; }
.lb-desc { color: #c3cfdc; white-space: pre-line; }
.lb-close { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(6, 9, 18, .6); border: 1px solid var(--line); transition: transform .4s var(--ease); }
.lb-close:hover { transform: rotate(90deg); }

/* ---------- CTA ---------- */
.cta-band { padding: 0 0 20px; }
.cta-inner { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: clamp(34px, 5vw, 56px); flex-wrap: wrap; }
.cta-inner::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(600px circle at 0% 0%, rgba(1, 148, 186, .35), transparent 60%), radial-gradient(500px circle at 100% 100%, rgba(146, 196, 123, .28), transparent 60%); }
.cta-inner h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); margin-bottom: 8px; }
.cta-inner p { margin: 0; color: #c3cfdc; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 80px); align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 30px 0; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 16px; align-items: center; }
.contact-list small { display: block; color: var(--muted); font-size: .8rem; }
.contact-list a:hover { color: var(--blue-l); }
.ci { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: var(--blue-l); }
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); transition: .4s var(--ease); }
.socials a:hover { background: var(--grad-btn); color: #04131b; transform: translateY(-3px); border-color: transparent; }

.contact-form { position: relative; padding: clamp(24px, 4vw, 40px); display: grid; gap: 16px; overflow: hidden; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { position: relative; display: block; }
.field input, .field textarea, .field select {
  width: 100%; padding: 24px 16px 10px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(4, 8, 18, .45); color: var(--text); font: inherit; font-size: .95rem; outline: none;
  transition: border-color .3s, box-shadow .3s, background .3s; resize: vertical;
}
.field select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.field select option { background: #0b1120; }
.field > span { position: absolute; top: 17px; inset-inline-start: 17px; color: var(--muted); font-size: .95rem; pointer-events: none; transition: .3s var(--ease); transform-origin: left top; }
.rtl .field > span { transform-origin: right top; }
.field input:focus ~ span, .field input:not(:placeholder-shown) ~ span,
.field textarea:focus ~ span, .field textarea:not(:placeholder-shown) ~ span,
.field.select > span { top: 7px; font-size: .72rem; color: var(--green); letter-spacing: .04em; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: rgba(60, 198, 234, .6); box-shadow: 0 0 0 4px rgba(1, 148, 186, .15); background: rgba(4, 8, 18, .6); }
.field.select::after { content: ''; position: absolute; inset-inline-end: 18px; top: 50%; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: translateY(-30%) rotate(45deg); pointer-events: none; }
.field.invalid input, .field.invalid textarea { border-color: #ff7a7a; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; }
.form-status { margin: 0; min-height: 1.4em; font-size: .9rem; text-align: center; }
.form-status.ok { color: var(--green-l); }
.form-status.err { color: #ff9b9b; }
.contact-form button[disabled] { opacity: .7; pointer-events: none; }

/* ---------- footer ---------- */
.site-footer { position: relative; margin-top: clamp(60px, 8vw, 100px); border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 50%); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); overflow: hidden; }
.footer-glow { position: absolute; top: -1px; left: 10%; right: 10%; height: 1px; background: linear-gradient(90deg, transparent, var(--blue-l), var(--green), transparent); }
.footer-glow::after { content: ''; position: absolute; left: 20%; right: 20%; top: 0; height: 120px; background: radial-gradient(ellipse at top, rgba(1, 148, 186, .18), transparent 70%); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr 1.3fr; gap: 40px; padding: 70px 0 50px; position: relative; }
.footer-brand img { height: 36px; width: auto; margin-bottom: 18px; }
.footer-brand p { color: var(--muted); max-width: 320px; font-size: .92rem; }
.site-footer h4 { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--green); margin-bottom: 18px; font-weight: 600; }
.rtl .site-footer h4 { letter-spacing: 0; font-size: .95rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer ul a { color: #b9c6d4; font-size: .92rem; transition: color .3s, padding .3s var(--ease); }
.site-footer ul a:hover { color: #fff; padding-inline-start: 4px; }
.footer-contact li { display: flex; gap: 10px; align-items: center; color: #b9c6d4; font-size: .92rem; }
.footer-contact .ic { color: var(--blue-l); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 22px 0 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.to-top { display: inline-flex; gap: 8px; align-items: center; transition: color .3s; }
.to-top:hover { color: var(--green-l); }

.wa-float { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 40; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #25d366, var(--green-d)); color: #fff; box-shadow: 0 14px 30px -10px rgba(37, 211, 102, .6); transition: transform .4s var(--ease); }
.wa-float .ic { width: 26px; height: 26px; }
.wa-float:hover { transform: scale(1.08) translateY(-3px); }
.wa-float::before { content: ''; position: absolute; inset: 0; border-radius: inherit; border: 2px solid #25d366; animation: ping 2.6s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.6); opacity: 0; } }

/* ---------- inner pages ---------- */
.page-hero { min-height: 62vh; min-height: 62svh; padding: 150px 0 80px; }
.page-hero .hero-content { max-width: 860px; }
.crumbs { display: flex; gap: 10px; align-items: center; font-size: .82rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a:hover { color: var(--blue-l); }
.crumbs span:last-child { color: var(--text); }
.page-title { font-size: clamp(2.3rem, 6vw, 4.6rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.05;
  background: linear-gradient(100deg, #fff 10%, #dff4ff 45%, var(--blue-l) 70%, var(--green-l) 95%); -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: transform .9s var(--ease) var(--d), opacity .9s var(--ease) var(--d), filter .9s var(--ease) var(--d); }
.rtl .page-title { letter-spacing: 0; font-weight: 800; line-height: 1.3; }
.page-sub { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.2rem); max-width: 620px; margin: 18px auto 0; }
.page-hero .kicker::after { content: ''; width: 28px; height: 1.5px; background: var(--grad); }

.card-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--blue-l); font-weight: 600; font-size: .9rem; transition: gap .4s var(--ease), color .3s; }
.card-link:hover { gap: 12px; color: var(--green-l); }
.rtl .card-link .ic { transform: scaleX(-1); }
.more-btn { margin-top: 30px; }

.stats-band { padding: 0 0 20px; }
.stats.wide { grid-template-columns: repeat(4, 1fr); margin-top: 0; }

.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.value-card { position: relative; overflow: hidden; padding: 32px 28px; }
.value-card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.value-card p { color: var(--muted); margin: 0; }
.value-card:hover .card-glow { opacity: 1; }

.services-detail .svc-row { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: center; margin-bottom: clamp(70px, 9vw, 120px); }
.svc-row.flip .svc-media { order: 2; }
.svc-frame { position: relative; overflow: hidden; aspect-ratio: 3 / 2; padding: 0; }
.svc-frame img, .svc-frame .work-placeholder { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.svc-frame:hover img { transform: scale(1.04); }
.svc-top { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.svc-top .service-icon { margin: 0; }
.svc-num { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 3.4rem; line-height: 1; color: rgba(255, 255, 255, .08); }
.svc-points { list-style: none; padding: 0; margin: 6px 0 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.svc-points li { display: flex; align-items: center; gap: 10px; color: #c7d3df; font-size: .95rem; }
.svc-points li > span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(146, 196, 123, .14); border: 1px solid rgba(146, 196, 123, .35); color: var(--green-l); }
.svc-points .ic { width: 13px; height: 13px; }
.minor-img { width: 120px; height: 84px; object-fit: cover; border-radius: 14px; flex: none; }

.filters-wrap { display: flex; justify-content: center; margin-bottom: 40px; }

.wa-card { display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin-bottom: 24px; border-radius: 18px; transition: transform .5s var(--ease), border-color .4s; }
.wa-card:hover { transform: translateY(-3px); border-color: rgba(37, 211, 102, .5); }
.wa-card > span:nth-child(2) { flex: 1; display: grid; }
.wa-card small { color: var(--muted); }
.wa-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, #25d366, var(--green-d)); color: #fff; }
.rtl .wa-card > .ic { transform: scaleX(-1); }

/* ---------- parallax ---------- */
.section { isolation: isolate; }
.service-img { position: relative; }
/* images sit taller than their frame and slide inside it while scrolling (--pp = -1..1, set by JS) */
[data-px] { --pp: 0; }
[data-px] .px-img { position: absolute; left: 0; top: -20%; width: 100%; height: 140%; max-width: none; object-fit: cover; translate: 0 calc(var(--pp) * -14%); will-change: translate; }

.deco-layer { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.deco { position: absolute; display: block; will-change: translate; }
.deco-ring { width: 360px; height: 360px; border-radius: 50%; border: 1px solid rgba(60, 198, 234, .2); box-shadow: inset 0 0 80px rgba(1, 148, 186, .1), 0 0 60px rgba(1, 148, 186, .06); animation: orbit 46s linear infinite; }
.deco-ring::after { content: ''; position: absolute; top: -4px; left: calc(50% - 4px); width: 8px; height: 8px; border-radius: 50%; background: var(--green-l); box-shadow: 0 0 14px var(--green); }
.deco-ring.sm { width: 220px; height: 220px; border-color: rgba(146, 196, 123, .22); animation-direction: reverse; animation-duration: 34s; }
.deco-ring.sm::after { background: var(--blue-l); box-shadow: 0 0 14px var(--blue); }
.deco-disc { width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .12), rgba(255, 255, 255, .02) 60%); border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); animation: bob 9s ease-in-out infinite; }
.deco-disc.lg { width: 260px; height: 260px; background: radial-gradient(circle at 30% 30%, rgba(60, 198, 234, .2), rgba(1, 148, 186, .03) 62%); }
.deco-dots { width: 180px; height: 180px; background-image: radial-gradient(rgba(146, 196, 123, .45) 1.3px, transparent 1.6px); background-size: 18px 18px;
  -webkit-mask: radial-gradient(circle, #000 35%, transparent 70%); mask: radial-gradient(circle, #000 35%, transparent 70%); }
@keyframes orbit { to { transform: rotate(360deg); } }

.px-banner { position: relative; overflow: hidden; isolation: isolate; min-height: 72vh; display: grid; place-items: center; text-align: center; padding: 120px 0; border-block: 1px solid var(--line); }
.px-banner .px-img { top: -40%; height: 180%; translate: 0 calc(var(--pp) * -22%); z-index: -2; }
.px-overlay { position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse at center, rgba(6, 9, 18, .4), rgba(6, 9, 18, .86) 75%), linear-gradient(180deg, var(--ink) 0%, transparent 20%, transparent 80%, var(--ink) 100%); }
.px-content { max-width: 820px; }
.px-banner .kicker::after { content: ''; width: 28px; height: 1.5px; background: var(--grad); }
.banner-title { font-family: var(--display); font-style: italic; font-weight: 900; text-transform: uppercase; font-size: clamp(2.6rem, 7vw, 5.6rem); line-height: .95; margin: 6px 0 20px; padding: 0 .06em;
  background: linear-gradient(100deg, #fff 10%, var(--blue-l) 55%, var(--green-l) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rtl .banner-title { font-family: var(--font); font-style: normal; text-transform: none; font-weight: 800; line-height: 1.3; }
.px-content p { color: #d5dfea; font-size: 1.1rem; max-width: 620px; margin: 0 auto 28px; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .main-nav { display: none; }
  .menu-btn { display: grid; }
  .services-grid, .work-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .process-steps::before { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats.wide { grid-template-columns: repeat(2, 1fr); }
  .values-grid { grid-template-columns: 1fr; }
  .services-detail .svc-row { grid-template-columns: 1fr; }
  .svc-row.flip .svc-media { order: 0; }
}
@media (max-width: 760px) {
  :root { --radius: 18px; }
  .container { width: calc(100% - 32px); }
  .header-actions .btn span { display: none; }
  .header-actions .btn { --pad: 9px; width: 38px; height: 38px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .services-grid, .work-grid, .process-steps { grid-template-columns: 1fr; }
  .work-card.featured { grid-column: auto; aspect-ratio: 4 / 3.4; }
  .field-row { grid-template-columns: 1fr; }
  .minor-service { flex-direction: column; align-items: flex-start; }
  .lb-panel { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .swap { white-space: normal; }
  .svc-points { grid-template-columns: 1fr; }
  .minor-img { width: 100%; height: 160px; }
  .page-hero { padding: 120px 0 60px; }
  .section { padding: 72px 0; }
  .hero-title { font-size: 25vw; } /* JS shrinks it if a chosen font is wider than the screen */
  .hero-cta { flex-direction: column; align-items: stretch; width: min(100%, 320px); }
  .hero-cta .btn { width: 100%; }
  .card-link, .to-top { min-height: 44px; padding: 10px 0; }
  .section-head.split > .btn { width: 100%; }
  .stat { padding: 16px; }
  .stat strong { font-size: 2.2rem; }
  .lb-media { min-height: 0; }
  .lb-media .work-placeholder { min-height: 220px; }
  .lb-body { padding: 22px 20px 26px; }
  .lb-title { font-size: 1.3rem; }
  .cta-actions, .cta-actions .btn { width: 100%; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .contact-form { padding: 20px; }
}
@media (max-width: 380px) {
  .header-inner { padding: 8px 8px 8px 14px; gap: 8px; }
  .rtl .header-inner { padding: 8px 14px 8px 8px; }
  .brand img { height: 26px; }
  .header-actions { gap: 6px; }
  .lang-btn, .header-actions .btn, .menu-btn { width: 36px; height: 36px; }
}
@media (max-width: 760px) {
  .deco-ring { width: 220px; height: 220px; }
  .deco-disc.lg { width: 170px; height: 170px; }
  .px-banner { min-height: 60vh; padding: 90px 0; }
  .hero-swap { letter-spacing: .18em; }
  .scroll-cue { display: none; }
}

/* ---------- phones & tablets: same look, far less GPU work ----------
   backdrop-filter, filter: blur() and permanent animations are the expensive parts on mobile chips. */
@media (max-width: 900px), (pointer: coarse) {
  .glass, .btn-ghost, .site-footer { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .glass { background: linear-gradient(135deg, rgba(22, 30, 50, .82), rgba(12, 18, 32, .78)); }
  .site-header:not(.scrolled) .header-inner { background: rgba(10, 15, 28, .55); }
  .header-inner { background: rgba(10, 15, 28, .9); }
  .work-info { background: rgba(8, 12, 22, .82); }
  .mobile-nav { background: rgba(8, 12, 24, .97); }
  .btn-ghost { background: rgba(255, 255, 255, .06); }
  /* entrance animations: fade + slide only (blur on dozens of elements is what made scrolling stutter) */
  .reveal { filter: none !important; }
  @keyframes heroIn { from { opacity: 0; translate: 0 30px; } }
  .swap-b .ch, .hero.is-alt .swap-a .ch { filter: none; }
  .hero-word { filter: none; }
  .grain { display: none; }
  .orb { animation: none; }
  .deco-ring, .deco-disc, .about-frame .about-logo { animation: none; }
  [data-px] .px-img, .deco, .orb { will-change: auto; }
  .wa-float::before { animation-iteration-count: 3; }
  .card-link, .to-top { min-height: 44px; padding: 10px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
}
