/* ==========================================================================
   KNS Water Supply - Ultra-Premium Enterprise Design System
   Stack: Vanilla CSS3, Modern Flex/Grid, Glassmorphism, CSS Animations
   Palette: Luxury Deep Navy (#050B14, #0A192F), Electric Aqua (#00F2FE, #00B4D8),
            Ocean Cyan (#4FACFE), Pure White (#FFFFFF), Slate (#64748B)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Premium Dark & Brand Palette */
  --primary-navy: #0A192F;
  --primary-navy-dark: #050B14;
  --primary-navy-surface: #0F2442;
  --primary-navy-light: #16345C;
  
  /* Electric Vibrant Gradients & Accents */
  --accent-cyan: #00F2FE;
  --accent-aqua: #00B4D8;
  --accent-aqua-hover: #0096C7;
  --accent-teal: #4FACFE;
  --accent-light: #E0F7FA;
  --gradient-aqua: linear-gradient(135deg, #00F2FE 0%, #4FACFE 100%);
  --gradient-navy-dark: linear-gradient(135deg, #050B14 0%, #0A192F 50%, #0F2442 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  --gradient-emerald: linear-gradient(135deg, #10B981 0%, #059669 100%);

  /* Surface & Backgrounds */
  --bg-dark-hero: #050B14;
  --bg-ice-blue: #F8FAFC;
  --bg-surface-white: #FFFFFF;
  --bg-surface-dark: #0A192F;
  
  /* Text & Border Color Tokens */
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --text-white: #FFFFFF;
  --border-light: #E2E8F0;
  --border-dark: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(0, 242, 254, 0.35);

  /* Status Tokens */
  --status-success: #10B981;
  --status-warning: #F59E0B;
  --status-danger: #EF4444;
  --status-info: #3B82F6;

  /* Typography */
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;

  /* Elevation Shadows & Radius */
  --shadow-sm: 0 4px 12px rgba(10, 25, 47, 0.05);
  --shadow-md: 0 10px 25px rgba(10, 25, 47, 0.08);
  --shadow-lg: 0 20px 40px rgba(10, 25, 47, 0.12);
  --shadow-glow: 0 0 30px rgba(0, 242, 254, 0.3);
  --shadow-glow-lg: 0 0 50px rgba(0, 242, 254, 0.45);
  --shadow-glow-success: 0 0 25px rgba(16, 185, 129, 0.4);
  
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-ice-blue);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary-navy);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: var(--accent-aqua);
  text-decoration: none;
  transition: all var(--transition-fast);
}

a:hover {
  color: var(--accent-cyan);
}

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

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

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

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

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.items-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(5, 11, 20, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.1rem 0;
  transition: all var(--transition-smooth);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: var(--gradient-aqua);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #050B14;
  font-size: 1.35rem;
  box-shadow: var(--shadow-glow);
  transition: transform var(--transition-bounce);
}

.navbar-brand:hover .brand-icon {
  transform: rotate(12deg) scale(1.08);
}

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

.nav-link {
  color: #CBD5E1;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  position: relative;
  transition: color var(--transition-fast);
}

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

.nav-link:hover, .nav-link.active {
  color: #FFFFFF;
}

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

.nav-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  color: #FFFFFF;
  font-size: 1.5rem;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

@media (max-width: 850px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #050B14;
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border-dark);
    display: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  }
  .nav-links.active { display: flex; }
}

/* Premium Buttons & Micro-Interactions */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 1.85rem;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-smooth);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-aqua);
  color: #050B14;
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 242, 254, 0.55);
  color: #050B14;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
  color: #FFFFFF;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-navy);
  color: var(--primary-navy);
  font-weight: 700;
}

.btn-outline:hover {
  background-color: var(--primary-navy);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-sm {
  padding: 0.55rem 1.15rem;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

/* Glassmorphism Cards */
.glass-card {
  background: rgba(15, 36, 66, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-smooth);
}

.glass-card:hover {
  border-color: rgba(0, 242, 254, 0.4);
  box-shadow: 0 25px 60px rgba(0, 242, 254, 0.2);
}

.card {
  background-color: var(--bg-surface-white);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-smooth);
  position: relative;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 180, 216, 0.35);
}

.card-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.12), rgba(79, 172, 254, 0.05));
  border: 1px solid rgba(0, 242, 254, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.35rem;
  color: var(--accent-aqua);
  transition: transform var(--transition-bounce);
}

.card:hover .card-icon-wrap {
  transform: scale(1.1) rotate(5deg);
  background: var(--gradient-aqua);
  color: #050B14;
}

/* Hero Section */
.hero-section {
  background: var(--gradient-navy-dark);
  color: #FFFFFF;
  padding: 7.5rem 0 6.5rem;
  position: relative;
  overflow: hidden;
}

