/* =========================================================================
   BASE RESET & VARIABLES
   ========================================================================= */
:root {
  --bg: #0A0F1E;
  --bg2: #0D1528;
  --surface: #111827;
  --teal: #00D4FF;
  --blue: #3B82F6;
  --border: #1E293B;
  --text: #FFFFFF;
  --muted: #94A3B8;
  
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  color: var(--text);
}

body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  cursor: none; /* Custom Cursor */
}

body.loading-state {
  overflow: hidden;
}

::selection {
  background: var(--teal);
  color: var(--bg);
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--border);
}
::-webkit-scrollbar-thumb {
  background: var(--teal);
  border-radius: 3px;
}

a {
  text-decoration: none;
  color: inherit;
  cursor: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2.5rem;
}

@media(min-width: 768px) {
  h2 { font-size: 3.5rem; }
}

p {
  color: var(--muted);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.teal-gradient {
  background: linear-gradient(90deg, #00D4FF 0%, #3B82F6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =========================================================================
   CUSTOM CURSOR
   ========================================================================= */
#cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 12px; height: 12px;
  background-color: var(--teal);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
}

#cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border: 2px solid rgba(0, 212, 255, 0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background-color 0.2s, border-color 0.2s;
  will-change: transform;
}

body.hovering-btn #cursor-ring {
  width: 72px;
  height: 72px;
  background-color: rgba(0, 212, 255, 0.2);
  border-color: rgba(0, 212, 255, 0);
}

@media(max-width: 768px) {
  #cursor-dot, #cursor-ring { display: none; }
  body { cursor: auto; }
  a, button { cursor: pointer; }
}

/* =========================================================================
   AMBIENT ORBS
   ========================================================================= */
.ambient-orbs {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.orb {
  position: absolute;
  border-radius: 50%;
  background: var(--teal);
  filter: blur(80px);
  opacity: 0.02;
  will-change: transform;
}

.orb-1 {
  width: 400px; height: 400px;
  top: -100px; left: -100px;
  animation: orb-drift 25s infinite alternate ease-in-out;
}
.orb-2 {
  width: 500px; height: 500px;
  bottom: -200px; right: -100px;
  animation: orb-drift-rev 30s infinite alternate ease-in-out;
}
.orb-3 {
  width: 300px; height: 300px;
  top: 40%; left: 50%;
  animation: orb-drift 20s infinite alternate ease-in-out;
}

@keyframes orb-drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(100px, 50px) scale(1.1); }
  100% { transform: translate(-50px, 150px) scale(0.9); }
}

@keyframes orb-drift-rev {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-100px, -50px) scale(1.1); }
  100% { transform: translate(50px, -150px) scale(0.9); }
}

/* =========================================================================
   SECTION 1: LOADING SCREEN
   ========================================================================= */
#loader {
  position: fixed;
  inset: 0;
  background-color: var(--bg);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s var(--ease-out);
}

.loader-content {
  text-align: center;
}

.loader-logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 1rem;
}

.loader-logo path {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  /* Animates in JS */
}

.loader-wordmark {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.6s var(--ease-out) 1.2s;
}

.loader-wordmark.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================================
   SECTION 2: NAVIGATION
   ========================================================================= */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: all 0.3s var(--ease-in-out);
  border-bottom: 1px solid transparent;
}

#navbar.scrolled {
  padding: 1rem 0;
  background: rgba(10, 15, 30, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo {
  width: 32px;
  height: 32px;
}

.nav-wordmark {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.nav-center {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--teal);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: none; /* override for custom cursor logic */
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: 0.3s;
}

.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 15, 30, 0.98);
  z-index: -1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s var(--ease-in-out);
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  transform: translateY(20px);
  transition: transform 0.4s var(--ease-in-out);
}

.mobile-menu.active .mobile-links {
  transform: translateY(0);
}

.mobile-links a {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 600;
}

@media(max-width: 992px) {
  .nav-center { display: none; }
  .nav-right .btn { display: none; }
  .hamburger { display: flex; cursor: pointer; }
}

