/* ============================================================
   SPARSH TECHNOLOGIES — Aurora Glass Theme
   Premium dark UI · glassmorphism · gradient accents
   ============================================================ */

/* ---------- Tokens (LIGHT premium theme — palette from Sparsh logo:
   crimson "S" · navy "P" · forest "TECHNOLOGIES" + champagne gold accent) ---------- */
:root {
  --bg-0: #f7f8fc;
  --bg-1: #ffffff;
  --bg-2: #ffffff;
  --bg-3: #eef1f8;

  --surface: rgba(255, 255, 255, 0.72);
  --surface-2: rgba(255, 255, 255, 0.92);
  --surface-hover: rgba(255, 255, 255, 1);

  --border: rgba(20, 32, 87, 0.10);
  --border-strong: rgba(20, 32, 87, 0.18);
  --border-glow: rgba(214, 40, 54, 0.45);

  --text: #0e1742;
  --text-muted: #5a6580;
  --text-dim: #8b95b0;

  --primary:   #D62836;  /* crimson — slightly deeper for contrast on white */
  --secondary: #2F44C3;  /* royal navy */
  --tertiary:  #4A9F3D;  /* forest green */
  --accent:    #C99432;  /* champagne gold */
  --warn:      #ed9510;

  --gradient:       linear-gradient(135deg, #D62836 0%, #C99432 50%, #4A9F3D 100%);
  --gradient-cool:  linear-gradient(135deg, #2F44C3 0%, #4A9F3D 100%);
  --gradient-warm:  linear-gradient(135deg, #D62836 0%, #C99432 100%);
  --gradient-royal: linear-gradient(135deg, #D62836 0%, #2F44C3 100%);
  --gradient-soft:  linear-gradient(135deg, rgba(214,40,54,0.12), rgba(201,148,50,0.12) 50%, rgba(47,68,195,0.12));
  --gradient-text:  linear-gradient(120deg, #D62836 0%, #C99432 35%, #4A9F3D 70%, #2F44C3 100%);

  --shadow-sm:        0 4px 14px rgba(20, 32, 87, 0.08);
  --shadow-md:        0 12px 40px rgba(20, 32, 87, 0.12);
  --shadow-lg:        0 30px 70px rgba(20, 32, 87, 0.18);
  --shadow-glow:      0 0 60px rgba(47, 68, 195, 0.22);
  --shadow-glow-warm: 0 0 50px rgba(214, 40, 54, 0.28);

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-xl: 40px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --container: 1240px;
  --nav-h: 78px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-0);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color .25s var(--ease); }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; }
::selection { background: rgba(0, 224, 255, 0.4); color: #fff; }

/* ---------- Background canvas ---------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(47, 68, 195, 0.10), transparent 60%),
    radial-gradient(900px 600px at 85% 10%, rgba(214, 40, 54, 0.08), transparent 60%),
    radial-gradient(900px 700px at 50% 110%, rgba(74, 159, 61, 0.10), transparent 60%),
    linear-gradient(180deg, #f7f8fc 0%, #ffffff 40%, #f7f8fc 100%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(20, 32, 87, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 32, 87, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.65), transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.65), transparent 80%);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  font-family: 'Sora', 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}
h1 { font-size: clamp(2.6rem, 6vw, 5.4rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
h4 { font-size: 1.2rem; }
p  { color: var(--text-muted); }

.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradientShift 8s ease-in-out infinite;
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ---------- Layout ---------- */
.container { width: min(var(--container), calc(100% - 48px)); margin-inline: auto; }
section { padding: clamp(72px, 10vw, 140px) 0; position: relative; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 64px; }
.section-head p { margin-top: 18px; font-size: 1.05rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  margin-bottom: 24px;
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 12px var(--primary);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .25s;
  position: relative;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 14px 40px rgba(124, 92, 255, 0.45), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 20px 50px rgba(124, 92, 255, 0.65); }
.btn-primary:hover svg { transform: translateX(4px); }
.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-hover); border-color: var(--border-glow); transform: translateY(-3px); }
.btn-ghost:hover svg { transform: translateX(4px); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .35s var(--ease), backdrop-filter .35s, border-color .35s, box-shadow .35s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(20, 32, 87, 0.08);
}
.nav .container {
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  display: inline-flex; align-items: center;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand-logo {
  height: 52px;
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(20, 32, 87, 0.10));
  transition: transform .35s var(--ease), filter .35s var(--ease);
}
.brand:hover .brand-logo {
  transform: translateY(-2px);
  filter: drop-shadow(0 8px 18px rgba(214, 40, 54, 0.22));
}
.footer .brand-logo { height: 56px; }
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--gradient);
  display: grid; place-items: center;
  font-weight: 800; color: #fff;
  box-shadow: 0 0 24px rgba(124, 92, 255, 0.45);
  position: relative; overflow: hidden;
}
.brand-mark::after {
  content: '';
  position: absolute; inset: 1px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent 50%);
}
.brand-mark span { position: relative; z-index: 1; }

