/* ==========================================================================
   BASE WATER COMPANY — DESIGN SYSTEM & MAIN STYLES
   "The Virtual Reservoir Network"
   Form Energy meets Tesla Powerwall: Institutional, Resilient, Engineering-Backed
   ========================================================================== */

:root {
  /* Surface & Background Colors */
  --bg-deep: #06090e;
  --bg-surface: #0c121c;
  --bg-card: #121c2a;
  --bg-card-hover: #182537;
  --bg-card-glass: rgba(18, 28, 42, 0.75);
  --bg-accent-subtle: rgba(0, 229, 255, 0.05);

  /* Primary Accent & Hydraulic Glow */
  --cyan-primary: #00e5ff;
  --cyan-bright: #33ecff;
  --cyan-dim: #00b4cc;
  --cyan-glow: rgba(0, 229, 255, 0.25);
  --cyan-glow-subtle: rgba(0, 229, 255, 0.08);

  /* Secondary & Institutional Accents */
  --azure-deep: #0066ff;
  --azure-light: #3385ff;
  --azure-glow: rgba(0, 102, 255, 0.3);

  /* Semantic Alert & State Colors */
  --emerald-success: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --amber-warning: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.25);
  --ruby-danger: #ef4444;
  --ruby-glow: rgba(239, 68, 68, 0.25);

  /* Text & Contrast Scales */
  --text-primary: #f0f6fc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-cyan: #38bdf8;

  /* Borders & Grid lines */
  --border-light: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-cyan: rgba(0, 229, 255, 0.25);
  --border-cyan-active: rgba(0, 229, 255, 0.6);
  --grid-line: rgba(255, 255, 255, 0.035);

  /* Typography Stacks */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Roboto Mono", Menlo, Consolas, monospace;

  /* Shadows & Elevations */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-cyan: 0 0 25px rgba(0, 229, 255, 0.15);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-deep);
  background-image: 
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: top center;
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

p {
  color: var(--text-secondary);
}

a {
  color: inherit;
  text-decoration: none;
}

.mono {
  font-family: var(--font-mono);
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.container-wide {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

/* ==========================================================================
   TOP TELEMETRY STATUS BAR
   ========================================================================== */
.telemetry-ticker-bar {
  background: rgba(8, 14, 22, 0.95);
  border-bottom: 1px solid var(--border-light);
  padding: 6px 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  position: relative;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.telemetry-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.telemetry-items {
  display: flex;
  align-items: center;
  gap: 20px;
}

.telemetry-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald-success);
  box-shadow: 0 0 8px var(--emerald-success);
  display: inline-block;
  animation: pulse-dot 2s infinite ease-in-out;
}

.status-dot.active {
  background: var(--cyan-primary);
  box-shadow: 0 0 8px var(--cyan-primary);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.telemetry-val {
  color: var(--cyan-primary);
  font-weight: 600;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(6, 9, 14, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition-smooth);
}

.site-header.scrolled {
  background: rgba(6, 9, 14, 0.96);
  border-bottom-color: var(--border-cyan);
  box-shadow: var(--shadow-md);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.logo-symbol {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.15), rgba(0, 102, 255, 0.25));
  border: 1px solid var(--border-cyan);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

.logo-symbol svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--cyan-primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 800;
  font-size: 1.125rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.brand-name span {
  color: var(--cyan-primary);
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Audience Mode Pill Toggle in Nav */
.audience-mode-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mode-btn:hover {
  color: var(--text-primary);
}

.mode-btn.active {
  background: var(--bg-card);
  color: var(--cyan-primary);
  border: 1px solid var(--border-cyan);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.mode-badge {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0, 229, 255, 0.15);
  color: var(--cyan-bright);
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link.active {
  color: var(--cyan-primary);
}

/* Mobile Menu Toggle Button (hidden on desktop) */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 0;
}

.mobile-menu-btn:hover {
  border-color: var(--border-cyan);
  color: var(--cyan-primary);
}

.mobile-menu-btn .icon-close {
  display: none;
}

.mobile-menu-btn.active .icon-menu {
  display: none;
}

.mobile-menu-btn.active .icon-close {
  display: block;
}

/* Buttons & CTA Styling */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
  text-decoration: none;
  line-height: 1.25;
  white-space: nowrap;
  max-width: 100%;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn-primary {
  background: linear-gradient(135deg, #00d4ec, #0088cc);
  color: #040910;
  font-weight: 700;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(0, 229, 255, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #33ecff, #00a0f0);
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-cyan);
  color: var(--cyan-bright);
}

.btn-outline-cyan {
  background: rgba(0, 229, 255, 0.05);
  border-color: var(--border-cyan);
  color: var(--cyan-primary);
}

.btn-outline-cyan:hover {
  background: rgba(0, 229, 255, 0.12);
  border-color: var(--cyan-primary);
  box-shadow: var(--shadow-cyan);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.82rem;
  height: 36px;
}

.btn-md {
  padding: 11px 22px;
  font-size: 0.9rem;
  height: 44px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 0.95rem;
  height: 50px;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 70px 0 90px;
  overflow: hidden;
  overflow-x: clip;
}

.hero-radial-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 100%);
  max-width: 100vw;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(0, 229, 255, 0.12) 0%, rgba(0, 102, 255, 0.05) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-grid-accent {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 50% 20%, rgba(0, 229, 255, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

/* Tagline pill */
.hero-badge-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid var(--border-cyan);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--cyan-bright);
  box-shadow: 0 2px 12px rgba(0, 229, 255, 0.12);
}

.badge-beacon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan-primary);
  box-shadow: 0 0 10px var(--cyan-primary);
}

/* Hero Titles */
.hero-title {
  text-align: center;
  font-size: clamp(2rem, 5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.08;
  max-width: 1020px;
  margin: 0 auto 24px;
  letter-spacing: -0.03em;
  overflow-wrap: break-word;
  word-break: break-word;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #ffffff 40%, var(--cyan-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  text-align: center;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 820px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-subtitle strong {
  color: var(--text-primary);
}

/* Dual CTAs */
.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.cta-subtext {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: -36px;
  margin-bottom: 50px;
}

/* Stats Callout Banner */
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
}

.stat-card {
  background: var(--bg-card-glass);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px;
  position: relative;
  transition: var(--transition-smooth);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.stat-card:hover {
  border-color: var(--border-cyan);
  transform: translateY(-2px);
  box-shadow: var(--shadow-cyan);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan-primary), transparent);
  opacity: 0;
  transition: var(--transition-fast);
}

