/* ============================================================
   HEPIX — Main Stylesheet
   ============================================================ */

@import url('https://api.fontshare.com/v2/css?f[]=satoshi@300,400,500,700,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;900&display=swap');

/* ── Variables ─────────────────────────────────────────── */
:root {
  --red:    #ff2a2a;
  --purple: #521cea;
  --grad:   linear-gradient(135deg, #ff2a2a 0%, #9d22aa 50%, #521cea 100%);
  --grad-r: linear-gradient(135deg, #521cea 0%, #9d22aa 50%, #ff2a2a 100%);

  /* Dark theme (default) */
  --bg:          #080808;
  --bg2:         #0f0f0f;
  --bg3:         #161616;
  --text:        #ffffff;
  --text2:       #888888;
  --text3:       #444444;
  --border:      rgba(255,255,255,0.07);
  --glass:       rgba(255,255,255,0.03);
  --glass-b:     rgba(255,255,255,0.08);
  --card-bg:     rgba(255,255,255,0.02);

  --font-body: 'Satoshi', 'Tajawal', sans-serif;
  --ease:     cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg:      #f8f8f8;
  --bg2:     #f0f0f0;
  --bg3:     #e8e8e8;
  --text:    #0a0a0a;
  --text2:   #555555;
  --text3:   #aaaaaa;
  --border:  rgba(0,0,0,0.08);
  --glass:   rgba(0,0,0,0.02);
  --glass-b: rgba(0,0,0,0.06);
  --card-bg: rgba(0,0,0,0.02);
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .4s ease, color .4s ease;
}
[lang="ar"] { font-family: 'Tajawal', sans-serif; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ── Loader ────────────────────────────────────────────── */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  background: #080808;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 32px;
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
#loader.done { opacity: 0; pointer-events: none; transform: scale(1.03); }

.loader-logo {
  font-size: clamp(56px, 10vw, 120px);
  font-weight: 900; letter-spacing: -.04em;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0; transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.loader-logo.show { opacity: 1; transform: translateY(0); }

.loader-bar {
  width: 180px; height: 1px;
  background: rgba(255,255,255,0.1); position: relative; overflow: hidden;
}
.loader-fill {
  position: absolute; top: 0; left: 0; height: 100%; width: 0%;
  background: var(--grad);
  transition: width .05s linear;
}
.loader-num {
  font-size: 11px; letter-spacing: .25em; color: rgba(255,255,255,0.3);
  font-weight: 500; font-variant-numeric: tabular-nums;
}

/* ── Navigation ────────────────────────────────────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 48px;
  height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  transition: background .3s ease, border-color .3s ease,
              backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
#nav.scrolled {
  background: rgba(8,8,8,.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-color: var(--border);
}
[data-theme="light"] #nav.scrolled { background: rgba(248,248,248,.85); }

.nav-logo {
  font-size: 22px; font-weight: 900; letter-spacing: -.04em;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex; gap: 36px; list-style: none;
}
.nav-links a {
  font-size: 12px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text2);
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); }

.nav-right { display: flex; gap: 10px; align-items: center; }

.btn-pill {
  padding: 7px 18px;
  border-radius: 100px; font-size: 12px; font-weight: 700;
  letter-spacing: .05em;
  background: var(--glass); border: 1px solid var(--glass-b);
  color: var(--text2);
  transition: all .2s ease;
}
.btn-pill:hover { color: var(--text); border-color: rgba(255,42,42,.4); }

.nav-cta {
  padding: 8px 20px; border-radius: 100px;
  font-size: 12px; font-weight: 700; letter-spacing: .05em;
  background: var(--grad); color: #fff;
  transition: opacity .2s, transform .2s;
}
.nav-cta:hover { opacity: .85; transform: translateY(-1px); }

/* ── Hero ──────────────────────────────────────────────── */
#hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 120px 48px 80px;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }

.orb {
  position: absolute; border-radius: 50%;
  filter: blur(130px); pointer-events: none;
  animation: orbPulse 9s ease-in-out infinite;
}
.orb-1 { width: 700px; height: 700px; background: #ff2a2a; top: -250px; right: -150px; opacity: .22; }
.orb-2 { width: 550px; height: 550px; background: #521cea; bottom: -150px; left: -120px; opacity: .22; animation-delay: -4s; }
.orb-3 { width: 350px; height: 350px; background: #ff2a2a; top: 45%; left: 38%; opacity: .08; animation-delay: -2s; }

@keyframes orbPulse {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(25px,-25px) scale(1.06); }
  66%     { transform: translate(-15px,15px) scale(.94); }
}

#lightning-canvas {
  position: absolute; inset: 0; pointer-events: none; opacity: .35;
}

/* BTB logo watermark in hero */
.hero-btb {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: min(700px, 80vw); opacity: .06;
  pointer-events: none;
  animation: btbFloat 8s ease-in-out infinite;
}
@keyframes btbFloat {
  0%,100% { transform: translate(-50%,-50%) scale(1) rotate(0deg); }
  50%     { transform: translate(-50%,-52%) scale(1.02) rotate(.5deg); }
}

.hero-era {
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--text2); margin-bottom: 28px;
  display: flex; align-items: center; gap: 14px; opacity: 0;
}
.hero-era::before {
  content: ''; width: 28px; height: 1px;
  background: var(--grad); flex-shrink: 0;
}

.hero-title {
  font-size: clamp(44px, 7.5vw, 130px);
  font-weight: 900; line-height: .93; letter-spacing: -.04em;
  max-width: 1000px; margin-bottom: 52px; opacity: 0;
}
[lang="ar"] .hero-title { letter-spacing: 0; line-height: 1.1; }

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

.hero-bottom {
  display: flex; align-items: flex-end;
  justify-content: space-between; gap: 32px;
  opacity: 0;
}

.hero-stats { display: flex; gap: 48px; }
.stat-val { font-size: 32px; font-weight: 900; letter-spacing: -.03em; }
.stat-lbl { font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--text2); margin-top: 2px; }

.hero-actions { display: flex; gap: 12px; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 100px;
  background: var(--grad); color: #fff;
  font-size: 14px; font-weight: 700;
  transition: opacity .2s, transform .2s;
}
.btn-primary:hover { opacity: .85; transform: translateY(-2px); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 30px; border-radius: 100px;
  background: var(--glass); border: 1px solid var(--glass-b);
  color: var(--text); font-size: 14px; font-weight: 600;
  transition: all .2s;
}
.btn-outline:hover { border-color: rgba(255,42,42,.4); background: rgba(255,42,42,.04); }

.scroll-hint {
  position: absolute; bottom: 32px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text3); font-size: 9px; letter-spacing: .25em; text-transform: uppercase;
}
.scroll-line {
  width: 1px; height: 52px;
  background: linear-gradient(180deg, var(--red), transparent);
  animation: scrollAnim 2.2s ease-in-out infinite;
}
@keyframes scrollAnim {
  0%,100% { opacity: 0; transform: scaleY(0) translateY(-20px); }
  50%     { opacity: 1; transform: scaleY(1) translateY(0); }
}

/* ── Section Base ──────────────────────────────────────── */
section { padding: 120px 48px; }

.s-label {
  font-size: 10px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--text2); display: flex; align-items: center; gap: 14px;
  margin-bottom: 56px;
}
.s-label::before {
  content: ''; width: 24px; height: 1px;
  background: var(--grad); flex-shrink: 0;
}
[dir="rtl"] .s-label { flex-direction: row-reverse; }
[dir="rtl"] .s-label::before { background: var(--grad-r); }

.s-title {
  font-size: clamp(36px, 4.5vw, 72px);
  font-weight: 900; letter-spacing: -.03em; line-height: 1;
}

/* ── Work ──────────────────────────────────────────────── */
#work { padding-top: 0; }

.work-header {
  display: flex; align-items: flex-end;
  justify-content: space-between; margin-bottom: 56px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 320px;
  gap: 3px;
}

.project-card {
  position: relative; overflow: hidden; cursor: pointer;
  background: var(--bg3);
  transition: transform .5s var(--ease);
}
.project-card:hover { z-index: 2; transform: scale(1.01); }

/* Layout spans */
.project-card:nth-child(1) { grid-column: span 7; grid-row: span 2; }
.project-card:nth-child(2) { grid-column: span 5; }
.project-card:nth-child(3) { grid-column: span 5; }
.project-card:nth-child(4) { grid-column: span 4; }
.project-card:nth-child(5) { grid-column: span 4; }
.project-card:nth-child(6) { grid-column: span 4; }

.project-card-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease);
}
.project-card:hover .project-card-img { transform: scale(1.07); }

