/* ═══════════════════════════════════════════════════════
   styles.css — Aqualytics
   Single stylesheet for all pages.

   Body classes used for page-specific scoping:
     (none)            → index.html (home)
     .case-study       → both case study pages
     .loch-leven       → loch-leven case study
     .tnc-mississippi  → TNC Mississippi case study
     .klamath          → Klamath River case study
═══════════════════════════════════════════════════════ */


/* ── RESET + VARIABLES ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #1c2b3a;
  --navy-mid:   #243447;
  --navy-light: #2d3f52;
  --blue:       #1a56db;
  --blue-h:     #1d4ed8;
  --cyan:       #22d3ee;
  --green:      #4ade80;
  --periwinkle: #a8c0e0;
  --gray-50:    #f8fafc;
  --gray-100:   #f1f5f9;
  --gray-200:   #e2e8f0;
  --gray-500:   #64748b;
  --gray-600:   #475569;
  --gray-900:   #0f172a;
  --r:          16px;
  --r-sm:       8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--periwinkle);
  color: var(--gray-900);
  line-height: 1.6;
}
/* Case study pages use a larger base font size */
.case-study { font-size: 18px; }


/* ── NAV ─────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 2.5rem;
  background: rgba(28, 43, 58, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  background: white;
  border-radius: 10px;
  padding: 0.3rem 0.75rem;
  text-decoration: none;
}
.nav-logo img { height: 28px; width: auto; }

.nav-wordmark { font-size: 1.1rem; font-weight: 800; }
.nav-wordmark .aqua   { color: #fff; }
.nav-wordmark .lytics { color: var(--cyan); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}
.nav-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: #fff; }
.nav-cta {
  background: var(--blue) !important;
  color: white !important;
  padding: 0.45rem 1.1rem !important;
  border-radius: var(--r-sm) !important;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--blue-h) !important; }


/* ── SHARED SECTION STYLES ───────────────────────────── */
section { padding: 5.5rem 2.5rem; }

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.6rem;
  display: block;
}

h2.section-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.9rem;
}

p.section-sub {
  font-size: 0.97rem;
  color: var(--gray-600);
  line-height: 1.75;
}
body:not(.case-study) p.section-sub { max-width: 540px; margin-bottom: 3rem; }
.tnc-mississippi p.section-sub     { max-width: 600px; }


/* ── SHARED HERO STRUCTURE ───────────────────────────── */
#hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
/* Loch-leven hero is fixed-height, not viewport-height */
.loch-leven #hero { height: 1200px; min-height: unset; overflow: hidden; }

.hero-image {
  background-size: cover;
  background-position: center;
  position: relative;
}
.hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 60%, rgba(28,43,58,0.45) 100%);
}

.hero-panel {
  background: var(--navy);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* Page-specific hero panel padding */
body:not(.case-study) .hero-panel { padding: 6rem 3.5rem 4rem; gap: 1.75rem; }
.loch-leven    .hero-panel { padding: 2.5rem 3rem; gap: 1rem; }
.tnc-mississippi .hero-panel { padding: 4rem 3.5rem; gap: 1.5rem; }
.klamath       .hero-panel { padding: 4rem 3.5rem; gap: 1.25rem; }
.batanghari    .hero-panel { padding: 4rem 3.5rem; gap: 1.25rem; }

/* Hero badge — different sizes on home vs case studies */
.hero-badge {
  background: white;
  border-radius: 18px;
  padding: 0.6rem 1.2rem;
  display: inline-flex;
  align-items: center;
}
body:not(.case-study) .hero-badge { width: fit-content; }
.case-study .hero-badge { justify-content: center; height: 76px; }

body:not(.case-study) .hero-badge img { height: 100px; width: auto; }
.case-study .hero-badge img          { height: 48px; width: auto; }
.case-study .hero-badge:not(.tnc) img { height: 62px; }

.hero-headline { font-weight: 800; color: white; line-height: 1.15; }
body:not(.case-study) .hero-headline { font-size: 2.4rem; }
.case-study            .hero-headline { font-size: 2.3rem; }

.hero-sub { line-height: 1.8; }
.hero-sub strong { color: white; font-weight: 600; }
body:not(.case-study) .hero-sub { font-size: 1rem; color: rgba(255,255,255,0.7); max-width: 420px; }
.case-study            .hero-sub { font-size: 0.97rem; color: rgba(255,255,255,0.65); max-width: 400px; }


/* ── SHARED BUTTON ───────────────────────────────────── */
.btn-primary {
  background: var(--blue);
  color: white;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--blue-h); }
