/* ============================================
   WRAVELO — Core Design System
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=Lexend:wght@300;400;500;600;700&display=swap');

/* --- Custom Properties --- */
html {
  /* Lenis handles smooth scroll — no native scroll-behavior here */
  scroll-behavior: auto;
  background-color: #000000;
  touch-action: pan-y;
  /* guarantee vertical touch scroll on mobile */
}

:root {
  --bg: #000000;
  --bg-elevated: #080808;
  --brand-red: #851b1b;
  --brand-gold: #f5c842;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --primary: #F5F5F7;
  --secondary: #e2e2e8;
  --muted: #71717a;
  --accent: #2d3f49;
  --accent-light: #3d5566;
  --accent-glow: rgba(45, 63, 73, 0.4);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --radius-sm: 0.75rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --radius-full: 9999px;
  --font-heading: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-label: 'Lexend', system-ui, sans-serif;
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: auto;
  overflow-x: hidden;
  background-color: #000000;
  /* NOTE: Do NOT set overscroll-behavior on html — it blocks native touch scroll on iOS/Android */
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

/* .lenis.lenis-stopped — overflow is managed directly on body via JS instead */

body {
  font-family: var(--font-body);
  background-color: #000000;
  background: linear-gradient(180deg, #000000 0%, #050505 50%, #000000 100%);
  color: var(--primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  touch-action: pan-y;
  /* ensures vertical touch scroll is native-fast */
}

/* --- Fixed dark background fallback (prevents white flash on overscroll) --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -100;
  background: #000000;
  pointer-events: none;
}

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

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

/* --- Typography Utilities --- */
.font-label {
  font-family: var(--font-label);
}

.text-balance {
  text-wrap: balance;
}

/* --- Section Label (Eyebrow) --- */
.section-label {
  font-family: var(--font-label);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-full);
  background: var(--glass-bg);
  border: 1px solid #851b1b;
  box-shadow: 0 0 15px rgba(133, 27, 27, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  /* prevent inline-flex text from causing horizontal CLS on narrow viewports */
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
}

@media (min-width: 1536px) {
  .section-label {
    font-size: 0.95rem;
    padding: 0.75rem 1.75rem;
  }
}

@media (max-width: 639px) {
  .section-label {
    font-size: 0.65rem;
    padding: 0.4rem 1rem;
    letter-spacing: 0.1em;
    gap: 0.5rem;
  }

  .section-label::before {
    width: 5px;
    height: 5px;
  }
}

.section-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-gold);
  box-shadow: 0 0 8px var(--brand-gold);
}

/* --- Glass Card --- */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(12px);
  /* reduced from 20px — lighter GPU compositor cost */
  -webkit-backdrop-filter: blur(12px);
  /* Promote to own GPU layer so backdrop-filter doesn't repaint neighbours */
  transform: translateZ(0);
  /* will-change omitted at rest — translateZ(0) already promotes the layer;
     will-change is applied only on hover to prevent unnecessary compositor pinning */
  transition: background var(--transition-base),
    border-color var(--transition-base),
    transform var(--transition-smooth),
    box-shadow var(--transition-smooth);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  will-change: transform;
  transform: translateY(-4px) scale(1.015) translateZ(0);
  box-shadow: 0 20px 50px -10px rgba(255, 106, 0, 0.15),
    0 12px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* On mobile remove backdrop-filter from cards — it's the single biggest
   source of scroll jank on low-end phones (forces GPU compositing of every card). */
@media (max-width: 767px) {
  .glass-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.05);
    /* slightly more opaque to compensate */
  }
}

/* --- Pill Button --- */
.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

@media (min-width: 640px) {
  .hero-container {
    min-height: 80vh;
  }
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.02em;
  padding: 1rem 2.5rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

@media (min-width: 1536px) {
  .btn-pill {
    font-size: 1.125rem;
    padding: 1.25rem 3rem;
  }
}

.btn-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--transition-base);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
}

.btn-pill:hover::before {
  opacity: 1;
}

.btn-primary {
  background: var(--primary);
  color: var(--bg);
}

.btn-primary:hover {
  background: #e4e4e7;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(245, 245, 247, 0.15);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--brand-gold);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: #FFFFFF;
  transform: translateY(-1px);
}

/* Arrow icon in button */
.btn-arrow {
  display: inline-flex;
  transition: transform var(--transition-base);
}

.btn-pill:hover .btn-arrow {
  transform: translateX(3px);
}

/* --- Ambient Background Effects --- */
.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  pointer-events: none;
  /* translateZ(0) promotes to GPU layer for blur perf without a persistent will-change hint */
  transform: translateZ(0);
  backface-visibility: hidden;
}

.dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* --- Global Gradient Mesh Background --- */
.gradient-mesh-bg {
  position: fixed;
  inset: 0;
  z-index: -10;
  background-color: #0b0c0c;
  overflow: hidden;
  transform: translateZ(0);
  contain: strict;
}

.gradient-mesh-bg::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: radial-gradient(ellipse at 10% 20%, rgba(137, 147, 143, 0.2) 0%, transparent 40%),
    radial-gradient(ellipse at 80% 60%, rgba(80, 95, 90, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 40% 80%, rgba(120, 137, 133, 0.15) 0%, transparent 45%);
  filter: blur(100px);
}