.project-card-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(24px, 3vw, 48px); font-weight: 900;
  letter-spacing: -.04em; color: rgba(255,255,255,.04);
  transition: transform .8s var(--ease);
}
.project-card:hover .project-card-placeholder { transform: scale(1.07); }

.project-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,8,8,.92) 0%, rgba(8,8,8,.2) 50%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 32px;
  opacity: 0; transition: opacity .4s ease;
}
.project-card:hover .project-card-overlay { opacity: 1; }

.project-cat {
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255,255,255,.5); margin-bottom: 8px;
}
.project-name {
  font-size: clamp(18px, 2vw, 26px); font-weight: 700;
  color: #fff; letter-spacing: -.02em; line-height: 1.2;
}

.project-arrow {
  position: absolute; top: 20px; right: 20px;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #fff;
  opacity: 0; transform: scale(.7) rotate(-45deg);
  transition: opacity .3s, transform .3s;
}
.project-card:hover .project-arrow { opacity: 1; transform: scale(1) rotate(0deg); }

/* ── Marquee Strip ─────────────────────────────────────── */
.marquee-strip {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  background: var(--bg);
  position: relative;
}
.marquee-strip::before,
.marquee-strip::after {
  content: '';
  position: absolute; top: 0; bottom: 0; width: 120px; z-index: 2;
  pointer-events: none;
}
.marquee-strip::before { left: 0;  background: linear-gradient(to right,  var(--bg), transparent); }
.marquee-strip::after  { right: 0; background: linear-gradient(to left,   var(--bg), transparent); }