.stat-card:hover::after {
  opacity: 1;
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-icon {
  color: var(--cyan-primary);
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  font-family: var(--font-mono);
}

.stat-value.highlight-cyan {
  color: var(--cyan-primary);
  text-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}

.stat-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ==========================================================================
   SECTION COMMON WRAPPERS
   ========================================================================== */
.section {
  padding: 100px 0;
  position: relative;
}

.section-alt {
  background: linear-gradient(180deg, rgba(8, 14, 22, 0.4) 0%, rgba(12, 18, 28, 0.9) 50%, rgba(8, 14, 22, 0.4) 100%);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 60px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan-primary);
  margin-bottom: 12px;
  padding: 4px 12px;
  background: var(--cyan-glow-subtle);
  border: 1px solid var(--border-cyan);
  border-radius: 4px;
}

.section-title {
  font-size: clamp(1.65rem, 3.2vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.section-lead {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Section Divider with Glow */
.section-divider-glow {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-cyan), transparent);
  margin: 0;
}

/* ==========================================================================
   SITE FOOTER
   ========================================================================== */
.site-footer {
  background: rgba(4, 7, 12, 0.98);
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border-light);
}

.footer-inner {
  padding: 64px 24px 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1.6fr;
  gap: 48px;
  align-items: flex-start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo {
  text-decoration: none;
}

.footer-desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 360px;
}

.footer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 5px 12px;
  width: fit-content;
}

.footer-status-pill .status-dot {
  width: 7px;
  height: 7px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan-primary);
  font-weight: 600;
}

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

.footer-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-link:hover {
  color: var(--text-primary);
  transform: translateX(2px);
}

.footer-col-compliance {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-compliance-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Footer Bottom Bar */
.footer-bottom {
  border-top: 1px solid var(--border-light);
  margin-top: 48px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.footer-legal {
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 820px;
}

.footer-cohort-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--cyan-primary);
  background: var(--cyan-glow-subtle);
  border: 1px solid var(--border-cyan);
  border-radius: 4px;
  padding: 4px 10px;
  white-space: nowrap;
}