body:not(.case-study) .btn-primary { padding: 0.75rem 1.6rem; }
.case-study .btn-primary { padding: 0.85rem 1.75rem; display: inline-block; }

.btn-ghost {
  background: transparent;
  color: rgba(255,255,255,0.75);
  padding: 0.75rem 1.6rem;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.2s;
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.45); color: white; }


/* ─────────────────────────────────────────────────────
   HOME PAGE
───────────────────────────────────────────────────── */

/* ── HOME HERO ─────────────────────────────────────── */
.hero-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.hero-reach {
  display: flex;
  gap: 2.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.reach-item strong {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: white;
}
.reach-item span {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}


/* ── WQ STRIP ─────────────────────────────────────── */
.wq-strip {
  background: white;
  padding: 4rem 2.5rem;
}
.wq-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  align-items: center;
}
.wq-text .eyebrow { margin-bottom: 0.65rem; }
.wq-text h2 {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.9rem;
}
.wq-text p {
  font-size: 0.92rem;
  color: var(--gray-600);
  line-height: 1.75;
}
.wq-img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: var(--r);
  display: block;
}


/* ── SERVICES ─────────────────────────────────────── */
#services { background: var(--gray-50); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.svc-card {
  background: white;
  border-radius: var(--r);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.svc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.08);
}

.svc-img {
  height: 300px;
  overflow: hidden;
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.svc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.svc-img img.contain {
  object-fit: contain;
  padding: 1rem;
}

.svc-img-split {
  height: 220px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  flex-shrink: 0;
}
.svc-img-split img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: white;
  padding: 0.75rem;
}
.svc-img-split img:first-child {
  border-right: 1px solid var(--gray-100);
}

.svc-body {
  padding: 1.75rem 2rem 2rem;
  flex: 1;
}
.svc-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.55rem;
}
.svc-body p {
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tag {
  font-size: 0.73rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  background: var(--gray-100);
  color: var(--gray-500);
}

.deploy-heading {
  margin-top: 3rem;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-500);
}

/* Deploy strip — different layout on home vs loch-leven */
.deploy-strip { display: grid; }
body:not(.case-study) .deploy-strip {
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.deploy-item { overflow: hidden; position: relative; }
body:not(.case-study) .deploy-item { border-radius: var(--r); height: 220px; }

.deploy-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.deploy-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(28,43,58,0.85) 0%, transparent 100%);
  padding: 1.25rem 1rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}
.deploy-label span {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: rgba(255,255,255,0.6);
  margin-top: 0.1rem;
}


/* ── CASE STUDIES SECTION (home) ─────────────────── */
#case-studies { background: var(--navy); }
#case-studies .eyebrow         { color: var(--cyan); }
#case-studies h2.section-title { color: white; }
#case-studies p.section-sub    { color: rgba(255,255,255,0.55); }

#contact .eyebrow { color: var(--blue); }
#contact h2.section-title { color: var(--gray-900); }
#contact p.section-sub { color: var(--gray-600); }

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-top: 2rem;
}
.contact-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r);
  display: block;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.case-card {
  border-radius: var(--r);
  overflow: hidden;
  background: var(--navy-mid);
  border: 1px solid rgba(255,255,255,0.07);
  transition: transform 0.2s;
}
.case-card:hover { transform: translateY(-4px); }

.case-img {
  height: 190px;
  overflow: hidden;
  position: relative;
}
.case-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.case-img img.contain-dark {
  object-fit: contain;
  background: #111820;
  padding: 0.5rem;
}
.case-img-label {
  position: absolute;
  bottom: 0.65rem;
  left: 0.65rem;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  border-radius: 6px;
  padding: 0.18rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.case-body { padding: 1.4rem 1.5rem 1.6rem; }
.case-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 0.5rem;
}
.case-body p {
  font-size: 0.86rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.65;
}
.case-client {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0.5rem;
}

.clients-row {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.clients-row p {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 1.25rem;
}
.client-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.9rem;
  align-items: center;
}
.cpill {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  padding: 0.3rem 0.9rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
}