.gradient-mesh-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 70% 20%, rgba(58, 64, 61, 0.6) 0%, transparent 50%);
  filter: blur(80px);
}

/* --- Noise Grain Overlay --- */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: -9;
  opacity: 0.25;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  pointer-events: none;
  mix-blend-mode: overlay;
  transform: translateZ(0);
  contain: strict;
}

/* --- Floating Header --- */
.floating-header {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  z-index: 1000;
  padding: 0;
  background: transparent !important;
  border: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  transition: all var(--transition-smooth);
}

.floating-header.scrolled {
  top: 0.75rem;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Navbar Container Dock styling */
.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  border-radius: 9999px;
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  /* Hardware acceleration & smooth timing */
  will-change: max-width, padding, background-color, border-color, box-shadow;
  transform: translateZ(0);
  transition: max-width 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    background-color 0.5s ease,
    border-color 0.5s ease,
    box-shadow 0.5s ease;
}

.floating-header.scrolled .navbar-container {
  max-width: 380px; /* mobile scrolled max-width */
}

@media (min-width: 768px) {
  .floating-header.scrolled .navbar-container {
    max-width: 720px; /* desktop scrolled max-width */
  }
}

/* Remove backgrounds of wrappers inside dock */
.floating-header.scrolled .floating-header-logo-wrap,
.floating-header.scrolled .floating-header-actions-wrap {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 !important;
}

/* Transitions for navigation options and toggles */
.desktop-nav {
  display: none !important; /* Hide desktop links globally */
}

.floating-header.scrolled .desktop-nav {
  display: none !important;
}

.dock-menu-btn {
  display: none !important; /* hidden on mobile viewports */
  opacity: 1 !important;
  transform: translate(-50%, -50%) scale(1) !important;
  pointer-events: auto !important;
  position: absolute;
  left: 50%;
  top: 50%;
  will-change: opacity, transform;
  transition: background-color 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transform-origin: center center;
  
  /* Increased size and padding */
  align-items: center !important;
  gap: 10px !important;
  padding: 0.55rem 1.4rem !important;
  border-radius: 9999px !important;
  background-color: #0A0A0A !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
  font-family: var(--font-label) !important;
  font-size: 12.5px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.15em !important;
}

.dock-menu-btn:hover {
  background-color: #171717 !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

/* Pulsing red dot size */
.dock-menu-btn span.w-1\.5.h-1\.5,
.dock-menu-btn span.bg-red-500 {
  width: 7px !important;
  height: 7px !important;
}

/* Chevron icon size */
.dock-menu-btn svg {
  width: 13px !important;
  height: 13px !important;
}

.floating-header.scrolled .dock-menu-btn {
  opacity: 1 !important;
  transform: translate(-50%, -50%) scale(1) !important;
  pointer-events: auto !important;
}

/* --- Desktop Megamenu Overlay --- */
#desktop-megamenu {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, visibility;
  background-color: #000000;
  z-index: 1100;
}

#desktop-megamenu.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

/* Stagger animations for Megamenu contents */
#desktop-megamenu .lg\:col-span-3,
#desktop-megamenu .lg\:col-span-5,
#desktop-megamenu .lg\:col-span-4 {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

#desktop-megamenu.is-open .lg\:col-span-3 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.1s;
}

#desktop-megamenu.is-open .lg\:col-span-5 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

#desktop-megamenu.is-open .lg\:col-span-4 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.3s;
}

#desktop-megamenu .border-t {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

#desktop-megamenu.is-open .border-t {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.4s;
}

/* Custom scrollbar for megamenu overlay */
#desktop-megamenu::-webkit-scrollbar {
  width: 6px;
}

#desktop-megamenu::-webkit-scrollbar-track {
  background: transparent;
}

#desktop-megamenu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
}

#desktop-megamenu::-webkit-scrollbar-thumb:hover {
  background: rgba(220, 38, 38, 0.3);
}

/* --- Floating Logo Island --- */
.floating-header-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(220, 38, 38, 0.4);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-base);
}

.floating-header-logo-wrap:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(220, 38, 38, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.15);
}

/* --- Floating Actions Island (CTA + Hamburger) --- */
.floating-header-actions-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(220, 38, 38, 0.4);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-base);
}

/* Ensure the button has proper spacing inside the action island */
.floating-header-actions-wrap .btn-pill {
  margin: 0;
}

/* Adjust hamburger position in wrapper */
.floating-header-actions-wrap .hamburger {
  margin-right: 0.5rem;
}

/* --- Desktop Navigation & Individual Menu Pills --- */
.desktop-nav {
  gap: 0.5rem !important;
  /* Overrides the tailwind gap-8 for segmented spacing */
}

/* --- Nav Link Base --- */
.nav-link {
  position: relative;
  font-family: var(--font-label);
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--secondary);
  transition: color var(--transition-fast);
}

/* Style individual nav items in desktop view as background blocks */
.desktop-nav .nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  height: 2.75rem;
  border-radius: var(--radius-full);
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(220, 38, 38, 0.4);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all var(--transition-base);
}

/* Remove original bottom-underline hover line for desktop pills */
.desktop-nav .nav-link::after {
  display: none !important;
}

/* Hover effect on desktop menu pills */
.desktop-nav .nav-link:hover,
.desktop-nav .relative.group:hover .nav-link {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(220, 38, 38, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.15);
  color: var(--primary);
}