/* =========================================================================
   BUTTONS
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 8px;
  transition: transform 0.1s, box-shadow 0.2s, background 0.2s;
  border: 1px solid transparent;
  will-change: transform;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: linear-gradient(90deg, #00D4FF 0%, #3B82F6 100%);
  color: #0A0F1E;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}
.btn-xl {
  padding: 1.25rem 2.5rem;
  font-size: 1.15rem;
}

/* =========================================================================
   SECTION 3: HERO
   ========================================================================= */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-color: #050d1a;
  background-image: linear-gradient(rgba(30, 41, 59, 0.2) 1px, transparent 1px),
  linear-gradient(90deg, rgba(30, 41, 59, 0.2) 1px, transparent 1px);
  background-size: 80px 80px;
  overflow: hidden;
  padding-top: 80px; /* navbar offset */
}

#hero-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: auto; /* Allow mousemove */
}

.hud-scan-line {
  position: absolute;
  top: -100px; left: 0; right: 0;
  height: 1px;
  background: var(--teal);
  box-shadow: 0 0 10px 2px var(--teal);
  opacity: 0;
  z-index: 2;
  animation: scan-line 3s var(--ease-in-out) forwards 1.5s;
}

@keyframes scan-line {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 0.3; }
  90% { opacity: 0.3; }
  100% { transform: translateY(120vh); opacity: 0; }
}

.hero-container {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-left {
  flex: 0 0 55%;
  max-width: 55%;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 50px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--teal);
  margin-bottom: 2rem;
}

.hero-headline {
  font-size: clamp(3rem, 5vw, 5.5rem);
  letter-spacing: -1.5px;
  margin-bottom: 1.5rem;
}

.hero-headline .line {
  display: block;
}

.subtext {
  font-size: 1.25rem;
  max-width: 90%;
  margin-bottom: 2.5rem;
}

.cta-group {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 3rem;
  align-items: center;
}

.trust-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dots-group {
  display: flex;
  gap: 4px;
}

.trust-row .dot {
  width: 6px; height: 6px;
  background: var(--teal);
  border-radius: 50%;
  opacity: 0.7;
}

.trust-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
}

.hero-right {
  flex: 0 0 45%;
  max-width: 45%;
  position: relative;
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visuals {
  position: relative;
  width: 100%;
  height: 100%;
}

.cluster-visuals {
  transform: translateY(-20px);
}

.cluster-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.3) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
}

