/* ============================================================
   QUANTA ADVISORY — PREMIUM ANIMATIONS
   Atmospheric card hovers, magnetic buttons, spotlight,
   sophisticated reveals, and motion polish
   ============================================================ */

/* === SCROLL PROGRESS BAR === */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--signal) 0%, var(--bar-1) 100%);
  z-index: 9999;
  pointer-events: none;
  transform-origin: left;
}

/* === LANGUAGE GLOBE SHIMMER === */
.lang-globe::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 70%
  );
  transform: translateX(-120%) skewX(-15deg);
  transition: transform 550ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
  border-radius: inherit;
  z-index: 1;
}
.lang-globe:hover::before {
  transform: translateX(220%) skewX(-15deg);
}

/* === BUTTON SHIMMER === */
.btn-primary {
  overflow: hidden;
  isolation: isolate;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 70%
  );
  transform: translateX(-120%) skewX(-15deg);
  transition: transform 650ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
  border-radius: inherit;
}
.btn-primary:hover::before {
  transform: translateX(220%) skewX(-15deg);
}

.btn-ghost {
  overflow: hidden;
  isolation: isolate;
}
.btn-ghost::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(235, 232, 226, 0.06) 50%,
    transparent 70%
  );
  transform: translateX(-120%) skewX(-15deg);
  transition: transform 650ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
  border-radius: inherit;
}
.btn-ghost:hover::before {
  transform: translateX(220%) skewX(-15deg);
}

/* === CTA GLOW PULSE === */
@keyframes signalPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(61, 111, 240, 0.0); }
  50%       { box-shadow: 0 4px 28px rgba(61, 111, 240, 0.32); }
}
.cta-banner .btn-primary {
  animation: signalPulse 3.5s ease-in-out infinite;
}
.cta-banner .btn-primary:hover {
  animation: none;
  box-shadow: 0 4px 24px rgba(61, 111, 240, 0.45);
}

/* === SERVICE CARDS — atmospheric backgrounds === */

/* Light-reflection layer (follows cursor via JS) */
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle 220px at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.055) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 400ms ease;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
}
.service-card:hover::before { opacity: 1; }

/* Atmospheric image layer */
.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 700ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 0;
  pointer-events: none;
}
.service-card:hover::after { opacity: 1; }

/* Ensure content sits above both pseudo-elements */
.service-card > * { position: relative; z-index: 1; }

/* Top signal accent via box-shadow (freed ::before for reflection) */
.service-card:hover {
  box-shadow: inset 0 1px 0 var(--signal);
}