.desktop-nav .nav-link:active {
  transform: translateY(0);
}

/* Active Nav Link (current page indicator) */
.desktop-nav .nav-link.nav-link--active {
  background: rgba(220, 38, 38, 0.15) !important;
  border-color: rgba(220, 38, 38, 0.95) !important;
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: var(--primary) !important;
}

.desktop-nav .nav-link.nav-link--active:hover {
  background: rgba(220, 38, 38, 0.25) !important;
  border-color: rgba(220, 38, 38, 1) !important;
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

/* --- Mobile / Underline styles (only used if they are not in desktop nav) --- */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: width var(--transition-base);
}

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

.nav-link:hover::after {
  width: 100%;
}

.nav-link--active {
  color: var(--primary) !important;
}

/* --- Mega Menu Gradient Border Effect --- */
.megamenu-gradient-container {
  position: relative;
  background: rgba(10, 10, 10, 0.96) !important;
}

.megamenu-gradient-container::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.5px;
  /* Border thickness */
  border-radius: inherit;
  background: linear-gradient(135deg,
      rgba(255, 60, 0, 0.95) 0%,
      rgba(255, 106, 0, 0.7) 25%,
      rgba(255, 140, 66, 0.4) 50%,
      rgba(255, 106, 0, 0.7) 75%,
      rgba(255, 60, 0, 0.95) 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

.megamenu-card-gradient {
  position: relative;
  background: rgba(255, 255, 255, 0.01) !important;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.megamenu-card-gradient::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  /* Card border thickness */
  border-radius: inherit;
  background: linear-gradient(135deg,
      rgba(255, 60, 0, 0.4) 0%,
      rgba(255, 140, 66, 0.25) 50%,
      rgba(255, 60, 0, 0.4) 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.4s ease;
}

.megamenu-card-gradient:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  transform: translateY(-4px);
}

.megamenu-card-gradient:hover::before {
  background: linear-gradient(135deg,
      rgba(255, 60, 0, 0.8) 0%,
      rgba(255, 140, 66, 0.5) 50%,
      rgba(255, 60, 0, 0.8) 100%);
}

/* ── Process Cards ── */
.process-card {
  min-height: 220px;
}

.process-tag {
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #FFFFFF;
  background: var(--glass-bg);
  border: 1px solid #851b1b;
  border-radius: var(--radius-full);
  padding: 0.4rem 1rem;
  transition: all var(--transition-base);
  white-space: nowrap;
  box-shadow: 0 0 10px rgba(133, 27, 27, 0.1);
}

@media (min-width: 1536px) {
  .process-tag {
    font-size: 0.85rem;
    padding: 0.5rem 1.25rem;
  }
}

.process-card:hover .process-tag {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.process-progress-dot.is-active {
  background: white;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.8), 0 0 24px rgba(168, 85, 247, 0.4);
  transform: scale(1.3);
}

/* ============================================
   Section Gradient Backgrounds (.sg) (Premium Lighting System)
   ============================================ */

.sg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  /* will-change removed from resting state — gradient orbs are static;
     no compositor layer needed until a scroll-driven animation fires */
}

.sg::before,
.sg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  mix-blend-mode: screen;
  /* will-change removed from resting pseudo-elements;
     translateZ(0) still promotes to GPU layer for blur performance */
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* ── 1. HERO ──
   Dominant top-left Burnt Red/Orange light source, soft amber ambient fill */
#hero .sg::before {
  width: 80%;
  height: 80%;
  top: -20%;
  left: -15%;
  background: radial-gradient(ellipse at center,
      rgba(255, 60, 0, 0.4) 0%,
      rgba(255, 106, 0, 0.25) 40%,
      rgba(255, 140, 66, 0.1) 70%,
      transparent 100%);
}

#hero .sg::after {
  width: 60%;
  height: 60%;
  bottom: -10%;
  right: -10%;
  background: radial-gradient(ellipse at center,
      rgba(255, 140, 66, 0.2) 0%,
      rgba(255, 106, 0, 0.1) 50%,
      transparent 100%);
}

/* ── 2. SERVICES ── */
#services .sg::before {
  width: 65%;
  height: 80%;
  top: 10%;
  right: -15%;
  background: radial-gradient(ellipse at center,
      rgba(255, 106, 0, 0.3) 0%,
      rgba(255, 60, 0, 0.15) 50%,
      transparent 100%);
}

#services .sg::after {
  width: 55%;
  height: 65%;
  top: -10%;
  left: -10%;
  background: radial-gradient(ellipse at center,
      rgba(255, 140, 66, 0.25) 0%,
      rgba(255, 106, 0, 0.1) 60%,
      transparent 100%);
}

/* ── 3. PRICING ── */
#pricing .sg::before {
  width: 70%;
  height: 70%;
  top: 5%;
  left: 15%;
  background: radial-gradient(ellipse at center,
      rgba(255, 60, 0, 0.35) 0%,
      rgba(255, 106, 0, 0.2) 40%,
      transparent 100%);
}

#pricing .sg::after {
  width: 90%;
  height: 50%;
  bottom: -10%;
  right: -5%;
  background: radial-gradient(ellipse at center,
      rgba(255, 140, 66, 0.2) 0%,
      transparent 60%);
}