.ui-card {
  position: absolute;
  background: rgba(17, 24, 39, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.1rem 1.6rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(0, 212, 255, 0.2);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 500;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: max-content;
  white-space: nowrap;
}

@keyframes floatCard1 {
  0%, 100% { transform: translateY(0) rotateX(15deg) rotateY(-15deg); }
  50% { transform: translateY(-20px) rotateX(15deg) rotateY(-15deg); }
}
@keyframes floatCard2 {
  0%, 100% { transform: translateY(0) rotateX(15deg) rotateY(15deg); }
  50% { transform: translateY(-20px) rotateX(15deg) rotateY(15deg); }
}
@keyframes floatCard3 {
  0%, 100% { transform: translateY(0) rotateX(-10deg) rotateY(-15deg); }
  50% { transform: translateY(-20px) rotateX(-10deg) rotateY(-15deg); }
}
@keyframes floatCard4 {
  0%, 100% { transform: translateY(0) rotateX(10deg) rotateY(15deg); }
  50% { transform: translateY(-25px) rotateX(10deg) rotateY(15deg); }
}
@keyframes floatCard5 {
  0%, 100% { transform: translateY(0) rotateX(-15deg) rotateY(10deg); }
  50% { transform: translateY(-15px) rotateX(-15deg) rotateY(10deg); }
}
@keyframes floatCard6 {
  0%, 100% { transform: translateY(0) rotateX(5deg) rotateY(-10deg); }
  50% { transform: translateY(-18px) rotateX(5deg) rotateY(-10deg); }
}
@keyframes floatCard7 {
  0%, 100% { transform: translateY(0) rotateX(-5deg) rotateY(5deg); }
  50% { transform: translateY(-20px) rotateX(-5deg) rotateY(5deg); }
}
@keyframes floatCard8 {
  0%, 100% { transform: translateY(0) rotateX(8deg) rotateY(-8deg); }
  50% { transform: translateY(-22px) rotateX(8deg) rotateY(-8deg); }
}

.card-1 { 
  top: 10%; left: -5%; 
  animation: floatCard1 6s ease-in-out infinite; 
}
.card-2 { 
  top: 40%; right: -8%; 
  animation: floatCard2 8s ease-in-out infinite 1s; 
}
.card-3 { 
  bottom: 25%; left: 10%; 
  animation: floatCard3 7s ease-in-out infinite 2.5s; 
}
.card-4 { 
  top: 5%; right: 10%; 
  animation: floatCard4 6.5s ease-in-out infinite 0.5s; 
}
.card-5 { 
  bottom: 18%; right: -5%; 
  animation: floatCard5 7.5s ease-in-out infinite 1.5s; 
}
.card-6 { 
  top: 45%; left: -12%; 
  animation: floatCard6 6.8s ease-in-out infinite 2s; 
}
.card-7 { 
  bottom: -2%; left: 35%; 
  animation: floatCard7 8s ease-in-out infinite 3s; 
}
.card-8 {
  top: 25%; right: 30%;
  animation: floatCard8 7.2s ease-in-out infinite 1.2s;
}

.waveform { display: flex; gap: 4px; align-items: center; height: 24px; }
.waveform .bar { width: 4px; background: #00d4ff; border-radius: 2px; animation: wave 1s ease-in-out infinite alternate; }
.waveform .bar-1 { height: 12px; animation-delay: 0s; }
.waveform .bar-2 { height: 24px; animation-delay: 0.2s; }
.waveform .bar-3 { height: 16px; animation-delay: 0.4s; }
.waveform .bar-4 { height: 20px; animation-delay: 0.6s; }
.waveform .bar-5 { height: 10px; animation-delay: 0.8s; }

@keyframes wave { 0% { transform: scaleY(0.5); } 100% { transform: scaleY(1); } }

.metrics { display: flex; flex-direction: column; gap: 0.5rem; }
.metric-line { font-family: var(--font-mono); font-size: 0.9rem; color: #00d4ff; }
.icon-check { color: #10B981; font-weight: bold; }

@media(max-width: 992px) {
  .hero-container { flex-direction: column; text-align: center; padding-top: 4rem; }
  .hero-left, .hero-right { flex: 0 0 100%; max-width: 100%; }
  .subtext { margin: 0 auto 2.5rem; }
  .cta-group { justify-content: center; flex-wrap: wrap; }
  .trust-row { justify-content: center; }
  .hero-right { height: 550px; margin-top: 3rem; }
  .phone-mockup { left: 50%; transform: translateX(-50%); bottom: -20px; }
  .main-visual { max-width: 300px; }
}

/* =========================================================================
   SECTION 4: MARQUEE BAR
   ========================================================================= */
#marquee {
  background: var(--bg2);
  border-top: 1px solid rgba(0, 212, 255, 0.2);
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
  padding: 1rem 0;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.05) inset;
}

.marquee-wrapper {
  display: flex;
  white-space: nowrap;
  width: 200%;
}

.marquee-content {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--teal);
  letter-spacing: 1px;
  text-transform: uppercase;
  animation: marquee 30s linear infinite;
  width: 50%;
}

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

/* =========================================================================
   GLOBAL REVEAL CLASSES (OBSERVER TARGETS)
   ========================================================================= */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  will-change: opacity, transform;
}

.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 80ms; }
.delay-2 { transition-delay: 160ms; }
.delay-3 { transition-delay: 240ms; }

/* Hero specific reveals handled by JS / internal classes */
.fade-up {
  opacity: 0; transform: translateY(20px);
  animation: initial-fade-up 0.8s var(--ease-out) forwards;
}
.stagger-0 { animation-delay: 1.5s; }
.stagger-1 { animation-delay: 1.6s; }
.stagger-2 { animation-delay: 1.7s; }
.stagger-3 { animation-delay: 1.85s; }
.stagger-4 { animation-delay: 2.0s; }

@keyframes initial-fade-up {
  to { opacity: 1; transform: translateY(0); }
}


/* =========================================================================
   GENERIC SECTION WRAPPER
   ========================================================================= */
.section-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 8rem 2rem;
}
.text-center { text-align: center; }
.subtitle { font-size: 1.25rem; max-width: 600px; margin: 0 auto; }

/* =========================================================================
   SECTION 5: SERVICES (JS generated cards)
   ========================================================================= */
.services-stack {
  display: flex;
  flex-direction: column;
  gap: 0; 
  margin-top: 4rem;
  padding-bottom: 4rem;
}

