/* ==========================================================================
   Dynamic Engineering Consultants, PC — shared stylesheet
   Mobile-first, logical properties, WCAG AA palette
   ========================================================================== */

:root {
  /* Brand */
  --brand: #8c0c04;
  --brand-600: #a3160c;
  --brand-50: #fbefee;
  --engineering: #7a222f;
  --earth: #0b6b3a;
  --survey: #004990;
  --traffic: #f58026;
  --traffic-text: #a64a05;

  /* Neutrals */
  --ink: #14171c;
  --ink-2: #2b3038;
  --muted: #4f5662;
  --line: #e2e5ea;
  --surface: #ffffff;
  --surface-2: #f5f6f8;
  --surface-3: #eceef2;
  --dark: #121418;
  --dark-2: #1c1f25;

  /* Type */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Archivo", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-xs: clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
  --fs-sm: clamp(0.88rem, 0.85rem + 0.15vw, 0.95rem);
  --fs-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --fs-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);
  --fs-xl: clamp(1.35rem, 1.2rem + 0.7vw, 1.75rem);
  --fs-2xl: clamp(1.7rem, 1.4rem + 1.4vw, 2.5rem);
  --fs-3xl: clamp(2.1rem, 1.6rem + 2.6vw, 3.75rem);

  /* Space & shape */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: clamp(3rem, 2rem + 4vw, 6rem);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(20, 23, 28, 0.06), 0 1px 3px rgba(20, 23, 28, 0.08);
  --shadow: 0 6px 18px rgba(20, 23, 28, 0.08), 0 2px 6px rgba(20, 23, 28, 0.06);
  --shadow-lg: 0 18px 40px rgba(20, 23, 28, 0.14);
  --container: 1240px;
  --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
  --header-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
  overflow-wrap: break-word;
}