/* ── 4. PROCESS ── */
#process .sg::before {
  width: 70%;
  height: 65%;
  top: -10%;
  left: -10%;
  background: radial-gradient(ellipse at center,
      rgba(255, 106, 0, 0.3) 0%,
      transparent 80%);
}

#process .sg::after {
  width: 65%;
  height: 70%;
  bottom: -10%;
  right: -10%;
  background: radial-gradient(ellipse at center,
      rgba(255, 60, 0, 0.35) 0%,
      rgba(255, 140, 66, 0.15) 60%,
      transparent 100%);
}

/* ── 5. CONTACT ── */
#contact .sg::before {
  width: 80%;
  height: 80%;
  top: -10%;
  left: 10%;
  background: radial-gradient(ellipse at center,
      rgba(255, 60, 0, 0.4) 0%,
      rgba(255, 106, 0, 0.25) 40%,
      transparent 100%);
}

#contact .sg::after {
  width: 55%;
  height: 70%;
  bottom: 0%;
  right: -8%;
  background: radial-gradient(ellipse at center,
      rgba(255, 140, 66, 0.25) 0%,
      transparent 60%);
}

/* ── Stat Cards (CTA Section) ── */
.stat-card {
  width: 180px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(145deg,
      rgba(139, 92, 246, 0.25) 0%,
      rgba(6, 182, 212, 0.2) 50%,
      rgba(21, 94, 117, 0.3) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow 0.4s ease,
    border-color 0.4s ease;
  cursor: default;
  transform: translateZ(0);    /* own GPU layer — prevents backdrop-filter repaint on scroll */
  will-change: transform;
  backface-visibility: hidden;
}

.stat-card:hover {
  transform: scaleX(1.12) scaleY(1.04) translateZ(0);
  border-color: rgba(255, 120, 30, 0.25);
  box-shadow:
    0 12px 48px rgba(139, 92, 246, 0.15),
    0 4px 20px rgba(6, 182, 212, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

@media (max-width: 639px) {
  .stat-card {
    width: 100%;
    max-width: none;
    flex: 1;
    min-width: 0;
    padding: 1rem 0.25rem;
    gap: 0.5rem;
    align-items: center;
    border-radius: 0.75rem;
  }
}

/* --- Pricing Card Highlight --- */
.pricing-highlight {
  position: relative;
}

.pricing-highlight::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--accent-light), transparent 60%);
  z-index: -1;
  opacity: 0.6;
}

/* --- CTA Glow Button --- */
.cta-glow-btn {
  position: relative;
}

.cta-glow-btn::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-light), var(--accent), var(--accent-light));
  z-index: -1;
  opacity: 0;
  filter: blur(12px);
  transition: opacity var(--transition-slow);
}

.cta-glow-btn:hover::after {
  opacity: 0.6;
}

/* --- Footer Giant Text --- */
.footer-giant-text {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(4rem, 15vw, 14rem);
  line-height: 0.85;
  letter-spacing: -0.04em;

  /* Modern Webkit Gradient Text & Stroke */
  background: linear-gradient(135deg,
      rgba(139, 92, 246, 0.4) 0%,
      rgba(255, 255, 255, 0.05) 50%,
      rgba(6, 182, 212, 0.4) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  /* High visibility outline */
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.12);

  /* Fallback for older browsers or where stroke isn't desired alone */
  text-shadow: 0 0 40px rgba(0, 0, 0, 0.5);

  user-select: none;
  overflow: hidden;
  transition: opacity 0.5s ease;
  opacity: 0.8;
}

.footer-giant-text:hover {
  opacity: 1;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.25);
}

/* --- Keyframe Animations --- */
@keyframes float {

  0%,
  100% {
    transform: translateY(0px) scale(1);
  }

  50% {
    transform: translateY(-20px) scale(1.02);
  }
}

@keyframes pulse-glow {

  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.6;
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes icon-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3);
  }

  100% {
    box-shadow: 0 0 0 15px rgba(255, 255, 255, 0);
  }
}

.animate-icon-pulse {
  animation: icon-pulse 2s infinite cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Reveal Animations (GSAP will control these) --- */
/* will-change is set dynamically by JS during animation to avoid
   pinning too many GPU compositor layers while idle */
.reveal,
.reveal-left,
.reveal-right,
.reveal-scale {
  will-change: auto;
}

.reveal.is-animating,
.reveal-left.is-animating,
.reveal-right.is-animating,
.reveal-scale.is-animating {
  will-change: opacity, transform;
}

/* --- Mobile Nav --- */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  /* Allow scrolling inside the mobile nav panel itself */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* iOS momentum scroll */
  overscroll-behavior: contain;
  /* don't let scroll bleed to page */
  touch-action: pan-y;
  /* enable touch scroll inside nav */
}

.mobile-nav.is-open {
  opacity: 1;
  pointer-events: all;
}

/* --- Hamburger --- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 0.25rem;
  cursor: pointer;
  z-index: 1001;
}

@media (min-width: 640px) {
  .hamburger {
    padding: 0.5rem;
  }
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--primary);
  border-radius: 2px;
  transition: all var(--transition-base);
  transform-origin: center;
  flex-shrink: 0;
}

.hamburger span:nth-child(2) {
  width: 14px;
  align-self: flex-end;
}

.hamburger:hover span:nth-child(2) {
  width: 22px;
}

/* hamburger → X cross animation
   Gap between bars = 6px, bar height = 1.5px
   Center-to-center distance = 6px + 1.5px = 7.5px → half = 3.75px */