.sticky-card {
  position: sticky;
  top: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--teal);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 400px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
  transform-origin: top center;
  transition: border-color 0.4s var(--ease-out);
  will-change: transform;
}

.sticky-img-col {
  flex: 0 0 45%;
  height: 100%;
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

.sticky-img-col img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  transition: opacity 0.4s, transform 0.6s var(--ease-out);
}

.sticky-card:hover .sticky-img-col img {
  opacity: 1;
  transform: scale(1.05);
}

.sticky-img-blur {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, var(--surface) 100%);
  z-index: 1;
}

.sticky-content {
  flex: 0 0 55%;
  padding: 3rem 4rem;
  position: relative;
  z-index: 2;
}

.sticky-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.sticky-title {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.sticky-body {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 90%;
}

.sticky-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.sticky-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 6px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: #CBD5E1;
}

@media(max-width: 992px) {
  .sticky-card {
    flex-direction: column;
    min-height: auto;
  }
  .sticky-img-col {
    width: 100%;
    height: 250px;
    min-height: 250px;
    flex: none;
  }
  .sticky-img-blur {
    background: linear-gradient(180deg, transparent 0%, var(--surface) 100%);
  }
  .sticky-content {
    width: 100%;
    padding: 2rem;
    flex: none;
  }
  .sticky-title {
    font-size: 1.75rem;
  }
}


/* =========================================================================
   SECTION 6: METRICS
   ========================================================================= */
#metrics {
  background: var(--bg2);
  position: relative;
  padding: 6rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.data-rain-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(180deg, transparent 0%, rgba(0, 212, 255, 0.1) 50%, transparent 100%);
  background-size: 100% 200%;
  animation: data-rain 8s linear infinite;
  opacity: 0.5;
  pointer-events: none;
}

@keyframes data-rain {
  0% { background-position: 0 -200%; }
  100% { background-position: 0 200%; }
}

.metrics-container {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  z-index: 2;
}

@media(max-width: 992px) {
  .metrics-container { grid-template-columns: repeat(2, 1fr); gap: 4rem 2rem; }
}

@media(max-width: 576px) {
  .metrics-container { grid-template-columns: 1fr; gap: 4rem 2rem; }
}

.metric-card {
  position: relative;
  text-align: center;
}

.ghost-number {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-head);
  font-size: 180px;
  font-weight: 800;
  color: var(--teal);
  opacity: 0; /* JS controls this */
  z-index: -1;
  pointer-events: none;
  transition: transform 2s var(--ease-out), opacity 2s var(--ease-out);
}

.metric-value {
  font-family: var(--font-head);
  font-size: 4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.always-on {
  opacity: 0;
  transition: opacity 2s ease-in;
}

.metric-card.is-visible .always-on {
  opacity: 1;
}

/* =========================================================================
   SECTION 7: HOW IT WORKS
   ========================================================================= */
.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 4rem;
  position: relative;
}

.pipeline-connector {
  position: absolute;
  top: 24px; left: 10%; right: 10%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.pipeline-connector::after {
  content: '';
  position: absolute;
  top: -1px; left: 0;
  width: 0; height: 4px;
  background: var(--teal);
  box-shadow: 0 0 10px var(--teal);
  transition: width 2s var(--ease-out);
}

.pipeline-grid.is-visible .pipeline-connector::after {
  width: 100%;
}

.pipeline-step {
  position: relative;
  z-index: 1;
  background: var(--bg);
  padding-top: 3rem;
}

.step-badge {
  width: 48px; height: 48px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--teal);
  position: absolute;
  top: 0; left: 0;
  transition: border-color 0.4s, background 0.4s;
}

.pipeline-step:hover .step-badge {
  border-color: var(--teal);
  background: rgba(0, 212, 255, 0.1);
}

.step-timing {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.pipeline-step h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.pipeline-step p {
  font-size: 0.95rem;
}

@media(max-width: 1024px) {
  .pipeline-grid { grid-template-columns: repeat(2, 1fr); gap: 4rem 2rem; }
  .pipeline-connector { display: none; }
}

@media(max-width: 600px) {
  .pipeline-grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   SECTION 8: CASE STUDIES REDESIGN
   ========================================================================= */
#cases {
  position: relative;
  background: #0A0F1E;
  padding-bottom: 8rem;
  overflow: hidden;
}

#cases .section-container {
  padding-bottom: 2rem;
  position: relative;
  z-index: 2;
}