.marquee-track {
  display: flex; align-items: center;
  width: max-content;
  animation: marqueeScroll 38s linear infinite;
}
.marquee-strip:hover .marquee-track { animation-play-state: paused; }

.marquee-item {
  font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--text3); padding: 0 28px; white-space: nowrap;
  transition: color .3s;
}
.marquee-strip:hover .marquee-item { color: var(--text2); }

.marquee-sep {
  color: rgba(255,42,42,.25); font-size: 10px; flex-shrink: 0;
}

@keyframes marqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Work hero (featured) card ─────────────────────────── */
.work-hero-card {
  position: relative; overflow: hidden; cursor: pointer;
  height: clamp(360px, 50vw, 580px);
  margin-bottom: 3px;
  background: #0d0d0d;
}
.work-hero-card:hover .work-hero-img { transform: scale(1.05); filter: brightness(.55); }

.work-hero-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease), filter .6s ease;
  filter: brightness(.7);
}

.work-hero-num {
  position: absolute; top: 32px; left: 44px;
  font-size: clamp(72px, 14vw, 220px); font-weight: 900;
  letter-spacing: -.06em; line-height: 1;
  color: rgba(255,255,255,.035); pointer-events: none;
  transition: opacity .6s, transform .6s var(--ease);
  z-index: 1; user-select: none;
}
.work-hero-card:hover .work-hero-num { opacity: 0; transform: translateX(-20px); }

.work-hero-overlay {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(to top, rgba(5,5,5,.96) 0%, rgba(5,5,5,.2) 55%, transparent 100%);
  display: flex; align-items: flex-end;
  padding: clamp(28px, 4vw, 52px) clamp(24px, 5vw, 56px);
}
.work-hero-info { max-width: 680px; }

.work-hero-title {
  font-size: clamp(28px, 4.5vw, 64px); font-weight: 900;
  letter-spacing: -.03em; line-height: 1.05; color: #fff;
  margin: 10px 0 16px;
  transition: transform .45s var(--ease);
}
.work-hero-card:hover .work-hero-title { transform: translateY(-4px); }

.work-hero-desc {
  font-size: 15px; color: rgba(255,255,255,.5); line-height: 1.65;
  margin-bottom: 22px; max-width: 520px;
  opacity: 0; transform: translateY(12px);
  transition: opacity .45s var(--ease) .05s, transform .45s var(--ease) .05s;
}
.work-hero-card:hover .work-hero-desc { opacity: 1; transform: translateY(0); }

/* Project number on grid cards */
.project-num {
  position: absolute; top: 16px; left: 20px;
  font-size: 10px; font-weight: 700; letter-spacing: .2em;
  color: rgba(255,255,255,.18); z-index: 2; pointer-events: none;
  transition: opacity .3s;
}
.project-card:hover .project-num { opacity: 0; }

