/* ==========================================================================
   Environmental Recovery — Oilfield Services & Consulting
   Rebuilt flat-HTML stylesheet (matches original Muse design)
   ========================================================================== */

:root {
  --teal-dark: #0e4f5c;      /* header / footer band */
  --teal: #157083;           /* headings, links */
  --teal-light: #2f93a8;
  --green: #8cc63e;          /* brand lime green */
  --green-dark: #6faa27;
  --blue-wave: #3f7fa6;
  --ink: #3a3a3a;
  --rule: #b6d56d;
  --bg: #ffffff;
  --max: 1100px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Helvetica Neue", Helvetica, Arial, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

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

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ header */
.site-header {
  background: var(--teal-dark);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 62px; flex: none; }
.brand-text .brand-name {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}
.brand-text .brand-tag {
  color: var(--green);
  font-size: 10.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-top: 1px solid var(--green);
  margin-top: 3px;
  padding-top: 2px;
}

.main-nav ul { list-style: none; display: flex; align-items: center; gap: 4px; }
.main-nav li { position: relative; }
.main-nav a {
  display: block;
  padding: 10px 12px;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}
.main-nav a:hover, .main-nav a:focus { color: var(--green); text-decoration: none; }
.main-nav li.active > a { color: var(--green); }
.main-nav .caret { font-size: 8px; color: var(--green); margin-left: 4px; }

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background: var(--teal-dark);
  border-top: 2px solid var(--green);
  display: none;
  z-index: 200;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu a {
  letter-spacing: 1.5px;
  font-size: 11px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 4px;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
}

/* ------------------------------------------------------------------- hero */
.hero {
  position: relative;
  color: #fff;
  overflow: hidden;
  min-height: 420px;
  background: linear-gradient(160deg, var(--teal-dark), var(--teal-light));
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
}
.hero-slide.current { opacity: 1; }
.hero-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 48px 24px 56px;
  text-align: center;
  background: linear-gradient(to top, rgba(14,79,92,.85), rgba(14,79,92,0));
}
.hero-caption h1, .hero-caption p.tagline {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  max-width: 760px;
  margin: 0 auto;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.hero-rule { height: 14px; background: var(--green); }

/* ---------------------------------------------------------------- layout */
.page {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 24px 96px;
}
.page-narrow { max-width: 800px; }

.page-title {
  color: var(--teal);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--rule);
  margin-bottom: 36px;
}

.section-title {
  color: var(--teal);
  font-size: 19px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 48px 0 20px;
}
.sub-title {
  color: #8a8a8a;
  font-size: 17px;
  font-weight: 400;
  margin: 36px 0 14px;
}

p { margin-bottom: 18px; text-align: justify; }
.lead-link { font-weight: 700; text-decoration: underline; }

ul.plain-list { list-style: none; margin: 0 0 24px; }
ul.plain-list li { padding: 4px 0; color: var(--teal); }
ul.dot-list { list-style: none; margin: 0 0 24px; }
ul.dot-list li { padding: 3px 0 3px 14px; position: relative; }
ul.dot-list li::before { content: "\2022"; position: absolute; left: 0; color: var(--ink); }
ul.dot-list.teal li { color: var(--teal); }

.note { font-size: 13px; color: var(--teal); }
.center { text-align: center; }

