/* AEIP site styles
   Layout: left-aligned editorial column on a cool paper ground; one deep-slate hero band
   carrying an EUI pathway drawn like a Front Range ridgeline. Everything else stays quiet. */

:root {
  --paper: #F6F8F7;
  --ink: #1C2A31;
  --muted: #55666F;
  --line: #D3DCE0;
  --slate: #3E6274;
  --leaf: #8DC63F;
  --leaf-ink: #4A7816;
  --sun: #F37021;
  --gold: #E3A92C;
  --gold-ink: #9A6A06;
  --band-bg: #1F3644;
  --band-fg: #EEF3F2;
  --band-muted: #A9BCC4;
  --band-line: #3B5666;
  --btn-bg: #3E6274;
  --btn-fg: #FFFFFF;
  --field: #FFFFFF;
  --map-empty: #E3E9EB;
  --map-line: #FFFFFF;
  --map-badge: #1F3644;
  --map-badge-fg: #FFFFFF;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 4.2vw, 3.25rem);
  --measure: 64ch;
  --wrap: 72rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121D24;
    --ink: #E4ECEE;
    --muted: #9AABB3;
    --line: #2A3A44;
    --slate: #8DB3C6;
    --leaf-ink: #A3D660;
    --gold-ink: #EBBE57;
    --band-bg: #0C171E;
    --band-line: #26404E;
    --btn-bg: #8DB3C6;
    --btn-fg: #0C171E;
    --field: #182730;
    --map-empty: #22323C;
    --map-line: #121D24;
    --map-badge: #E4ECEE;
    --map-badge-fg: #121D24;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121D24;
  --ink: #E4ECEE;
  --muted: #9AABB3;
  --line: #2A3A44;
  --slate: #8DB3C6;
  --leaf-ink: #A3D660;
  --band-bg: #0C171E;
  --band-line: #26404E;
  --btn-bg: #8DB3C6;
  --btn-fg: #0C171E;
  --field: #182730;
  --map-empty: #22323C;
  --map-line: #121D24;
  --map-badge: #E4ECEE;
  --map-badge-fg: #121D24;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
}
img, svg { max-width: 100%; }
a { color: var(--slate); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 2px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) {
  .wrap { padding-left: max(40px, env(safe-area-inset-left, 0px)); padding-right: max(40px, env(safe-area-inset-right, 0px)); }
}

