/* =============================================
   DiveGuard - Main Stylesheet
   A premium underwater safety system website
   ============================================= */

:root {
  /* Color Palette */
  --primary-dark: #0A2540;
  --primary-blue: #1E3A5F;
  --accent-cyan: #00D9FF;
  --accent-teal: #4ECDC4;
  --accent-orange: #FF6B35;
  --neutral-dark: #2D3748;
  --neutral-gray: #718096;
  --neutral-light: #E2E8F0;
  --white: #FFFFFF;
  
  /* Gradients */
  --gradient-ocean: linear-gradient(135deg, #0A2540 0%, #1E3A5F 50%, #2C5F8D 100%);
  --gradient-wave: linear-gradient(90deg, #00D9FF 0%, #4ECDC4 100%);
  --gradient-glow: radial-gradient(circle, rgba(0, 217, 255, 0.3) 0%, transparent 70%);
  
  /* Spacing */
  --section-padding: 120px;
  --container-max: 1280px;
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  
  /* Animation */
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* =============================================
   Reset & Base Styles
   ============================================= */

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--neutral-dark);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

/* =============================================
   Navigation
   ============================================= */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 37, 64, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 217, 255, 0.1);
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  background: rgba(10, 37, 64, 0.98);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  height: 2rem;
  width: auto;
  display: block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  align-items: center;
}

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

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

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

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

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  padding: 0.5rem;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--white);
  border-radius: 3px;
  transition: var(--transition-smooth);
}

/* =============================================
   Hero Section
   ============================================= */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-ocean);
  overflow: hidden;
  padding-top: 80px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><defs><linearGradient id="grad" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(0,217,255);stop-opacity:0.1" /><stop offset="100%" style="stop-color:rgb(78,205,196);stop-opacity:0.05" /></linearGradient></defs><circle cx="200" cy="150" r="150" fill="url(%23grad)" /><circle cx="900" cy="600" r="200" fill="url(%23grad)" /><circle cx="1100" cy="200" r="100" fill="url(%23grad)" /></svg>');
  background-size: cover;
  opacity: 0.3;
  animation: heroBackground 20s ease-in-out infinite;
  z-index: 0;
}

/* Hero Video Background */
.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

/* Video overlay for better text readability - using ::after for hero with video */
.hero:has(.hero-video)::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(10, 37, 64, 0.6) 0%, rgba(30, 58, 95, 0.5) 100%);
  z-index: 1;
  pointer-events: none;
}

/* When video is present, reduce background pattern opacity */
.hero:has(.hero-video)::before {
  opacity: 0.1;
}

@keyframes heroBackground {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.1) rotate(2deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  max-width: 900px;
  padding: 2rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  opacity: 0;
  animation: fadeInUp 1s ease forwards 0.3s;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  font-family: var(--font-display);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #FFFFFF 0%, #00D9FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: fadeInUp 1s ease forwards 0.5s;
}

.hero-description {
  font-size: 1.3rem;
  line-height: 1.8;
  margin-bottom: 3rem;
  color: rgba(255, 255, 255, 0.9);
  opacity: 0;
  animation: fadeInUp 1s ease forwards 0.7s;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 1s ease forwards 0.9s;
}

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

/* =============================================
   Buttons
   ============================================= */

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent-orange);
  color: var(--white);
  box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--accent-cyan);
}

.btn-secondary:hover {
  background: var(--accent-cyan);
  color: var(--primary-dark);
  transform: translateY(-3px);
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

/* =============================================
   Container & Section
   ============================================= */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: var(--section-padding) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 5rem;
}

.section-subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--primary-dark);
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.section-description {
  font-size: 1.2rem;
  color: var(--neutral-gray);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

/* =============================================
   Cards
   ============================================= */

.card {
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  transition: var(--transition-smooth);
  border: 1px solid rgba(0, 217, 255, 0.1);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 60px rgba(0, 217, 255, 0.2);
  border-color: var(--accent-cyan);
}

.card-icon {
  font-size: 3rem;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
  display: inline-block;
}

.card-video {
  width: 100%;
  height: 200px;
  margin-bottom: 1.5rem;
  border-radius: 15px;
  overflow: hidden;
  position: relative;
  background: var(--gradient-ocean);
}

.card-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.card-text {
  font-size: 1rem;
  color: var(--neutral-gray);
  line-height: 1.8;
}

/* =============================================
   Grid Layouts
   ============================================= */

.grid {
  display: grid;
  gap: 2.5rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* =============================================
   Footer
   ============================================= */

.footer {
  background: var(--primary-dark);
  color: var(--white);
  padding: 4rem 0 2rem;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-wave);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--accent-cyan);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a:hover {
  color: var(--accent-cyan);
  padding-left: 5px;
}

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

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 217, 255, 0.1);
  border-radius: 50%;
  transition: var(--transition-smooth);
}

.social-link:hover {
  background: var(--accent-cyan);
  color: var(--primary-dark);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* =============================================
   Animations & Effects
   ============================================= */

.glow-effect {
  position: relative;
}

.glow-effect::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: var(--gradient-glow);
  border-radius: inherit;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.glow-effect:hover::before {
  opacity: 1;
}

.wave-background {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 150px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,50 Q300,0 600,50 T1200,50 L1200,120 L0,120 Z" fill="%23ffffff" /></svg>');
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 1;
}

/* Particle Effect Container */
#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
}

/* =============================================
   Responsive Design
   ============================================= */

@media (max-width: 968px) {
  :root {
    --section-padding: 80px;
  }
  
  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: var(--primary-dark);
    flex-direction: column;
    justify-content: flex-start;
    padding: 3rem 2rem;
    gap: 2rem;
    transition: left 0.4s ease;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }
  
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 640px) {
  .nav-container {
    padding: 1rem 1.5rem;
  }
  
  .logo {
    font-size: 1.5rem;
  }
  
  .hero-content {
    padding: 1rem;
  }
  
  .section {
    padding: 60px 0;
  }
  
  .section-header {
    margin-bottom: 3rem;
  }
  
  .grid {
    gap: 1.5rem;
  }
  
  .card {
    padding: 2rem;
  }
}

/* =============================================
   Utility Classes
   ============================================= */

.text-center { text-align: center; }
.text-gradient {
  background: var(--gradient-wave);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