/* Description excerpt in card overlay */
.project-desc {
  font-size: 12px; color: rgba(255,255,255,.45); line-height: 1.55;
  margin-top: 6px; margin-bottom: 2px;
  opacity: 0; transform: translateY(6px);
  transition: opacity .35s var(--ease) .05s, transform .35s var(--ease) .05s;
}
.project-card:hover .project-desc { opacity: 1; transform: translateY(0); }

/* Project card — case study CTA */
.project-cta {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 18px;
  padding: 9px 20px; border-radius: 100px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  text-decoration: none;
  transform: translateY(8px); opacity: 0;
  transition: all .35s var(--ease);
}
.project-cta:hover { background: var(--grad); border-color: transparent; }
.project-card:hover .project-cta { opacity: 1; transform: translateY(0); }

/* Behance badge */
.project-be-badge {
  position: absolute; top: 18px; left: 18px;
  width: 30px; height: 30px; border-radius: 6px;
  background: rgba(23,119,255,.85); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; color: #fff;
  opacity: 0; transform: scale(.7);
  transition: opacity .3s, transform .3s;
}
.project-card:hover .project-be-badge { opacity: 1; transform: scale(1); }

/* ── About ─────────────────────────────────────────────── */
#about { background: var(--bg2); }

.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px;
  align-items: start;
}

.about-big {
  font-size: clamp(26px, 3vw, 46px); font-weight: 700;
  letter-spacing: -.02em; line-height: 1.15;
}

.about-right { display: flex; flex-direction: column; gap: 36px; }

.about-body { font-size: 16px; line-height: 1.75; color: var(--text2); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  padding: 6px 16px; border-radius: 100px;
  background: var(--glass); border: 1px solid var(--glass-b);
  font-size: 12px; font-weight: 500; color: var(--text2); letter-spacing: .04em;
}

/* ── Stats ─────────────────────────────────────────────── */
.stats-row {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 3px;
  margin-top: 72px;
}
.stat-box {
  padding: 44px 36px;
  background: var(--glass); border: 1px solid var(--border);
}
.stat-box-val {
  font-size: clamp(48px, 5vw, 88px); font-weight: 900;
  letter-spacing: -.04em; line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-box-lbl { font-size: 12px; color: var(--text2); margin-top: 10px; letter-spacing: .06em; }

/* ── Services ──────────────────────────────────────────── */
.services-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 3px;
  margin-top: 56px;
}
.service-card {
  padding: 44px 38px;
  background: var(--glass); border: 1px solid var(--border);
  position: relative; overflow: hidden;
  transition: background .3s, border-color .3s;
}
.service-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--grad); transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.service-card:hover::after { transform: scaleX(1); }
.service-card:hover { background: rgba(255,42,42,.02); border-color: rgba(255,42,42,.15); }

.service-num { font-size: 10px; letter-spacing: .2em; color: var(--text3); margin-bottom: 20px; }
.service-icon { font-size: 20px; margin-bottom: 16px; background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.service-name { font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 14px; }
.service-desc { font-size: 14px; color: var(--text2); line-height: 1.65; }

/* ── Clients — Premium Logo Showcase ──────────────────── */
#clients { background: var(--bg2); }

.clients-head {
  display: flex; align-items: flex-end;
  justify-content: space-between; gap: 32px;
  margin-bottom: 0;
}
.clients-sub {
  font-size: 14px; color: var(--text3); letter-spacing: .04em;
  align-self: flex-end; padding-bottom: 6px; max-width: 300px;
  text-align: right;
}
[dir="rtl"] .clients-sub { text-align: left; }

.clients-logo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 56px;
}

.client-logo-item {
  background: var(--bg2);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 28px; min-height: 130px;
  position: relative;
  transition: background .3s;
}
.client-logo-item::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--grad); opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
  mix-blend-mode: screen;
}
.client-logo-item:hover { background: rgba(255,42,42,.03); }
.client-logo-item:hover::after { opacity: .03; }

.client-logo-link {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-decoration: none; width: 100%;
}

.client-logo-img {
  max-width: 140px; max-height: 54px;
  width: auto; height: auto; object-fit: contain;
  filter: grayscale(1) brightness(3) opacity(.25);
  transition: filter .5s ease, transform .4s var(--ease);
}
[data-theme="light"] .client-logo-img { filter: grayscale(1) brightness(.3) opacity(.25); }
.client-logo-item:hover .client-logo-img {
  filter: grayscale(0) brightness(1) opacity(1);
  transform: scale(1.08);
}
[data-theme="light"] .client-logo-item:hover .client-logo-img {
  filter: grayscale(0) brightness(1) opacity(1);
}