/* ── ABOUT + CONTACT (home) ──────────────────────── */
#about { background: var(--gray-50); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.about-text h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 1.25rem;
  line-height: 1.2;
}
.about-text p {
  font-size: 0.93rem;
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 0.9rem;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}
.stat-box {
  background: white;
  border-radius: var(--r-sm);
  padding: 1.2rem 1.25rem;
  border: 1px solid var(--gray-200);
}
.stat-num {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--gray-500);
  margin-top: 0.3rem;
  line-height: 1.4;
}

/* ── Bio cards ─────────────────────────────────────────── */
.bio-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--gray-200);
}
.bio-card:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}
.bio-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.bio-avatar {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.bio-name {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--gray-900);
  display: block;
  text-decoration: none;
}
.bio-name:hover {
  color: var(--blue);
}
.bio-role {
  display: block;
  font-size: 0.78rem;
  color: var(--blue);
  font-weight: 600;
  margin-top: 0.15rem;
}
.bio-body {
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin: 0.25rem 0 0;
}
.join-block {
  background: var(--gray-50);
  border-radius: var(--r-sm);
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--gray-200);
  margin-top: 1.25rem;
}
.join-block strong {
  display: block;
  font-size: 0.85rem;
  color: var(--gray-900);
  margin-bottom: 0.3rem;
}
.join-block p {
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.65;
  margin: 0;
}

.contact-form {
  background: white;
  border-radius: var(--r);
  padding: 2.25rem;
  border: 1px solid var(--gray-200);
  box-shadow: 0 4px 24px rgba(0,0,0,0.05);
}
.contact-form h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}
.form-group { margin-bottom: 0.9rem; }
.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 0.3rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--gray-900);
  background: var(--gray-50);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--blue); background: white; }
.form-group textarea { resize: vertical; min-height: 96px; }

.form-submit {
  width: 100%;
  background: var(--blue);
  color: white;
  border: none;
  padding: 0.75rem;
  border-radius: var(--r-sm);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
  margin-top: 0.5rem;
}
.form-submit:hover { background: var(--blue-h); }

.contact-alt {
  margin-top: 1.1rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--gray-500);
}
.contact-alt a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}
.contact-alt a:hover { text-decoration: underline; }


/* ── FOOTER (home) ───────────────────────────────── */
body:not(.case-study) footer {
  background: var(--navy);
  padding: 1.75rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  background: white;
  border-radius: 12px;
  padding: 0.4rem 0.9rem;
  text-decoration: none;
}
body:not(.case-study) .footer-logo img { height: 28px; width: auto; }

footer p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}
footer a {
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  font-size: 0.8rem;
}
footer a:hover { color: rgba(255,255,255,0.75); }


/* ─────────────────────────────────────────────────────
   CASE STUDY PAGES — SHARED STYLES
───────────────────────────────────────────────────── */

/* ── CASE STUDY HERO ─────────────────────────────── */
.hero-logos {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.hero-logo-x {
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tnc-mississippi .hero-meta { padding-top: 0.25rem; }

.meta-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.1);
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.hstat strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
}
.hstat span {
  font-size: 0.73rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}


/* ── CONTEXT ─────────────────────────────────────── */
#context { background: white; }

.context-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 5rem;
  align-items: start;
}
.context-main h2 {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.1rem;
}
.context-main p {
  font-size: 0.93rem;
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 0.9rem;
}
.context-main p strong { color: var(--gray-900); }

.context-sidebar {
  background: var(--gray-50);
  border-radius: var(--r);
  border: 1px solid var(--gray-200);
  padding: 2rem;
}
.context-sidebar h3 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 1.25rem;
}
.meta-row { display: flex; flex-direction: column; gap: 1rem; }
.meta-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
}
.meta-icon {
  width: 32px; height: 32px;
  background: var(--gray-200);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 0.95rem;
}
.meta-item-text strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.1rem;
}
.meta-item-text span {
  font-size: 0.8rem;
  color: var(--gray-600);
  line-height: 1.5;
}


/* ── CHALLENGE (shared) ──────────────────────────── */
#challenge { background: var(--navy); }

.challenge-pull {
  font-size: 2.1rem;
  font-weight: 800;
  color: white;
  line-height: 1.2;
  border-left: 4px solid var(--cyan);
  padding-left: 1.75rem;
}
.loch-leven    .challenge-pull { margin-bottom: 3.5rem; max-width: 760px; }
.tnc-mississippi .challenge-pull { margin-bottom: 4rem; max-width: 800px; }
.klamath       .challenge-pull { margin-bottom: 3.5rem; max-width: 780px; }

