/* ============================================================
   Home — page-specific styles.
   Header, footer, button, card, layout primitives all live in
   components.css / base.css. This file owns *only* the Home
   sections: hero, services, sectors, why-us, projects, insights,
   CTA band. No new tokens.
   ============================================================ */

/* ============================================================
   Full-viewport homepage sections
   Each major content section fills at least one viewport so the
   page reads as a sequence of slides on scroll. `safe center`
   falls back to flex-start when content is taller than the
   viewport, so nothing gets clipped at the top on tall content.

   Note: .cta-band is intentionally NOT in this list — it pairs
   with the dark footer below it, and giving both a full viewport
   produced an over-heavy dark close. The CTA now sizes to its
   own padding so CTA + footer together fit roughly in one screen.
   ============================================================ */

.hero,
.services,
.sectors,
.why,
.projects,
.insights {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: safe center;
}

@supports not (height: 100svh) {
  .hero,
  .services,
  .sectors,
  .why,
  .projects,
  .insights {
    min-height: 100vh;
  }
}

/* ---------- Reveal (used across sections) ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity   var(--dur-reveal) var(--ease-out),
    transform var(--dur-reveal) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal][data-revealed] {
  opacity: 1;
  transform: none;
}

/* Per-section heading rhythm */
.section-head {
  display: grid;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
  max-width: 64rem;
}
.section-head__title {
  font-size: var(--fs-h1);
  letter-spacing: var(--tr-tight);
  text-wrap: balance;
}
.section-head__lead {
  font-size: var(--fs-body-lg);
  color: var(--fg);
  line-height: var(--lh-relaxed);
  max-width: 60ch;
}
@media (min-width: 1024px) {
  .section-head {
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: var(--space-xl);
  }
}

/* ============================================================
   1) HERO — exact viewport, full-bleed image, single centered copy
   ============================================================ */

.hero {
  position: relative;
  height: 100svh;
  min-height: 100svh;
  overflow: hidden;
  padding-block: 0;
  isolation: isolate;
  color: var(--fg-on-dark);
}

@supports not (height: 100svh) {
  .hero { height: 100vh; min-height: 100vh; }
}

/* Full-bleed background photography — single image, edge-to-edge,
   cover-cropped to the viewport. */

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--color-obsidian);
  overflow: hidden;
}

.hero__media-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* Tinted overlay so headline + lead stay legible on any photo. */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(10, 10, 11, 0.55) 0%,
      rgba(10, 10, 11, 0.30) 40%,
      rgba(10, 10, 11, 0.65) 100%
    );
  pointer-events: none;
  z-index: 2;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding-block: clamp(5rem, 12vh, 8rem) var(--space-xl);
}

.hero__copy {
  max-width: 60rem;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  font-weight: var(--fw-display);
  line-height: 0.98;
  letter-spacing: var(--tr-tight);
  font-variation-settings: "SOFT" 30, "opsz" 144;
  text-wrap: balance;
  color: var(--fg-on-dark);
}

.hero__title em {
  font-style: italic;
  font-weight: var(--fw-semibold);
  color: var(--color-dune);
  font-variation-settings: "SOFT" 80, "opsz" 144;
}

.hero__lead {
  margin-top: var(--space-lg);
  font-size: clamp(1.0625rem, 0.9rem + 0.5vw, 1.25rem);
  color: var(--fg-on-dark-muted);
  line-height: var(--lh-relaxed);
  max-width: 56ch;
}

.hero__cta {
  margin-top: var(--space-xl);
}

/* ============================================================
   2) SERVICES OVERVIEW
   Tabs (desktop / tablet) + accordion (mobile). DOM is a flat
   list of [tab, panel, tab, panel, …]. CSS Grid does the work.
   ============================================================ */

.services {
  /* Sit on the page surface so the section reads as part of the
     overall page rather than an ivory band that competes with the
     other sections. */
  background: transparent;
}

/* ---------- Shell ---------- */

.services-shell {
  display: flex;          /* mobile-first: vertical accordion */
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--surface-line);
}

