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

/* ==========================================================================
   CSS VARIABLES & DESIGN SYSTEM
   ========================================================================== */
:root {
  /* Colors */
  --color-primary: #001C47;        /* Deep Navy from logo */
  --color-secondary: #FF6B00;      /* Bright Orange from logo */
  --color-accent: #FF3C00;         /* Red-Orange gradient stop from logo */
  --color-dark-bg: #030A16;        /* Deep Dark Navy for dark mode blocks */
  --color-light-bg: #F8FAFC;       /* Off-white background */
  --color-white: #FFFFFF;
  --color-text-dark: #0F172A;      /* Slate 900 */
  --color-text-muted: #475569;     /* Slate 600 */
  --color-text-light: #94A3B8;     /* Slate 400 */
  --color-text-white: #F8FAFC;
  --color-border: #E2E8F0;         /* Slate 200 */
  --color-border-dark: rgba(255, 255, 255, 0.08);
  --color-card-dark: #08152B;      /* Premium glass card background */
  --color-glass-bg: rgba(255, 255, 255, 0.7);
  --color-glass-border: rgba(255, 255, 255, 0.4);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-accent) 100%);
  --gradient-dark: linear-gradient(135deg, #001C47 0%, #030A16 100%);
  --gradient-glow: radial-gradient(circle, rgba(255,107,0,0.15) 0%, rgba(3,10,22,0) 70%);
  
  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Shadow & Blur */
  --shadow-sm: 0 2px 8px rgba(0, 28, 71, 0.04);
  --shadow-md: 0 8px 30px rgba(0, 28, 71, 0.06);
  --shadow-lg: 0 20px 50px rgba(0, 28, 71, 0.1);
  --shadow-glow: 0 0 30px rgba(255, 107, 0, 0.35);
  --blur-glass: blur(16px);
  
  /* Layout */
  --header-height: 80px;
  --container-width: 1280px;
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --border-radius-xl: 40px;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: initial; /* GSAP ScrollTrigger works better with initial */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--color-text-dark);
  background-color: var(--color-light-bg);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
}

body.dark-mode {
  background-color: var(--color-dark-bg);
  color: var(--color-text-white);
}

/* Typography styles */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-primary);
}

body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4 {
  color: var(--color-white);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  color: var(--color-text-muted);
  font-size: clamp(1rem, 1.1vw, 1.125rem);
}

body.dark-mode p {
  color: var(--color-text-light);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

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

ul {
  list-style: none;
}

/* ==========================================================================
   LAYOUT CONTAINERS & UTILITIES
   ========================================================================== */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.section {
  padding: clamp(5rem, 10vw, 8rem) 0;
  position: relative;
}

.section.dark {
  background-color: var(--color-dark-bg);
  color: var(--color-text-white);
}

/* Utility alignments */
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* Grid systems */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 2rem; }
}

/* Custom glow background effects */
.glow-spot {
  position: absolute;
  width: 500px;
  height: 500px;
  background: var(--gradient-glow);
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(40px);
}

/* Custom Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--gradient-primary);
  z-index: 1000;
  width: 0%;
}

/* Custom Cursor Glow */
.custom-cursor {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-secondary);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  transition: width 0.3s, height 0.3s, background-color 0.3s;
  display: none; /* Enabled on desktop in JS */
}

.custom-cursor-dot {
  width: 4px;
  height: 4px;
  background-color: var(--color-accent);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .custom-cursor, .custom-cursor-dot {
    display: block;
  }
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.header {
  height: var(--header-height);
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color var(--transition-normal), border var(--transition-normal);
}

.header.scrolled {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: var(--blur-glass);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  height: 70px;
}

body.dark-mode .header.scrolled {
  background-color: rgba(3, 10, 22, 0.85);
  border-bottom: 1px solid var(--color-border-dark);
}

.header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
  height: 42px;
  width: auto;
  transition: var(--transition-normal);
}

.header.scrolled .logo img {
  height: 38px;
}

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

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

.nav-link {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-primary);
  position: relative;
  padding: 0.5rem 0;
}

body.dark-mode .nav-link {
  color: var(--color-text-white);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition-fast);
}

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