.cases-ambient-left {
  position: absolute;
  top: 50%; left: 15%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,212,255,0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.cases-ambient-right {
  position: absolute;
  top: 50%; left: 85%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(59,130,246,0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.cases-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--teal);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.cases-wrapper {
  position: relative;
  max-width: 100vw;
  z-index: 2;
}

.case-study-scroller {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 20px 60px;
  gap: 28px;
  cursor: grab;
}

.case-study-scroller.grabbing {
  cursor: grabbing;
  scroll-snap-type: none; /* disable snap during drag */
}

.case-study-scroller::-webkit-scrollbar {
  display: none; 
}

.case-card {
  flex: 0 0 520px;
  width: 520px;
  height: 640px;
  scroll-snap-align: center;
  background: #111827;
  border: 1px solid var(--border);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s, transform 0.4s, box-shadow 0.4s;
  
  /* Initial state for Entry Anim */
  opacity: 0;
  transform: translateY(50px) scale(0.97);
}

.case-card.in {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}

.case-card:hover {
  border-color: var(--accent);
  transform: translateY(-8px) scale(1.01) !important;
  box-shadow: 
    0 0 0 1px rgba(0,212,255,0.2),
    0 40px 80px rgba(0,0,0,0.6),
    0 0 60px color-mix(in srgb, var(--accent) 15%, transparent);
}

/* Base Image */
.case-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 1.6s cubic-bezier(0.4,0,0.2,1);
}

.case-card:hover .case-img {
  transform: scale(1.1);
}

/* Gradient Overlay */
.case-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top,
    rgba(10,15,30,0.98) 30%,
    rgba(10,15,30,0.7)  55%,
    rgba(10,15,30,0.25) 80%,
    rgba(10,15,30,0.1) 100%);
  pointer-events: none;
}

/* Top Accent Bar */
.case-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  z-index: 4;
  transition: right 0.6s ease;
}

.case-card:hover::before {
  right: 0;
}

/* HUD Corners */
.case-corner-tl, .case-corner-tr, .case-corner-bl, .case-corner-br {
  position: absolute;
  width: 18px; height: 18px;
  opacity: 0;
  z-index: 4;
  transition: opacity 0.25s ease;
}

.case-card:hover .case-corner-tl,
.case-card:hover .case-corner-tr,
.case-card:hover .case-corner-bl,
.case-card:hover .case-corner-br {
  opacity: 1;
}

.case-corner-tl { top: 16px; left: 16px; border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.case-corner-tr { top: 16px; right: 16px; border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.case-corner-bl { bottom: 56px; left: 16px; border-bottom: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.case-corner-br { bottom: 56px; right: 16px; border-bottom: 2px solid var(--accent); border-right: 2px solid var(--accent); }


/* Card Body */
.case-body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 40px;
  z-index: 2;
}

.case-body .industry-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  padding: 4px 10px;
  border-radius: 4px;
  color: #fff;
  margin-bottom: 16px;
}

.case-body h3 {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 10px 0;
}

.case-body p {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 24px 0;
}

/* Metric Row */
.metric-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
}

.metric-number {
  font-family: var(--font-head);
  font-size: 68px;
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: filter 0.4s ease;
}

.case-card:hover .metric-number {
  filter: drop-shadow(0 0 24px var(--accent));
}

.sub-metric {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  max-width: 130px;
}

/* Nav Arrows */
.case-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(10,15,30,0.85);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  color: var(--teal);
  font-size: 22px;
  display: flex;
  align-items: center; justify-content: center;
  z-index: 5;
  cursor: pointer;
  transition: all 0.3s;
}

#casePrev { left: 12px; }
#caseNext { right: 12px; }

.case-nav-arrow:hover {
  background: rgba(0,212,255,0.12);
  border-color: var(--teal);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 20px rgba(0,212,255,0.3);
}

/* Dot Indicators */
.case-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
  z-index: 2;
  position: relative;
}

.case-dot {
  width: 7px; height: 7px;
  border-radius: 4px;
  background: var(--border);
  transition: width 0.3s ease, background 0.3s ease;
  cursor: pointer;
}

