/* ==========================================================================
   Advanced Environmental Controls (AEC) — Modernized stylesheet
   Pure CSS, no external dependencies. Fonts: system stack (offline-safe).
   Palette derived from the original 2003 brand (navy/gold) re-tuned to a
   professional environmental green + heritage gold.
   ========================================================================== */

:root {
  --brand-950: #0b2e1f;
  --brand-900: #123d2a;
  --brand-800: #14532d;
  --brand-700: #1c6e43;
  --brand-600: #248a54;
  --brand-100: #dcf3e6;
  --brand-50: #f0faf3;
  --gold: #d99e06;
  --gold-dark: #a97a04;
  --gold-soft: #fdf3d7;
  --ink: #1f2937;
  --ink-strong: #0f172a;
  --muted: #5b6b7b;
  --line: #e3e9e6;
  --bg: #ffffff;
  --bg-alt: #f5f9f6;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-md: 0 6px 20px rgba(15, 23, 42, .10);
  --radius: 14px;
  --radius-sm: 9px;
  --container: 1100px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
          "Noto Sans", "Liberation Sans", sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

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

a { color: var(--brand-700); text-underline-offset: 3px; }
a:hover { color: var(--brand-900); }

h1, h2, h3, h4 {
  color: var(--ink-strong);
  line-height: 1.25;
  margin: 0 0 .6em;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); }

p { margin: 0 0 1em; }

ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
li { margin-bottom: .4em; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 3px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 24px);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand-900);
  color: #fff;
  padding: .6em 1em;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  flex-wrap: wrap;
  padding-block: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-logo {
  width: 52px; height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name {
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--brand-900);
  letter-spacing: .01em;
}
.brand-tag {
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .04em;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: inline-block;
  padding: .45em .8em;
  text-decoration: none;
  font-weight: 600;
  font-size: .93rem;
  color: var(--ink);
  border-radius: 999px;
}
.site-nav a:hover { background: var(--brand-50); color: var(--brand-800); }
.site-nav a[aria-current="page"] {
  background: var(--brand-900);
  color: #fff;
}

/* ---------- Hero / page banner ---------- */
.hero {
  background:
    radial-gradient(1000px 400px at 85% -10%, rgba(217, 158, 6, .18), transparent 60%),
    linear-gradient(135deg, var(--brand-950) 0%, var(--brand-800) 60%, var(--brand-700) 100%);
  color: #fff;
  padding-block: clamp(48px, 9vw, 92px);
}
.hero .eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fcd34d;
  margin-bottom: 14px;
}
.hero h1 { color: #fff; max-width: 21ch; }
.hero .lead {
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  color: #e2f3e9;
  max-width: 62ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.page-hero {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(28px, 5vw, 46px);
}
.page-hero h1 { margin-bottom: .25em; }
.page-hero .page-intro { color: var(--muted); max-width: 70ch; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: .72em 1.5em;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn-gold { background: var(--gold); color: #241a00; box-shadow: var(--shadow-sm); }
.btn-gold:hover { background: #e8ab10; color: #241a00; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { border: 1.5px solid rgba(255,255,255,.65); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-outline { border: 1.5px solid var(--brand-700); color: var(--brand-800); }
.btn-outline:hover { background: var(--brand-50); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(40px, 7vw, 72px); }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

.section-head { max-width: 66ch; margin-bottom: 30px; }
.section-head .kicker {
  display: inline-block;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-700);
  margin-bottom: 8px;
}
.section-head p { color: var(--muted); }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card h3 a { text-decoration: none; }
.card .card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-100);
  font-size: 1.35rem;
  margin-bottom: 14px;
}
.card p { color: var(--muted); font-size: .95rem; margin-bottom: .8em; }
.card .more { font-weight: 700; text-decoration: none; font-size: .92rem; }
.card .more::after { content: " →"; }

/* Feature checklist */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  padding-left: 1.7em;
  position: relative;
  margin-bottom: .55em;
}
.checklist li::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--brand-600);
  font-weight: 800;
}