.hamburger.is-open span:nth-child(1) {
  transform: translateY(3.75px) rotate(45deg) !important;
}

.hamburger.is-open span:nth-child(2) {
  width: 22px !important;
  align-self: center !important;
  transform: translateY(-3.75px) rotate(-45deg) !important;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .floating-header {
    left: 1rem;
    right: 1rem;
  }
}

@media (max-width: 767px) {
  .floating-header {
    top: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
    padding: 0;
  }

  /* On mobile, the header inner flex row becomes a simple space-between row inside a single pill */
  .floating-header>div {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: 380px !important; /* longer mobile pill */
    height: 52px !important;
    padding: 0 0.5rem 0 1rem !important;
    border-radius: 26px !important;
    background: rgba(10, 10, 10, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important; /* subtle white/gray stroke */
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    margin: 0 auto !important;
    float: none !important;
    gap: 0 !important;
    position: relative !important;
  }

  .floating-header-logo-wrap {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    flex-shrink: 0 !important;
    transform: none !important;
  }

  .floating-header-logo-wrap img {
    height: 36px !important; /* Fits beautifully inside 52px container */
    width: auto !important;
  }

  /* Actions wrap is now a transparent flex row */
  .floating-header-actions-wrap {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0 !important;
    border: none !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    flex-shrink: 0 !important;
    overflow: visible !important;
  }

  /* Hide the desktop CTA btn-pill on mobile */
  .floating-header-actions-wrap .btn-pill:not(.mobile-cta-btn) {
    display: none !important;
  }

  /* The hamburger button IS the text MENU pill on mobile */
  .floating-header-actions-wrap .hamburger {
    width: auto !important;
    height: 38px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 0.9rem !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    border-radius: 19px !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    background: #0A0A0A !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    flex-shrink: 0 !important;
    
    font-family: var(--font-label) !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
    transition: all 0.3s ease !important;
  }

  .floating-header-actions-wrap .hamburger:hover {
    background: #171717 !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
  }

  /* Reset spans for text/dot styling */
  .floating-header-actions-wrap .hamburger span {
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    border-radius: 0 !important;
    transition: none !important;
    transform: none !important;
    align-self: center !important; /* Force vertical centering overriding old hamburger rules */
    line-height: 1 !important;
  }

  .floating-header-actions-wrap .hamburger .menu-text {
    display: inline-block !important;
  }

  .floating-header-actions-wrap .hamburger .close-text {
    display: none !important;
  }

  /* Specific styling for red dot on mobile MENU */
  .floating-header-actions-wrap .hamburger span.bg-red-500,
  .floating-header-actions-wrap .hamburger span.red-dot {
    display: inline-block !important;
    width: 6px !important;
    height: 6px !important;
    background: #ef4444 !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
  }

  /* When mobile nav is open, swap close and menu text visibility */
  .floating-header-actions-wrap .hamburger.is-open .menu-text {
    display: none !important;
  }
  .floating-header-actions-wrap .hamburger.is-open .close-text {
    display: inline-block !important;
  }
  .floating-header-actions-wrap .hamburger.is-open svg {
    transform: rotate(180deg) !important;
  }

  .hamburger {
    display: flex;
  }

  .desktop-nav {
    display: none !important;
  }
}

/* --- Mobile CTA Button is hidden globally in the new global pill design --- */
.mobile-cta-btn,
.floating-header-actions-wrap .mobile-cta-btn {
  display: none !important;
}


/* --- Selection Color --- */
::selection {
  background: var(--accent);
  color: var(--primary);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   Tech Ecosystem Animations
   ============================================ */
.data-noise {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.tech-anim-flow path {
  stroke-dasharray: 6 30;
  animation: techFlowData 2s linear infinite;
  opacity: 0;
  /* Hidden by default, triggered by JS or shown implicitly */
}

@keyframes techFlowData {
  from {
    stroke-dashoffset: 36;
  }

  to {
    stroke-dashoffset: 0;
  }
}

.tech-ecosystem.is-visible .tech-anim-flow path {
  opacity: 0.8;
  transition: opacity 1s ease-in-out;
}

/* --- Mobile Nav Active Link --- */
@keyframes mobile-active-in {
  from {
    opacity: 0;
    transform: scaleX(0);
  }

  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

/* Active text: white-to-orange gradient */
.mobile-nav .mobile-nav-link--active>span {
  background: linear-gradient(90deg, #ffffff 40%, #f97316 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}

/* Active state for Pricing accordion button (button element) */
.mobile-nav button.mobile-nav-link--active {
  color: #f97316 !important;
  position: relative;
}

/* Active underline draw-in */
.mobile-nav .mobile-nav-link--active>span::after,
.mobile-nav button.mobile-nav-link--active::before {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #ea580c, #f97316, #fb923c);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(234, 88, 12, 0.5);
  transform-origin: left center;
  animation: mobile-active-in 0.6s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* --- Global Vignette --- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background: radial-gradient(circle, transparent 50%, rgba(0, 0, 0, 0.4) 120%);
  transform: translateZ(0);
  contain: strict;
}

/* --- Interactive Cursor Glow --- */
#cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 999;
  background: radial-gradient(circle closest-side, rgba(255, 106, 0, 0.18) 0%, transparent 100%);
  transform: translate(-50%, -50%);
  will-change: transform;
  mix-blend-mode: screen;
  transition: opacity 0.3s ease;
}

/* --- Tech Ecosystem Network Animations --- */
.network-base path {
  opacity: 0.3;
  transition: opacity 0.4s ease;
}

.tech-ecosystem:hover .network-base path {
  opacity: 0.15;
}

.tech-ecosystem:hover .network-base path:hover,
.tech-ecosystem:hover .network-base path.highlighted {
  opacity: 0.8 !important;
}

.flow-pulse {
  stroke-dasharray: 150 800;
  /* Creates the dashed traveling effect */
  stroke-dashoffset: 950;
  animation: data-flow 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  opacity: 0.7;
}

.flow-pulse.delay-1 {
  animation-delay: 0s;
  animation-duration: 4.5s;
  stroke-dasharray: 100 900;
}

.flow-pulse.delay-2 {
  animation-delay: 1s;
  animation-duration: 5s;
  stroke-dasharray: 120 700;
}

.flow-pulse.delay-3 {
  animation-delay: 2s;
  animation-duration: 4.2s;
  stroke-dasharray: 80 800;
}

.flow-pulse.delay-4 {
  animation-delay: 1.5s;
  animation-duration: 4.8s;
  stroke-dasharray: 140 1000;
}

.flow-pulse.delay-5 {
  animation-delay: 0.5s;
  animation-duration: 5.5s;
  stroke-dasharray: 90 950;
}

@keyframes data-flow {
  0% {
    stroke-dashoffset: 950;
    opacity: 0;
  }

  10% {
    opacity: 0.7;
  }

  90% {
    opacity: 0.7;
  }

  100% {
    stroke-dashoffset: -150;
    opacity: 0;
  }
}

.node-interactive {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.node-interactive .tech-icon-box {
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.1);
  transition: all 0.4s ease;
}

.node-interactive:hover {
  transform: translateY(-8px) scale(1.05);
}

.node-interactive:hover .tech-icon-box {
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.4), inset 0 0 10px rgba(255, 106, 0, 0.2) !important;
}

html,
body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

@media (hover: none) and (pointer: coarse) {
  #cursor-glow {
    display: none !important;
  }
}

/* ─── Lottie SVG Global Override ─── */
.lottie-svg-override,
.hero-lottie-wrap svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Force white-tone strokes for a minimalist look */
.hero-lottie-wrap svg path,
.hero-lottie-wrap svg polyline,
.hero-lottie-wrap svg circle,
.hero-lottie-wrap svg rect,
.hero-lottie-wrap svg line {
  stroke: rgba(255, 255, 255, 0.6) !important;
  stroke-width: 1.5px !important;
  fill: none !important;
}

/* --- Premium Pricing Toggle --- */
.pricing-toggle-container {
  display: inline-flex;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 9999px;
  padding: 4px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.05);
}

.pricing-toggle-bg-pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  /* Deep charcoal to slate gradient for depth */
  background: linear-gradient(135deg, #2d2d31 0%, #151517 100%);
  border-radius: 9999px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.5),
    inset 0 -1px 2px rgba(0, 0, 0, 0.3);
}

.pricing-toggle-btn {
  position: relative;
  z-index: 10;
  padding: 10px 24px;
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  transition: all 0.3s ease-in-out;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .pricing-toggle-btn {
    padding: 10px 32px;
    font-size: 12px;
  }
}

.pricing-toggle-btn.is-active {
  color: #FFFFFF !important;
  font-weight: 600;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

/* Subtle outer glow for the container when hovered */
.pricing-toggle-container:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.03), inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Scroll To Top Button
   ============================================ */

#scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 0.5rem;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 106, 0, 0.3);
  /* Copper/Orange border */
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  will-change: transform, opacity, visibility;
  contain: layout;
}