.client-logo-text {
  font-size: 13px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text3); text-align: center;
  line-height: 1.3;
  transition: color .3s;
}
.client-logo-item:hover .client-logo-text { color: var(--text); }

/* When logo image exists, show text only on hover (acts as caption) */
.client-logo-item:has(.client-logo-img) .client-logo-text {
  font-size: 10px; letter-spacing: .15em;
  opacity: 0; transform: translateY(4px);
  transition: opacity .3s, transform .3s, color .3s;
}
.client-logo-item:has(.client-logo-img):hover .client-logo-text {
  opacity: 1; transform: translateY(0); color: var(--text2);
}

/* ── Contact — Premium Split Layout ───────────────────── */
#contact {
  position: relative; overflow: hidden;
  padding-bottom: 80px;
}
.contact-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 60%, rgba(82,28,234,.1) 0%, transparent 65%);
  pointer-events: none;
}

.contact-upper {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: start;
  margin-bottom: 80px;
}

/* Left column */
.contact-info-col { display: flex; flex-direction: column; gap: 0; }

.contact-heading {
  font-size: clamp(44px, 7vw, 110px); font-weight: 900;
  letter-spacing: -.04em; line-height: .9;
  margin-bottom: 36px;
}

.contact-email-big {
  display: block; font-size: clamp(18px, 2.2vw, 30px);
  font-weight: 700; letter-spacing: -.01em;
  color: var(--text2);
  border-bottom: 1px solid var(--border); padding-bottom: 16px;
  margin-bottom: 32px; text-decoration: none;
  transition: color .2s, border-color .2s;
}
.contact-email-big:hover { color: var(--text); border-color: var(--red); }

.contact-ctas { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

.contact-phone-display {
  font-size: 14px; color: var(--text3); letter-spacing: .04em;
  font-weight: 600;
}

/* Right column — social links */
.contact-social-col { padding-top: 4px; }

.social-links { display: flex; flex-direction: column; }

.social-link {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  position: relative; overflow: hidden;
  transition: color .25s;
}
.social-link::before {
  content: '';
  position: absolute; bottom: -1px; left: 0;
  width: 100%; height: 1px;
  background: var(--grad);
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
.social-link:hover::before { transform: scaleX(1); }

.social-icon-wrap {
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--glass); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--text3);
  transition: background .25s, border-color .25s, color .25s;
}
.social-link:hover .social-icon-wrap {
  background: rgba(255,42,42,.08);
  border-color: rgba(255,42,42,.25);
  color: var(--red);
}

.social-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.social-name { font-size: 16px; font-weight: 700; letter-spacing: -.01em; line-height: 1; }
.social-handle { font-size: 11px; color: var(--text3); letter-spacing: .06em; }

.social-arr {
  font-size: 16px; color: var(--text3);
  transform: translateX(-6px) translateY(2px);
  transition: transform .25s, color .25s;
}
.social-link:hover .social-arr { transform: translateX(0) translateY(0); color: var(--text); }

/* Contact form section */
.contact-form-wrap {
  max-width: 640px; margin: 0 auto;
}