@media (min-width: 768px) {
  .services-shell {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: var(--space-sm);
    row-gap: var(--space-md);
    border-top: none;
  }
  /* All panels live in the row directly below the tabs.
     Only one is visible at a time; non-active panels are [hidden]. */
  .services-shell .services-panel {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

@media (min-width: 1024px) {
  .services-shell {
    grid-template-columns: repeat(5, 1fr);
    column-gap: var(--space-sm);
  }
  .services-shell .services-panel {
    grid-row: 2;
  }
}

/* ---------- Tab buttons ---------- */

.services-tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--surface-line);
  text-align: left;
  padding: var(--space-md) var(--space-2xs);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  color: var(--fg);
  font-family: var(--font-sans);
  transition:
    background var(--dur-fast) var(--ease-out),
    color      var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}

.services-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.services-tab__index {
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  letter-spacing: var(--tr-loose);
  color: var(--accent);
}

.services-tab__label {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 0.95rem + 0.6vw, 1.375rem);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  letter-spacing: var(--tr-tight);
  font-variation-settings: "SOFT" 50, "opsz" 144;
  color: var(--fg);
}

.services-tab__chev {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--dur-base) var(--ease-out),
              color     var(--dur-fast) var(--ease-out);
}
.services-tab__chev svg { width: 100%; height: 100%; }

.services-tab:hover .services-tab__chev,
.services-tab.is-active .services-tab__chev {
  color: var(--accent-hover);
}

.services-tab.is-active .services-tab__chev {
  transform: rotate(180deg);
}

/* Mobile (default): tabs feel like accordion rows. */
.services-tab.is-active {
  background: color-mix(in oklab, var(--color-dune) 18%, transparent);
}
.services-tab.is-active .services-tab__index {
  color: var(--accent-hover);
}

/* Tablet+: tabs become card-like pills above the panel.
   Active state uses the brand accent (dune) — same warm tone as the
   hero CTA — so the services section feels part of the same palette. */
@media (min-width: 768px) {
  .services-tab {
    border: 1px solid var(--surface-line);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    background: var(--bg-elevated);
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-items: start;
    min-height: 7.5rem;
  }
  .services-tab .services-tab__chev { display: none; }
  .services-tab__index {
    grid-row: 1;
  }
  .services-tab__label {
    grid-row: 2;
    text-wrap: balance;
  }
  .services-tab:hover {
    border-color: var(--surface-line-strong);
    background: var(--bg);
  }
  .services-tab.is-active {
    background: var(--color-dune);
    border-color: var(--color-dune);
  }
  .services-tab.is-active .services-tab__index {
    color: var(--color-ember);
  }
  .services-tab.is-active .services-tab__label {
    color: var(--color-obsidian);
  }
}

/* ---------- Panel ---------- */

.services-panel {
  padding-block: var(--space-lg) var(--space-xl);
}
.services-panel[hidden] { display: none; }

@media (min-width: 768px) {
  .services-panel {
    margin-top: var(--space-lg);
    padding: var(--space-xl) var(--space-lg);
    background: transparent;
    border: 0;
    border-radius: var(--radius-lg);
    box-shadow: none;
    position: relative;
    overflow: hidden;
    isolation: isolate;
  }
}

@media (min-width: 1024px) {
  .services-panel {
    padding: var(--space-2xl);
  }
}

/* Background image layer — sits behind the cards.
   Hidden on mobile; the cards take priority on small screens. */
.services-panel__bg {
  display: none;
}

@media (min-width: 768px) {
  .services-panel__bg {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: var(--panel-bg-image);
    background-size: cover;
    background-position: center;
    pointer-events: none;
    transition: opacity var(--dur-base) var(--ease-out);
  }
  /* Tinted gradient overlay — fades the image into the mist surface so
     the cards remain the visual priority. */
  .services-panel__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(
        180deg,
        color-mix(in oklab, var(--color-mist) 70%, transparent) 0%,
        color-mix(in oklab, var(--color-mist) 88%, transparent) 100%
      );
  }
  /* Lift the panel content above the bg layer. */
  .services-panel > .services-panel__head,
  .services-panel > .sub-services,
  .services-panel > .diagnostic {
    position: relative;
    z-index: 1;
  }
}