.challenge-sat-img {
  border-radius: var(--r);
  overflow: hidden;
}
.challenge-sat-img img { width: 100%; display: block; object-fit: cover; }


/* ── CTA BOX (shared) ────────────────────────────── */
.cta-box {
  background: var(--navy);
  border-radius: var(--r);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 2.5rem;
  text-align: center;
}
.cta-box h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.65rem;
}
.cta-box p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1.75rem;
  line-height: 1.65;
}


/* ── FOOTER (case study) ─────────────────────────── */
.case-study footer {
  background: var(--gray-900);
  padding: 3rem 2.5rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.case-study .footer-logo img { height: 42px; width: auto; }
.footer-right {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
  text-align: right;
}
.footer-right a {
  color: rgba(255,255,255,0.45);
  text-decoration: none;
}
.footer-right a:hover { color: rgba(255,255,255,0.7); }


/* ─────────────────────────────────────────────────────
   LOCH LEVEN — PAGE-SPECIFIC
───────────────────────────────────────────────────── */

/* ── LOCH LEVEN CHALLENGE ────────────────────────── */
.challenge-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 3.5rem;
  align-items: start;
}
.challenge-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.challenge-card {
  background: var(--navy-mid);
  border-radius: var(--r-sm);
  border: 1px solid rgba(255,255,255,0.07);
  padding: 1.25rem 1.35rem;
}
.challenge-card h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 0.4rem;
}
.challenge-card p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
}
.challenge-card.full { grid-column: 1 / -1; }

.challenge-bottom-line {
  margin-top: 2.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cyan);
  text-align: center;
  padding: 1.25rem 2rem;
  border: 1px solid rgba(34,211,238,0.25);
  border-radius: var(--r);
  background: rgba(34,211,238,0.05);
}


/* ── LOCH LEVEN SOLUTION ─────────────────────────── */
#solution { background: var(--gray-50); }

.solution-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 4rem;
}
.solution-intro-img {
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
}
.solution-intro-img img { width: 100%; display: block; }

.solution-intro-text h2 {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.solution-intro-text p {
  font-size: 0.92rem;
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 0.85rem;
}
.solution-intro-text p strong { color: var(--gray-900); }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.step-card {
  background: white;
  border-radius: var(--r);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.step-img { height: 200px; overflow: hidden; }
.step-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.step-body { padding: 1.75rem; flex: 1; }
.step-num {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.4rem;
}
.step-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.55rem;
}
.step-body p {
  font-size: 0.86rem;
  color: var(--gray-600);
  line-height: 1.7;
}


/* ── LOCH LEVEN RESULTS ──────────────────────────── */
#results { background: white; }

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.results-text h2 {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.results-text p {
  font-size: 0.92rem;
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 0.85rem;
}
.results-text p strong { color: var(--gray-900); }

.results-finding {
  background: var(--navy);
  border-radius: var(--r);
  padding: 2rem 2.25rem;
  margin-top: 1.75rem;
}
.results-finding-num {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--cyan);
  line-height: 1;
}
.results-finding-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: white;
  margin-top: 0.4rem;
}
.results-finding-sub {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  margin-top: 0.25rem;
  line-height: 1.5;
}

.results-map {
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
}
.results-map img { width: 100%; display: block; }


/* ── KLAMATH RESULTS (chart above text, full width) ─ */
.klamath .results-grid {
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
.klamath .results-map {
  order: -1;
}
.klamath .results-map img {
  max-height: 340px;
  object-fit: contain;
  background: white;
  padding: 1.25rem;
}


/* ── LOCH LEVEN DEPLOY STRIP ─────────────────────── */
.loch-leven .deploy-strip { grid-template-columns: repeat(3, 1fr); }
.loch-leven .deploy-item  { height: 380px; }

/* ── KLAMATH DEPLOY STRIP ────────────────────────── */
.klamath .deploy-strip { grid-template-columns: repeat(3, 1fr); }
.klamath .deploy-item  { height: 320px; }
.deploy-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(28,43,58,0.82) 0%, transparent 100%);
  padding: 2rem 1.25rem 1rem;
  color: white;
  font-size: 0.82rem;
  font-weight: 600;
}
.deploy-caption span {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  margin-top: 0.15rem;
}


/* ── LOCH LEVEN CLOSING IMAGE ────────────────────── */
.closing-image {
  height: 380px;
  overflow: hidden;
  position: relative;
}
.closing-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}
.closing-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(28,43,58,0.5) 100%);
}