.btn {
  display: inline-block;
  background: var(--teal-dark);
  color: #fff;
  font-size: 14px;
  padding: 10px 28px;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
}
.btn:hover { background: var(--teal); color: #fff; text-decoration: none; }

hr.divider { border: 0; border-top: 1px solid #999; margin: 40px 0; }

/* ------------------------------------------------------------ home proof */
.proof {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.proof h2 {
  text-align: center;
  color: var(--teal);
  font-size: 34px;
  font-weight: 400;
  letter-spacing: 1px;
  margin-bottom: 24px;
}
.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 36px;
  color: var(--teal);
}
.carousel-nav button {
  background: none;
  border: none;
  color: var(--green);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  padding: 0 8px;
}
.case-slide { display: none; }
.case-slide.current { display: block; }
.case-slide h3 { color: var(--teal); font-size: 15px; display: inline; text-transform: uppercase; }
.carousel-dots { display: flex; justify-content: center; gap: 12px; margin-top: 32px; }
.carousel-dots button {
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 1.5px solid var(--green);
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.carousel-dots button.current { background: var(--green); }

.before-after { display: grid; grid-template-columns: 1fr 1fr; margin: 24px 0; }
.before-after figure { position: relative; }
.before-after figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 16px;
  color: #fff;
  font-size: 18px;
  background: linear-gradient(to right, rgba(14,79,92,.85), rgba(14,79,92,.35));
}
.before-after figure.after figcaption {
  background: linear-gradient(to right, rgba(111,170,39,.9), rgba(140,198,62,.5));
}

/* ----------------------------------------------------------- data tables */
.data-table { width: 100%; border-collapse: collapse; margin: 24px 0 12px; }
.data-table th {
  color: var(--teal);
  font-weight: 500;
  font-size: 15px;
  padding: 10px 8px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.data-table td { text-align: center; padding: 6px 8px; font-size: 13.5px; color: var(--teal); }
.data-table .hl { background: var(--green); color: #fff; }
.data-table th.hl { border-color: var(--green); }

/* --------------------------------------------------------- case study top */
.case-hero {
  background: linear-gradient(to bottom, #e8eef0, #fff);
  border-bottom: 1px solid #dfe5e7;
}
.case-hero h1 {
  max-width: var(--max);
  margin: 0 auto;
  padding: 42px 24px;
  color: var(--teal);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.case-hero.center h1 { text-align: center; }
.case-links {
  background: #eef1f2;
  text-align: center;
  padding: 12px 24px;
  font-size: 14px;
  box-shadow: 0 6px 10px -8px rgba(0,0,0,.35);
}
.case-links a { padding: 0 10px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); }
.gallery figure { position: relative; }
.gallery figcaption {
  padding: 14px 10px;
  text-align: center;
  color: #fff;
  font-size: 15px;
  line-height: 1.35;
}
.gallery .g1 figcaption { background: var(--teal-dark); }
.gallery .g2 figcaption { background: var(--teal-light); }
.gallery .g3 figcaption { background: var(--green); }
figure.solo { margin: 24px auto; max-width: 560px; }
figcaption.tag {
  display: inline-block;
  background: #ffd300;
  color: #1a1a1a;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 22px;
  margin: 6px auto;
}

.product-subnav { background: #e9edee; }
.product-subnav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px 16px;
}
.product-subnav a {
  display: block;
  padding: 6px 14px;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--teal);
}

/* -------------------------------------------------------------- products */
.product { margin: 64px 0; }
.product h2 { display: inline; color: var(--teal); font-size: 20px; font-weight: 500; }
.product h2 sup { font-size: 10px; }
.product .dl { display: block; font-weight: 700; text-decoration: underline; margin: 10px 0; }
.product .dl.light { font-weight: 400; text-decoration: none; }

/* --------------------------------------------------------------- contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
}
.contact-form label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin: 20px 0 6px;
}
.req { color: #d21; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  width: 100%;
  max-width: 420px;
  padding: 8px 10px;
  border: 1px solid #bbb;
  border-radius: 2px;
  font: inherit;
}
.contact-form textarea { min-height: 140px; max-width: 420px; }
.radio-row { display: flex; align-items: center; gap: 8px; color: var(--teal); padding: 3px 0; }
.contact-card { text-align: right; }
.contact-card h3 { color: var(--teal); font-size: 18px; font-weight: 500; }
.contact-card p { text-align: right; margin-bottom: 28px; }

/* ---------------------------------------------------------------- footer */
.site-footer { margin-top: auto; }
.waves { display: block; width: 100%; height: auto; margin-bottom: -5px; }
.footer-band {
  background: var(--green);
  color: #fff;
  font-size: 13px;
  padding: 18px 24px 26px;
}
.footer-band .inner { max-width: var(--max); margin: 0 auto; }
.footer-band a { color: #fff; }

.back-top { display: inline-block; margin-top: 48px; color: var(--teal); }
.back-top .t { color: var(--green); font-weight: 700; margin-right: 6px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; width: 100%; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .header-inner { flex-wrap: wrap; }
  .dropdown-menu { position: static; display: block; border: 0; padding-left: 12px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-card, .contact-card p { text-align: left; }
  .gallery, .before-after { grid-template-columns: 1fr; }
  .hero { min-height: 300px; }
  .data-table { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-slide { transition: none; }
}

/* run-in headings (product paragraphs, case names) */
.product h2, .product .run-in { display: inline; }
.product .run-in { text-align: justify; }
.product { display: block; }
.product > h2 + .run-in { margin-bottom: 0; }
.product a.dl:first-of-type { margin-top: 20px; }
.case-name { color: var(--teal); text-transform: uppercase; font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* rotating hero captions */
.hero-line { display: none; }
.hero-line.current { display: block; }
.hero-caption p.tagline { font-size: 24px; font-weight: 700; line-height: 1.4; max-width: 760px; margin: 0 auto; text-shadow: 0 1px 4px rgba(0,0,0,.4); }

/* combined before/after photo with overlay labels (grantks.jpg, harristx.jpg) */
.wide-pair { position: relative; margin: 0 0 24px; }
.wide-pair img { width: 100%; }
.pair-label {
  position: absolute; bottom: 0; padding: 8px 16px;
  color: #fff; font-size: 17px;
}
.pair-label.before-l { left: 0; right: 50%; background: linear-gradient(to right, rgba(14,79,92,.85), rgba(14,79,92,.35)); }
.pair-label.after-l { left: 50%; right: 0; background: linear-gradient(to right, rgba(111,170,39,.9), rgba(140,198,62,.5)); }

/* full-lockup header logo (erlogo.png, 312x70) */
.brand-mark { width: auto; height: 44px; }

/* case-study gallery: fill columns edge-to-edge with uniform height */
.gallery figure { display: flex; flex-direction: column; }
.gallery figure img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  flex: 1;
}
.gallery figcaption { flex: none; }

@media (max-width: 900px) {
  .gallery figure img { height: 200px; }
}

/* before/after pairs and solo case images fill their frames */
.before-after figure img, .wide-pair img { width: 100%; object-fit: cover; }
figure.solo img { width: 100%; }
