/* Modern Design System for Kalsaedi Logistics - Navy Blue & Gold Theme */
:root {
  --bg-dark: #0a1628;
  --bg-panel: #0f1d32;
  --bg-card: #132238;
  --navy-primary: #1a365d;
  --navy-secondary: #2c5282;
  --gold-primary: #d69e2e;
  --gold-secondary: #ecc94b;
  --gold-light: #f6e05e;
  --text-light: #e2e8f0;
  --text-muted: #a0aec0;
  --glossy-black: #0d1829;
  --glossy-black-light: #1a2744;
}

/* Base Styles - Following Web Interface Guidelines */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background: var(--bg-dark);
  color: var(--text-light);
  position: relative;
  overflow-x: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Skip to main content - Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--gold-primary);
  color: var(--bg-dark);
  padding: 8px 16px;
  z-index: 100;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 4px 0;
}

.skip-link:focus {
  top: 0;
}

/* Focus States - Accessibility */
:focus-visible {
  outline: 2px solid var(--gold-primary);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* Animated Dots - Hero Section Only */
.hero-dots {
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background-image:
    radial-gradient(circle, rgba(214, 158, 46, 0.5) 1.5px, transparent 2px),
    radial-gradient(circle, rgba(214, 158, 46, 0.25) 1px, transparent 2px);
  background-size: 32px 32px, 24px 24px;
  background-position: 0 0, 16px 16px;
  animation: dotsFloat 20s linear infinite;
  pointer-events: none;
  z-index: 1;
  mask-image: linear-gradient(to left, rgba(0,0,0,0.9), transparent);
}

@media (prefers-reduced-motion: reduce) {
  .hero-dots {
    animation: none;
  }
}

@keyframes dotsFloat {
  0% { background-position: 0 0, 16px 16px; }
  50% { background-position: 40px 30px, -20px -12px; }
  100% { background-position: 0 0, 16px 16px; }
}

/* Glossy Black Navigation */
.nav-glossy {
  background: var(--glossy-black);
  backdrop-filter: blur(25px);
  border-bottom: 1px solid rgba(214, 158, 46, 0.3);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  position: relative;
  min-height: 0;
  overflow: visible;
}

.nav-glossy::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(214, 158, 46, 0.4), transparent);
}

.nav-glossy::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(214, 158, 46, 0.2), transparent);
}

/* Logo Text Styling */
.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-text-sub {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Enhanced Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 70% 30%, rgba(214, 158, 46, 0.12) 0%, transparent 40%),
    radial-gradient(ellipse at 30% 70%, rgba(236, 201, 75, 0.08) 0%, transparent 40%),
    linear-gradient(135deg, #0a1628 0%, #0f1d32 100%);
  overflow: hidden;
}

/* Sub-page Hero Section */
.hero-sub {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 70% 30%, rgba(214, 158, 46, 0.08) 0%, transparent 40%),
    radial-gradient(ellipse at 30% 70%, rgba(236, 201, 75, 0.06) 0%, transparent 40%),
    linear-gradient(135deg, #0a1628 0%, #0f1d32 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    conic-gradient(from 45deg at 20% 30%, rgba(214, 158, 46, 0.08) 0deg, transparent 120deg),
    conic-gradient(from 225deg at 80% 70%, rgba(236, 201, 75, 0.06) 0deg, transparent 120deg);
  animation: heroGlow 12s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .hero::before {
    animation: none;
  }
}

@keyframes heroGlow {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  animation: heroSlideUp 1s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .hero-content {
    animation: none;
  }
}

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

.hero-title {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary), #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}