/* Crossfade the active panel on tab change. */
.services-panel.is-leaving {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.services-panel.is-entering {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}

.services-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-xs) var(--space-md);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--surface-line);
}

.services-panel__eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--accent-hover);
}

.services-panel__tagline {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 0.95rem + 0.6vw, 1.5rem);
  font-style: italic;
  font-weight: var(--fw-medium);
  letter-spacing: var(--tr-tight);
  line-height: var(--lh-snug);
  color: var(--fg);
  font-variation-settings: "SOFT" 80, "opsz" 144;
  text-wrap: balance;
  flex: 1 1 18rem;
}

/* ---------- Sub-services grid ---------- */

.sub-services {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .sub-services { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .sub-services { grid-template-columns: repeat(3, 1fr); }
}

/* When a panel only has one sub-service (e.g. EV Charging),
   keep its width readable instead of stretching across the row. */
.sub-services--sparse {
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .sub-services--sparse { grid-template-columns: minmax(0, 28rem); }
}

.sub-service {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--bg-elevated);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-md);
  transition:
    border-color var(--dur-base) var(--ease-out),
    transform    var(--dur-base) var(--ease-out);
}
.sub-service:hover {
  border-color: var(--surface-line-strong);
  transform: translateY(-2px);
}

.sub-service__icon {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: color-mix(in oklab, var(--color-dune) 22%, transparent);
  color: var(--color-ember);
}
.sub-service__icon svg { width: 1.25rem; height: 1.25rem; }

.sub-service__title {
  font-family: var(--font-display);
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  letter-spacing: var(--tr-tight);
  font-variation-settings: "SOFT" 50, "opsz" 144;
  text-wrap: balance;
  color: var(--fg);
}

.sub-service__desc {
  color: var(--fg);
  font-size: var(--fs-small);
  line-height: var(--lh-relaxed);
  max-width: 38ch;
}

/* ---------- Diagnostic (Villa) layout ---------- */

.diagnostic {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .diagnostic {
    grid-template-columns: 1.4fr 1fr;
    gap: var(--space-2xl);
  }
}

.diagnostic__col--advantages {
  background: var(--color-bone);
  color: var(--color-text);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}
@media (min-width: 1024px) {
  .diagnostic__col--advantages {
    padding: var(--space-xl);
  }
}

.diagnostic__heading {
  font-family: var(--font-sans);
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: var(--space-md);
}
.diagnostic__col--advantages .diagnostic__heading {
  color: var(--color-ember);
}
.diagnostic__heading--scope {
  margin-top: var(--space-xl);
}

.diagnostic-capabilities {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 480px) {
  .diagnostic-capabilities { grid-template-columns: repeat(2, 1fr); }
}

.diagnostic-capability {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast) var(--ease-out);
}
.diagnostic-capability:hover {
  border-color: var(--surface-line-strong);
}

.diagnostic-capability__icon {
  flex: none;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  background: color-mix(in oklab, var(--color-dune) 22%, transparent);
  color: var(--color-ember);
}
.diagnostic-capability__icon svg { width: 1.125rem; height: 1.125rem; }

.diagnostic-capability__label {
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--fg);
  line-height: var(--lh-snug);
}

.diagnostic__scope {
  color: var(--fg);
  line-height: var(--lh-relaxed);
  font-size: var(--fs-body);
  max-width: 56ch;
}

.diagnostic-advantages {
  display: grid;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}

.diagnostic-advantage {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  color: var(--color-text);
  line-height: var(--lh-snug);
}

.diagnostic-advantage__bullet {
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--color-ember);
}

/* ---------- Stagger reveal for sub-service items ---------- */

[data-services-stagger] > * {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity   var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
  transition-delay: var(--stagger-delay, 0ms);
}
[data-services-stagger] > .is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-services-stagger] > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Section CTA ---------- */