.contact-form {
  display: flex; flex-direction: column; gap: 14px;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%; padding: 15px 20px; border-radius: 12px;
  background: var(--glass); border: 1px solid var(--glass-b);
  color: var(--text); font-family: inherit; font-size: 14px;
  transition: border-color .2s; outline: none;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { border-color: rgba(255,42,42,.5); }
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form select option { background: #111; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-submit-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-msg { font-size: 13px; padding: 12px 16px; border-radius: 8px; }
.form-msg.ok  { background: rgba(0,200,80,.1);  color: #00c850; border: 1px solid rgba(0,200,80,.2); }
.form-msg.err { background: rgba(255,42,42,.1); color: var(--red); border: 1px solid rgba(255,42,42,.2); }

/* ── Store / Packages ──────────────────────────────────── */
#store { background: var(--bg2); }

.packages-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 3px;
  margin-top: 56px;
}

.pkg-card {
  position: relative; padding: 44px 38px;
  background: var(--glass); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 0;
  transition: border-color .3s, background .3s;
}
.pkg-card:hover { border-color: rgba(255,42,42,.25); background: rgba(255,42,42,.02); }
.pkg-featured {
  border-color: rgba(255,42,42,.3);
  background: linear-gradient(160deg, rgba(255,42,42,.06) 0%, rgba(82,28,234,.06) 100%);
}
.pkg-featured::before {
  content: ''; position: absolute; inset: 0;
  background: var(--grad); opacity: .04; pointer-events: none;
}

.pkg-badge {
  display: inline-block; padding: 4px 14px; border-radius: 100px; margin-bottom: 20px;
  background: var(--grad); color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  align-self: flex-start;
}
.pkg-name {
  font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 10px;
}
.pkg-desc { font-size: 14px; color: var(--text2); line-height: 1.6; margin-bottom: 28px; }
.pkg-price {
  font-size: clamp(38px, 4vw, 56px); font-weight: 900; letter-spacing: -.04em; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 4px;
}
.pkg-currency { font-size: 18px; font-weight: 600; opacity: .6; }
.pkg-features {
  list-style: none; margin: 28px 0 36px;
  display: flex; flex-direction: column; gap: 12px; flex: 1;
}
.pkg-features li {
  font-size: 14px; color: var(--text2); padding-left: 20px; position: relative; line-height: 1.5;
}
.pkg-features li::before {
  content: '—'; position: absolute; left: 0;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; font-weight: 700;
}
[dir="rtl"] .pkg-features li { padding-left: 0; padding-right: 20px; }
[dir="rtl"] .pkg-features li::before { left: auto; right: 0; }

.pkg-cta {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border-radius: 100px;
  font-size: 14px; font-weight: 700; text-decoration: none;
  transition: opacity .2s, transform .2s;
}
.pkg-cta:hover { opacity: .85; transform: translateY(-2px); }

.store-note {
  text-align: center; margin-top: 48px;
  font-size: 13px; color: var(--text3); line-height: 1.6; max-width: 500px;
  margin-left: auto; margin-right: auto;
}

/* ── WhatsApp Bubble ──────────────────────────────────── */
.wa-bubble {
  position: fixed; bottom: 28px; right: 28px; z-index: 500;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 32px rgba(37,211,102,.35), 0 0 0 0 rgba(37,211,102,.4);
  text-decoration: none;
  animation: waPulse 3s ease-in-out infinite;
  transition: transform .2s var(--ease), box-shadow .2s;
}
.wa-bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(37,211,102,.5), 0 0 0 8px rgba(37,211,102,.15);
  animation: none;
}
@keyframes waPulse {
  0%,100% { box-shadow: 0 8px 32px rgba(37,211,102,.35), 0 0 0 0 rgba(37,211,102,.3); }
  50%      { box-shadow: 0 8px 32px rgba(37,211,102,.35), 0 0 0 10px rgba(37,211,102,0); }
}

.wa-bubble-tooltip {
  position: absolute; right: 66px; top: 50%; transform: translateY(-50%);
  background: #0d0d0d; border: 1px solid var(--border);
  color: var(--text); font-size: 12px; font-weight: 600; white-space: nowrap;
  padding: 7px 14px; border-radius: 8px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  transform: translateY(-50%) translateX(6px);
}
.wa-bubble:hover .wa-bubble-tooltip { opacity: 1; transform: translateY(-50%) translateX(0); }
[dir="rtl"] .wa-bubble { right: auto; left: 28px; }
[dir="rtl"] .wa-bubble-tooltip { right: auto; left: 66px; }

/* ── Footer ────────────────────────────────────────────── */
footer {
  padding: 36px 48px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.footer-logo { font-size: 18px; font-weight: 900; letter-spacing: -.04em; background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.footer-copy { font-size: 12px; color: var(--text3); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 12px; color: var(--text3); letter-spacing: .04em; transition: color .2s; }
.footer-links a:hover { color: var(--text); }

/* ── Reveal animation ──────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(44px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }
.reveal-d3 { transition-delay: .3s; }

/* ── RTL ────────────────────────────────────────────────── */
[dir="rtl"] .hero-era::before { background: var(--grad-r); }
[dir="rtl"] .hero-bottom { flex-direction: row-reverse; }
[dir="rtl"] .work-header { flex-direction: row-reverse; }
[dir="rtl"] .about-grid { direction: rtl; }
[dir="rtl"] .footer-links { flex-direction: row-reverse; }

/* ── Mobile ────────────────────────────────────────────── */
@media (max-width: 900px) {
  #nav { padding: 0 24px; }
  .nav-links { display: none; }
  section { padding: 80px 24px; }
  #hero { padding: 100px 24px 64px; }

  .hero-bottom { flex-direction: column; align-items: flex-start; }
  .hero-stats  { gap: 28px; flex-wrap: wrap; }

  .work-hero-card { height: clamp(280px, 60vw, 420px); }
  .work-hero-overlay { padding: 24px; }
  .work-hero-num { font-size: 20vw; top: 20px; left: 24px; }
  .work-grid { grid-template-columns: 1fr; grid-auto-rows: 260px; }
  .project-card { grid-column: span 1 !important; grid-row: span 1 !important; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .stats-row  { grid-template-columns: repeat(2,1fr); }
  .services-grid { grid-template-columns: 1fr; }

  .clients-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .clients-sub  { text-align: left; max-width: 100%; padding-bottom: 0; }
  .clients-logo-grid { grid-template-columns: repeat(2, 1fr); }

  .contact-upper { grid-template-columns: 1fr; gap: 56px; }
  .contact-heading { font-size: clamp(44px, 12vw, 80px); }
  .form-row { grid-template-columns: 1fr; }

  .packages-grid { grid-template-columns: 1fr; }
  .wa-bubble { bottom: 20px; right: 20px; }
  [dir="rtl"] .wa-bubble { left: 20px; right: auto; }

  footer { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 480px) {
  .hero-stats { gap: 20px; }
  .stat-val { font-size: 26px; }
  .clients-logo-grid { grid-template-columns: repeat(2, 1fr); }
  .client-logo-item { padding: 28px 16px; min-height: 100px; }
  .contact-heading { font-size: clamp(40px, 14vw, 64px); }
}

/* ═══════════════════════════════════════════════════════════
   GLASSMORPHISM & CINEMATIC ENHANCEMENTS
   ═══════════════════════════════════════════════════════════ */

/* ── Extended variables ────────────────────────────────── */
:root {
  --glass-sm:  rgba(255,255,255,0.03);
  --glass-md:  rgba(255,255,255,0.06);
  --glass-lg:  rgba(255,255,255,0.10);
  --blur-sm:   blur(8px);
  --blur-md:   blur(20px);
  --blur-lg:   blur(40px);
  --glow-red:  0 0 40px rgba(255,42,42,0.25), 0 0 80px rgba(255,42,42,0.08);
  --glow-prp:  0 0 40px rgba(82,28,234,0.25), 0 0 80px rgba(82,28,234,0.08);
  --glow-dual: 0 0 60px rgba(255,42,42,0.15), 0 0 120px rgba(82,28,234,0.12);
  --shadow-deep: 0 32px 80px rgba(0,0,0,0.6), 0 8px 24px rgba(0,0,0,0.4);
  --inset-glow: inset 0 1px 0 rgba(255,255,255,0.08), inset 0 -1px 0 rgba(0,0,0,0.2);
}

/* ── Scroll progress bar ───────────────────────────────── */
#scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 10000;
  height: 2px; width: 0%;
  background: var(--grad);
  transition: width .05s linear;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(255,42,42,0.6);
}

/* ── Enhanced nav scrolled ─────────────────────────────── */
#nav.scrolled {
  background: rgba(8,8,8,.9);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border-color: rgba(255,255,255,0.07);
  box-shadow: 0 1px 0 rgba(255,42,42,0.12), 0 4px 32px rgba(0,0,0,0.4);
}
[data-theme="light"] #nav.scrolled {
  background: rgba(248,248,248,.9);
  box-shadow: 0 1px 0 rgba(0,0,0,0.08), 0 4px 24px rgba(0,0,0,0.1);
}

/* ── Hero media modes ──────────────────────────────────── */
.hero-bg-img,
.hero-bg-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.hero-bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8,8,8,.55) 0%,
    rgba(8,8,8,.3) 40%,
    rgba(8,8,8,.85) 100%
  );
  pointer-events: none;
}