@media (prefers-reduced-motion: reduce) {
  .hero-title {
    animation: none;
    background-position: 0% 50%;
  }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Enhanced Cards with Glassmorphism */
.card {
  background: rgba(19, 34, 56, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(214, 158, 46, 0.2);
  border-radius: 20px;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(214, 158, 46, 0.1), transparent);
  transition: left 0.6s ease;
}

.card:hover::before {
  left: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .card::before {
    display: none;
  }
}

.card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 20px 40px rgba(214, 158, 46, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: rgba(214, 158, 46, 0.4);
}

/* Enhanced Buttons */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary));
  border: none;
  border-radius: 12px;
  padding: 16px 32px;
  font-weight: 700;
  color: var(--bg-dark);
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow:
    0 8px 32px rgba(214, 158, 46, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(214, 158, 46, 0.3);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 12px 40px rgba(214, 158, 46, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  border: 2px solid var(--gold-primary);
  border-radius: 12px;
  padding: 14px 30px;
  font-weight: 600;
  color: var(--gold-primary);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  touch-action: manipulation;
}

.btn-secondary:hover {
  background: var(--gold-primary);
  color: var(--bg-dark);
  transform: translateY(-2px);
}

/* Enhanced Typography */
.text-gradient {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary), #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}

@media (prefers-reduced-motion: reduce) {
  .text-gradient {
    animation: none;
  }
}

/* Neon Grid Layout */
.neon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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

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

.neon-card {
  position: relative;
  border-radius: 18px;
  background: radial-gradient(120% 120% at 0% 0%, rgba(214, 158, 46, 0.08) 0%, rgba(44, 82, 130, 0.08) 100%);
  border: 1px solid rgba(214, 158, 46, 0.25);
  box-shadow: 0 20px 40px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08);
  padding: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.neon-card:hover {
  transform: translateY(-6px);
  border-color: rgba(214, 158, 46, 0.45);
  box-shadow: 0 28px 60px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.12);
}

.neon-card-body { display: flex; flex-direction: column; gap: 12px; }

.neon-title { font-size: 1.25rem; font-weight: 700; color: #fff; }

.neon-text { color: var(--text-muted); line-height: 1.6; }

/* Service Icon Styling */
.service-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(214, 158, 46, 0.2), rgba(44, 82, 130, 0.2));
  border: 1px solid rgba(214, 158, 46, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--gold-primary);
  font-size: 1.5rem;
}

/* Stats Counter */
.stat-number {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.stat-label {
  font-size: clamp(0.75rem, 2vw, 0.9rem);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.3;
  margin-top: 0.5rem;
}

/* Client Logos Section */
.client-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 48px;
  align-items: center;
  opacity: 0.7;
}

.client-logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Form Styling - Following Guidelines */
.form-input {
  width: 100%;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid rgba(214, 158, 46, 0.3);
  border-radius: 12px;
  color: var(--text-light);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(214, 158, 46, 0.2);
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-light);
}

/* Footer Styling */
.footer {
  background: var(--glossy-black);
  border-top: 1px solid rgba(214, 158, 46, 0.2);
  padding: 48px 0 24px;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--gold-primary);
}

/* Mobile Navigation */
.mobile-links {
  display: none;
}

@media (max-width: 768px) {
  .nav-links {
    display: none !important;
  }

  .mobile-links {
    display: flex !important;
  }

  .hero-dots {
    width: 100%;
    opacity: 0.4;
  }

  .hero {
    min-height: 80vh;
  }

  .stat-number {
    font-size: clamp(1.25rem, 5vw, 1.75rem);
  }

  .stat-label {
    font-size: 0.7rem;
    letter-spacing: 0.03em;
  }
}

/* Pulse Glow Animation */
.pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite alternate;
}

@media (prefers-reduced-motion: reduce) {
  .pulse-glow {
    animation: none;
  }
}

@keyframes pulseGlow {
  from {
    box-shadow: 0 0 20px rgba(214, 158, 46, 0.3);
  }
  to {
    box-shadow: 0 0 40px rgba(214, 158, 46, 0.6);
  }
}

/* Shimmer Effect */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(214, 158, 46, 0.1) 50%,
    transparent 70%
  );
  animation: shimmer 3s infinite;
}

@media (prefers-reduced-motion: reduce) {
  .shimmer::after {
    animation: none;
    display: none;
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

/* Utility Classes */
.text-gold { color: var(--gold-primary); }
.text-gold-light { color: var(--gold-secondary); }
.bg-navy { background: var(--navy-primary); }
.bg-navy-light { background: var(--navy-secondary); }

/* Scroll margin for anchor links */
[id] {
  scroll-margin-top: 100px;
}

/* Safe area for mobile devices */
@supports (padding: env(safe-area-inset-bottom)) {
  .footer {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
}