/* --- Card 1: Strategic Advisory — executive boardroom, city light ---*/
.service-card:nth-child(1)::after {
  background:
    radial-gradient(ellipse 75% 50% at 88% 88%, rgba(195, 150, 55, 0.09) 0%, transparent 50%),
    radial-gradient(ellipse 65% 70% at 10% 12%, rgba(61, 111, 240, 0.44) 0%, transparent 55%),
    radial-gradient(ellipse 45% 35% at 50% 50%, rgba(20, 38, 80, 0.55) 0%, transparent 60%),
    linear-gradient(148deg, #080E1C 0%, #141E38 58%, #0A0F1A 100%);
}

/* --- Card 2: Financial Modeling — data screens, market analytics --- */
.service-card:nth-child(2)::after {
  background:
    radial-gradient(ellipse 58% 42% at 78% 12%, rgba(61, 111, 240, 0.58) 0%, transparent 50%),
    radial-gradient(ellipse 42% 52% at 12% 88%, rgba(14, 175, 118, 0.11) 0%, transparent 48%),
    radial-gradient(ellipse 80% 38% at 50% 100%, rgba(8, 28, 58, 0.85) 0%, transparent 58%),
    linear-gradient(142deg, #070C16 0%, #0C1824 100%);
}

/* --- Card 3: AI Integration — server farm, neural network glow --- */
.service-card:nth-child(3)::after {
  background:
    radial-gradient(ellipse 55% 55% at 50% 18%, rgba(68, 152, 228, 0.42) 0%, transparent 56%),
    radial-gradient(ellipse 28% 28% at 88% 82%, rgba(61, 111, 240, 0.26) 0%, transparent 40%),
    radial-gradient(ellipse 24% 24% at 12% 62%, rgba(94, 139, 245, 0.18) 0%, transparent 38%),
    linear-gradient(178deg, #080E1A 0%, #0E1B28 100%);
}

/* --- Card 4: Investor Materials — glass tower, silver light --- */
.service-card:nth-child(4)::after {
  background:
    radial-gradient(ellipse 88% 38% at 50% 0%, rgba(138, 180, 255, 0.22) 0%, transparent 50%),
    radial-gradient(ellipse 48% 58% at 8% 72%, rgba(38, 78, 178, 0.34) 0%, transparent 55%),
    radial-gradient(ellipse 32% 32% at 92% 92%, rgba(61, 111, 240, 0.18) 0%, transparent 44%),
    linear-gradient(163deg, #0B1520 0%, #090E18 100%);
}

/* --- Card 5: Interactive Portals — screen glow, digital workspace --- */
.service-card:nth-child(5)::after {
  background:
    radial-gradient(ellipse 62% 62% at 54% 42%, rgba(61, 111, 240, 0.50) 0%, transparent 65%),
    radial-gradient(ellipse 32% 32% at 82% 8%, rgba(94, 139, 245, 0.20) 0%, transparent 44%),
    radial-gradient(ellipse 28% 38% at 8% 82%, rgba(18, 48, 118, 0.24) 0%, transparent 44%),
    linear-gradient(128deg, #070B16 0%, #0F1828 100%);
}

/* --- Card 6: Company Literature — archival warmth, document light --- */
.service-card:nth-child(6)::after {
  background:
    radial-gradient(ellipse 62% 42% at 18% 18%, rgba(218, 188, 98, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 52% 38% at 82% 88%, rgba(61, 111, 240, 0.32) 0%, transparent 50%),
    radial-gradient(ellipse 58% 58% at 50% 50%, rgba(12, 22, 48, 0.62) 0%, transparent 65%),
    linear-gradient(153deg, #0C1120 0%, #09100E 100%);
}

/* === INITIATIVE CARDS (Special Projects page) === */

/* Light reflection */
.initiative-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle 200px at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.05) 0%,
    transparent 68%
  );
  opacity: 0;
  transition: opacity 400ms ease;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
}
.initiative-card:hover::before { opacity: 1; }

/* Replace bottom-line ::after with atmospheric background */
.initiative-card::after {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  bottom: auto !important;
  height: auto !important;
  opacity: 0 !important;
  transition: opacity 700ms cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  z-index: 0 !important;
  pointer-events: none !important;
}
.initiative-card:hover::after { opacity: 1 !important; }
.initiative-card > * { position: relative; z-index: 1; }
.initiative-card:hover { box-shadow: inset 0 -1px 0 var(--signal); }

.initiative-card:nth-child(1)::after {
  background:
    radial-gradient(ellipse 68% 52% at 72% 28%, rgba(94, 139, 245, 0.42) 0%, transparent 55%),
    linear-gradient(142deg, #090E1E 0%, #0F1830 100%) !important;
}
.initiative-card:nth-child(2)::after {
  background:
    radial-gradient(ellipse 60% 58% at 28% 72%, rgba(61, 111, 240, 0.40) 0%, transparent 55%),
    linear-gradient(158deg, #0B1220 0%, #101830 100%) !important;
}
.initiative-card:nth-child(3)::after {
  background:
    radial-gradient(ellipse 72% 48% at 58% 18%, rgba(68, 148, 212, 0.38) 0%, transparent 55%),
    linear-gradient(138deg, #090E18 0%, #0F1A28 100%) !important;
}
.initiative-card:nth-child(4)::after {
  background:
    radial-gradient(ellipse 65% 65% at 42% 55%, rgba(61, 111, 240, 0.44) 0%, transparent 62%),
    linear-gradient(153deg, #0B1020 0%, #0D1117 100%) !important;
}
.initiative-card:nth-child(5)::after {
  background:
    radial-gradient(ellipse 68% 42% at 78% 22%, rgba(94, 139, 245, 0.40) 0%, transparent 55%),
    linear-gradient(142deg, #080C18 0%, #121C30 100%) !important;
}
.initiative-card:nth-child(6)::after {
  background:
    radial-gradient(ellipse 58% 68% at 18% 62%, rgba(48, 98, 200, 0.38) 0%, transparent 55%),
    linear-gradient(158deg, #090E1C 0%, #0D1117 100%) !important;
}

/* === CARDS — touch device overrides === */
@media (hover: none) {
  /* Disable mouse-only hover effects on touch */
  .service-card:hover,
  .initiative-card:hover {
    background: inherit;
    box-shadow: none;
  }

  .service-card:hover::before,
  .service-card:hover::after,
  .initiative-card:hover::before,
  .initiative-card:hover::after {
    opacity: 0;
  }

  .service-card:hover .service-card-icon,
  .initiative-card:hover .initiative-icon {
    transform: none;
    background: var(--signal-faint);
    border-color: var(--signal-dim);
  }

  /* Clean tap feedback using opacity only (GPU-composited) */
  .service-card:active,
  .initiative-card:active {
    opacity: 0.82;
    transition: opacity 80ms ease;
  }
}

/* === WHY-ITEMS — cursor-tracked glow === */
.why-item {
  isolation: isolate;
}
.why-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle 240px at var(--mx, 50%) var(--my, 50%),
    rgba(61, 111, 240, 0.09) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 350ms ease;
  pointer-events: none;
  z-index: 0;
}
.why-item:hover::before { opacity: 1; }
.why-item > * { position: relative; z-index: 1; }

/* === PILLAR ITEMS — bottom signal sweep === */
.pillar-item {
  isolation: isolate;
}
.pillar-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--signal) 40%, var(--signal-soft) 60%, transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 450ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.pillar-item:hover::after { transform: scaleX(1); }

/* === LOGO BARS — spring on hover === */
.logo-bar {
  transform-origin: bottom center;
  transition:
    transform 380ms cubic-bezier(0.34, 1.4, 0.64, 1),
    opacity 300ms ease;
}
.logo:hover .lb1 { transform: scaleY(1.5); }
.logo:hover .lb2 { transform: scaleY(1.35); transition-delay: 40ms; }
.logo:hover .lb3 { transform: scaleY(1.2);  transition-delay: 80ms; }

/* === SPOTLIGHT OVERLAY (injected by JS onto dark sections) === */
.spotlight-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 500ms ease;
  background: radial-gradient(
    circle 380px at var(--cx, -500px) var(--cy, -500px),
    rgba(61, 111, 240, 0.055) 0%,
    transparent 70%
  );
}
.spotlight-section { position: relative; }
.spotlight-section:hover .spotlight-overlay { opacity: 1; }

/* Make sure spotlight sits behind content but above pure bg */
.hero .spotlight-overlay,
.services-preview .spotlight-overlay,
.why-section .spotlight-overlay,
.special-preview .spotlight-overlay {
  z-index: 1;
}

/* === HEADING CLIP REVEALS === */
.clip-reveal {
  overflow: hidden;
  display: block;
}
.clip-reveal-inner {
  display: block;
  transform: translateY(105%);
  transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}
.clip-reveal.in-view .clip-reveal-inner {
  transform: translateY(0);
}

/* Staggered children */
.clip-reveal:nth-child(2) .clip-reveal-inner { transition-delay: 80ms; }
.clip-reveal:nth-child(3) .clip-reveal-inner { transition-delay: 160ms; }

/* === ABOUT PREVIEW NUMBER === */
.about-preview-number {
  transition: color 600ms ease, transform 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.about-preview-left:hover .about-preview-number {
  color: rgba(61, 111, 240, 0.14);
  transform: scale(1.04) translateX(-10px);
}

/* === SECTION BAR ENTRANCE === */
@keyframes barRise {
  from { transform: scaleY(0); opacity: 0; }
  to   { transform: scaleY(1); opacity: 1; }
}
.section-bar.in-view .sb1 {
  animation: barRise 500ms cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}
.section-bar.in-view .sb2 {
  animation: barRise 500ms 80ms cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}
.section-bar.in-view .sb3 {
  animation: barRise 500ms 160ms cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}
.section-bar .sb1,
.section-bar .sb2,
.section-bar .sb3 {
  transform-origin: bottom center;
  transform: scaleY(0);
  opacity: 0;
}

/* === NAV LINK ENHANCED UNDERLINE === */
.nav-link::after {
  background: linear-gradient(90deg, var(--signal), var(--signal-soft));
}


/* === HERO EYEBROW ENTRANCE === */
@keyframes eyebrowIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
.hero-eyebrow {
  animation: eyebrowIn 900ms 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* === SERVICE DETAIL HOVER LINE === */
.service-detail {
  transition: border-color 300ms ease;
}
.service-detail:hover {
  border-color: rgba(61, 111, 240, 0.2);
}

/* === CONTACT FORM FOCUS GLOW === */
.form-input,
.form-select,
.form-textarea {
  transition:
    border-color 250ms ease,
    box-shadow 250ms ease,
    background 250ms ease;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  background: #FAFAF8;
}

/* === FOOTER LINK HOVER NUDGE === */
.footer-link {
  transition: color 200ms ease, transform 200ms ease;
  display: inline-block;
}
.footer-link:hover {
  transform: translateX(3px);
}

/* === APPROACH STEP SIGNAL HOVER === */
.approach-step {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(13, 17, 23, 0.96), rgba(20, 25, 35, 0.76));
  transition:
    transform 220ms var(--ease-out),
    background 220ms var(--ease-out),
    border-color 220ms var(--ease-out),
    box-shadow 220ms var(--ease-out);
}

.approach-step::before,
.approach-step::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.approach-step::before {
  background:
    linear-gradient(
      108deg,
      transparent 24%,
      rgba(138, 180, 255, 0.03) 38%,
      rgba(138, 180, 255, 0.16) 50%,
      rgba(94, 139, 245, 0.06) 62%,
      transparent 76%
    );
  opacity: 0;
  transform: translateX(-120%) skewX(-14deg);
  transition:
    opacity 220ms var(--ease-out),
    transform 650ms var(--ease-out);
}

.approach-step::after {
  border: 1px solid rgba(138, 180, 255, 0);
  box-shadow: inset 0 0 0 1px rgba(61, 111, 240, 0);
  opacity: 0;
  transition:
    opacity 220ms var(--ease-out),
    border-color 220ms var(--ease-out),
    box-shadow 220ms var(--ease-out);
}

.approach-step > * {
  position: relative;
  z-index: 1;
}

.approach-step-num,
.approach-step-title {
  transition:
    transform 220ms var(--ease-out),
    color 220ms var(--ease-out),
    text-shadow 220ms var(--ease-out);
}

.approach-step:hover,
.approach-step:focus-within {
  background:
    radial-gradient(circle at 16% 0%, rgba(94, 139, 245, 0.16), transparent 34%),
    linear-gradient(145deg, #141923 0%, #1b2235 56%, #0d1117 100%);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.3),
    0 0 32px rgba(61, 111, 240, 0.22);
  transform: translateY(-5px);
  z-index: 2;
}

.approach-step:hover::before,
.approach-step:focus-within::before {
  opacity: 1;
  transform: translateX(120%) skewX(-14deg);
}

.approach-step:hover::after,
.approach-step:focus-within::after {
  border-color: rgba(138, 180, 255, 0.38);
  box-shadow: inset 0 0 0 1px rgba(61, 111, 240, 0.1);
  opacity: 1;
}

.approach-step:hover .approach-step-num,
.approach-step:focus-within .approach-step-num {
  color: #8ab4ff;
  text-shadow: 0 0 18px rgba(94, 139, 245, 0.46);
  transform: translateY(-2px);
}

.approach-step:hover .approach-step-title,
.approach-step:focus-within .approach-step-title {
  color: #ffffff;
  transform: translateY(-1px);
}

/* === WHO WE SERVE SIGNAL HOVER === */
.serve-list {
  position: relative;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(232, 238, 250, 0.24));
  box-shadow: 0 18px 42px rgba(13, 17, 23, 0.05);
}

.serve-item {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition:
    transform 220ms var(--ease-out),
    background 220ms var(--ease-out),
    box-shadow 220ms var(--ease-out);
}

.serve-item::before,
.serve-item::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.serve-item::before {
  background:
    linear-gradient(
      108deg,
      transparent 20%,
      rgba(138, 180, 255, 0.06) 38%,
      rgba(61, 111, 240, 0.14) 50%,
      rgba(138, 180, 255, 0.05) 62%,
      transparent 78%
    );
  opacity: 0;
  transform: translateX(-120%) skewX(-14deg);
  transition:
    opacity 220ms var(--ease-out),
    transform 650ms var(--ease-out);
}

.serve-item::after {
  border: 1px solid rgba(94, 139, 245, 0);
  box-shadow: inset 0 0 0 1px rgba(138, 180, 255, 0);
  opacity: 0;
  transition:
    opacity 220ms var(--ease-out),
    border-color 220ms var(--ease-out),
    box-shadow 220ms var(--ease-out);
}

.serve-dot,
.serve-text {
  position: relative;
  z-index: 1;
  transition:
    transform 220ms var(--ease-out),
    color 220ms var(--ease-out),
    background 220ms var(--ease-out),
    box-shadow 220ms var(--ease-out),
    text-shadow 220ms var(--ease-out);
}

.serve-item:hover,
.serve-item:focus-within {
  background:
    radial-gradient(circle at 12% 0%, rgba(94, 139, 245, 0.16), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(226, 235, 255, 0.58) 58%, rgba(247, 248, 245, 0.72));
  box-shadow:
    0 14px 28px rgba(13, 17, 23, 0.08),
    0 0 24px rgba(61, 111, 240, 0.2);
  transform: translateY(-4px);
  z-index: 2;
}

.serve-item:hover::before,
.serve-item:focus-within::before {
  opacity: 1;
  transform: translateX(120%) skewX(-14deg);
}

.serve-item:hover::after,
.serve-item:focus-within::after {
  border-color: rgba(94, 139, 245, 0.34);
  box-shadow: inset 0 0 0 1px rgba(138, 180, 255, 0.16);
  opacity: 1;
}

.serve-item:hover .serve-dot,
.serve-item:focus-within .serve-dot {
  background: #8ab4ff !important;
  box-shadow:
    0 0 0 4px rgba(61, 111, 240, 0.11),
    0 0 18px rgba(61, 111, 240, 0.48);
  transform: translateY(-1px) scale(1.18);
}

.serve-item:hover .serve-text,
.serve-item:focus-within .serve-text {
  color: #141923 !important;
  text-shadow: 0 0 18px rgba(94, 139, 245, 0.14);
  transform: translateX(3px);
}

[dir="rtl"] .serve-item:hover .serve-text,
[dir="rtl"] .serve-item:focus-within .serve-text {
  transform: translateX(-3px);
}

/* === HERO SCROLL LINE ANIMATION === */
@keyframes scrollPulse {
  0%   { transform: scaleY(0) translateY(0); opacity: 0; transform-origin: top; }
  40%  { transform: scaleY(1) translateY(0); opacity: 0.7; }
  100% { transform: scaleY(1) translateY(20px); opacity: 0; }
}
.scroll-line {
  animation: scrollPulse 2.2s ease-in-out infinite !important;
}

/* === WHY ICON HOVER === */
.why-icon,
.service-card-icon,
.initiative-icon {
  transition:
    background 350ms ease,
    border-color 350ms ease,
    transform 350ms cubic-bezier(0.34, 1.4, 0.64, 1);
}
.why-item:hover .why-icon,
.service-card:hover .service-card-icon,
.initiative-card:hover .initiative-icon {
  background: rgba(61, 111, 240, 0.18);
  border-color: rgba(61, 111, 240, 0.4);
  transform: scale(1.08);
}

/* === PILLAR NAME NUDGE === */
.pillar-item {
  transition: background 300ms ease;
}
.pillar-item:hover .pillar-name {
  color: #ffffff;
  transition: color 200ms ease;
}
.pillar-item:hover .pillar-num {
  color: var(--signal-soft);
  transition: color 200ms ease;
}

/* === HERO BAR CSS ANIMATION (survives tab switching) === */
@keyframes barFloat {
  0%, 100% { transform: scaleY(1);    opacity: 1; }
  50%       { transform: scaleY(1.14); opacity: 0.85; }
}

.bar-col {
  transform-origin: bottom center;
  animation: barFloat 3s ease-in-out infinite;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.bar-composition:hover .bar-col {
  filter: brightness(1.8) saturate(1.4);
  opacity: 1 !important;
}

.bar-composition:hover .bar-col.accent {
  filter: brightness(2.2) saturate(1.6);
}

/* Staggered timing per bar for organic, non-uniform feel */
.bar-col:nth-child(1)  { animation-duration: 3.1s; animation-delay: -0.0s; }
.bar-col:nth-child(2)  { animation-duration: 2.7s; animation-delay: -0.6s; }
.bar-col:nth-child(3)  { animation-duration: 3.5s; animation-delay: -1.3s; }
.bar-col:nth-child(4)  { animation-duration: 2.9s; animation-delay: -0.9s; }
.bar-col:nth-child(5)  { animation-duration: 3.3s; animation-delay: -1.7s; }
.bar-col:nth-child(6)  { animation-duration: 2.6s; animation-delay: -0.4s; }
.bar-col:nth-child(7)  { animation-duration: 3.0s; animation-delay: -1.1s; }
.bar-col:nth-child(8)  { animation-duration: 2.8s; animation-delay: -0.7s; }
.bar-col:nth-child(9)  { animation-duration: 3.4s; animation-delay: -1.9s; }
.bar-col:nth-child(10) { animation-duration: 2.9s; animation-delay: -0.3s; }
.bar-col:nth-child(11) { animation-duration: 3.1s; animation-delay: -1.4s; }
.bar-col:nth-child(12) { animation-duration: 2.7s; animation-delay: -0.8s; }

/* Accent bars pulse more visibly */
.bar-col.accent {
  animation-name: barFloatAccent;
}

@keyframes barFloatAccent {
  0%, 100% { transform: scaleY(1);    opacity: 1; }
  50%       { transform: scaleY(1.18); opacity: 0.9; }
}

/* Top shimmer on accent bars */
.bar-col.accent {
  position: relative;
}
.bar-col.accent::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 25%;
  background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, transparent 100%);
  border-radius: 3px 3px 0 0;
  pointer-events: none;
}

/* === LOGO INTRO ANIMATION === */

.logo-intro {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  background: #060a12;
  opacity: 1;
}

.logo-intro-bg { display: none; }

.logo-intro.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Vertical stack: logo → line → tagline */
.logo-intro-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* ── Logo ── */
/* Same classes as navbar (.logo-text, .logo-bars, .lb1/2/3) scaled 5×
   Pixel-perfect: same DOM, same CSS, different scale. */
.logo-intro-wrap {
  display: inline-flex;
  align-items: flex-end;
  gap: 5px;
  opacity: 0;
  transform: scale(5) translateY(-8px);
  animation: introLogoIn 700ms cubic-bezier(0.16, 1, 0.3, 1) 150ms forwards;
}

.logo-intro-wrap .logo-text {
  color: var(--text-dark);
  font-size: 1.85rem;
  transition: none;
}
.logo-intro-wrap .logo-bars { margin-bottom: 4px; }

/* Bars spring up one by one */
.logo-intro-wrap .intro-bar {
  transform-origin: bottom center;
  transform: scaleY(0);
  opacity: 0;
}
.logo-intro-wrap .intro-bar-1 {
  animation: introBarUp 500ms cubic-bezier(0.34, 1.5, 0.64, 1) 750ms forwards;
}
.logo-intro-wrap .intro-bar-2 {
  animation: introBarUp 500ms cubic-bezier(0.34, 1.5, 0.64, 1) 950ms forwards;
}
.logo-intro-wrap .intro-bar-3 {
  animation: introBarUp 500ms cubic-bezier(0.34, 1.5, 0.64, 1) 1150ms forwards;
}

@keyframes introLogoIn {
  to { opacity: 1; transform: scale(5) translateY(0); }
}
@keyframes introBarUp {
  to { opacity: 1; transform: scaleY(1); }
}

/* ── Separator line ── draws from center outward */
.logo-intro-line {
  width: 0;
  height: 1px;
  background: rgba(235, 232, 226, 0.18);
  margin: 2.8rem 0 2.4rem;
  animation: introLineGrow 600ms cubic-bezier(0.76, 0, 0.24, 1) 1400ms forwards;
}

@keyframes introLineGrow {
  from { width: 0; }
  to   { width: clamp(160px, 30vw, 320px); }
}

/* ── Tagline ── clips in left-to-right (not just blur) */
.logo-intro-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  font-weight: 300;
  color: rgba(235, 232, 226, 0.65);
  letter-spacing: -0.02em;
  white-space: nowrap;
  clip-path: inset(0 100% 0 0);
  animation: introTaglineWipe 700ms cubic-bezier(0.76, 0, 0.24, 1) 1700ms forwards;
}

@keyframes introTaglineWipe {
  to { clip-path: inset(0 0% 0 0); }
}

/* ── Exit ── container fades + lifts slightly */
.logo-intro.exit .logo-intro-container {
  animation: introExit 550ms cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

@keyframes introExit {
  to { opacity: 0; transform: translateY(-12px); }
}

/* Mobile */
@media (max-width: 768px) {
  .logo-intro-line {
    margin: 2rem 0 1.75rem;
  }
  .logo-intro-tagline {
    font-size: clamp(1rem, 5vw, 1.4rem);
    white-space: normal;
    text-align: center;
    max-width: 80vw;
  }
}

/* New Quanta intro sequence */
.quanta-intro.logo-intro {
  display: none;
  overflow: hidden;
  background: #080c14;
}

.quanta-intro.logo-intro.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms var(--ease-out);
}

.intro-scan-field,
.intro-sweep,
.intro-particles,
.intro-outro-wash {
  position: absolute;
  pointer-events: none;
}

.intro-scan-field {
  inset: 0;
  background:
    radial-gradient(circle at 72% 48%, rgba(47, 92, 211, 0.18), transparent 29%),
    radial-gradient(circle at 40% 50%, rgba(255, 255, 255, 0.04), transparent 31%);
  opacity: 0;
  animation: introScanNew 3.9s var(--ease-out) forwards;
}

.intro-sweep {
  top: 0;
  bottom: 0;
  width: 32vw;
  min-width: 220px;
  background: linear-gradient(90deg, transparent, rgba(126, 174, 255, 0.12), transparent);
  filter: blur(28px);
  opacity: 0;
  transform: translateX(-120vw);
  animation: introSweepNew 3.55s cubic-bezier(0.65, 0, 0.35, 1) 240ms forwards;
}

.logo-lockup {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  gap: clamp(1.75rem, 3.65vw, 3.35rem);
  opacity: 0;
  transform: scale(0.985);
  animation: introLockupInNew 650ms cubic-bezier(0.16, 1, 0.3, 1) 320ms forwards;
}

.intro-logo-text {
  color: #f2eee7;
  font-family: var(--font-display);
  font-size: clamp(6.8rem, 14.95vw, 11.6rem);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 0.765;
  white-space: nowrap;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.intro-char {
  display: inline-block;
  opacity: 0;
  filter: blur(16px);
  transform: translateY(34px);
  animation: introCharInNew 760ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(640ms + (var(--i) * 105ms));
}

.intro-bar-mark {
  display: flex;
  align-items: flex-end;
  gap: clamp(0.76rem, 1.55vw, 1.18rem);
  padding-bottom: clamp(0.12rem, 0.48vw, 0.42rem);
}

.intro-bar {
  position: relative;
  display: block;
  width: clamp(1.55rem, 2.42vw, 2.18rem);
  overflow: hidden;
  border-radius:
    clamp(0.58rem, 1.02vw, 0.86rem)
    clamp(0.58rem, 1.02vw, 0.86rem)
    clamp(0.22rem, 0.42vw, 0.36rem)
    clamp(0.22rem, 0.42vw, 0.36rem);
  opacity: 0;
  transform: scaleY(0);
  transform-origin: bottom;
  animation: introBarGrowNew 780ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.intro-bar-1 {
  height: clamp(4.02rem, 5.82vw, 5.72rem);
  background: #7eaeff;
  animation-delay: 2.05s;
}
.intro-bar-2 {
  height: clamp(6.08rem, 8.92vw, 8.72rem);
  background: #4d7cf1;
  animation-delay: 2.18s;
}
.intro-bar-3 {
  height: clamp(9.2rem, 13.22vw, 12.95rem);
  background: #2852c4;
  animation-delay: 2.31s;
}

.intro-bar span {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 45%, transparent);
  transform: translateY(-115%);
  animation: introBarShineNew 980ms ease-in-out forwards;
}
.intro-bar-1 span { animation-delay: 2.58s; }
.intro-bar-2 span { animation-delay: 2.71s; }
.intro-bar-3 span { animation-delay: 2.84s; }

.intro-slogan {
  position: absolute;
  left: 50%;
  top: calc(50% + clamp(5.65rem, 9.4vw, 8.2rem));
  z-index: 6;
  width: min(86vw, 42rem);
  color: rgba(242, 238, 231, 0.74);
  font-family: var(--font-display);
  font-size: clamp(1.02rem, 2vw, 1.55rem);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-align: center;
  opacity: 0;
  transform: translateX(-50%);
  animation:
    introSloganShow 1ms linear 1.92s forwards,
    introSloganFadeOut 460ms var(--ease-out) 3.48s forwards;
}

.intro-slogan span {
  display: inline-block;
  position: relative;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: top;
  width: 0;
  animation: introSloganType 1.28s steps(30, end) 1.92s forwards;
}

.intro-slogan span::after {
  content: '';
  position: absolute;
  top: 0.08em;
  right: 0;
  width: 1px;
  height: 1.05em;
  background: rgba(138, 180, 255, 0.85);
  animation: introSloganCursor 560ms step-end 1.92s 4;
}

.intro-particles {
  inset: 0;
  z-index: 2;
}

.intro-particle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(126, 174, 255, 0.72);
  opacity: 0;
}

.intro-particles-in .intro-particle {
  transform: translate(var(--x), var(--y)) scale(0.35);
  animation: introParticleInNew 1.72s ease-in-out forwards;
  animation-delay: var(--delay);
}

.intro-particles-out {
  z-index: 10;
}

.intro-particles-out .intro-particle {
  background: rgba(126, 174, 255, 0.8);
  transform: translate(var(--sx), var(--sy)) scale(0.2);
}

.quanta-intro.exit .logo-lockup {
  animation: introLockupOutNew 1.08s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

.quanta-intro.exit .intro-logo-text {
  animation: introLetterCompressNew 1.08s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

.quanta-intro.exit .intro-particles-out .intro-particle {
  animation: introParticleOutNew 950ms cubic-bezier(0.76, 0, 0.24, 1) forwards;
  animation-delay: var(--delay);
}

.intro-outro-wash {
  inset: 0;
  z-index: 10;
  background: #080c14;
  opacity: 0;
}

.quanta-intro.exit .intro-outro-wash {
  animation: introOutroWashNew 1.05s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

@keyframes introScanNew {
  0% { opacity: 0; }
  55% { opacity: 1; }
  100% { opacity: 0.55; }
}
@keyframes introSweepNew {
  0% { opacity: 0; transform: translateX(-120vw); }
  50% { opacity: 1; transform: translateX(-10vw); }
  100% { opacity: 0; transform: translateX(118vw); }
}
@keyframes introLockupInNew {
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}
@keyframes introCharInNew {
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}
@keyframes introBarGrowNew {
  to { opacity: 1; transform: scaleY(1); }
}
@keyframes introBarShineNew {
  0% { transform: translateY(-115%); }
  50% { transform: translateY(0%); }
  100% { transform: translateY(125%); }
}
@keyframes introSloganShow {
  to { opacity: 1; }
}
@keyframes introSloganType {
  to { width: 30ch; }
}
@keyframes introSloganCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@keyframes introSloganFadeOut {
  to { opacity: 0; }
}
@keyframes introParticleInNew {
  0% { opacity: 0; transform: translate(var(--x), var(--y)) scale(0.35); }
  45% { opacity: 0.9; transform: translate(var(--mx), var(--my)) scale(1); }
  100% { opacity: 0; transform: translate(0, 0) scale(0.1); }
}
@keyframes introLockupOutNew {
  0% { opacity: 1; transform: scale(1); filter: blur(0); }
  42% { opacity: 0.85; transform: scale(1.018); filter: blur(6px); }
  100% { opacity: 0; transform: scale(1.08); filter: blur(22px); }
}
@keyframes introLetterCompressNew {
  0% { letter-spacing: -0.04em; }
  45% { letter-spacing: -0.075em; }
  100% { letter-spacing: -0.12em; }
}
@keyframes introParticleOutNew {
  0% { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(0.2); }
  45% { opacity: 1; transform: translate(var(--mx), var(--my)) scale(1.15); }
  100% { opacity: 0; transform: translate(var(--ex), var(--ey)) scale(0.15); }
}
@keyframes introOutroWashNew {
  0% { opacity: 0; }
  42% { opacity: 0.28; }
  100% { opacity: 0; }
}

@media (max-width: 768px) {
  .quanta-intro.logo-intro {
    min-height: 100svh;
    min-height: 100dvh;
    padding-inline: clamp(1rem, 5vw, 1.5rem);
  }

  .quanta-intro .logo-lockup {
    position: absolute;
    left: 50%;
    top: 48%;
    translate: -50% -50%;
    max-width: calc(100vw - 2rem);
    gap: clamp(0.72rem, 3.4vw, 1.05rem);
    align-items: flex-end;
  }

  .quanta-intro .intro-logo-text {
    font-size: clamp(3.15rem, 15.2vw, 4.45rem);
    letter-spacing: -0.035em;
    line-height: 0.82;
  }

  .quanta-intro .intro-bar-mark {
    gap: clamp(0.38rem, 1.9vw, 0.56rem);
    padding-bottom: clamp(0.08rem, 0.45vw, 0.18rem);
  }

  .quanta-intro .intro-bar {
    width: clamp(0.7rem, 3.25vw, 0.94rem);
    border-radius:
      clamp(0.32rem, 1.6vw, 0.46rem)
      clamp(0.32rem, 1.6vw, 0.46rem)
      clamp(0.13rem, 0.7vw, 0.2rem)
      clamp(0.13rem, 0.7vw, 0.2rem);
  }

  .quanta-intro .intro-bar-1 { height: clamp(1.75rem, 8.2vw, 2.42rem); }
  .quanta-intro .intro-bar-2 { height: clamp(2.58rem, 12.1vw, 3.62rem); }
  .quanta-intro .intro-bar-3 { height: clamp(3.82rem, 17.4vw, 5.12rem); }

  .intro-slogan {
    top: calc(48% + clamp(2.72rem, 12.4vw, 3.8rem));
    width: min(92vw, 22rem);
    font-size: clamp(0.82rem, 3.75vw, 1.02rem);
    line-height: 1.3;
  }

  .intro-slogan span {
    max-width: 100%;
  }
}

@media (max-width: 380px) {
  .quanta-intro .logo-lockup {
    gap: 0.58rem;
  }

  .quanta-intro .intro-logo-text {
    font-size: clamp(2.75rem, 15.6vw, 3.35rem);
  }

  .quanta-intro .intro-bar {
    width: 0.64rem;
  }

  .quanta-intro .intro-bar-1 { height: 1.65rem; }
  .quanta-intro .intro-bar-2 { height: 2.45rem; }
  .quanta-intro .intro-bar-3 { height: 3.55rem; }

  .intro-slogan {
    top: calc(48% + 2.75rem);
    font-size: 0.78rem;
  }
}

/* === CLARITY ENGINE (Interactive Centerpiece) === */

.clarity-engine-section {
  position: relative;
  padding: 8rem 0;
  background: linear-gradient(135deg, rgba(6,10,18,0.3) 0%, rgba(47,92,211,0.03) 100%);
}

.clarity-header-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.clarity-header-bar .section-bar {
  margin: 0;
}

.clarity-header {
  text-align: center;
  margin-bottom: 5rem;
}

.clarity-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  color: var(--text-dark);
  margin: 0 0 1.5rem;
  letter-spacing: -0.02em;
}

.clarity-subheading {
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  color: rgba(235, 232, 226, 0.7);
  max-width: 56rem;
  margin: 0 auto;
  line-height: 1.7;
  font-weight: 300;
}

/* CANVAS */
.clarity-demo-wrapper {
  position: relative;
}

.clarity-canvas {
  position: relative;
  min-height: 480px;
  margin-bottom: 3rem;
}

/* BEFORE STATE: Scattered Complexity */
.clarity-state {
  position: absolute;
  inset: 0;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.clarity-state-before {
  opacity: 1;
  pointer-events: auto;
}

.clarity-state-after {
  opacity: 0;
  pointer-events: none;
}

.scatter-space {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
}

.scatter-item {
  position: absolute;
  padding: 1.5rem 1.8rem;
  background: linear-gradient(135deg, rgba(126, 174, 255, 0.15) 0%, rgba(47, 92, 211, 0.08) 100%);
  border: 1.5px solid rgba(126, 174, 255, 0.35);
  border-radius: 12px;
  backdrop-filter: blur(16px);
  color: rgba(235, 232, 226, 0.9);
  transform-style: preserve-3d;
  animation: scatterMove 12s ease-in-out infinite, scatterRotate 8s linear infinite;
  backface-visibility: visible;
  box-shadow: 0 8px 24px rgba(47, 92, 211, 0.15);
}

/* Individual movement and rotation paths */
.scatter-item:nth-child(1) {
  left: 12%;
  top: 15%;
  animation:
    scatterMove1 28s ease-in-out infinite,
    scatterRotate1 18s linear infinite;
}

.scatter-item:nth-child(2) {
  right: 12%;
  top: 10%;
  animation:
    scatterMove2 32s ease-in-out infinite,
    scatterRotate2 22s linear infinite;
  animation-delay: 0.3s, 0.3s;
}

.scatter-item:nth-child(3) {
  left: 8%;
  bottom: 12%;
  animation:
    scatterMove3 30s ease-in-out infinite,
    scatterRotate3 20s linear infinite;
  animation-delay: 0.6s, 0.6s;
}

.scatter-item:nth-child(4) {
  right: 8%;
  bottom: 8%;
  animation:
    scatterMove4 29s ease-in-out infinite,
    scatterRotate1 17s linear infinite;
  animation-delay: 0.9s, 0.9s;
}

.scatter-item:nth-child(5) {
  left: 50%;
  top: 5%;
  transform: translateX(-50%);
  animation:
    scatterMove5 34s ease-in-out infinite,
    scatterRotate2 24s linear infinite;
  animation-delay: 1.2s, 1.2s;
}

.scatter-item:nth-child(6) {
  left: 50%;
  bottom: 5%;
  transform: translateX(-50%);
  animation:
    scatterMove6 31s ease-in-out infinite,
    scatterRotate3 19s linear infinite;
  animation-delay: 1.5s, 1.5s;
}

/* 3D ROTATION ANIMATIONS */
@keyframes scatterRotate1 {
  0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
  25% { transform: rotateX(45deg) rotateY(90deg) rotateZ(30deg); }
  50% { transform: rotateX(180deg) rotateY(180deg) rotateZ(60deg); }
  75% { transform: rotateX(270deg) rotateY(90deg) rotateZ(30deg); }
  100% { transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg); }
}

@keyframes scatterRotate2 {
  0% { transform: rotateY(0deg) rotateZ(0deg) rotateX(0deg); }
  25% { transform: rotateY(80deg) rotateZ(45deg) rotateX(60deg); }
  50% { transform: rotateY(180deg) rotateZ(90deg) rotateX(180deg); }
  75% { transform: rotateY(270deg) rotateZ(45deg) rotateX(60deg); }
  100% { transform: rotateY(360deg) rotateZ(360deg) rotateX(360deg); }
}

@keyframes scatterRotate3 {
  0% { transform: rotateZ(0deg) rotateX(0deg) rotateY(0deg); }
  25% { transform: rotateZ(60deg) rotateX(45deg) rotateY(90deg); }
  50% { transform: rotateZ(180deg) rotateX(180deg) rotateY(180deg); }
  75% { transform: rotateZ(270deg) rotateX(45deg) rotateY(90deg); }
  100% { transform: rotateZ(360deg) rotateX(360deg) rotateY(360deg); }
}

/* COMPLEX MOVEMENT PATHS */
@keyframes scatterMove1 {
  0% {
    transform: translateX(0) translateY(0) translateZ(0) rotateX(0) rotateY(0) rotateZ(0);
  }
  25% {
    transform: translateX(40px) translateY(-30px) translateZ(60px) rotateX(45deg) rotateY(90deg) rotateZ(30deg);
  }
  50% {
    transform: translateX(-50px) translateY(20px) translateZ(-40px) rotateX(180deg) rotateY(180deg) rotateZ(60deg);
  }
  75% {
    transform: translateX(30px) translateY(40px) translateZ(80px) rotateX(270deg) rotateY(90deg) rotateZ(30deg);
  }
  100% {
    transform: translateX(0) translateY(0) translateZ(0) rotateX(360deg) rotateY(360deg) rotateZ(360deg);
  }
}

@keyframes scatterMove2 {
  0% {
    transform: translateX(0) translateY(0) translateZ(0) rotateY(0) rotateZ(0) rotateX(0);
  }
  25% {
    transform: translateX(-45px) translateY(35px) translateZ(50px) rotateY(80deg) rotateZ(45deg) rotateX(60deg);
  }
  50% {
    transform: translateX(60px) translateY(-25px) translateZ(-60px) rotateY(180deg) rotateZ(90deg) rotateX(180deg);
  }
  75% {
    transform: translateX(-30px) translateY(-40px) translateZ(70px) rotateY(270deg) rotateZ(45deg) rotateX(60deg);
  }
  100% {
    transform: translateX(0) translateY(0) translateZ(0) rotateY(360deg) rotateZ(360deg) rotateX(360deg);
  }
}

@keyframes scatterMove3 {
  0% {
    transform: translateX(0) translateY(0) translateZ(0) rotateZ(0) rotateX(0) rotateY(0);
  }
  25% {
    transform: translateX(35px) translateY(45px) translateZ(-50px) rotateZ(60deg) rotateX(45deg) rotateY(90deg);
  }
  50% {
    transform: translateX(-40px) translateY(-35px) translateZ(80px) rotateZ(180deg) rotateX(180deg) rotateY(180deg);
  }
  75% {
    transform: translateX(50px) translateY(-20px) translateZ(-70px) rotateZ(270deg) rotateX(45deg) rotateY(90deg);
  }
  100% {
    transform: translateX(0) translateY(0) translateZ(0) rotateZ(360deg) rotateX(360deg) rotateY(360deg);
  }
}

@keyframes scatterMove4 {
  0% {
    transform: translateX(0) translateY(0) translateZ(0) rotateX(0) rotateY(0) rotateZ(0);
  }
  25% {
    transform: translateX(-38px) translateY(-42px) translateZ(55px) rotateX(50deg) rotateY(85deg) rotateZ(35deg);
  }
  50% {
    transform: translateX(45px) translateY(30px) translateZ(-75px) rotateX(190deg) rotateY(175deg) rotateZ(65deg);
  }
  75% {
    transform: translateX(-25px) translateY(45px) translateZ(65px) rotateX(280deg) rotateY(95deg) rotateZ(25deg);
  }
  100% {
    transform: translateX(0) translateY(0) translateZ(0) rotateX(360deg) rotateY(360deg) rotateZ(360deg);
  }
}

@keyframes scatterMove5 {
  0% {
    transform: translateX(-50%) translateY(0) translateZ(0) rotateY(0) rotateZ(0) rotateX(0);
  }
  25% {
    transform: translateX(calc(-50% + 35px)) translateY(-38px) translateZ(70px) rotateY(75deg) rotateZ(50deg) rotateX(55deg);
  }
  50% {
    transform: translateX(calc(-50% - 45px)) translateY(40px) translateZ(-65px) rotateY(190deg) rotateZ(95deg) rotateX(185deg);
  }
  75% {
    transform: translateX(calc(-50% + 40px)) translateY(-35px) translateZ(80px) rotateY(280deg) rotateZ(50deg) rotateX(55deg);
  }
  100% {
    transform: translateX(-50%) translateY(0) translateZ(0) rotateY(360deg) rotateZ(360deg) rotateX(360deg);
  }
}

@keyframes scatterMove6 {
  0% {
    transform: translateX(-50%) translateY(0) translateZ(0) rotateZ(0) rotateX(0) rotateY(0);
  }
  25% {
    transform: translateX(calc(-50% - 40px)) translateY(42px) translateZ(-55px) rotateZ(65deg) rotateX(50deg) rotateY(85deg);
  }
  50% {
    transform: translateX(calc(-50% + 38px)) translateY(-40px) translateZ(70px) rotateZ(185deg) rotateX(190deg) rotateY(175deg);
  }
  75% {
    transform: translateX(calc(-50% - 30px)) translateY(38px) translateZ(-70px) rotateZ(280deg) rotateX(50deg) rotateY(85deg);
  }
  100% {
    transform: translateX(-50%) translateY(0) translateZ(0) rotateZ(360deg) rotateX(360deg) rotateY(360deg);
  }
}

.scatter-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: rgba(235, 232, 226, 0.7);
  margin-bottom: 0.6rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
}

.scatter-value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--signal);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.scatter-overlay {
  position: absolute;
  bottom: -3rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.scatter-status {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: rgba(235, 232, 226, 0.5);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
}

/* AFTER STATE: Structured Framework */
.framework-structure {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: flex-start;
  min-height: 300px;
}

.framework-column {
  background: linear-gradient(135deg, rgba(126, 174, 255, 0.1) 0%, rgba(77, 124, 241, 0.05) 100%);
  border: 1px solid rgba(126, 174, 255, 0.2);
  border-radius: 10px;
  padding: 2.5rem 2rem;
  animation: columnAppear 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
}

.fc-assess { animation-delay: 0.1s; }
.fc-synthesize { animation-delay: 0.25s; }
.fc-recommend { animation-delay: 0.4s; }

@keyframes columnAppear {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fc-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.fc-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 300;
  color: var(--signal);
  line-height: 1;
  opacity: 0.8;
}

.fc-header h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-dark);
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.3;
}

.fc-body {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: rgba(235, 232, 226, 0.75);
  line-height: 1.6;
  margin: 0;
}

.framework-output {
  position: absolute;
  bottom: -3rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.output-label {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: rgba(235, 232, 226, 0.5);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
}

.output-value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--signal);
  font-weight: 400;
}

/* SLIDE MAGNET CONTROL */
.clarity-magnet-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  margin-bottom: 4rem;
}

.clarity-magnet-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(235, 232, 226, 0.5);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
  min-width: 60px;
  text-align: center;
}

.clarity-magnet-slider {
  position: relative;
  width: 280px;
  height: 2px;
  background: linear-gradient(90deg, rgba(126, 174, 255, 0.2), rgba(47, 92, 211, 0.3), rgba(126, 174, 255, 0.2));
  border-radius: 2px;
  cursor: grab;
  user-select: none;
  transition: background 400ms ease;
}

.clarity-magnet-slider.transformed {
  background: linear-gradient(90deg, rgba(126, 174, 255, 0.4), rgba(47, 92, 211, 0.5), rgba(126, 174, 255, 0.4));
}

.clarity-magnet-slider:active {
  cursor: grabbing;
}

.clarity-magnet-handle {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 60px;
  height: 48px;
  background: linear-gradient(135deg, var(--signal) 0%, #5a7fd4 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: grab;
  transition: box-shadow 200ms ease, transform 200ms ease, left 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 8px 24px rgba(47, 92, 211, 0.3);
  will-change: left;
}

.clarity-magnet-slider:active .clarity-magnet-handle {
  cursor: grabbing;
}

.clarity-magnet-handle:hover {
  box-shadow: 0 12px 36px rgba(47, 92, 211, 0.4);
}

.magnet-icon {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 300;
  line-height: 1;
}

.magnet-text {
  display: none;
}

.clarity-magnet-handle.dragging {
  box-shadow: 0 0 30px 8px rgba(47, 92, 211, 0.35), 0 12px 36px rgba(47, 92, 211, 0.4);
  transition: box-shadow 100ms ease;
}

/* When fully transformed */
.clarity-magnet-handle.transformed {
  left: 220px;
  transition: box-shadow 200ms ease, transform 200ms ease, left 350ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(47, 92, 211, 0.7);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(47, 92, 211, 0);
  }
}

/* RESPONSIVE */
@media (max-width: 1200px) {
  .framework-structure {
    gap: 1.5rem;
  }

  .framework-column {
    padding: 2rem 1.5rem;
  }

  .fc-body {
    font-size: 0.9rem;
  }
}

@media (max-width: 900px) {
  .clarity-engine-section {
    padding: 6rem 0;
  }

  .clarity-heading {
    font-size: clamp(1.5rem, 3.5vw, 2.8rem);
  }

  .clarity-subheading {
    font-size: clamp(0.9rem, 1.6vw, 1rem);
    max-width: 48rem;
  }

  .framework-structure {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }

  .fc-recommend {
    grid-column: 1 / -1;
  }

  .scatter-item {
    font-size: 0.85rem;
    padding: 1rem 1.2rem;
  }

  .scatter-value {
    font-size: 1rem;
  }
}

@media (max-width: 600px) {
  .clarity-engine-section {
    padding: 4rem 0;
  }

  .clarity-header {
    margin-bottom: 3rem;
  }

  .clarity-heading {
    font-size: clamp(1.3rem, 5vw, 2rem);
    margin: 1rem 0 1.2rem;
  }

  .clarity-subheading {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .clarity-canvas {
    min-height: 350px;
    margin-bottom: 2rem;
  }

  .scatter-item {
    font-size: 0.75rem;
    padding: 0.9rem 1rem;
  }

  .scatter-label {
    font-size: 0.7rem;
  }

  .scatter-value {
    font-size: 0.95rem;
  }

  .scatter-item:nth-child(1) { left: 5%; top: 5%; }
  .scatter-item:nth-child(2) { right: 5%; top: 20%; }
  .scatter-item:nth-child(3) { left: 5%; bottom: 15%; }
  .scatter-item:nth-child(4) { right: 5%; bottom: 15%; }
  .scatter-item:nth-child(5) { left: 50%; top: 2%; transform: translateX(-50%); }
  .scatter-item:nth-child(6) { left: 50%; bottom: 2%; transform: translateX(-50%); }

  .framework-structure {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .fc-recommend {
    grid-column: 1;
  }

  .fc-column {
    padding: 1.5rem 1.2rem;
  }

  .fc-number {
    font-size: 1.5rem;
  }

  .fc-header h3 {
    font-size: 1rem;
  }

  .fc-body {
    font-size: 0.85rem;
  }

  .clarity-control {
    margin-top: 4rem;
  }

  .clarity-button {
    padding: 1rem 2.2rem;
    font-size: 0.95rem;
  }
}

/* === REDUCE MOTION === */
@media (prefers-reduced-motion: reduce) {
  .btn-primary::before,
  .btn-ghost::before { display: none; }

  .service-card,
  .initiative-card {
    transition: none !important;
  }

  .cta-banner .btn-primary {
    animation: none !important;
  }

  .scroll-line {
    animation: none !important;
  }

  .quanta-intro *,
  .quanta-intro *::before,
  .quanta-intro *::after {
    animation: none !important;
    transition: none !important;
  }

  .quanta-intro .logo-lockup,
  .quanta-intro .intro-char,
  .quanta-intro .intro-bar {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .quanta-intro .intro-slogan {
    opacity: 0 !important;
    animation:
      introSloganReducedIn 400ms ease 300ms forwards,
      introSloganReducedOut 500ms ease 1400ms forwards !important;
  }

  .quanta-intro .intro-slogan span {
    width: auto !important;
    overflow: visible !important;
    animation: none !important;
  }

  .quanta-intro .intro-slogan span::after {
    display: none !important;
  }

  @keyframes introSloganReducedIn {
    to { opacity: 1; }
  }

  @keyframes introSloganReducedOut {
    to { opacity: 0; }
  }

  .section-bar .sb1,
  .section-bar .sb2,
  .section-bar .sb3 {
    animation: none !important;
    transform: scaleY(1) !important;
    opacity: 1 !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Final cascade position for primary CTAs. Keep after legacy animation rules. */
.btn-primary {
  --signal-arrow: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='11' viewBox='0 0 18 11' fill='none'><path d='M1 5.5H15.5M11.25 1.25L15.5 5.5L11.25 9.75' stroke='%23F7FAFF' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'/><path d='M1 5.5H5.5' stroke='%238AB4FF' stroke-width='1.35' stroke-linecap='round'/></svg>");
  --signal-arrow-position: right 1.18rem center;
  --signal-sweep-start: -145%;
  --signal-sweep-end: 145%;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  text-transform: none;
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.14);
  background-color: #17306f;
  background-image:
    var(--signal-arrow),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 34%),
    linear-gradient(135deg, #5e8bf5 0%, #3d6ff0 44%, #1f45b0 100%);
  background-repeat: no-repeat;
  background-position: var(--signal-arrow-position), 0 0, 0 0;
  background-size: 18px 11px, 100% 100%, 155% 100%;
  border: 1px solid rgba(138, 180, 255, 0.38);
  border-radius: 6px;
  padding: 0.875rem 3.15rem 0.875rem 1.65rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 10px 26px rgba(4, 10, 28, 0.38),
    0 0 24px rgba(61, 111, 240, 0.24);
}

[dir="rtl"] .btn-primary {
  --signal-arrow: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='11' viewBox='0 0 18 11' fill='none'><path d='M17 5.5H2.5M6.75 1.25L2.5 5.5L6.75 9.75' stroke='%23F7FAFF' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'/><path d='M17 5.5H12.5' stroke='%238AB4FF' stroke-width='1.35' stroke-linecap='round'/></svg>");
  --signal-arrow-position: left 1.18rem center;
  --signal-sweep-start: 145%;
  --signal-sweep-end: -145%;
  padding: 0.875rem 1.65rem 0.875rem 3.15rem;
}

.btn-primary::before {
  content: none;
  display: none;
}

.btn-primary::after {
  content: none;
  display: none;
}

.btn-primary:hover {
  background-color: #101a38;
  background-image:
    var(--signal-arrow),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02) 36%),
    linear-gradient(135deg, #14295f 0%, #182f74 48%, #0b1430 100%);
  background-position: right 0.68rem center, 0 0, 0 0;
  border-color: rgba(168, 198, 255, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 0 0 1px rgba(138, 180, 255, 0.22),
    inset 0 -10px 22px rgba(61, 111, 240, 0.14),
    0 12px 28px rgba(4, 10, 28, 0.46),
    0 0 0 1px rgba(126, 174, 255, 0.3),
    0 0 36px rgba(61, 111, 240, 0.48);
  filter: saturate(1.12) brightness(1.03);
  transform: translateY(-2px);
}

[dir="rtl"] .btn-primary:hover {
  background-position: left 0.68rem center, 0 0, 0 0;
}

.btn-primary:hover::before {
  opacity: 0;
  transform: none;
}

.btn-primary:hover::after {
  opacity: 0;
  filter: none;
}

.btn-primary:active {
  transform: translateY(0) scale(0.985);
  border-color: rgba(138, 180, 255, 0.52);
  filter: saturate(1) brightness(0.96);
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 6px 18px rgba(4, 10, 28, 0.38),
    0 0 18px rgba(61, 111, 240, 0.24);
}

.btn-primary:focus-visible {
  outline: 2px solid rgba(168, 198, 255, 0.72);
  outline-offset: 3px;
  border-color: rgba(168, 198, 255, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.14),
    0 0 0 4px rgba(91, 124, 250, 0.18),
    0 12px 28px rgba(4, 10, 28, 0.42),
    0 0 30px rgba(61, 111, 240, 0.32);
}

.btn-primary:focus-visible::after {
  opacity: 0;
  filter: none;
  box-shadow: none;
}

.cta-banner .btn-primary {
  animation: none;
}

.nav-cta .btn-primary {
  --signal-arrow-position: right 0.92rem center;
  font-size: 0.78rem;
  line-height: 1;
  letter-spacing: 0.005em;
  border-radius: 5px;
  padding: 0.68rem 2.35rem 0.68rem 1.05rem;
  background-size: 15px 9px, 100% 100%, 155% 100%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -1px 0 rgba(0, 0, 0, 0.16),
    0 7px 18px rgba(4, 10, 28, 0.34),
    0 0 16px rgba(61, 111, 240, 0.18);
}

[dir="rtl"] .nav-cta .btn-primary {
  --signal-arrow-position: left 0.92rem center;
  padding: 0.68rem 1.05rem 0.68rem 2.35rem;
}

.nav-cta .btn-primary:hover {
  background-color: #101a38;
  background-image:
    var(--signal-arrow),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02) 36%),
    linear-gradient(135deg, #14295f 0%, #182f74 48%, #0b1430 100%);
  background-position: right 0.58rem center, 0 0, 0 0;
  border-color: rgba(168, 198, 255, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 0 0 1px rgba(138, 180, 255, 0.18),
    inset 0 -8px 18px rgba(61, 111, 240, 0.12),
    0 9px 22px rgba(4, 10, 28, 0.42),
    0 0 26px rgba(61, 111, 240, 0.36);
}

[dir="rtl"] .nav-cta .btn-primary:hover {
  background-position: left 0.58rem center, 0 0, 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary,
  .btn-primary::before,
  .btn-primary::after {
    transition: none !important;
    animation: none !important;
  }

  .btn-primary::before {
    display: none !important;
  }

  .btn-primary:hover {
    transform: none;
  }

  .approach-step,
  .approach-step::before,
  .approach-step::after,
  .approach-step-num,
  .approach-step-title,
  .serve-item,
  .serve-item::before,
  .serve-item::after,
  .serve-dot,
  .serve-text {
    transition: none !important;
    animation: none !important;
  }

  .approach-step::before,
  .serve-item::before {
    display: none !important;
  }

  .approach-step:hover,
  .approach-step:focus-within,
  .serve-item:hover,
  .serve-item:focus-within {
    transform: none;
  }
}