.services-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  margin-top: var(--space-xl);
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg);
  padding-bottom: 2px;
  border-bottom: 1px solid var(--accent);
  transition:
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}
.services-cta span {
  transition: transform var(--dur-fast) var(--ease-out);
}
.services-cta:hover {
  color: var(--accent-hover);
  border-color: var(--accent-hover);
}
.services-cta:hover span {
  transform: translateX(4px);
}

/* ============================================================
   3) SECTORS STRIP
   ============================================================ */

.sectors {
  background: var(--color-obsidian);
  color: var(--fg-on-dark);
  padding-block: var(--section-y);
}

.sectors h2,
.sectors p { color: var(--fg-on-dark); }

.sectors__head {
  display: grid;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}
@media (min-width: 1024px) {
  .sectors__head {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: var(--space-xl);
  }
}

.sectors__title {
  font-size: var(--fs-h2);
  color: var(--fg-on-dark);
  text-wrap: balance;
}
.sectors__title em {
  color: var(--color-dune);
  font-style: italic;
  font-variation-settings: "SOFT" 80, "opsz" 144;
}
.sectors__lead {
  color: var(--fg-on-dark-muted);
  max-width: 50ch;
}

.sectors__grid {
  display: grid;
  gap: 1px;
  background: var(--surface-line-on-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--surface-line-on-dark);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .sectors__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .sectors__grid { grid-template-columns: repeat(4, 1fr); }
}

.sector {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-xl) var(--space-lg);
  background: var(--color-slate);
  min-height: 14rem;
  transition: background var(--dur-base) var(--ease-out);
}

.sector:hover {
  background: var(--color-graphite);
}

.sector__icon {
  width: 2rem;
  height: 2rem;
  color: var(--color-dune);
}
.sector__icon svg { width: 100%; height: 100%; }

.sector__name {
  font-family: var(--font-display);
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tr-tight);
  line-height: var(--lh-snug);
  color: var(--fg-on-dark);
  font-variation-settings: "SOFT" 50, "opsz" 144;
}

.sector__desc {
  color: var(--fg-on-dark-muted);
  font-size: var(--fs-small);
  line-height: var(--lh-relaxed);
  max-width: 32ch;
  margin-top: auto;
}

/* ============================================================
   4) WHY-US / DIFFERENTIATORS
   ============================================================ */

.why {
  padding-block: var(--section-y);
}

.why__inner {
  display: grid;
  gap: var(--space-2xl);
}

@media (min-width: 1024px) {
  .why__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: var(--space-3xl);
    align-items: start;
  }
}

.why__intro h2 {
  font-size: var(--fs-h1);
  letter-spacing: var(--tr-tight);
}
.why__intro h2 em {
  font-style: italic;
  color: var(--color-dune);
  font-variation-settings: "SOFT" 80, "opsz" 144;
}
.why__intro p {
  margin-top: var(--space-md);
  color: var(--fg);
  font-size: var(--fs-body-lg);
  line-height: var(--lh-relaxed);
  max-width: 44ch;
}
.why__intro .btn {
  margin-top: var(--space-lg);
}

.why__list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--surface-line);
}

.why-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-md) var(--space-lg);
  align-items: start;
  padding-block: var(--space-lg);
  border-bottom: 1px solid var(--surface-line);
}

.why-item__num {
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  letter-spacing: var(--tr-loose);
  color: var(--accent);
  padding-top: 0.4rem;
}

.why-item__body h3 {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 1.05rem + 1.2vw, 1.75rem);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  letter-spacing: var(--tr-tight);
  font-variation-settings: "SOFT" 50, "opsz" 144;
  text-wrap: balance;
}

.why-item__body p {
  margin-top: var(--space-2xs);
  color: var(--fg);
  line-height: var(--lh-relaxed);
  max-width: 56ch;
}

/* ============================================================
   5) FEATURED PROJECTS — atmospheric backdrop, "window" framing
   The section bg is a large photo (loaded via .projects__bg) that
   reads as a vista glimpsed beyond the cards. A soft bone-tinted
   gradient keeps the cards readable; cards sit above with a lift
   shadow so they feel framed, like panes set into a window.
   ============================================================ */