/* ── Hero ambient glow pulse ───────────────────────────── */
#hero::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 65% 30%, rgba(255,42,42,.09) 0%, transparent 55%),
              radial-gradient(ellipse at 25% 75%, rgba(82,28,234,.09) 0%, transparent 50%);
  animation: ambientShift 14s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes ambientShift {
  0%   { opacity: 0.6; transform: scale(1)    rotate(0deg); }
  50%  { opacity: 1;   transform: scale(1.08) rotate(1deg); }
  100% { opacity: 0.7; transform: scale(0.97) rotate(-1deg); }
}

/* ── Button shimmer / glow ─────────────────────────────── */
.btn-primary {
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute; top: -50%; left: -75%;
  width: 50%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  transform: skewX(-20deg);
  transition: left .55s ease;
  pointer-events: none;
}
.btn-primary:hover::after { left: 125%; }
.btn-primary:hover {
  box-shadow: var(--glow-red);
  transform: translateY(-2px);
}

.btn-outline:hover {
  box-shadow: 0 0 24px rgba(255,42,42,0.18);
}

/* ── Service cards — glassmorphism ─────────────────────── */
.service-card {
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  box-shadow: var(--inset-glow);
}
.service-card:hover {
  background: rgba(255,42,42,.04);
  border-color: rgba(255,42,42,.2);
  box-shadow: var(--inset-glow), 0 8px 40px rgba(255,42,42,.08);
  transform: translateY(-3px);
  transition: background .3s, border-color .3s, box-shadow .3s, transform .35s var(--ease);
}