/* Type */
h1, h2, h3 { margin: 0; line-height: 1.12; text-wrap: balance; }
h1 { font-size: var(--step-3); font-weight: 750; font-variation-settings: "wdth" 118; letter-spacing: -0.01em; }
h2 { font-size: var(--step-2); font-weight: 700; font-variation-settings: "wdth" 112; }
h3 { font-size: var(--step-1); font-weight: 650; font-variation-settings: "wdth" 104; }
p { margin: 0; max-width: var(--measure); }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--muted); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; padding-block: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark { flex: none; display: block; }
.brand-mark img { display: block; width: 48px; height: auto; }
.brand-name { display: grid; line-height: 1.15; }
.brand-name b { font-size: 1.15rem; font-weight: 800; font-variation-settings: "wdth" 125; letter-spacing: 0.02em; }
.brand-name span { font-size: var(--step--1); color: var(--muted); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 500; padding-block: 6px; }
.nav a[aria-current="page"] { color: var(--slate); box-shadow: inset 0 -2px 0 var(--leaf); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 4px;
  font-weight: 650;
  font-variation-settings: "wdth" 108;
  text-decoration: none;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 2px solid var(--btn-bg);
  line-height: 1.2;
}
.btn:hover { color: var(--btn-fg); filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { color: var(--ink); border-color: var(--slate); }
.nav .btn { padding: 9px 16px; color: var(--btn-fg); }
.band .btn { background: var(--leaf); border-color: var(--leaf); color: #142008; }
.band .btn-ghost { background: transparent; color: var(--band-fg); border-color: var(--band-line); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero band */
.band { background: var(--band-bg); color: var(--band-fg); }
.band .lede { color: var(--band-muted); }
/* Intro: the logo animation is the first thing on the home page */
.intro { background: #fff; display: flex; justify-content: center; padding: 8px 12px 0; border-bottom: 1px solid var(--line); }
.intro-video { display: block; width: min(100%, 1180px, calc(68vh * 16 / 9)); height: auto; aspect-ratio: 16 / 9; background: #fff; }
.hero .wrap { display: grid; gap: 24px; padding-block: 48px 56px; }
.tagline { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: var(--step-1); max-width: none; }
.tagline b { font-weight: 750; font-variation-settings: "wdth" 112; color: var(--gold); letter-spacing: 0.01em; }
.tagline span { color: var(--leaf); font-weight: 600; }
.eyebrow { font-weight: 700; font-variation-settings: "wdth" 112; color: var(--gold-ink); letter-spacing: 0.02em; }
.hero-media { margin-top: 8px; border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 18px 50px rgb(0 0 0 / 0.35); }
.brand-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #fff; }
.bps-chart { margin: 12px 0 0; padding: 20px 20px 14px; border-radius: 8px; background: var(--band-bg); display: grid; gap: 4px; }
.bps-chart figcaption { font-size: var(--step--1); color: var(--band-muted); }
.video-frame { margin: 0; display: grid; gap: 6px; align-self: center; }
.video-frame .brand-video { border-radius: 8px; border: 1px solid var(--line); }
.video-frame figcaption { font-size: var(--step--1); color: var(--muted); }
.hero h1 { max-width: 18ch; }
.hero-chart { display: block; width: 100%; height: auto; margin-top: 12px; }
.hero-chart text { font-family: var(--font); font-size: 13px; fill: var(--band-muted); }
.hero-caption { font-size: var(--step--1); color: var(--band-muted); padding-block: 0 20px; }

.page-head .wrap { display: grid; gap: 16px; padding-block: 56px 48px; }

/* Sections */
.section .wrap { display: grid; gap: 28px; padding-block: 64px; }
.section + .section .wrap { border-top: 1px solid var(--line); }

.points { display: grid; gap: 32px 40px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .points, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .points, .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.point { display: grid; gap: 8px; align-content: start; padding-top: 16px; border-top: 3px solid var(--leaf); min-width: 0; }
.point p { color: var(--muted); }

.split { display: grid; gap: 28px 64px; align-items: start; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } }
.split > * { min-width: 0; }
.stack { display: grid; gap: 16px; }

.types { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.types li { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; }

.steps { counter-reset: step; display: grid; gap: 28px 40px; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: step; display: grid; gap: 6px; align-content: start; min-width: 0; }
.steps li::before {
  content: counter(step);
  font-size: 2.25rem; font-weight: 800; font-variation-settings: "wdth" 125;
  color: var(--slate); line-height: 1;
}
.steps p { color: var(--muted); }

/* Services list */
.services { display: grid; gap: 0; }
.service { display: grid; gap: 10px 48px; padding-block: 32px; border-top: 1px solid var(--line); }
.service:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 860px) { .service { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); } }
.service p { color: var(--muted); }

/* About */
.values { display: grid; gap: 18px; padding: 0; margin: 0; list-style: none; }
.values li { max-width: var(--measure); }
.values b { color: var(--ink); }
.plain-list { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }

/* Contact form */
.contact-details { display: grid; gap: 6px; font-size: var(--step-0); }
.contact-details strong { font-weight: 650; }
form.intake { display: grid; gap: 18px; }
.field-row { display: grid; gap: 18px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: var(--step--1); }
.field .hint { font-weight: 400; color: var(--muted); }
input, select, textarea {
  font: inherit;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--sun); outline-offset: 1px; }
textarea { min-height: 7rem; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; }
.checks { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); margin-top: 6px; }
.checks label { display: flex; gap: 10px; align-items: center; font-weight: 400; font-size: var(--step-0); }
.checks input { width: auto; }
button.btn { cursor: pointer; font: inherit; font-weight: 650; justify-self: start; }
.form-status { font-weight: 600; }
.form-status[data-state="ok"] { color: var(--leaf-ink); }
.form-status[data-state="error"] { color: var(--sun); }

/* Closing band */
.closing .wrap { display: grid; gap: 20px; padding-block: 56px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: var(--step--1); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; padding-block: 28px; }
.site-footer p { max-width: none; }
.motto { color: var(--leaf-ink); font-weight: 650; }

@media (prefers-reduced-motion: no-preference) {
  .hero-path { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.4s ease-out 0.2s forwards; }
  .hero-dot { opacity: 0; animation: appear 0.4s ease-out 2.4s forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes appear { to { opacity: 1; } }
}

/* Key to Sustainability block with the AEI Partners logo */
.turnkey { display: grid; gap: 24px 56px; align-items: center; }
@media (min-width: 760px) { .turnkey { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); } }
.keys img { display: block; width: 100%; max-width: 340px; height: auto; }
@media (max-width: 759px) { .keys img { max-width: 220px; } }

/* Proof figures: the numbers are the point of this list */
.proof { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px 40px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .proof { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .proof { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.proof li { display: grid; gap: 4px; align-content: start; min-width: 0; }
.proof b { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; font-variation-settings: "wdth" 120; color: var(--slate); line-height: 1.05; font-variant-numeric: tabular-nums; }
.proof span { color: var(--muted); max-width: 34ch; }
.note { font-size: var(--step--1); color: var(--muted); }

/* Featured project */
.feature { display: grid; gap: 28px 64px; align-items: start; }
@media (min-width: 860px) { .feature { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.facts div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts div:nth-child(odd) { padding-right: 16px; }
.facts dt { font-size: var(--step--1); color: var(--muted); }
.facts dd { margin: 0; font-size: var(--step-2); font-weight: 800; font-variation-settings: "wdth" 118; color: var(--leaf-ink); }

/* Services groups */
.jump { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: var(--step--1); }
.service-group { display: grid; gap: 8px; scroll-margin-top: 24px; }
.service-group + .service-group { margin-top: 40px; }
.group-head { display: grid; gap: 6px; padding-bottom: 8px; }
.group-head p { color: var(--muted); }
.stack-tight { display: grid; gap: 10px; min-width: 0; }
.figs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.figs li { background: color-mix(in srgb, var(--leaf) 18%, transparent); color: var(--ink); border-radius: 4px; padding: 4px 10px; font-size: var(--step--1); font-weight: 600; }

/* Tables */
.table-wrap { overflow-x: auto; max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: var(--step--1); }
th, td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 650; color: var(--muted); white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 12px; }
caption { text-align: left; color: var(--muted); padding-bottom: 8px; }

/* Map */
.split-map { display: grid; gap: 28px 48px; align-items: start; }
@media (min-width: 960px) { .split-map { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); } }
.split-map > * { min-width: 0; }
.map-figure { margin: 0; display: grid; gap: 8px; }
.us-map { width: 100%; height: auto; display: block; }
.map-figure figcaption { font-size: var(--step--1); color: var(--muted); }

/* About */
.about-head { grid-template-columns: 1fr; align-items: center; }
@media (min-width: 760px) { .about-head { grid-template-columns: 220px minmax(0, 1fr); gap: 40px; } }
.headshot { width: 100%; max-width: 220px; height: auto; border-radius: 50%; display: block; }
.quote { margin: 8px 0 0; padding: 0 0 0 20px; border-left: 3px solid var(--leaf); display: grid; gap: 8px; }
.quote p { font-size: var(--step-1); line-height: 1.5; }
.quote footer { color: var(--muted); font-size: var(--step--1); }
.photo { margin: 0; display: grid; gap: 6px; }
.photo img { width: 100%; height: auto; border-radius: 4px; display: block; }
.photo figcaption { font-size: var(--step--1); color: var(--muted); }

/* Footer brand */
.footer-brand { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; }
.footer-brand img { width: 180px; height: auto; display: block; }
.footer-brand .motto strong { color: var(--gold-ink); }

/* Career timeline: a real sequence, newest first */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { display: grid; gap: 4px 32px; padding-block: 18px; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .timeline li { grid-template-columns: 9rem minmax(0, 1fr); } }
.timeline .when { color: var(--slate); font-weight: 650; font-variant-numeric: tabular-nums; }
.timeline p { color: var(--muted); }

/* Case study pages */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.case-head h1 { max-width: 24ch; }
.case-meta { font-size: var(--step--1); color: var(--muted); font-weight: 600; }
.case-stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .case-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.case-stats li { display: grid; gap: 4px; align-content: start; padding: 18px 18px 16px; border-radius: 8px; background: color-mix(in srgb, var(--leaf) 10%, var(--paper)); border-top: 3px solid var(--leaf); min-width: 0; }
.case-stats li:first-child { background: var(--band-bg); border-top-color: var(--gold); }
.case-stats li:first-child b { color: var(--gold); }
.case-stats li:first-child span { color: var(--band-fg); }
.case-stats b { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; font-variation-settings: "wdth" 118; color: var(--slate); line-height: 1.05; font-variant-numeric: tabular-nums; }
.case-stats span { color: var(--muted); font-size: var(--step--1); }
.case-grid { display: grid; gap: 28px 56px; align-items: start; }
@media (min-width: 900px) { .case-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }
.case-grid > * { min-width: 0; }
.case .photo img { border: 1px solid var(--line); background: #fff; }
.photo.wide { max-width: 1000px; }
.snapshot { margin: 0; display: grid; border-top: 1px solid var(--line); }
.snapshot div { display: grid; grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr); gap: 4px 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.snapshot dt { color: var(--muted); font-size: var(--step--1); font-weight: 600; }
.snapshot dd { margin: 0; font-size: var(--step--1); }
@media (min-width: 1040px) { .case-points { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.case-points .plain-list { color: var(--muted); font-size: var(--step--1); }
.case-points .plain-list b { color: var(--ink); }
.closing .lede { color: var(--band-muted); }