.case-dot.active {
  width: 28px;
  background: var(--teal);
}

@media(max-width: 768px) {
  .case-card { 
    flex: 0 0 300px; 
    width: 300px; 
    height: 480px; 
  }
  .case-study-scroller { padding: 20px 24px; }
  .metric-number { font-size: 52px; }
  .case-nav-arrow { display: none; }
}

/* =========================================================================
   SECTION 9: ABOUT
   ========================================================================= */
#about {
  background: var(--bg2);
  border-top: 1px solid var(--border);
}

.about-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 8rem 2rem;
  display: flex;
  align-items: center;
  gap: 4rem;
}

.about-left {
  flex: 1;
}

.about-left h2 {
  font-size: 3rem;
  margin-bottom: 2rem;
}

.story-text {
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 1.5rem;
  max-width: 600px;
}

.founder-signoff {
  font-family: var(--font-mono);
  color: var(--teal);
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.about-right {
  flex: 1;
  display: flex;
  justify-content: center;
  background: url('./images/about-bg.png') center/cover no-repeat;
  padding: 4rem;
  border-radius: 20px;
}

.founder-frame {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4/5;
  border: 1px solid var(--teal);
  border-radius: 12px;
  position: relative;
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.1) inset;
  background: var(--surface);
  overflow: hidden;
}

.founder-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
}

.founder-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.mt-6 { margin-top: 1.5rem; }

@media(max-width: 992px) {
  .about-container { flex-direction: column; text-align: center; }
  .story-text { margin: 0 auto 1.5rem; }
}

/* =========================================================================
   SECTION 10: FAQ
   ========================================================================= */
.faq-accordion {
  max-width: 800px;
  margin: 4rem auto 0;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  border-left: 2px solid transparent;
  transition: border-color 0.3s;
}

.faq-item.active {
  border-left-color: var(--teal);
  background: rgba(0, 212, 255, 0.02);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.5rem;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question .icon {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--teal);
  transition: transform 0.3s;
}

.faq-item.active .icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out);
}

.faq-answer p {
  padding: 0 1.5rem 1.5rem;
  color: var(--muted);
}

/* =========================================================================
   SECTION 11: CTA
   ========================================================================= */
#cta {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: url('./images/cta-bg.png') center/cover no-repeat;
  overflow: hidden;
}

#cta-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.cta-overlay-bg {
  position: absolute;
  inset: 0;
  background: var(--bg);
  opacity: 0.8;
  z-index: 0;
}

.sonar-wrapper {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 10px; height: 10px;
  z-index: 0;
}

.sonar-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid var(--teal);
  border-radius: 50%;
  opacity: 0;
  animation: pulse-ring 9s infinite linear;
}

.r1 { animation-delay: 0s; }
.r2 { animation-delay: 3s; }
.r3 { animation-delay: 6s; }

@keyframes pulse-ring {
  0% { width: 0; height: 0; opacity: 0.4; border-width: 2px; }
  100% { width: 800px; height: 800px; opacity: 0; border-width: 0px; }
}

.cta-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 2rem;
}

.breathing-glow {
  font-size: clamp(3rem, 5vw, 4.5rem);
  margin-bottom: 2rem;
  animation: breathe 4s infinite alternate ease-in-out;
}

@keyframes breathe {
  0% { filter: brightness(1) drop-shadow(0 0 10px rgba(0, 212, 255, 0.2)); }
  100% { filter: brightness(1.3) drop-shadow(0 0 30px rgba(0, 212, 255, 0.6)); }
}

.cta-burst-btn {
  position: relative;
  overflow: hidden;
}

.trust-footer {
  margin-top: 3rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--muted);
  letter-spacing: 1px;
}

/* =========================================================================
   SECTION 12: FOOTER
   ========================================================================= */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 6rem 2rem 2rem;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

@media(max-width: 992px) {
  .footer-container { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
}

@media(max-width: 576px) {
  .footer-container { grid-template-columns: 1fr; }
}

.brand-col .footer-wordmark {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 1rem 0 0.5rem;
}

.brand-col .footer-tagline {
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.footer-col h4 {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul a {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.footer-col ul a:hover {
  color: var(--teal);
}

.teal-link {
  color: var(--teal) !important;
  font-weight: 600;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* End Configuration */