.nav-link.has-dropdown {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link svg {
  transition: transform var(--transition-fast);
}

.nav-link:hover svg {
  transform: translateY(2px);
}

/* Dropdown styling */
.nav-item {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(15px);
  width: 260px;
  background-color: var(--color-white);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  padding: 0.75rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  z-index: 100;
}

body.dark-mode .dropdown-menu {
  background-color: var(--color-card-dark);
  border: 1px solid var(--color-border-dark);
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(5px);
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius-sm);
  color: var(--color-text-dark);
  font-weight: 500;
  font-size: 0.9rem;
}

body.dark-mode .dropdown-link {
  color: var(--color-text-white);
}

.dropdown-link svg {
  color: var(--color-secondary);
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.dropdown-link:hover {
  background-color: rgba(255, 107, 0, 0.05);
  color: var(--color-secondary);
}

.dropdown-link:hover svg {
  transform: translateX(4px);
}

/* Hamburger mobile menu button */
.menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  position: relative;
  width: 30px;
  height: 20px;
  flex-direction: column;
  justify-content: space-between;
}

.menu-btn-bar {
  width: 100%;
  height: 2.5px;
  background-color: var(--color-primary);
  border-radius: 2px;
  transition: var(--transition-normal);
}

body.dark-mode .menu-btn-bar {
  background-color: var(--color-white);
}

.menu-btn.active .menu-btn-bar:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-btn.active .menu-btn-bar:nth-child(2) {
  opacity: 0;
}

.menu-btn.active .menu-btn-bar:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 991px) {
  .menu-btn {
    display: flex;
  }
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 100%;
    height: 100vh;
    background-color: var(--color-white);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 2.5rem 2.5rem;
    transition: right var(--transition-normal);
    gap: 3rem;
    overflow-y: auto;
  }
  
  body.dark-mode .nav {
    background-color: var(--color-dark-bg);
  }
  
  .nav.active {
    right: 0;
  }
  
  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 1.5rem;
  }
  
  .nav-item {
    width: 100%;
  }
  
  .dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 0 1.5rem;
    width: 100%;
    display: none;
  }
  
  .nav-item.active .dropdown-menu {
    display: block;
  }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background-color: var(--color-dark-bg);
  border-top: 1px solid var(--color-border-dark);
  padding: 5rem 0 2rem;
  color: var(--color-text-white);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.footer .glow-spot {
  bottom: -250px;
  right: -250px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

@media (max-width: 991px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

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

.footer-brand .logo {
  margin-bottom: 1.5rem;
}

.footer-brand p {
  color: var(--color-text-light);
  margin-bottom: 2rem;
  max-width: 320px;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-white);
  transition: var(--transition-fast);
}

.social-icon:hover {
  background: var(--gradient-primary);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.footer-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--color-white);
  position: relative;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  color: var(--color-text-light);
  transition: var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-secondary);
  transform: translateX(4px);
}

.footer-contact-item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--color-text-light);
}

.footer-contact-item svg {
  color: var(--color-secondary);
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--color-border-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-text-light);
  font-size: 0.9rem;
}

.footer-bottom-links {
  display: flex;
  gap: 2rem;
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  .footer-bottom-links {
    justify-content: center;
  }
}

/* ==========================================================================
   PAGE LOADING & TRANSITIONS
   ========================================================================== */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--color-dark-bg);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s var(--transition-normal), visibility 0.5s var(--transition-normal);
}

.loader-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--color-border-dark);
  border-top-color: var(--color-secondary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  position: relative;
}

.loader-spinner::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  border: 4px solid var(--color-border-dark);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 1.5s linear infinite reverse;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.page-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--color-primary);
  z-index: 9999;
  transform: scaleY(0);
  transform-origin: top;
  pointer-events: none;
}

/* ==========================================================================
   FLOATING ELEMENTS RESPONSIVENESS OVERRIDES
   ========================================================================== */
@media (max-width: 1200px) {
  .floating-element {
    transform: scale(0.8);
  }
  .hero-graphic-wrap .floating-element {
    left: 0 !important;
    right: 0 !important;
  }
}

@media (max-width: 768px) {
  .floating-element {
    display: none !important; /* Hide floating dashboard badges on mobile to prevent overlapping/scroll overflow */
  }
}