/* ── Stat boxes — glass ────────────────────────────────── */
.stat-box {
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  box-shadow: var(--inset-glow);
  transition: background .3s, box-shadow .3s, transform .35s var(--ease);
  position: relative; overflow: hidden;
}
.stat-box::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--grad); opacity: 0;
  transition: opacity .4s;
}
.stat-box:hover::before { opacity: 1; }
.stat-box:hover {
  background: rgba(255,255,255,.04);
  box-shadow: var(--inset-glow), 0 8px 40px rgba(0,0,0,.3);
  transform: translateY(-4px);
}

/* ── Project cards — tilt & glow ───────────────────────── */
.project-card {
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(calc(var(--ry, 0) * 1deg)) rotateY(calc(var(--rx, 0) * 1deg));
  will-change: transform;
  transition: transform .1s ease, z-index 0s;
}
.project-card:hover {
  z-index: 2;
  box-shadow: var(--glow-dual);
  transition: box-shadow .35s, z-index 0s;
}

.work-hero-card:hover {
  box-shadow: var(--glow-dual);
}

/* ── Contact form — premium glass ──────────────────────── */
.contact-form input,
.contact-form select,
.contact-form textarea {
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  box-shadow: var(--inset-glow);
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: rgba(255,42,42,.5);
  background: rgba(255,42,42,.03);
  box-shadow: var(--inset-glow), 0 0 0 3px rgba(255,42,42,.08), 0 0 20px rgba(255,42,42,.1);
  outline: none;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text3);
}

/* ── Work hero card — glass overlay enhance ─────────────── */
.work-hero-overlay {
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: backdrop-filter .4s;
}
.work-hero-card:hover .work-hero-overlay {
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* ── pkg-card glass ────────────────────────────────────── */
.pkg-card {
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  box-shadow: var(--inset-glow);
}
.pkg-featured {
  box-shadow: var(--inset-glow), var(--glow-dual);
}

/* ── Magnetic button target class ──────────────────────── */
.btn-mag {
  transition: transform .2s var(--ease);
  will-change: transform;
}

/* ── 3D card tilt ──────────────────────────────────────── */
.card-tilt {
  transform-style: preserve-3d;
  will-change: transform;
}

/* ── New keyframes ─────────────────────────────────────── */
@keyframes shimmer {
  0%   { left: -75%; }
  100% { left: 125%; }
}
@keyframes glowPulse {
  0%,100% { box-shadow: var(--glow-red); }
  50%     { box-shadow: var(--glow-dual); }
}

/* ── Section glow accents ──────────────────────────────── */
#services::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 500px; height: 500px;
  background: radial-gradient(ellipse at top right, rgba(82,28,234,.07) 0%, transparent 65%);
  pointer-events: none;
}
#services { position: relative; }

#contact::before {
  content: '';
  position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 400px;
  background: radial-gradient(ellipse at bottom center, rgba(255,42,42,.06) 0%, transparent 65%);
  pointer-events: none;
}

/* ── Mobile tweaks for new features ───────────────────── */
@media (max-width: 900px) {
  .project-card { transform: none !important; }
  #scroll-progress { height: 2px; }
}