#scroll-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

#scroll-to-top:hover {
  background: rgba(255, 106, 0, 0.1);
  border-color: rgba(255, 106, 0, 0.8);
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 12px 40px rgba(255, 106, 0, 0.2);
}

#scroll-to-top svg {
  width: 1.2rem;
  height: 1.2rem;
  transition: transform 0.3s ease;
}

#scroll-to-top:hover svg {
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  #scroll-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 2.1rem;
    height: 2.1rem;
  }

  #scroll-to-top svg {
    width: 0.9rem;
    height: 0.9rem;
  }
}

/* ── Pricing Popup Overlay ── */
#pricing-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  /* hidden state */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

#pricing-popup-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ── Popup Panel ── */
.pricing-popup-inner {
  position: relative;
  width: 100%;
  max-width: 940px;
  background: rgba(10, 10, 10, 0.96);
  border-radius: 1.75rem;
  padding: 2.5rem 2rem 2rem;
  overflow: hidden;
  /* Gradient border — same as megamenu-gradient-container */
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9);
  transform: translateY(28px) scale(0.97);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Gradient border shell — mirrors .megamenu-gradient-container::before */
.pricing-popup-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: linear-gradient(135deg,
      rgba(255, 60, 0, 0.95) 0%,
      rgba(255, 106, 0, 0.7) 25%,
      rgba(255, 140, 66, 0.4) 50%,
      rgba(255, 106, 0, 0.7) 75%,
      rgba(255, 60, 0, 0.95) 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

#pricing-popup-overlay.is-open .pricing-popup-inner {
  transform: translateY(0) scale(1);
}