.projects {
  position: relative;
  background: var(--color-bone);   /* fallback / shows behind transparent overlay */
  padding-block: var(--section-y);
  overflow: hidden;
  isolation: isolate;
}

.projects__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.projects__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Soft bone-tinted gradient overlay so the project cards above
   stay readable on any backdrop photography that drops in. */
.projects__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      color-mix(in oklab, var(--color-bone) 72%, transparent) 0%,
      color-mix(in oklab, var(--color-bone) 90%, transparent) 100%
    );
}

.projects__inner {
  position: relative;
  z-index: 1;
}

.projects__grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .projects__grid {
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-lg);
  }
  /* Editorial layout: featured spans 4 cols, two stacked spans 2 cols. */
  .projects__grid > .project-card:nth-child(1) {
    grid-column: span 4;
    grid-row: span 2;
  }
  .projects__grid > .project-card:nth-child(2),
  .projects__grid > .project-card:nth-child(3) {
    grid-column: span 2;
  }
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--color-mist);
  border: 1px solid var(--surface-line);
  box-shadow: var(--shadow-md);   /* lifts the card off the atmospheric bg */
  text-decoration: none;
  color: inherit;
  transition:
    transform    var(--dur-base) var(--ease-out),
    box-shadow   var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out);
  isolation: isolate;
  min-height: 18rem;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--surface-line-strong);
}

.project-card__media {
  position: absolute;
  inset: 0;
  background: var(--color-graphite);
  z-index: -1;
}
.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}
.project-card:hover .project-card__media img { transform: scale(1.05); }

.project-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 11, 0) 35%,
    rgba(10, 10, 11, 0.78) 100%
  );
}

.project-card__body {
  margin-top: auto;
  padding: var(--space-lg);
  color: var(--color-ivory);
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  z-index: 1;
}

.project-card__eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--color-sand);
}

.project-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 0.95rem + 1.1vw, 1.625rem);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  letter-spacing: var(--tr-tight);
  font-variation-settings: "SOFT" 50, "opsz" 144;
  color: var(--color-ivory);
  text-wrap: balance;
}

.project-card__meta {
  margin-top: var(--space-2xs);
  display: flex;
  gap: var(--space-md);
  font-size: var(--fs-caption);
  letter-spacing: var(--tr-loose);
  color: var(--fg-on-dark-muted);
  text-transform: uppercase;
}

.project-card--featured .project-card__title {
  font-size: clamp(1.625rem, 1.15rem + 2.1vw, 2.5rem);
}

/* ============================================================
   6) INSIGHTS TEASER
   ============================================================ */

.insights {
  padding-block: var(--section-y);
}

.insights__grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .insights__grid { grid-template-columns: repeat(3, 1fr); }
}

.insight {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--surface-line-strong);
}

.insight__meta {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  font-family: var(--font-sans);
  font-size: var(--fs-caption);
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
}

.insight__tag {
  color: var(--accent-hover);
  font-weight: var(--fw-semibold);
}
.insight__date { color: var(--fg-muted); }

.insight__title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1rem + 0.9vw, 1.5rem);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  letter-spacing: var(--tr-tight);
  font-variation-settings: "SOFT" 50, "opsz" 144;
  text-wrap: balance;
  color: var(--fg);
}

.insight__title a {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size var(--dur-base) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
.insight__title a:hover {
  background-size: 100% 1px;
  color: var(--accent-hover);
}

.insight__excerpt {
  color: var(--fg);
  line-height: var(--lh-relaxed);
  font-size: var(--fs-body);
  max-width: 42ch;
}

/* ============================================================
   7) CTA BAND
   ============================================================ */

.cta-band {
  background: var(--color-obsidian);
  color: var(--fg-on-dark);
  padding-block: clamp(4rem, 8vw, 7rem);
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 36rem;
  height: 36rem;
  background: radial-gradient(
    circle at center,
    color-mix(in oklab, var(--color-dune) 35%, transparent) 0%,
    transparent 60%
  );
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.cta-band__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-xl);
}