.nav-links {
  display: flex; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nav-links a {
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all .3s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active {
  background: var(--gradient-cool);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 224, 255, 0.35);
}

.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-cta .btn { padding: 12px 22px; font-size: 0.88rem; }

.nav-toggle { display: none; }

/* Mobile panel hidden by default at desktop */
.mobile-panel { display: none; }

/* Mobile nav */
@media (max-width: 920px) {
  .mobile-panel { display: flex; }
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle {
    display: grid;
    width: 44px; height: 44px;
    place-items: center;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
  }
  .nav-toggle span {
    width: 18px; height: 2px;
    background: var(--text);
    position: relative;
    transition: background .25s;
  }
  .nav-toggle span::before, .nav-toggle span::after {
    content: '';
    position: absolute; left: 0;
    width: 18px; height: 2px;
    background: var(--text);
    transition: transform .35s var(--ease);
  }
  .nav-toggle span::before { top: -6px; }
  .nav-toggle span::after  { top: 6px; }
  .nav-toggle.open span { background: transparent; }
  .nav-toggle.open span::before { top: 0; transform: rotate(45deg); }
  .nav-toggle.open span::after  { top: 0; transform: rotate(-45deg); }

  .mobile-panel {
    position: fixed; inset: var(--nav-h) 0 0 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 99;
    display: flex; flex-direction: column;
    padding: 30px 24px;
    transform: translateY(-12px);
    opacity: 0; pointer-events: none;
    transition: all .35s var(--ease);
  }
  .mobile-panel.open { opacity: 1; transform: none; pointer-events: auto; }
  .mobile-panel a {
    padding: 18px 0;
    font-size: 1.4rem;
    font-family: 'Sora', sans-serif;
    border-bottom: 1px solid var(--border);
  }
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  padding-top: calc(var(--nav-h) + 60px);
  padding-bottom: 80px;
  display: flex; align-items: center;
  position: relative;
  overflow: hidden;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  animation: float 14s ease-in-out infinite;
  pointer-events: none;
}
.hero-orb.o1 { width: 520px; height: 520px; background: radial-gradient(circle, #2F44C3, transparent 70%); top: -120px; left: -160px; }
.hero-orb.o2 { width: 600px; height: 600px; background: radial-gradient(circle, #D62836, transparent 70%); bottom: -200px; right: -180px; animation-delay: -5s; opacity: 0.38; }
.hero-orb.o3 { width: 360px; height: 360px; background: radial-gradient(circle, #4A9F3D, transparent 70%); top: 30%; right: 20%; animation-delay: -9s; opacity: 0.32; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40px, -30px) scale(1.06); }
  66%      { transform: translate(-30px, 40px) scale(0.95); }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
}
.hero h1 {
  margin-top: 12px;
  margin-bottom: 28px;
}
.hero h1 .word { display: inline-block; }
.hero p.lead {
  font-size: clamp(1.05rem, 1.4vw, 1.22rem);
  max-width: 580px;
  color: var(--text-muted);
  margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.hero-stats .stat { text-align: center; }
.hero-stats .stat-num {
  font-family: 'Sora', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-stats .stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

/* Hero visual showcase */
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1.05;
  perspective: 1400px;
}
.hero-card {
  position: absolute;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  background: var(--bg-2);
  transition: transform 0.6s var(--ease);
}
.hero-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(7, 9, 26, 0.85));
}
.hero-card .label {
  position: absolute; bottom: 18px; left: 20px; right: 20px;
  z-index: 2;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  color: #fff;
}
.hero-card .label small {
  display: block;
  color: #ffd6a0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.hero-card.c1 { width: 62%; height: 70%; top: 0; right: 0; transform: rotate(3deg); animation: floatY 6s ease-in-out infinite; }
.hero-card.c2 { width: 50%; height: 48%; bottom: 8%; left: 0; transform: rotate(-4deg); animation: floatY 7s ease-in-out infinite; animation-delay: -2s; }
.hero-card.c3 { width: 38%; height: 38%; bottom: 0; right: 8%; transform: rotate(6deg); animation: floatY 8s ease-in-out infinite; animation-delay: -4s; }
@keyframes floatY {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%      { transform: translateY(-14px) rotate(var(--r, 0deg)); }
}
.hero-card.c1 { --r: 3deg; }
.hero-card.c2 { --r: -4deg; }
.hero-card.c3 { --r: 6deg; }

.hero-badge {
  position: absolute;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: var(--shadow-md);
  z-index: 3;
  font-size: 0.85rem;
  font-weight: 500;
}
.hero-badge .ico {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--gradient-cool);
  font-size: 1rem;
}
.hero-badge.b1 { top: 18%; left: -8%; animation: floatY 6s ease-in-out infinite reverse; }
.hero-badge.b2 { bottom: 22%; right: -6%; animation: floatY 7s ease-in-out infinite; animation-delay: -3s; }

.hero-scroll {
  position: absolute;
  left: 50%; bottom: 28px;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hero-scroll::after {
  content: '';
  width: 1px; height: 50px;
  background: linear-gradient(180deg, var(--primary), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 50px; }
  .hero-visual { aspect-ratio: 1 / 1; max-width: 520px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Marquee (clients) ---------- */
.clients {
  padding: 56px 0 64px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(20, 32, 87, 0.025);
}
.clients-label {
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 36px;
}
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: 56px;
  animation: scroll 60s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.client-logo {
  height: 64px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  flex-shrink: 0;
  //filter: grayscale(0.85) opacity(0.78);
  transition: filter .35s var(--ease), transform .3s var(--ease);
  cursor: default;
}
.client-logo:hover {
  filter: none;
  transform: scale(1.06);
}
/* Slightly taller for the SVG badges (which include 3 lines of text) */
.client-logo[src$=".svg"] { height: 72px; max-width: 200px; }

@keyframes scroll {
  to { transform: translateX(-50%); }
}

/* Span fallback (kept for legacy) */
.marquee-track span {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: -0.02em;
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.service-card {
  position: relative;
  padding: 32px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  transition: transform .5s var(--ease), border-color .35s, background .35s;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity .35s var(--ease);
  pointer-events: none;
}
.service-card::after {
  content: '';
  position: absolute;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: var(--gradient-soft);
  filter: blur(50px);
  top: -110px; right: -110px;
  opacity: 0;
  transition: opacity .5s var(--ease);
  pointer-events: none;
}
.service-card:hover { transform: translateY(-6px); background: var(--surface-2); }
.service-card:hover::before { opacity: 1; }
.service-card:hover::after { opacity: 1; }

.service-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--gradient-cool);
  display: grid; place-items: center;
  margin-bottom: 22px;
  position: relative;
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.35);
}
.service-icon svg { width: 26px; height: 26px; color: #fff; }
.service-card h3 { margin-bottom: 12px; }
.service-card p { font-size: 0.96rem; color: var(--text-muted); }
.service-card ul {
  margin-top: 16px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.service-card ul li {
  font-size: 0.78rem;
  padding: 5px 12px;
  background: rgba(140, 158, 220, 0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
}
@media (max-width: 880px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* ---------- Portfolio (the showcase) ---------- */
.portfolio {
  position: relative;
}
.portfolio-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 50px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.portfolio-filter {
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all .35s var(--ease);
}
.portfolio-filter:hover { color: var(--text); }
.portfolio-filter.active {
  background: var(--gradient-cool);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 224, 255, 0.35);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
}
.portfolio-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform .6s var(--ease), border-color .35s, opacity .35s;
  min-height: 360px;
  display: flex;
  align-items: flex-end;
  text-decoration: none;
}
.portfolio-card.size-lg  { grid-column: span 8; min-height: 480px; }
.portfolio-card.size-md  { grid-column: span 4; min-height: 480px; }
.portfolio-card.size-sm  { grid-column: span 4; min-height: 380px; }
.portfolio-card.size-wide{ grid-column: span 6; min-height: 380px; }

.portfolio-card.is-hidden { display: none; }

.portfolio-card .img {
  position: absolute; inset: 0;
  overflow: hidden;
}
.portfolio-card .img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease), filter .6s;
  filter: saturate(0.9) brightness(0.85);
}
.portfolio-card:hover { transform: translateY(-6px); border-color: var(--border-glow); }
.portfolio-card:hover .img img { transform: scale(1.08); filter: saturate(1.1) brightness(1); }

.portfolio-card .img::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, transparent 30%, rgba(6, 8, 26, 0.55) 65%, rgba(6, 8, 26, 0.95) 100%);
}

.portfolio-card .meta {
  position: relative;
  z-index: 2;
  padding: 28px;
  width: 100%;
  color: #fff;
}
.portfolio-card .meta h3 { color: #fff; }
.portfolio-card .tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 5px 14px;
  background: rgba(0, 224, 255, 0.15);
  border: 1px solid rgba(0, 224, 255, 0.4);
  border-radius: var(--radius-pill);
  color: var(--primary);
  margin-bottom: 14px;
}
.portfolio-card h3 {
  font-size: 1.45rem;
  margin-bottom: 8px;
}
.portfolio-card p {
  font-size: 0.92rem;
  color: rgba(236, 240, 255, 0.78);
  max-width: 460px;
}
.portfolio-card .arrow {
  position: absolute;
  top: 24px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: grid; place-items: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .4s var(--ease), background .35s;
  z-index: 2;
}
.portfolio-card .arrow svg { width: 18px; height: 18px; color: #fff; transition: transform .4s var(--ease); }
.portfolio-card:hover .arrow { background: var(--gradient); transform: rotate(-45deg); border-color: transparent; }

.portfolio-card .specs {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 16px;
}
.portfolio-card .specs span {
  font-size: 0.72rem;
  padding: 4px 10px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-pill);
  color: rgba(236, 240, 255, 0.85);
  border: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 980px) {
  .portfolio-card.size-lg, .portfolio-card.size-md, .portfolio-card.size-sm, .portfolio-card.size-wide { grid-column: span 6; min-height: 360px; }
}
@media (max-width: 640px) {
  .portfolio-card.size-lg, .portfolio-card.size-md, .portfolio-card.size-sm, .portfolio-card.size-wide { grid-column: span 12; min-height: 320px; }
}

/* ---------- Process timeline ---------- */
.process-wrap { position: relative; }
.process-line {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--border-strong) 10%, var(--border-strong) 90%, transparent);
  transform: translateX(-50%);
}
.process-line::before {
  content: '';
  position: absolute;
  left: -1px; top: 0;
  width: 4px;
  background: var(--gradient);
  height: var(--progress, 0%);
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(0, 224, 255, 0.6);
  transition: height .4s linear;
}
.process-step {
  display: grid;
  grid-template-columns: 1fr 80px 1fr;
  gap: 30px;
  align-items: center;
  margin-bottom: 60px;
  position: relative;
}
.process-step:last-child { margin-bottom: 0; }
.process-step .num {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--bg-1);
  border: 2px solid var(--border-strong);
  display: grid; place-items: center;
  font-family: 'Sora', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  position: relative;
  z-index: 2;
  transition: all .5s var(--ease);
}
.process-step.is-visible .num {
  background: var(--gradient-cool);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 30px rgba(0, 224, 255, 0.5);
}
.process-step .body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.process-step .body h4 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  font-family: 'Sora', sans-serif;
}
.process-step .body p { font-size: 0.94rem; }
.process-step:nth-child(odd) .body { grid-column: 1; text-align: right; }
.process-step:nth-child(even) .body { grid-column: 3; }
.process-step:nth-child(odd) .num { grid-column: 2; }
.process-step:nth-child(even) .num { grid-column: 2; }