img, video, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: 1.18;
  margin: 0 0 var(--space-4);
  color: var(--ink);
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}
h1 { font-size: var(--fs-3xl); font-weight: 800; }
h2 { font-size: var(--fs-2xl); font-weight: 800; }
h3 { font-size: var(--fs-xl); font-weight: 700; }
h4 { font-size: var(--fs-lg); font-weight: 700; }
p { margin: 0 0 var(--space-4); }
ul, ol { margin: 0 0 var(--space-4); padding-inline-start: 1.25rem; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-600); }
strong { font-weight: 700; }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -100px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; color: #fff; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(20, 23, 28, 0.08);
  transition: box-shadow 0.25s var(--ease);
}
/* Glass layer lives on a pseudo-element so the header never becomes
   the containing block of the fixed mobile drawer */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
}
body.nav-open .site-header::before { background: #fff; }
.site-header.is-scrolled { box-shadow: var(--shadow); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 1;
  min-width: 0;
  min-height: 48px;
}
.brand img { width: clamp(190px, 40vw, 250px); height: auto; aspect-ratio: 354 / 49; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
  position: relative;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; inset-inline-start: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

.primary-nav {
  position: fixed;
  inset-inline: 0;
  top: var(--header-h);
  bottom: 0;
  background: var(--surface);
  padding: var(--space-5) var(--gutter) var(--space-7);
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-12px);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.3s var(--ease), opacity 0.25s, visibility 0.3s;
  border-top: 1px solid var(--line);
}
.primary-nav.is-open { opacity: 1; transform: none; visibility: visible; pointer-events: auto; }

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.nav-list a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.nav-list a:hover { background: var(--surface-2); color: var(--brand); }
.nav-list a.active,
.nav-list a[aria-current="page"] {
  color: var(--brand);
  background: var(--brand-50);
}
.nav-list .nav-cta {
  background: var(--brand);
  color: #fff;
  justify-content: center;
  margin-top: var(--space-3);
}
.nav-list .nav-cta:hover,
.nav-list .nav-cta.active,
.nav-list .nav-cta[aria-current="page"] { background: var(--brand-600); color: #fff; }

body.nav-open { overflow: hidden; }

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .primary-nav {
    position: static;
    transform: none;
    visibility: visible;
    padding: 0;
    background: transparent;
    border: 0;
    overflow: visible;
    opacity: 1;
    pointer-events: auto;
  }
  .nav-list { flex-direction: row; align-items: center; gap: var(--space-1); }
  .nav-list a {
    position: relative;
    padding-inline: var(--space-3);
    font-size: var(--fs-sm);
  }
  .nav-list a.active,
  .nav-list a[aria-current="page"] { background: transparent; }
  .nav-list a:not(.nav-cta)::after {
    content: "";
    position: absolute;
    inset-inline: var(--space-3);
    bottom: 6px;
    height: 2px;
    background: var(--brand);
    transform: scaleX(0);
    transition: transform 0.25s var(--ease);
  }
  .nav-list a:not(.nav-cta):hover::after,
  .nav-list a.active::after,
  .nav-list a[aria-current="page"]::after { transform: scaleX(1); }
  .nav-list .nav-cta { margin: 0; margin-inline-start: var(--space-3); padding-inline: var(--space-5); border-radius: 999px; }
  body.nav-open { overflow: visible; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 700;
  font-size: var(--fs-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(140, 12, 4, 0.25); }
.btn-primary:hover { background: var(--brand-600); color: #fff; }
.btn-ghost { border-color: rgba(255, 255, 255, 0.75); color: #fff; background: rgba(255, 255, 255, 0.06); }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-outline { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* ---------- Sections ---------- */
.section { padding-block: var(--space-8); }
.section-alt { background: var(--surface-2); }
.section-dark { background: var(--dark); color: #d7dbe2; }
.section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }
.section-head { max-width: 760px; margin-bottom: var(--space-7); }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: var(--space-3);
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: currentColor; }
.section-dark .eyebrow { color: #ff9a8f; }
.lead { font-size: var(--fs-lg); color: var(--muted); }
.section-dark .lead { color: #c3c8d1; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  color: #fff;
  padding-block: clamp(4rem, 3rem + 8vw, 9rem);
  background: var(--dark);
  overflow: clip;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media video,
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(14, 16, 20, 0.92) 0%, rgba(14, 16, 20, 0.78) 45%, rgba(14, 16, 20, 0.45) 100%);
}
[dir="rtl"] .hero::after { background: linear-gradient(-100deg, rgba(14, 16, 20, 0.92) 0%, rgba(14, 16, 20, 0.78) 45%, rgba(14, 16, 20, 0.45) 100%); }
.hero-content { max-width: 760px; }
.hero h1 { color: #fff; }
.hero .lead { color: #dfe3ea; }
.hero .eyebrow { color: #ffb0a7; }

.page-hero {
  position: relative;
  isolation: isolate;
  color: #fff;
  padding-block: clamp(3rem, 2rem + 5vw, 6rem);
  background: var(--dark);
  overflow: clip;
}
.page-hero h1 { color: #fff; font-size: var(--fs-3xl); }
.page-hero .lead { color: #dfe3ea; max-width: 720px; }
.page-hero .eyebrow { color: #ffb0a7; }
.page-hero .hero-media img { opacity: 1; }
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(14, 16, 20, 0.7), rgba(14, 16, 20, 0.88));
}

.breadcrumb {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: #c9ced6;
}
.breadcrumb li + li::before { content: "/"; margin-inline-end: var(--space-2); color: #8e95a1; }
.breadcrumb a { color: #fff; }

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-7);
  max-width: 820px;
}
.stat {
  padding: var(--space-4);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.stat { display: flex; flex-direction: column-reverse; gap: var(--space-1); }
.stat-value { margin: 0; display: block; font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 800; color: #fff; line-height: 1.1; }
.stat-label { display: block; font-size: var(--fs-sm); color: #d2d7df; }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Grid ---------- */
.grid { display: grid; gap: var(--space-5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.split {
  display: grid;
  gap: var(--space-7);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .split.reverse > :first-child { order: 2; }
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card h3 { font-size: var(--fs-lg); }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .card-link { margin-top: auto; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 0.35rem; min-height: 48px; }
.card .card-link:hover { text-decoration: underline; }

.arrow { display: inline-block; transition: transform 0.2s var(--ease); }
[dir="rtl"] .arrow { transform: scaleX(-1); }
a:hover .arrow { transform: translateX(3px); }
[dir="rtl"] a:hover .arrow { transform: scaleX(-1) translateX(3px); }

.company-card { border-top: 4px solid var(--accent, var(--brand)); }
.company-card .company-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  margin-bottom: var(--space-4);
}
.company-card .company-icon img { width: 35px; height: 35px; }
.company-card .company-tag {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text, var(--accent, var(--brand)));
  margin-bottom: var(--space-2);
}
.accent-engineering { --accent: var(--engineering); }
.accent-earth { --accent: var(--earth); }
.accent-survey { --accent: var(--survey); }
.accent-traffic { --accent: var(--traffic); --accent-text: var(--traffic-text); }

.value-card .value-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-2xl);
  color: var(--brand);
  line-height: 1;
  margin-bottom: var(--space-3);
}

.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); }
.check-list li { position: relative; padding-inline-start: 1.75rem; }
.check-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.45em;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--accent, var(--brand)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}
.check-list.cols { grid-template-columns: minmax(0, 1fr); column-gap: var(--space-6); }
@media (min-width: 768px) { .check-list.cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.tag-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tag-list li {
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--ink-2);
}

/* ---------- Media ---------- */
.media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-3);
  aspect-ratio: 16 / 10;
  box-shadow: var(--shadow-lg);
}
.media img, .media video { width: 100%; height: 100%; object-fit: cover; }
.media-badge {
  position: absolute;
  inset-inline-start: var(--space-4);
  bottom: var(--space-4);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  max-width: calc(100% - 2rem);
}

/* ---------- Company detail blocks (services) ---------- */
.company-block { border-inline-start: 5px solid var(--accent, var(--brand)); padding-inline-start: clamp(1rem, 0.5rem + 2vw, 2rem); }
.company-logo { width: auto; max-width: min(100%, 300px); height: auto; margin-bottom: var(--space-5); }
.service-group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-5);
  min-width: 0;
}
.service-group h4 { font-size: var(--fs-base); color: var(--accent-text, var(--accent, var(--brand))); margin-bottom: var(--space-2); }
.service-group p { font-size: var(--fs-sm); color: var(--muted); margin: 0; }
.cred-box {
  background: var(--dark);
  color: #d7dbe2;
  border-radius: var(--radius);
  padding: var(--space-5);
}
.cred-box h4 { color: #fff; }
.cred-box .check-list li::before { background-color: var(--accent, var(--brand)); }
.accent-traffic .cred-box .check-list li::before { background-color: var(--traffic); }

.tabs-jump {
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.tabs-jump ul {
  list-style: none;
  margin: 0;
  padding: var(--space-2) 0;
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: thin;
}
.tabs-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
  color: var(--ink-2);
  border: 1px solid var(--line);
  background: var(--surface);
}
.tabs-jump a:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- Projects ---------- */
.project-card { padding: 0; overflow: hidden; }
.project-card .media { border-radius: 0; box-shadow: none; aspect-ratio: 16 / 10; }
.project-card .project-body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.project-card .project-meta { font-size: var(--fs-xs); font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: 0.08em; }
.project-card h3, .project-card h4 { margin-bottom: var(--space-2); }
.project-card p { font-size: var(--fs-sm); color: var(--muted); }

.feature-project {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.feature-project .media { border-radius: 0; box-shadow: none; aspect-ratio: 16 / 10; height: 100%; }
.feature-project .feature-body { padding: clamp(1.25rem, 1rem + 2vw, 2.5rem); min-width: 0; }
.feature-project dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin: var(--space-5) 0; }
.feature-project dt { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.feature-project dd { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: var(--fs-lg); color: var(--ink); }
@media (min-width: 900px) {
  .feature-project { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .feature-project.reverse > .media { order: 2; }
}
.sector-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-6); }
.sector-head h2 { margin: 0; }
.footprint { margin-top: var(--space-5); }
.footprint h4 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: var(--space-3); }

/* ---------- People ---------- */
.people-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .people-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .people-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .people-grid.dense { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.person {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.person:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.person-photo { aspect-ratio: 2 / 3; background: var(--surface-3); overflow: hidden; }
.person-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.person-body { padding: var(--space-3) var(--space-4) var(--space-4); }
.person-name { font-family: var(--font-display); font-size: var(--fs-base); font-weight: 700; margin: 0 0 var(--space-1); line-height: 1.3; color: var(--ink); }
.person-role { font-size: var(--fs-xs); font-weight: 600; color: var(--brand); margin: 0 0 var(--space-2); }
.person-bio { font-size: var(--fs-xs); color: var(--muted); margin: 0; line-height: 1.55; }
.people-text { display: grid; gap: var(--space-3); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .people-text { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.leader-group + .leader-group { margin-top: var(--space-8); }
.leader-group > h3 { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.leader-group > h3 .pill {
  font-size: var(--fs-xs);
  font-family: var(--font-sans);
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand);
}
.region-title { font-size: var(--fs-base); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: var(--space-6) 0 var(--space-4); }

/* ---------- Locations ---------- */
.state-block + .state-block { margin-top: var(--space-7); }
.state-head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); flex-wrap: wrap; }
.state-head h3 { margin: 0; }
.state-head .count { font-size: var(--fs-xs); font-weight: 700; padding: 0.25rem 0.7rem; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); }
.office { gap: var(--space-2); }
.office h4 { font-size: var(--fs-base); margin-bottom: var(--space-1); }
.office address { font-style: normal; color: var(--ink-2); font-size: var(--fs-sm); }
.office .office-focus { font-size: var(--fs-xs); color: var(--muted); }
.office .phone {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 48px;
  font-weight: 700;
  text-decoration: none;
  margin-top: auto;
}
.office.hq { border-color: var(--brand); background: linear-gradient(180deg, var(--brand-50), #fff 60%); }
.hq-badge { align-self: flex-start; font-size: var(--fs-xs); font-weight: 700; color: #fff; background: var(--brand); padding: 0.2rem 0.65rem; border-radius: 999px; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 1rem + 2vw, 2.5rem);
  box-shadow: var(--shadow);
  min-width: 0;
}
.form-grid { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .form-grid .half { grid-column: span 1; } .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid .full { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: var(--fs-sm); color: var(--ink); }
.req { color: var(--brand); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border: 1px solid #b9bfc9;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: var(--fs-base);
  color: var(--ink);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--survey); box-shadow: 0 0 0 3px rgba(0, 73, 144, 0.2); }
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field select[aria-invalid="true"] { border-color: var(--brand); }
.field-error { font-size: var(--fs-xs); color: var(--brand); min-height: 1em; margin: 0; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.check-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
@media (min-width: 480px) { .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.check {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 48px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 500;
  font-size: var(--fs-sm);
  transition: border-color 0.2s, background 0.2s;
}
.check:hover { border-color: var(--brand); }
.check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand); flex-shrink: 0; }
.form-status {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.success { background: #e7f5ec; color: #0b5a31; border: 1px solid #b6dfc6; }
.form-status.error { background: var(--brand-50); color: var(--brand); border: 1px solid #f1c3be; }
.form-note { font-size: var(--fs-xs); color: var(--muted); margin-top: var(--space-3); }

/* ---------- Benefits / careers ---------- */
.benefit h3 { font-size: var(--fs-base); margin-bottom: var(--space-2); }
.benefit p { font-size: var(--fs-sm); color: var(--muted); }
.icon-dot {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-50);
  color: var(--brand);
  margin-bottom: var(--space-3);
}
.icon-dot svg { width: 22px; height: 22px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--brand) 0%, #5e0802 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 1rem + 4vw, 3.5rem);
  display: grid;
  gap: var(--space-5);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
.cta-band h2 { color: #fff; margin-bottom: var(--space-2); }
.cta-band p { color: #f4dcd9; margin: 0; }
.cta-band .btn-light { background: #fff; color: var(--brand); }
.cta-band .btn-light:hover { background: var(--ink); color: #fff; }
@media (min-width: 900px) { .cta-band { grid-template-columns: minmax(0, 1fr) auto; } }

/* ---------- FAQ (details) ---------- */
.faq { display: grid; gap: var(--space-3); }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 var(--space-5);
}
.faq summary {
  cursor: pointer;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  font-weight: 700;
  list-style: none;
  padding-block: var(--space-3);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; color: var(--brand); line-height: 1; flex-shrink: 0; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); padding-bottom: var(--space-4); margin: 0; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: var(--fs-sm); }
th, td { text-align: start; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #b9bfc9; padding-top: var(--space-8); font-size: var(--fs-sm); }
.footer-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); } }
.footer-brand img { width: 220px; height: auto; aspect-ratio: 354 / 49; margin-bottom: var(--space-4); }
.site-footer h2 {
  font-size: var(--fs-sm);
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #fff;
  margin-bottom: var(--space-4);
}
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #d7dbe2;
  text-decoration: none;
}
.footer-links a:hover, .footer-links a.active { color: #fff; text-decoration: underline; }
.footer-contact address { font-style: normal; margin-bottom: var(--space-3); }
.footer-contact a { color: #fff; font-weight: 700; text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
.footer-contact a:hover { text-decoration: underline; }
.footer-states { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; margin: var(--space-4) 0 0; }
.footer-states li { border: 1px solid #3a3f48; border-radius: 999px; padding: 0.2rem 0.7rem; font-size: var(--fs-xs); color: #d7dbe2; }
.footer-bottom {
  margin-top: var(--space-7);
  border-top: 1px solid #2c3038;
  padding-block: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: #a3aab5;
}
.footer-bottom a { color: #d7dbe2; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  inset-inline-end: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0.25s, background 0.2s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--brand-600); }
.back-to-top svg { width: 22px; height: 22px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Misc ---------- */
.mt-0 { margin-top: 0; }
.mt-5 { margin-top: var(--space-5); }
.mt-7 { margin-top: var(--space-7); }
.mb-0 { margin-bottom: 0; }
.text-muted { color: var(--muted); }
.center { text-align: center; }
.diagram {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 640px) { .diagram { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .diagram { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.map-figure { margin: 0; }
.map-figure figcaption { font-size: var(--fs-xs); color: var(--muted); margin-top: var(--space-3); text-align: center; }

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  margin-top: var(--space-4);
}
.gallery figure { margin: 0; min-width: 0; }
.gallery .media { aspect-ratio: 4 / 3; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.gallery .media img { transition: transform 0.5s var(--ease); }
.gallery figure:hover .media img { transform: scale(1.04); }
.gallery figcaption { font-size: var(--fs-sm); font-weight: 600; margin-top: var(--space-2); color: var(--ink-2); }

/* Pages with an in-page sticky jump bar need extra anchor offset */
html:has(.tabs-jump) { scroll-padding-top: calc(var(--header-h) + 76px); }

/* Chips that act as in-page links */
.tag-list li:has(> a) { padding: 0; background: transparent; }
.tag-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.tag-list a:hover { border-color: var(--brand); color: var(--brand); }
.section-dark .tag-list li { background: rgba(255, 255, 255, 0.1); color: #e6e9ee; }