/* ── Ambient orb inside popup ── */
.pricing-popup-orb {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 60, 0, 0.25) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

/* ── Close Button ── */
#pricing-popup-close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

#pricing-popup-close:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  transform: rotate(90deg);
}

/* ── Header area ── */
.pricing-popup-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  position: relative;
  z-index: 2;
}

.pricing-popup-subtitle {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

/* ── Cards Grid ── */
.pricing-popup-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.875rem;
  position: relative;
  z-index: 2;
}

/* ── Individual Card ── */
.pricing-popup-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.35rem 1.15rem;
  border-radius: 1rem;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
    background 0.35s ease;
}

.pricing-popup-card:hover {
  transform: translateY(-5px);
}

.pricing-popup-card:hover .pricing-popup-card-hover-overlay {
  opacity: 1;
}

.pricing-popup-card:hover .pricing-popup-arrow {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ── Icon wrapper ── */
.pricing-popup-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.pricing-popup-card:hover .pricing-popup-icon-wrap {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
}

.pricing-popup-icon {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

/* ── Card Text ── */
.pricing-popup-card-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--primary);
  margin: 0 0 0.3rem;
  line-height: 1.2;
}

.pricing-popup-card-desc {
  font-family: var(--font-label);
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

/* ── Arrow chip ── */
.pricing-popup-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-top: auto;
  transition: background 0.2s ease, border-color 0.2s ease;
}

/* ── Responsive: Tablet / Mobile ── */
@media (max-width: 640px) {
  .pricing-popup-inner {
    padding: 2rem 1.25rem 1.5rem;
    border-radius: 1.25rem;
    max-height: 90dvh;
    overflow-y: auto;
  }

  .pricing-popup-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .pricing-popup-card {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1rem;
  }

  .pricing-popup-card:hover {
    transform: translateX(4px);
  }

  .pricing-popup-arrow {
    margin-top: 0;
    margin-left: auto;
    flex-shrink: 0;
  }

  .pricing-popup-card>div:nth-child(3) {
    flex: 1;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .pricing-popup-inner {
    max-width: 96vw;
    padding: 2rem 1.5rem 1.75rem;
  }

  .pricing-popup-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .pricing-popup-card {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
  }

  .pricing-popup-card:hover {
    transform: translateX(4px);
  }

  .pricing-popup-arrow {
    margin-top: 0;
    margin-left: auto;
    flex-shrink: 0;
  }
}

/* ── Prevent body scroll when popup is open ── */
body.popup-open {
  overflow: hidden;
}

/* ==========================================================================
   UNIFIED PILL-BRIDGE HEADER (DESKTOP & TABLET OVERRIDES)
   ========================================================================== */
@media (min-width: 768px) {

  /* Layout centering and background styling for the header row */
  .floating-header>div {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: 720px !important; /* desktop length, longer on left/right than 620px */
    height: 60px !important; /* taller desktop height */
    padding: 0 0.75rem 0 1.25rem !important;
    border-radius: 30px !important;
    background: rgba(10, 10, 10, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important; /* subtle white/gray stroke */
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.45));
    gap: 0 !important;
    margin: 0 auto !important;
    position: relative !important;
  }

  /* Redefine Logo wrap: remove individual background, borders, filter, shadow */
  .floating-header-logo-wrap {
    height: auto !important;
    width: auto !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none !important;
    z-index: 5 !important;
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .floating-header-logo-wrap:hover {
    background: transparent !important;
    border-color: transparent !important;
    transform: none !important;
    box-shadow: none !important;
  }

  .floating-header-logo-wrap img {
    height: 40px !important;
    /* Fit beautifully inside the 56px high parent container */
    width: auto !important;
  }

  /* Redefine Desktop Nav: remove individual background, borders, filter, shadow */
  .desktop-nav {
    display: inline-flex !important;
    align-items: center !important;
    height: auto !important;
    padding: 0 !important;
    gap: 1.5rem !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    z-index: 5 !important;
    position: relative !important;
  }

  /* Reset individual nav links */
  .desktop-nav .nav-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.35rem 0.85rem !important;
    height: auto !important;
    border-radius: var(--radius-full) !important;
    background: transparent !important;
    border: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    transform: none !important;
    transition: all var(--transition-fast) !important;
  }

  /* Hover states for links inside the pill */
  .desktop-nav .nav-link:hover,
  .desktop-nav .relative.group:hover .nav-link {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--primary) !important;
    transform: none !important;
    box-shadow: none !important;
  }

  /* Active nav link styling inside the pill */
  .desktop-nav .nav-link.nav-link--active {
    background: rgba(220, 38, 38, 0.15) !important;
    color: var(--primary) !important;
    box-shadow: none !important;
  }

  .desktop-nav .nav-link.nav-link--active:hover {
    background: rgba(220, 38, 38, 0.25) !important;
    box-shadow: none !important;
  }

  /* Redefine Actions wrap: remove individual background, borders, filter, shadow */
  .floating-header-actions-wrap {
    height: auto !important;
    width: auto !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    transform: none !important;
    z-index: 5 !important;
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .floating-header-actions-wrap:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  /* CTA Button formatting */
  .floating-header-actions-wrap .btn-pill:not(.mobile-cta-btn) {
    height: 40px !important;
    padding: 0 1.25rem !important;
    font-size: 13px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .floating-header-actions-wrap .mobile-cta-btn {
    display: none !important;
  }

  /* Bridge helper styling is no longer used but clean it up */
  .header-bridge {
    display: none !important;
  }

  /* Show the center menu toggle on desktop/tablet views */
  .dock-menu-btn {
    display: flex !important;
  }
}

/* --- Desktop Megamenu Pricing Submenu --- */
.megamenu-pricing-submenu {
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    margin-top 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    margin-bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: max-height, opacity;
}

@media (min-width: 1024px) {
  .group\/pricing-parent:hover .megamenu-pricing-submenu {
    max-height: 250px !important;
    opacity: 1 !important;
    margin-top: 0.75rem !important;
    margin-bottom: 0.5rem !important;
  }
}

/* ─────────────────────────────────────────
   PLAN FORM MODAL (GLASSMORPHISM & LIGHTHOUSE OPTIMIZED)
   ───────────────────────────────────────── */
#plan-form-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem 0.75rem;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
  transform: translateZ(0);
}

