@layer base {
  :root {
    --bg-primary: #07070b;
    --bg-surface: #0e0e16;
    --bg-surface-hover: #151522;
    --brand-orange: #ff5016;
    --brand-pink: #e91e63;
    --brand-purple: #8b5cf6;
    --brand-green: #25d366;
    --border-subtle: rgba(255, 255, 255, 0.08);
  }

  html {
    scroll-behavior: smooth;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color-scheme: dark;
    -webkit-text-size-adjust: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    max-width: 100vw;
  }

  *, *::before, *::after {
    box-sizing: inherit;
    max-width: 100%;
  }

  body {
    background-color: var(--bg-primary);
    color: #f1f5f9;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    min-width: 300px;
    position: relative;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }
}

/* Fluid Media & Embed Resets */
img, svg, video, canvas, audio, iframe, embed, object {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* Typography Balance & Word Wrapping */
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  overflow-wrap: break-word;
  word-break: break-word;
}

p, span, li, td, th {
  overflow-wrap: break-word;
}

/* Responsive Table & Code Containers */
.table-responsive, .table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
}

pre, code {
  max-width: 100%;
  overflow-x: auto;
  word-break: break-word;
}

/* Navigation Dropdowns & Premium Hover Highlights */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-btn {
  display: inline-flex;
  align-items: center;
  white-space: nowrap !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-dropdown-btn svg {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-btn {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.08);
}

.nav-dropdown:hover .nav-dropdown-btn svg {
  transform: rotate(180deg);
  color: #ff5016;
  opacity: 1;
}

.nav-dropdown-menu {
  min-width: 270px !important;
  width: max-content !important;
  max-width: 360px !important;
  background: rgba(12, 12, 18, 0.98) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.85), 0 0 25px -5px rgba(255, 80, 22, 0.2) !important;
  z-index: 60 !important;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

/* Individual dropdown links highlight - Single-Line Guarantee */
.nav-dropdown-menu a {
  position: relative;
  display: flex !important;
  align-items: center;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  color: #cbd5e1 !important;
  font-weight: 500;
  font-size: 0.8125rem !important;
  line-height: 1.25rem !important;
  padding: 0.6rem 0.95rem !important;
  border-radius: 0.6rem;
  border: 1px solid transparent;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* High-impact hover state: bright white text, subtle glowing gradient background, tactile shift */
.nav-dropdown-menu a:hover {
  color: #ffffff !important;
  background: linear-gradient(90deg, rgba(255, 69, 0, 0.18) 0%, rgba(255, 0, 127, 0.10) 100%) !important;
  border-color: rgba(255, 69, 0, 0.35) !important;
  transform: translateX(4px);
  box-shadow: 0 4px 14px -2px rgba(255, 69, 0, 0.25);
  font-weight: 600 !important;
}

/* Neon accent indicator on left edge when hovered */
.nav-dropdown-menu a:hover::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18%;
  height: 64%;
  width: 3px;
  background: linear-gradient(180deg, #ff4500, #ff007f);
  border-radius: 9999px;
  box-shadow: 0 0 10px rgba(255, 69, 0, 0.9);
}

/* Active page link highlight inside menu */
.nav-dropdown-menu a.active,
.nav-dropdown-menu a[aria-current="page"] {
  color: #ff5500 !important;
  background: rgba(255, 69, 0, 0.12) !important;
  border-color: rgba(255, 69, 0, 0.3) !important;
  font-weight: 600 !important;
}

.bg-grid-pattern {
  background-size: 54px 54px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
}

.radial-glow-hero {
  background: radial-gradient(circle 600px at 70% 40%, rgba(147, 51, 234, 0.15), rgba(255, 80, 22, 0.08) 50%, transparent 80%);
}

.gradient-text-orange-pink {
  background: linear-gradient(135deg, #ff5e18 0%, #ff2a7a 50%, #d91b70 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-btn-primary {
  background: linear-gradient(135deg, #ff4c00 0%, #ec186c 100%);
  box-shadow: 0 4px 20px -2px rgba(255, 76, 0, 0.4), 0 0 35px -5px rgba(236, 24, 108, 0.3);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.gradient-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px 0 rgba(255, 76, 0, 0.55), 0 0 45px 0 rgba(236, 24, 108, 0.45);
}

.whatsapp-btn {
  background-color: #059669;
  transition: all 0.2s ease;
}

.whatsapp-btn:hover {
  background-color: #10b981;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px -4px rgba(16, 185, 129, 0.4);
}

.allegient-card {
  background: linear-gradient(180deg, rgba(20, 20, 30, 0.7) 0%, rgba(12, 12, 18, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 1rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.allegient-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6), 0 0 20px -5px rgba(255, 80, 22, 0.1);
}

.orbit-ring-1 {
  border: 1px solid rgba(139, 92, 246, 0.18);
  animation: pulse-ring 6s infinite ease-in-out;
}

.orbit-ring-2 {
  border: 1px solid rgba(168, 85, 247, 0.22);
  animation: pulse-ring 8s infinite ease-in-out reverse;
}

@keyframes pulse-ring {
  0%, 100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.02);
    opacity: 1;
  }
}

@keyframes orbit-particle {
  from {
    transform: rotate(0deg) translateX(170px) rotate(0deg);
  }
  to {
    transform: rotate(360deg) translateX(170px) rotate(-360deg);
  }
}

@keyframes orbit-particle-2 {
  from {
    transform: rotate(180deg) translateX(230px) rotate(-180deg);
  }
  to {
    transform: rotate(540deg) translateX(230px) rotate(-540deg);
  }
}

.particle-orbit-1 {
  animation: orbit-particle 20s linear infinite;
}

.particle-orbit-2 {
  animation: orbit-particle-2 28s linear infinite;
}

/* ==========================================================================
   Hero Orbital Nodes - CSS Floating Animation
   Organic asynchronous buoyancy with full prefers-reduced-motion compliance
   ========================================================================== */

@keyframes orbit-float-1 {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 1px -7px;
  }
}

@keyframes orbit-float-2 {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: -2px -9px;
  }
}

@keyframes orbit-float-3 {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 2px -6px;
  }
}