.cta-band__title {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  font-weight: var(--fw-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--tr-tight);
  color: var(--fg-on-dark);
  text-wrap: balance;
  max-width: 24ch;
}
.cta-band__title em {
  font-style: italic;
  color: var(--color-dune);
  font-variation-settings: "SOFT" 80, "opsz" 144;
}

/* ============================================================
   4.5) STATS — animated dark band (count-up infographic)
   Sits between Why Absher and Featured Projects. Numbers count
   up via count-up.js when the section enters the viewport.
   ============================================================ */

.stats {
  background: var(--color-obsidian);
  color: var(--fg-on-dark);
  padding-block: clamp(4rem, 8vw, 6rem);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Soft warm glow so the band doesn't read as a flat black slab. */
.stats::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 50%, rgba(184, 154, 120, 0.10), transparent 55%),
    radial-gradient(ellipse at 85% 50%, rgba(122, 74, 46, 0.08), transparent 55%);
  pointer-events: none;
  z-index: -1;
}

.stats__grid {
  display: grid;
  gap: var(--space-2xl);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .stats__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
  }
}

.stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-left: var(--space-md);
  border-left: 2px solid var(--color-dune);
  transition: border-color var(--dur-base) var(--ease-out);
}

.stat:hover { border-left-color: var(--color-ember); }

.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 1.8rem + 3vw, 4.5rem);
  font-weight: var(--fw-display);
  font-variation-settings: "SOFT" 30, "opsz" 144;
  line-height: 1;
  letter-spacing: var(--tr-tight);
  color: var(--color-dune);
  font-feature-settings: "tnum" 1; /* tabular numerals — no width jitter */
  display: inline-flex;
  align-items: baseline;
  gap: 0.05em;
}

.stat__suffix {
  font-size: 0.55em;
  font-weight: var(--fw-semibold);
  color: var(--color-sand);
  letter-spacing: 0.02em;
}

.stat__label {
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  color: var(--fg-on-dark-muted);
  line-height: var(--lh-normal);
  max-width: 28ch;
}

/* ============================================================
   Hover micro-motion — sectors, why-items, insights
   Subtle lift / color / scale only. Honors prefers-reduced-motion
   via the global rule at the bottom of this file (or the browser's
   transition: none default when motion is reduced).
   ============================================================ */

/* Sector cards: icon scales + dune accent line slides in from left. */
.sector {
  overflow: hidden;
}
.sector::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--color-dune);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--dur-base) var(--ease-out);
}
.sector:hover::before { transform: scaleY(1); }

.sector__icon {
  transition: transform var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out);
}
.sector:hover .sector__icon {
  transform: scale(1.08) translateY(-2px);
  color: var(--color-sand);
}

/* Why-items: number gets a soft slide + accent glow on hover. */
.why-item {
  transition: background var(--dur-base) var(--ease-out);
  padding-inline: var(--space-sm);
  margin-inline: calc(var(--space-sm) * -1);
  border-radius: var(--radius-md);
}
.why-item:hover {
  background: color-mix(in oklab, var(--color-dune) 8%, transparent);
}

.why-item__num {
  transition: color var(--dur-fast) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.why-item:hover .why-item__num {
  color: var(--accent-hover);
  transform: translateX(2px);
}

/* Insight cards: top border accent grows in, title link already animates. */
.insight {
  transition: border-top-color var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.insight:hover {
  border-top-color: var(--accent);
  transform: translateY(-2px);
}

/* Service tabs: chevron drifts on hover (already rotates on active). */
.services-tab {
  position: relative;
}
.services-tab:hover .services-tab__chev {
  color: var(--accent);
  transform: translateY(2px);
}

/* CTA band button arrow micro-motion is handled in components.css; nothing to add here. */

@media (prefers-reduced-motion: reduce) {
  .sector::before,
  .sector__icon,
  .why-item,
  .why-item__num,
  .insight,
  .services-tab__chev {
    transition: none !important;
  }
  .sector:hover::before { transform: scaleY(1); }
}