/* ---------- Notice strip (replaces old marquee) ---------- */
.notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--gold-soft);
  border: 1px solid #eed9a1;
  border-radius: var(--radius);
  padding: 16px 20px;
}
.notice .notice-dot {
  flex: 0 0 auto;
  width: 10px; height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--gold-dark);
}
.notice p { margin: 0; font-size: .95rem; color: #57430e; }

/* ---------- Stats band ---------- */
.stats-band {
  background: linear-gradient(135deg, var(--brand-950), var(--brand-800));
  color: #fff;
  padding-block: 42px;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; text-align: center; }
.stat .num {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: #fcd34d;
  line-height: 1.1;
}
.stat .label { color: #cfe8d8; font-size: .92rem; margin-top: 4px; }

/* ---------- Team cards ---------- */
.person {
  text-align: center;
  padding: 26px 18px;
}
.person .photo {
  width: 118px; height: 118px;
  object-fit: cover;
  object-position: top;
  border-radius: 50%;
  margin: 0 auto 14px;
  border: 3px solid var(--brand-100);
  box-shadow: var(--shadow-sm);
}
.person .avatar {
  width: 118px; height: 118px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
  color: #fff;
  font-weight: 800;
  font-size: 1.9rem;
  letter-spacing: .04em;
}
.person h3 { margin-bottom: 2px; }
.person h3 a { text-decoration: none; color: var(--ink-strong); }
.person h3 a:hover { color: var(--brand-700); }
.person .role {
  color: var(--brand-700);
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: 12px;
}
.person .link {
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
}
.person .link::after { content: " →"; }

/* ---------- Bio page ---------- */
.bio-head {
  display: flex;
  gap: 26px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.bio-head .photo {
  width: 170px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.bio-head .avatar {
  width: 150px; height: 150px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
  color: #fff; font-weight: 800; font-size: 2.6rem;
}
.bio-role { color: var(--brand-700); font-weight: 700; margin: 0; }
.bio-section { margin-top: 34px; }
.bio-label {
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-700);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--brand-100);
}
.bio-section p, .bio-section li { max-width: 75ch; }

/* ---------- FAQ (details/summary — no JS) ---------- */
.faq-list { display: grid; gap: 12px; max-width: 820px; }
.faq-list details {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 20px;
  box-shadow: var(--shadow-sm);
}
.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  padding-block: 14px;
  list-style: none;
  position: relative;
  padding-right: 36px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--brand-700);
  transition: transform .15s ease;
}
.faq-list details[open] summary::after { content: "–"; }
.faq-list .faq-a { color: var(--muted); padding-bottom: 14px; }

/* ---------- Clients ---------- */
.client-columns { columns: 3 240px; column-gap: 40px; }
.client-columns li {
  break-inside: avoid;
  padding: 5px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--ink);
  list-style: none;
}
.client-columns li::before { content: "·"; color: var(--gold-dark); font-weight: 800; margin-right: 8px; }

/* ---------- Resource links ---------- */
.resource-card { display: block; text-decoration: none; }
.resource-card h3 { color: var(--brand-800); margin-bottom: 6px; }
.resource-card .url { font-size: .85rem; color: var(--muted); word-break: break-all; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 26px; align-items: start; }
.contact-card {
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius);
  padding: 26px;
}
.contact-card dt { font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--brand-700); margin-top: 18px; }
.contact-card dt:first-of-type { margin-top: 0; }
.contact-card dd { margin: 4px 0 0; }
.contact-card dd a { font-weight: 600; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--brand-800), var(--brand-950));
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 44px);
  display: flex;
  flex-wrap: wrap;
  gap: 18px 30px;
  align-items: center;
  justify-content: space-between;
}
.cta-band h2 { color: #fff; margin: 0; max-width: 24ch; }
.cta-band p { color: #cfe8d8; margin: 4px 0 0; }
.cta-band .actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Breadcrumb ---------- */
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0 0 16px;
  padding: 0;
  font-size: .86rem;
  color: var(--muted);
}
.breadcrumb li + li::before { content: "›"; margin-right: 10px; color: #9db3a7; }
.breadcrumb a { color: var(--brand-700); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current="page"] { font-weight: 600; color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brand-950);
  color: #c8ddd0;
  margin-top: 70px;
  padding-block: 52px 30px;
  font-size: .93rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1.3fr;
  gap: 34px;
}
.site-footer h2, .site-footer h3 {
  color: #fff;
  font-size: .85rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.site-footer a { color: #c8ddd0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .55em; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand img { width: 46px; border-radius: 8px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-tag { color: #9fbfae; }
.site-footer address { font-style: normal; color: #c8ddd0; line-height: 1.7; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.14);
  margin-top: 38px;
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  color: #9fbfae;
  font-size: .85rem;
}

/* ---------- Tables (generic) ---------- */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--bg-alt); font-size: .88rem; letter-spacing: .02em; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .header-inner { justify-content: center; }
  .site-nav { width: 100%; }
  .site-nav ul { justify-content: center; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .bio-head { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}