:root {
  --bg-dark: #07090e;
  --bg-darker: #030407;
  --card-bg: rgba(15, 22, 35, 0.4);
  --card-border: rgba(255, 255, 255, 0.03);
  --card-hover-border: rgba(6, 182, 212, 0.2);
  --text-main: #f1f5f9;
  --text-muted: #64748b;
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.08);
  --accent-teal: #14b8a6;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-red-glow: rgba(239, 68, 68, 0.08);
  --accent-green-glow: rgba(16, 185, 129, 0.08);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

body.water-theme {
  background-color: var(--bg-darker);
  background-image: 
    radial-gradient(at 0% 0%, rgba(6, 182, 212, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(20, 184, 166, 0.08) 0px, transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.003) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.003) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 64px 64px, 64px 64px;
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}

.water-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  overflow-x: hidden;
}

.section-container {
  padding: 6rem 0;
  border-bottom: 1px solid var(--card-border);
}

.section-container:last-of-type {
  border-bottom: none;
}

/* Typography */
.water-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-cyan);
  background: var(--accent-cyan-glow);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  border: 1px solid rgba(6, 182, 212, 0.15);
}

.water-tag.tag-red {
  color: var(--accent-red);
  background: var(--accent-red-glow);
  border-color: rgba(239, 68, 68, 0.15);
}

.water-tag.tag-green {
  color: var(--accent-green);
  background: var(--accent-green-glow);
  border-color: rgba(16, 185, 129, 0.15);
}

.water-heading {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1.5rem 0;
  letter-spacing: -0.02em;
}

.water-subtext {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* CTA */
.water-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-cyan);
  color: #030407;
  font-weight: 600;
  font-size: 0.875rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.water-cta:hover {
  background: transparent;
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

/* Layout Grids */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 992px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* Cards */
.water-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 2rem;
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.water-card:hover {
  transform: translateY(-2px);
  border-color: var(--card-hover-border);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.6), 0 0 16px var(--accent-cyan-glow);
}

.water-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.water-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* HSI-style Borderless Cards & Icons */
.borderless-card {
  padding: 1.5rem 0;
  transition: transform 0.3s ease;
}

.borderless-card:hover {
  transform: translateY(-2px);
}

.water-icon {
  width: 1.5rem;
  height: 1.5rem;
  margin-bottom: 1rem;
  color: var(--accent-cyan);
  opacity: 0.8;
}

/* Sequenced Pipeline Chain */
.pipeline-chain {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.5rem;
}

.pipeline-chain-step {
  flex: 1;
  min-width: 160px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: all 0.3s ease;
}

.pipeline-chain-step:hover {
  border-color: var(--card-hover-border);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.6), 0 0 16px var(--accent-cyan-glow);
}

.pipeline-chain-step.highlight-step {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.03);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.05);
}

.step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  padding-bottom: 0.5rem;
}

.step-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.step-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.pipeline-chain-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(6, 182, 212, 0.2);
  width: 24px;
  flex-shrink: 0;
}

.pipeline-chain-connector .arrow-svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 1200px) {
  .pipeline-chain {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .pipeline-chain-connector {
    transform: rotate(90deg);
    margin: 0.5rem auto;
    width: auto;
  }
}

/* Interactive Pipeline Visualization (Hero Right) */
.pipeline-viz {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1rem;
  background: rgba(3, 4, 7, 0.4);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  position: relative;
}

.pipeline-node {
  background: rgba(15, 22, 35, 0.6);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
  transition: border-color 0.3s ease;
}

.pipeline-node:hover {
  border-color: rgba(6, 182, 212, 0.3);
}

.node-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
}

.node-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-cyan);
}

.pipeline-connector-line {
  width: 2px;
  height: 1.25rem;
  background: linear-gradient(to bottom, var(--accent-cyan), transparent);
  margin: -1.25rem auto 0 auto;
  position: relative;
  z-index: 1;
}

/* Live indicators */
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  display: inline-block;
  margin-right: 0.5rem;
  animation: pulse-dot 2s infinite;
}

.live-dot.dot-red {
  background: var(--accent-red);
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

/* Flow Charts */
.horizontal-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 1.5rem;
  background: rgba(3, 4, 7, 0.3);
  border: 1px solid var(--card-border);
  border-radius: 6px;
}

.flow-node {
  background: rgba(15, 22, 35, 0.8);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 0.75rem 1.25rem;
  min-width: 140px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.flow-node:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

.horizontal-flow.flow-red .flow-node {
  border-color: rgba(239, 68, 68, 0.15);
}
.horizontal-flow.flow-red .flow-node:hover {
  border-color: var(--accent-red);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.1);
}

.horizontal-flow.flow-green .flow-node {
  border-color: rgba(16, 185, 129, 0.15);
}
.horizontal-flow.flow-green .flow-node:hover {
  border-color: var(--accent-green);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

.flow-connector {
  flex-grow: 1;
  height: 2px;
  background: var(--card-border);
  position: relative;
  min-width: 30px;
}

.flow-connector::after {
  content: '';
  position: absolute;
  right: 0;
  top: -3px;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid var(--text-muted);
  opacity: 0.3;
}

.flow-red .flow-connector {
  background: rgba(239, 68, 68, 0.2);
}
.flow-red .flow-connector::after {
  border-left-color: var(--accent-red);
}

.flow-green .flow-connector {
  background: rgba(16, 185, 129, 0.2);
}
.flow-green .flow-connector::after {
  border-left-color: var(--accent-green);
}

/* 3-Column Architecture */
.arch-container {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 1.5rem;
}

.arch-card {
  flex: 1;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.arch-card:hover {
  transform: translateY(-2px);
  border-color: var(--card-hover-border);
}

.arch-flow-connector {
  width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.arch-arrow-svg {
  width: 100%;
  height: 40px;
}

.flowing-path {
  animation: march 1.5s linear infinite;
}

@keyframes march {
  to {
    stroke-dashoffset: -14;
  }
}

@media (max-width: 992px) {
  .arch-container {
    flex-direction: column;
    gap: 1rem;
  }
  .arch-flow-connector {
    width: 40px;
    height: 60px;
    transform: rotate(90deg);
    margin: 1rem auto;
  }
}

.arch-card.highlight {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.03);
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.05);
}

.arch-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0 0;
}