.hero-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: 
    radial-gradient(circle at 80% 20%, rgba(0, 242, 254, 0.15) 0%, rgba(0, 0, 0, 0) 50%),
    radial-gradient(circle at 10% 80%, rgba(79, 172, 254, 0.12) 0%, rgba(0, 0, 0, 0) 50%);
}

.hero-title {
  font-size: 3.85rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 1.35rem;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero-title span {
  background: var(--gradient-aqua);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-subtitle {
  font-size: 1.22rem;
  color: #CBD5E1;
  margin-bottom: 2.25rem;
  max-width: 630px;
  line-height: 1.7;
}

/* Badges & Live Status Indicators */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.1rem;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: var(--accent-cyan);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--status-success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--status-success);
  animation: pulse-dot-anim 1.8s infinite;
}

@keyframes pulse-dot-anim {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.2); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Sections */
.section {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  max-width: 740px;
  margin: 0 auto 3.75rem;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1.1rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.12rem;
  line-height: 1.7;
}

/* Live Telemetry Card Styling */
.telemetry-card {
  background: rgba(15, 36, 66, 0.75);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-glow);
}

.telemetry-item {
  background: rgba(5, 11, 20, 0.6);
  padding: 1.35rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform var(--transition-fast);
}

.telemetry-item:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 242, 254, 0.3);
}

/* Coverage Zones Widget */
.zone-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.65rem;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.zone-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-aqua);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.zone-card:hover {
  border-color: var(--accent-aqua);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.zone-card:hover::before {
  opacity: 1;
}

/* Process Steps */
.process-step {
  position: relative;
  padding: 2rem;
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  border-top: 5px solid var(--accent-aqua);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-smooth);
}

.process-step:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-top-color: var(--accent-cyan);
}

.step-num {
  font-size: 2.25rem;
  font-weight: 900;
  background: var(--gradient-aqua);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 0.85rem;
}

/* Testimonials */
.testimonial-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-smooth);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 180, 216, 0.3);
}

.stars {
  color: #F59E0B;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

/* Sustainability / Eco Card */
.eco-card {
  background: var(--gradient-navy-dark);
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: var(--radius-xl);
  color: #FFFFFF;
  padding: 3.5rem;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.eco-card::after {
  content: '🌱';
  position: absolute;
  right: -20px;
  bottom: -30px;
  font-size: 15rem;
  opacity: 0.04;
  pointer-events: none;
}

/* Accordion */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.accordion-item {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.accordion-item.active {
  border-color: var(--accent-aqua);
  box-shadow: var(--shadow-md);
}

.accordion-header {
  padding: 1.35rem 1.75rem;
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--primary-navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: background var(--transition-fast);
}

.accordion-header:hover {
  background: rgba(0, 180, 216, 0.04);
}

.accordion-icon {
  font-size: 0.9rem;
  transition: transform var(--transition-fast);
  color: var(--accent-aqua-hover);
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  padding: 0 1.75rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.7;
  display: none;
}

.accordion-item.active .accordion-content {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Custom Range Slider Widget */
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}

input[type=range]:focus {
  outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 10px;
  cursor: pointer;
  background: var(--border-light);
  border-radius: var(--radius-full);
}

input[type=range]::-webkit-slider-thumb {
  height: 24px;
  width: 24px;
  border-radius: 50%;
  background: var(--gradient-aqua);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -7px;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.6);
  transition: transform var(--transition-fast);
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Input Fields & Form Controls */
input[type=text],
input[type=tel],
input[type=email],
select,
textarea {
  width: 100%;
  padding: 0.85rem 1.15rem;
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--text-main);
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent-aqua);
  box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.15);
}

/* Footer */
.footer {
  background-color: var(--primary-navy-dark);
  color: #94A3B8;
  padding: 5rem 0 2.5rem;
  border-top: 1px solid var(--border-dark);
}

.footer-brand {
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 1.1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-links a {
  color: #94A3B8;
  font-weight: 500;
}

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

.footer-bottom {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 0.9rem;
  color: #64748B;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: #050B14;
  color: #FFFFFF;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border-left: 5px solid var(--accent-cyan);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-title { font-size: 2.75rem; }
  .hero-section { padding: 5rem 0 4rem; }
  .section { padding: 4rem 0; }
  .section-title { font-size: 2rem; }
  .eco-card { padding: 2rem; }
}

/* Modal Overlay & Modal Dialog System */
.modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(5, 11, 20, 0.85) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  z-index: 99999 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1.25rem !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.modal-card {
  background: #0F172A;
  border: 2px solid var(--accent-aqua);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  position: relative;
  color: #FFFFFF;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
}