@keyframes orbit-float-4 {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: -2px -8px;
  }
}

@keyframes orbit-float-5 {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 1px -7px;
  }
}

.orbit-node-card {
  will-change: translate;
  animation: orbit-float-1 4.4s ease-in-out infinite;
}

.orbit-node-card.orbit-node-1 {
  animation: orbit-float-1 4.2s ease-in-out infinite;
  animation-delay: 0s;
}

.orbit-node-card.orbit-node-2 {
  animation: orbit-float-2 4.9s ease-in-out infinite;
  animation-delay: 0.7s;
}

.orbit-node-card.orbit-node-3 {
  animation: orbit-float-3 3.8s ease-in-out infinite;
  animation-delay: 1.4s;
}

.orbit-node-card.orbit-node-4 {
  animation: orbit-float-4 4.6s ease-in-out infinite;
  animation-delay: 0.3s;
}

.orbit-node-card.orbit-node-5 {
  animation: orbit-float-5 5.2s ease-in-out infinite;
  animation-delay: 1.0s;
}

/* Pause floating smoothly when hovered or focused so user can interact easily */
.orbit-node-card:hover,
.orbit-node-card:focus-visible {
  animation-play-state: paused;
}

/* Accessibility: Strictly disable floating animation for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .orbit-node-card,
  .orbit-node-card.orbit-node-1,
  .orbit-node-card.orbit-node-2,
  .orbit-node-card.orbit-node-3,
  .orbit-node-card.orbit-node-4,
  .orbit-node-card.orbit-node-5,
  .orbit-ring-1,
  .orbit-ring-2,
  .particle-orbit-1,
  .particle-orbit-2 {
    animation: none !important;
    translate: 0 0 !important;
  }
}

/* Modal & Chat Drawer Responsive Layout Controls */
#phaseModal,
#assessmentModal,
#consultationModal {
  padding: 1rem;
}

#phaseModal > div,
#assessmentModal > div,
#consultationModal > div {
  max-width: min(94vw, 680px) !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

#whatsAppDrawer {
  width: min(calc(100vw - 2rem), 420px) !important;
  max-height: min(85vh, 620px) !important;
}

/* Mobile Touch Targets & Safe Area Insets */
@media (max-width: 768px) {
  .mobile-nav-link {
    min-height: 40px;
    display: flex;
    align-items: center;
  }
}

@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  #floatingWhatsAppBtn,
  .floating-chat-container {
    bottom: max(1.25rem, env(safe-area-inset-bottom));
    right: max(1.25rem, env(safe-area-inset-right));
  }
  #mobileNav > div {
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
  }
}

/* Hero Orbital Animation Scaling for Small Screens */
@media (max-width: 640px) {
  .orbit-node-card {
    font-size: 0.72rem !important;
    padding: 0.4rem 0.6rem !important;
  }
}

/* Parallax Depth & Performance Layers */
[data-parallax-blob],
[data-parallax],
.parallax-blob {
  will-change: transform;
  transform: translate3d(0, 0, 0);
  pointer-events: none;
}

/* Testimonials Slider Enhancements */
.testimonial-track {
  position: relative;
  transition: min-height 0.3s ease;
}

.testimonial-slide {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
}

.testimonial-dot {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #08080d;
}

::-webkit-scrollbar-thumb {
  background: #232334;
  border-radius: 4px;
}

/* Ensure zero animation and full visibility on pages with animations disabled */
main[data-no-animations],
main[data-no-animations] * {
  animation: none !important;
}

main[data-no-animations] h1,
main[data-no-animations] h2,
main[data-no-animations] p,
main[data-no-animations] section,
main[data-no-animations] .max-w-5xl,
main[data-no-animations] .max-w-6xl,
main[data-no-animations] .max-w-7xl {
  opacity: 1 !important;
  transform: none !important;
}

/* Universal Headline & Content Visibility Guarantee across all pages */
section h1,
section h2,
section h3,
main h1,
main h2,
main h3 {
  opacity: 1 !important;
}