.arch-list li {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 0.5rem 0 0.5rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.02);
  position: relative;
}

.arch-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

/* Scientific Validation Dashboard */
.validation-card {
  background: var(--bg-darker);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 2rem;
}

.val-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (max-width: 576px) {
  .val-grid {
    grid-template-columns: 1fr;
  }
}

.val-item {
  background: rgba(15, 22, 35, 0.3);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 1.25rem;
}

.val-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.val-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 0.25rem;
}

.side-metric-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--card-border);
}

.side-metric-item:last-child {
  border-bottom: none;
}

/* Live Dashboard Section */
.dash-layout {
  display: grid;
  grid-template-columns: 1.2fr 1.8fr;
  gap: 3rem;
  background: var(--bg-darker);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 3rem;
}

@media (max-width: 992px) {
  .dash-layout {
    grid-template-columns: 1fr;
    padding: 2rem;
  }
}

.score-dial {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.dial-container {
  width: 160px;
  height: 160px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dial-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.dial-progress-ring {
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease-in-out;
  filter: drop-shadow(0 0 4px rgba(6, 182, 212, 0.5));
}

.dial-content {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dial-value {
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-mono);
  line-height: 1;
}

.dial-max {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 0.25rem;
}

/* Dashboard Telemetry Cards */
.dash-card {
  background: rgba(10, 15, 25, 0.4);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s ease;
}

.dash-card:hover {
  border-color: var(--card-hover-border);
}

.dash-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.dash-card-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.dash-card-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.dash-card-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Status colors and dots */
.live-dot.dot-green {
  background: var(--accent-green);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}
.live-dot.dot-yellow {
  background: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
}
.live-dot.dot-red {
  background: var(--accent-red);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}
.live-dot.dot-cyan {
  background: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

/* Recommendations list */
.rec-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
}

.rec-list li {
  font-size: 0.9rem;
  color: var(--text-main);
  padding: 0.75rem 1rem;
  background: rgba(15, 22, 35, 0.3);
  border-left: 2px solid var(--accent-cyan);
  border-radius: 0 4px 4px 0;
  margin-bottom: 0.75rem;
}

/* Interconnected Systems Web */
.systems-web {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 250px;
  position: relative;
}

.web-center-node {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid var(--accent-cyan);
  border-radius: 50%;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-cyan);
  z-index: 3;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

.web-satellite-node {
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(15, 22, 35, 0.8);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  z-index: 2;
  transition: all 0.3s ease;
}

.web-satellite-node:hover {
  color: var(--text-main);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.1);
}

.web-svg-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.web-line {
  stroke: rgba(6, 182, 212, 0.15);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
  animation: dash 10s linear infinite;
}

@keyframes dash {
  to {
    stroke-dashoffset: -40;
  }
}

/* Positions for nodes (relative center alignment) */
.node-energy { transform: translate(-50%, -50%) translate(-140px, -60px); }
.node-agri { transform: translate(-50%, -50%) translate(140px, -60px); }
.node-climate { transform: translate(-50%, -50%) translate(-150px, 60px); }
.node-health { transform: translate(-50%, -50%) translate(150px, 60px); }
.node-urban { transform: translate(-50%, -50%) translate(0px, -95px); }

@media (max-width: 576px) {
  .node-energy { transform: translate(-50%, -50%) translate(-80px, -70px); }
  .node-agri { transform: translate(-50%, -50%) translate(80px, -70px); }
  .node-climate { transform: translate(-50%, -50%) translate(-90px, 70px); }
  .node-health { transform: translate(-50%, -50%) translate(90px, 70px); }
  .node-urban { transform: translate(-50%, -50%) translate(0px, -110px); }

  /* Reposition SVG lines on mobile viewports to keep them connected to the nodes */
  .line-energy { x2: calc(50% - 80px); y2: calc(50% - 70px); }
  .line-agri { x2: calc(50% + 80px); y2: calc(50% - 70px); }
  .line-climate { x2: calc(50% - 90px); y2: calc(50% + 70px); }
  .line-health { x2: calc(50% + 90px); y2: calc(50% + 70px); }
  .line-urban { x2: 50%; y2: calc(50% - 110px); }
}

/* Earth Grid / Final Section */
.earth-grid-section {
  text-align: center;
  background: linear-gradient(to bottom, var(--bg-dark), var(--bg-darker));
  padding: 8rem 2rem;
  position: relative;
  overflow: hidden;
}

.grid-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(6, 182, 212, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse at center, black, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black, transparent 70%);
  pointer-events: none;
}

/* --- Navbar Alignment Override --- */
#navbar-placeholder .max-w-6xl {
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 2rem !important;
  padding-right: 2rem !important;
}