@media (min-width: 640px) {
  #plan-form-modal-overlay {
    padding: 1.5rem 1rem;
  }
}

#plan-form-modal-overlay::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

#plan-form-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.plan-form-modal-inner {
  position: relative;
  width: 100%;
  max-width: 780px;
  margin: 0.75rem auto;
  overflow: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-radius: 20px;
  padding: 1.35rem 1.15rem;
  border: 1.5px solid transparent;
  background-image: 
    radial-gradient(circle at 50% 0%, #151619 0%, #08080a 100%),
    linear-gradient(135deg, rgba(220, 38, 38, 0.85), rgba(59, 214, 198, 0.85), rgba(220, 38, 38, 0.85));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.95), 0 0 50px rgba(220, 38, 38, 0.22), 0 0 35px rgba(59, 214, 198, 0.15);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

@media (min-width: 640px) {
  .plan-form-modal-inner {
    margin: 1.5rem auto;
    padding: 2rem 2.25rem;
    border-radius: 24px;
  }
}

.plan-form-modal-inner::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

#plan-form-modal-overlay.is-open .plan-form-modal-inner {
  transform: translateY(0) scale(1);
}

.modal-top-accent-line {
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #dc2626, #3bd6c6, transparent);
  border-radius: 999px;
  opacity: 0.8;
}

/* Modal Floating Close Button */
.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 20;
}

.modal-close-btn:hover {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(220, 38, 38, 0.5);
  color: #ffffff;
  transform: rotate(90deg);
}

/* Custom Dark Inputs */
.form-input-dark {
  width: 100%;
  background: #111215;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.65rem 0.9rem;
  font-size: 0.85rem;
  color: #ffffff;
  outline: none;
  transition: all 0.2s ease;
}

.form-input-dark::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.form-input-dark:focus {
  border-color: #dc2626;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.2);
}

/* Custom Select Container & Options */
.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.form-select-dark {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #111215;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.65rem 2.25rem 0.65rem 0.9rem;
  font-size: 0.85rem;
  color: #ffffff;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-select-dark option {
  background-color: #121316;
  color: #ffffff;
  padding: 8px;
}

.form-select-dark:focus {
  border-color: #dc2626;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.2);
}

.select-chevron {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

/* Custom Checkbox Pills */
.custom-checkbox-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  text-align: center;
}

.custom-checkbox-pill span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-label);
}

.custom-checkbox-pill input[type="checkbox"] {
  display: none;
}

.custom-checkbox-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.custom-checkbox-pill:has(input:checked) {
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.5);
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.2);
}

.custom-checkbox-pill:has(input:checked) span {
  color: #ffffff;
  font-weight: 500;
}

/* Sprint Deposit Commitment Box */
.deposit-commitment-box {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(133, 27, 27, 0.15) 0%, rgba(12, 12, 13, 0.6) 100%);
  border: 1px solid rgba(220, 38, 38, 0.35);
  cursor: pointer;
  transition: all 0.2s ease;
}

.deposit-commitment-box:hover {
  border-color: rgba(220, 38, 38, 0.6);
  background: linear-gradient(135deg, rgba(133, 27, 27, 0.25) 0%, rgba(12, 12, 13, 0.8) 100%);
}

.custom-check-input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  shrink: 0;
  display: grid;
  place-content: center;
  transition: all 0.2s ease;
}

.custom-check-input::before {
  content: "";
  width: 10px;
  height: 10px;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  transform: scale(0);
  transition: 120ms transform ease-in-out;
  box-shadow: inset 1em 1em #ffffff;
  background-color: #ffffff;
}

.custom-check-input:checked {
  background-color: #dc2626;
  border-color: #dc2626;
}

.custom-check-input:checked::before {
  transform: scale(1);
}

/* Luxury Submit Button */
.form-submit-btn-luxury {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: #ffffff;
  color: #09090b;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.15);
  cursor: pointer;
  border: none;
}

@media (min-width: 640px) {
  .form-submit-btn-luxury {
    padding: 0.85rem 1.5rem;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
  }
}

.form-submit-btn-luxury:hover {
  background: #f0f0f0;
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.3);
}

.form-submit-btn-luxury:active {
  transform: translateY(0) scale(0.99);
}