@media (max-width: 720px) {
  .process-line { left: 38px; }
  .process-step { grid-template-columns: 76px 1fr; gap: 24px; }
  .process-step .num { grid-column: 1 !important; grid-row: 1; }
  .process-step .body { grid-column: 2 !important; text-align: left !important; }
}

/* ---------- Stats band ---------- */
.stats-band {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 60px 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.stats-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-soft);
  opacity: 0.4;
  pointer-events: none;
}
.stats-band .stat-num {
  font-family: 'Sora', sans-serif;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}
.stats-band .stat-label {
  margin-top: 6px;
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
@media (max-width: 720px) {
  .stats-band { grid-template-columns: repeat(2, 1fr); padding: 40px 24px; }
}

/* ---------- Testimonials ---------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.testimonial {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.testimonial .quote-mark {
  position: absolute;
  top: -16px; left: 28px;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--gradient);
  display: grid; place-items: center;
  font-family: 'Sora', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.4);
}
.testimonial p { color: var(--text); font-size: 1rem; margin-top: 16px; line-height: 1.7; }
.testimonial .who {
  margin-top: 22px;
  display: flex; align-items: center; gap: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.testimonial .avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--gradient);
  display: grid; place-items: center;
  font-weight: 700; color: #fff;
  font-family: 'Sora', sans-serif;
}
.testimonial .who-meta strong { display: block; color: var(--text); font-size: 0.95rem; }
.testimonial .who-meta span  { font-size: 0.82rem; color: var(--text-muted); }
@media (max-width: 880px) { .testimonials-grid { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, rgba(0, 224, 255, 0.08), rgba(124, 92, 255, 0.12), rgba(255, 77, 166, 0.08));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: clamp(40px, 6vw, 80px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.4), transparent 60%);
  top: -50%; left: 20%;
  filter: blur(60px);
  pointer-events: none;
}
.cta-band h2 { margin-bottom: 18px; }
.cta-band p {
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto 30px;
}
.cta-band .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer {
  padding: 80px 0 30px;
  border-top: 1px solid var(--border);
  margin-top: 60px;
  position: relative;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}
.footer h5 {
  font-family: 'Sora', sans-serif;
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 20px;
}
.footer-col p { font-size: 0.94rem; max-width: 320px; margin-top: 18px; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { color: var(--text-muted); font-size: 0.94rem; }
.footer-col ul li a:hover { color: var(--primary); }
.socials { display: flex; gap: 10px; margin-top: 24px; }
.socials a {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  transition: all .3s var(--ease);
}
.socials a:hover { background: var(--gradient-cool); border-color: transparent; transform: translateY(-3px); }
.socials a svg { width: 18px; height: 18px; }
.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px;
  font-size: 0.86rem;
  color: var(--text-dim);
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: .1s; }
.reveal.delay-2 { transition-delay: .2s; }
.reveal.delay-3 { transition-delay: .3s; }
.reveal.delay-4 { transition-delay: .4s; }

/* Word-by-word slide for hero h1 */
.word-anim { display: inline-block; opacity: 0; transform: translateY(40px); animation: wordIn .9s var(--ease) forwards; }
@keyframes wordIn {
  to { opacity: 1; transform: none; }
}

/* ---------- Cursor follower ---------- */
.cursor-glow {
  position: fixed;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 40, 54, 0.08), rgba(201, 148, 50, 0.04) 50%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: opacity .4s, width .3s, height .3s;
  filter: blur(14px);
  /* No mix-blend-mode on light theme — full-viewport compositing every frame is expensive */
}
@media (hover: none), (max-width: 920px) { .cursor-glow { display: none; } }