/* ── LOCH LEVEN STATUS ───────────────────────────── */
#status { background: var(--navy); }

.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.status-text h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: white;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.status-text p {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.8;
  margin-bottom: 0.85rem;
}
.status-text p strong { color: rgba(255,255,255,0.9); }

.status-items { display: flex; flex-direction: column; gap: 0.85rem; }
.status-item {
  background: var(--navy-mid);
  border-radius: var(--r-sm);
  border: 1px solid rgba(255,255,255,0.07);
  padding: 1.1rem 1.35rem;
}
.status-item h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.35rem;
}
.status-item p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
}
.status-badge.active {
  background: rgba(74,222,128,0.12);
  color: var(--green);
  border: 1px solid rgba(74,222,128,0.25);
}
.status-badge.pending {
  background: rgba(251,191,36,0.1);
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.2);
}
.status-badge::before { content: '●'; font-size: 0.55rem; }


/* ── LOCH LEVEN CTA ──────────────────────────────── */
#cta { background: var(--navy-mid); }

.cta-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 5rem;
  align-items: center;
}
.cta-text h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: white;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.cta-text p {
  font-size: 0.93rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.8;
}


/* ─────────────────────────────────────────────────────
   TNC MISSISSIPPI — PAGE-SPECIFIC
───────────────────────────────────────────────────── */

/* ── TNC CHALLENGE ───────────────────────────────── */
.challenge-body {
  display: grid;
  grid-template-columns: 220px 1fr 1fr;
  gap: 3.5rem;
  align-items: start;
}
.challenge-sat-img.tnc { height: 360px; }
.challenge-cols { display: contents; }
.challenge-cols h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.75rem;
}
.challenge-cols p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.8;
  margin-bottom: 0.85rem;
}
.challenge-cols p strong {
  color: rgba(255,255,255,0.9);
  font-weight: 600;
}


/* ── TNC SOLUTION ────────────────────────────────── */
.solution-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4.5rem;
  align-items: center;
}
.solution-image {
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  box-shadow: 0 8px 40px rgba(0,0,0,0.1);
}
.solution-image img { width: 100%; display: block; object-fit: cover; }

.solution-text h2 {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.solution-text p {
  font-size: 0.92rem;
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 0.85rem;
}
.solution-text p strong { color: var(--gray-900); }

.pilot-specs { margin-top: 1.75rem; display: flex; flex-direction: column; gap: 0.75rem; }
.spec-row { display: flex; gap: 0.75rem; align-items: baseline; font-size: 0.86rem; }
.spec-label { font-weight: 700; color: var(--gray-900); min-width: 140px; flex-shrink: 0; }
.spec-val   { color: var(--gray-600); }


/* ── TNC RESULTS ─────────────────────────────────── */
.results-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 4.5rem;
}
.rstat-card {
  background: var(--gray-50);
  border-radius: var(--r);
  border: 1px solid var(--gray-200);
  padding: 2rem 1.75rem;
}
.rstat-num {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.rstat-num sup { font-size: 1.4rem; vertical-align: super; }
.rstat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.3rem;
}
.rstat-sub { font-size: 0.78rem; color: var(--gray-500); line-height: 1.5; }

.results-split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.results-text h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
}
/* Note: .results-text p is also used on loch-leven, same values, no conflict */

.quote-block {
  background: var(--navy);
  border-radius: var(--r);
  padding: 2.5rem;
}
.quote-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: white;
  line-height: 1.55;
  margin-bottom: 1.75rem;
}
.quote-text::before { content: '\201C'; }
.quote-text::after  { content: '\201D'; }
.quote-attr { display: flex; align-items: center; gap: 1rem; }
.quote-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.2);
}
.quote-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.quote-name { font-size: 0.88rem; font-weight: 700; color: white; }
.quote-role {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.4;
  margin-top: 0.15rem;
}


/* ── TNC HOW IT WORKS ────────────────────────────── */
#how { background: var(--gray-50); }

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.how-card {
  background: white;
  border-radius: var(--r);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.how-img { height: 200px; overflow: hidden; }
.how-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.how-body { padding: 1.75rem; }
.how-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.6rem;
}
.how-body p {
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.7;
}


/* ── TNC PERFORMANCE ─────────────────────────────── */
#performance { background: var(--navy); }
#performance .eyebrow          { color: var(--cyan); }
#performance h2.section-title  { color: white; }

.perf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}
.perf-card {
  background: var(--navy-mid);
  border-radius: var(--r);
  border: 1px solid rgba(255,255,255,0.07);
  padding: 2.25rem;
}
.perf-card h3 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.25rem;
}
.perf-meta {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.8;
  margin-bottom: 1.75rem;
}
.perf-meta strong { color: rgba(255,255,255,0.85); }
.perf-nums {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.pnum-val {
  font-size: 2.2rem;
  font-weight: 800;
  color: white;
  line-height: 1;
}
.pnum-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin-top: 0.3rem;
  line-height: 1.4;
}


/* ── TNC NEXT / CTA ──────────────────────────────── */
#next { background: var(--navy-mid); }

.next-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 5rem;
  align-items: center;
}
.next-text h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: white;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.next-text p {
  font-size: 0.93rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.8;
  margin-bottom: 0.85rem;
}
.next-text p strong { color: rgba(255,255,255,0.9); }


/* ─────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────── */

@media (max-width: 960px) {

  /* Home */
  body:not(.case-study) #hero { grid-template-columns: 1fr; min-height: auto; }
  body:not(.case-study) .hero-image { min-height: 300px; }
  body:not(.case-study) .hero-panel { padding: 3.5rem 2rem 3rem; }
  .wq-inner { grid-template-columns: 1fr; gap: 2rem; }
  .services-grid,
  .cases-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }

  /* Case studies shared */
  .case-study #hero { grid-template-columns: 1fr; }
  .case-study .hero-panel { padding: 3.5rem 2.5rem; }
  .context-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .challenge-sat-img { display: none; }

  /* Loch-leven 960px */
  .loch-leven #hero { height: auto; }
  .loch-leven .hero-image { height: 52vw; min-height: 260px; }
  .solution-intro,
  .results-grid,
  .status-grid,
  .cta-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .challenge-layout { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }

  /* TNC 960px */
  .tnc-mississippi .hero-image { min-height: 45vw; }
  .solution-grid,
  .results-split,
  .perf-grid,
  .next-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .challenge-body { grid-template-columns: 1fr 1fr; }
  .challenge-cols { display: contents; }
  .results-stats,
  .how-grid { grid-template-columns: 1fr 1fr; }
  .tnc-mississippi .challenge-pull { font-size: 1.6rem; }
}

@media (max-width: 640px) {

  nav { padding: 0.9rem 1.25rem; }
  .nav-links { display: none; }

  /* Home 640px */
  .svc-img { height: auto; }
  .svc-img img { height: auto; object-fit: unset; }
  body:not(.case-study) section { padding: 3.5rem 1.25rem; }
  .wq-strip { padding: 3rem 1.25rem; }
  .services-grid,
  .cases-grid,
  body:not(.case-study) .deploy-strip { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  body:not(.case-study) footer { flex-direction: column; text-align: center; }
  .about-stats { grid-template-columns: 1fr 1fr; }

  /* Case studies shared 640px */
  .case-study section { padding: 4rem 1.5rem; }
  .hero-headline { font-size: 1.9rem; }
  .hero-logos { flex-wrap: wrap; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-right { text-align: left; }

  /* Loch-leven 640px */
  .loch-leven .hero-image { height: 56vw; min-height: 220px; }
  .loch-leven .hero-panel { padding: 2.5rem 1.5rem; }
  .challenge-cards,
  .steps-grid { grid-template-columns: 1fr; }
  .challenge-card.full { grid-column: auto; }
  .loch-leven .deploy-strip { grid-template-columns: 1fr; }
  .loch-leven .deploy-item  { height: 260px; }
  .klamath .deploy-strip { grid-template-columns: 1fr; }
  .klamath .deploy-item  { height: 260px; }

  /* Bio cards 640px */
  .bio-card { flex-direction: column; }
  .bio-header { flex-direction: row; align-items: center; gap: 0.75rem; }

  /* Contact layout 640px */
  .contact-layout { grid-template-columns: 1fr; }
  .contact-img { max-height: 280px; }

  /* TNC 640px */
  .tnc-mississippi .hero-panel { padding: 3rem 1.5rem; }
  .hero-stats { gap: 1.75rem; }
  .results-stats,
  .how-grid { grid-template-columns: 1fr; }
  .perf-nums { grid-template-columns: 1fr; }
}