/* ---------- Page hero (sub-pages) ---------- */
.page-hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); margin-bottom: 18px; }
.page-hero p { max-width: 620px; margin: 0 auto; font-size: 1.05rem; }
.page-hero::before {
  content: '';
  position: absolute;
  width: 800px; height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 68, 195, 0.10), transparent 60%);
  top: -50%; left: 50%;
  transform: translateX(-50%);
  filter: blur(60px);
  pointer-events: none;
}
.crumbs {
  margin-bottom: 14px;
  font-size: 0.84rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.crumbs a { color: var(--primary); }

/* ---------- About page ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-grid img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; }
.about-pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 50px; }
.pillar {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.pillar .icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  background: var(--gradient-cool);
  display: grid; place-items: center;
  margin-bottom: 16px;
}
.pillar .icon svg { width: 22px; height: 22px; color: #fff; }
.pillar h4 { margin-bottom: 8px; font-family: 'Sora', sans-serif; }
.pillar p { font-size: 0.94rem; }
@media (max-width: 880px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-pillars { grid-template-columns: 1fr; }
}

/* ---------- Services page (detailed) ---------- */
.svc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 100px;
}
.svc-row:nth-child(even) .svc-text { order: 2; }
.svc-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
}
.svc-visual img { width: 100%; height: 100%; object-fit: cover; }
.svc-visual::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,224,255,0.12), transparent 50%, rgba(255,77,166,0.12));
}
.svc-text h2 { margin-bottom: 18px; }
.svc-text .feat-list { margin-top: 22px; display: grid; gap: 12px; }
.svc-text .feat-list li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 0.96rem;
  color: var(--text);
}
.svc-text .feat-list li::before {
  content: '';
  flex-shrink: 0;
  width: 22px; height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--gradient-cool);
  background-image: var(--gradient-cool), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  background-size: cover, 16px;
  background-repeat: no-repeat;
  background-position: center;
}
@media (max-width: 880px) {
  .svc-row { grid-template-columns: 1fr; gap: 30px; margin-bottom: 60px; }
  .svc-row:nth-child(even) .svc-text { order: 0; }
}

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}
.contact-info { display: grid; gap: 18px; }
.info-card {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all .35s var(--ease);
}
.info-card:hover { border-color: var(--border-glow); transform: translateX(4px); }
.info-card .icon {
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--gradient-cool);
  display: grid; place-items: center;
}
.info-card .icon svg { width: 20px; height: 20px; color: #fff; }
.info-card h5 { font-family: 'Sora', sans-serif; font-size: 1rem; margin-bottom: 4px; color: var(--text); }
.info-card p { font-size: 0.94rem; color: var(--text-muted); margin: 0; }
.info-card a { color: var(--text); }
.info-card a:hover { color: var(--primary); }

.form-card {
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.form-card h3 { font-family: 'Sora', sans-serif; margin-bottom: 8px; }
.form-card .lead { color: var(--text-muted); margin-bottom: 28px; font-size: 0.96rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.field { position: relative; }
.field label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  color: var(--text);
  transition: all .3s;
  font-size: 0.95rem;
}
.field textarea { min-height: 130px; resize: vertical; font-family: inherit; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(214, 40, 54, 0.12);
  background: #ffffff;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }
.field-full { margin-bottom: 14px; }

.form-success {
  padding: 16px 18px;
  background: rgba(110, 240, 192, 0.1);
  border: 1px solid rgba(110, 240, 192, 0.4);
  border-radius: 12px;
  color: var(--accent);
  font-size: 0.92rem;
  margin-top: 16px;
  display: none;
}
.form-success.show { display: block; animation: wordIn .5s var(--ease); }

@media (max-width: 880px) {
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .form-card { padding: 30px 24px; }
}

/* ---------- Modal (portfolio detail) ---------- */
.modal {
  position: fixed; inset: 0;
  background: rgba(20, 32, 87, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity .35s;
}
.modal.open { display: flex; opacity: 1; }
.modal-card {
  width: min(900px, 100%);
  max-height: 92vh;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  transform: scale(0.94);
  transition: transform .4s var(--ease-spring);
  display: grid;
  grid-template-columns: 1fr 1fr;
  box-shadow: var(--shadow-lg);
}
.modal.open .modal-card { transform: scale(1); }
.modal-img {
  position: relative;
  min-height: 400px;
  overflow: hidden;
}
.modal-img img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: 36px; overflow-y: auto; }
.modal-body .tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 5px 14px;
  background: rgba(0, 224, 255, 0.15);
  border: 1px solid rgba(0, 224, 255, 0.4);
  border-radius: var(--radius-pill);
  color: var(--primary);
  margin-bottom: 16px;
}
.modal-body h3 { font-family: 'Sora', sans-serif; font-size: 1.6rem; margin-bottom: 12px; }
.modal-body p { font-size: 0.96rem; line-height: 1.7; }
.modal-body .specs {
  margin-top: 20px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.modal-body .specs > div { padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.modal-body .specs strong { display: block; font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
.modal-body .specs span { font-size: 0.92rem; color: var(--text); }
.modal-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-strong);
  display: grid; place-items: center;
  z-index: 3;
  transition: all .3s;
  box-shadow: var(--shadow-sm);
}
.modal-close:hover { background: var(--gradient-warm); transform: rotate(90deg); border-color: transparent; }
.modal-close svg { width: 18px; height: 18px; color: var(--text); transition: color .3s; }
.modal-close:hover svg { color: #fff; }
@media (max-width: 720px) {
  .modal-card { grid-template-columns: 1fr; max-height: 95vh; }
  .modal-img { min-height: 220px; }
  .modal-body { padding: 28px; }
}

/* ---------- Career card (small) ---------- */
.career-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all .35s var(--ease);
}
.career-card:hover { border-color: var(--border-glow); }
.career-card h4 { font-family: 'Sora', sans-serif; font-size: 1.15rem; margin-bottom: 4px; }
.career-card .meta { font-size: 0.88rem; color: var(--text-muted); }
.career-card .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.career-card .tags span {
  font-size: 0.74rem;
  padding: 4px 10px;
  background: rgba(140, 158, 220, 0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-md { margin-top: 30px; }
.mt-lg { margin-top: 60px; }
.flex-wrap-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
