/* ==========================================================================
   The Di Salvo Engineering Group — Home (Version 03)
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --slate: #3B4A4C;
  --burgundy: #960000;
  --burgundy-dark: #400205;
  --burgundy-deep: #2C0103;
  --sage: #95BAB2;
  --sage-tint: #E4EBEA;
  --sage-muted: #D9E1E0;
  --cream: #EEE8DC;
  --paper: #F4F3EF;
  --white: #FFFFFF;

  --font: "Inter Tight", system-ui, sans-serif;

  --gutter: clamp(20px, 5vw, 80px);
  --max-width: 1440px;
  --header-h: 76px;
}

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

html, body { margin: 0; padding: 0; background: var(--white); }

body {
  font-family: var(--font);
  color: var(--slate);
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }

h1, h2, h3, p, figure { margin: 0; }

a { color: inherit; text-decoration: none; }

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

button { font: inherit; }

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

/* ---------- Shared type ---------- */
.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.eyebrow--sage { color: var(--sage); }
.eyebrow--burgundy { color: var(--burgundy); }

.section-title {
  font-size: clamp(36px, 4.4vw, 66px);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -.025em;
}

.rule {
  display: block;
  width: 56px;
  height: 2px;
  background: var(--burgundy);
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: 2px;
  font-size: 15px;
  font-weight: 500;
  transition: background-color .3s ease, color .3s ease;
}

.btn--primary { background: var(--burgundy); color: var(--white); }
.btn--primary:hover { background: var(--burgundy-dark); color: var(--white); }

.btn--outline-light {
  align-self: flex-start;
  padding: 13px 22px;
  border: 1px solid var(--white);
  color: var(--white);
  font-size: 14px;
}
.btn--outline-light:hover { background: var(--white); color: var(--slate); }

.btn--outline-dark {
  margin-top: 8px;
  padding: 12px 20px;
  border: 1px solid var(--slate);
  color: var(--slate);
  font-size: 14px;
}
.btn--outline-dark:hover { background: var(--slate); color: var(--white); }


.link-underline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid;
  font-size: 15px;
  font-weight: 500;
}
.link-underline--light { color: var(--white); border-color: var(--sage); }
.link-underline--light:hover { color: var(--sage); }
.link-underline--burgundy { color: var(--burgundy); border-color: var(--burgundy); }

/* ---------- Revit model figure ---------- */
.model-figure {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  padding: clamp(20px, 3vw, 40px);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(59, 74, 76, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 74, 76, .07) 1px, transparent 1px);
  background-size: 32px 32px;
}

.model-figure__image {
  width: 100%;
  height: auto;
  border: 1px solid rgba(59, 74, 76, .15);
}

.model-figure__caption {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--slate);
}
.model-figure__caption--split {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}
.model-figure__project { color: var(--burgundy); }

/* ---------- Reveal on scroll ---------- */
.reveal {
  transition: opacity 1.1s cubic-bezier(.2, .7, .2, 1), transform 1.1s cubic-bezier(.2, .7, .2, 1);
}
.reveal.is-pending { opacity: 0; transform: translateY(32px); }
.reveal.is-revealed { opacity: 1; transform: none; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--white);
  border-bottom: 1px solid rgba(59, 74, 76, .12);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  max-width: var(--max-width);
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-header__start {
  display: flex;
  align-items: center;
  gap: clamp(32px, 4vw, 64px);
}

.site-header__brand { display: flex; align-items: center; }

.site-logo { height: 42px; width: auto; }

/* ---------- Primary nav ---------- */
.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.6vw, 40px);
}

.primary-nav__item { position: relative; }

.primary-nav__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 28px 0;
  background: none;
  border: 0;
  color: var(--slate);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.primary-nav__toggle:hover,
.primary-nav__link:hover { color: var(--burgundy); }

.primary-nav__chevron {
  font-size: 10px;
  transition: transform .3s ease;
}

.primary-nav__dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: -20px;
  min-width: 200px;
  flex-direction: column;
  padding: 8px 0;
  background: var(--white);
  border: 1px solid rgba(59, 74, 76, .14);
  border-top: 2px solid var(--burgundy);
  box-shadow: 0 18px 40px rgba(59, 74, 76, .12);
}

.primary-nav__item--has-dropdown:hover .primary-nav__dropdown,
.primary-nav__item--has-dropdown.is-open .primary-nav__dropdown { display: flex; }

.primary-nav__item--has-dropdown:hover .primary-nav__chevron,
.primary-nav__item--has-dropdown.is-open .primary-nav__chevron { transform: rotate(180deg); }

.primary-nav__dropdown-link {
  padding: 12px 20px;
  color: var(--slate);
  font-size: 15px;
}
.primary-nav__dropdown-link:hover { background: var(--cream); color: var(--burgundy); }

.primary-nav__link {
  color: var(--slate);
  font-size: 15px;
  font-weight: 500;
}

.site-header__cta { padding: 13px 22px; font-size: 14px; }

/* ---------- Menu toggle (burger) ---------- */
.menu-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 0;
  background: var(--white);
  border: 1px solid rgba(59, 74, 76, .25);
  border-radius: 2px;
  cursor: pointer;
}

.menu-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--slate);
  transition: transform .3s ease, opacity .2s ease;
}

.menu-open .menu-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-toggle__bar:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed;
  top: calc(var(--header-h) + var(--dc-topbar-h, 0px));
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 24px var(--gutter) 48px;
  background: var(--white);
  overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }

.mobile-menu__link {
  padding: 16px 0;
  border-bottom: 1px solid rgba(59, 74, 76, .14);
  color: var(--slate);
  font-size: 20px;
  font-weight: 400;
}

.mobile-menu__link--sub {
  padding: 12px 0 12px 20px;
  border-bottom-color: rgba(59, 74, 76, .08);
  font-size: 16px;
  font-weight: 400;
}
.mobile-menu__link--sub-last { border-bottom-color: rgba(59, 74, 76, .14); }

.mobile-menu__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border-width: 0 0 1px;
  border-style: solid;
  background: none;
  font-family: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}

.mobile-menu__caret { color: var(--burgundy); font-size: 22px; font-weight: 300; }
.mobile-menu__caret::before { content: "+"; }
.mobile-menu__toggle[aria-expanded="true"] .mobile-menu__caret::before { content: "−"; }

.mobile-menu__sub { display: flex; flex-direction: column; }
.mobile-menu__sub[hidden] { display: none; }

.mobile-menu__cta {
  justify-content: center;
  margin-top: 32px;
  padding: 18px 22px;
  font-size: 16px;
}

/* ==========================================================================
   1 Hero
   ========================================================================== */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  height: max(660px, calc(100vh - var(--header-h) - var(--dc-topbar-h, 0px)));
  height: max(660px, calc(100svh - var(--header-h) - var(--dc-topbar-h, 0px)));
  overflow: hidden;
  background: var(--slate);
}

/* Area the title panel sits in: above the controls row, within the content max-width */
.hero__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero__slides { position: absolute; inset: 0; }

.hero__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.01);
  transition: opacity 1.8s ease, transform 0s linear 1.9s;
  will-change: transform, opacity;
}

.hero__slide.is-active {
  opacity: 1;
  transition: opacity 1.8s ease, transform 14s cubic-bezier(.25, .1, .25, 1);
}

/* Slow Ken Burns pan, a different direction per slide */
.hero__slide:nth-child(1) { --pan: scale(1.07) translate3d(-1%, -.6%, 0); }
.hero__slide:nth-child(2) { --pan: scale(1.07) translate3d(1%, -.5%, 0); }
.hero__slide:nth-child(3) { --pan: scale(1.07) translate3d(-.8%, .5%, 0); }
.hero__slide:nth-child(4) { --pan: scale(1.07) translate3d(.8%, .6%, 0); }
.hero.is-started .hero__slide.is-active { transform: var(--pan); }

.hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(25, 30, 31, .05) 35%, rgba(25, 30, 31, .78) 100%);
}

.hero__panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: min(640px, 100%);
  padding: clamp(28px, 4vw, 60px);
  background: var(--burgundy);
  color: var(--white);
}

.hero__title {
  font-size: clamp(30px, 3.3vw, 50px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -.015em;
  text-wrap: balance;
}

.hero__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  width: min(380px, 100%);
}

.hero__lede {
  font-size: 17px;
  line-height: 1.55;
  text-wrap: pretty;
}

.hero__controls {
  position: relative;
  width: 100%;
  margin-bottom: 72px; /* sits above the fixed Back to Home button */
  padding-top: 32px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  color: var(--white);
}

.hero__dots { display: flex; gap: 8px; }

.hero__dot {
  padding: 14px 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.hero__dot-track {
  position: relative;
  display: block;
  width: clamp(32px, 4vw, 56px);
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, .35);
}

.hero__dot-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  background: var(--white);
  transition: width .4s ease;
}
.hero__dot.is-done .hero__dot-fill { width: 100%; }
.hero.is-started .hero__dot.is-active .hero__dot-fill { width: 100%; transition: width 9000ms linear; }

/* ==========================================================================
   2 Intro
   ========================================================================== */
.intro {
  padding: clamp(80px, 3vw, 160px) 0;
  background: var(--cream);
}

.intro__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  align-items: start;
  gap: clamp(32px, 6vw, 120px);
}

.intro__title {
  font-size: clamp(36px, 4.4vw, 66px);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.intro__body {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 12px;
}

.intro__text {
  font-size: clamp(17px, 1.3vw, 19px);
  line-height: 1.65;
  text-wrap: pretty;
}

/* ==========================================================================
   3 Why TDEG
   ========================================================================== */
.why {
  position: relative;
  background: var(--slate);
  color: var(--white);
}

.why__title {
  font-size: clamp(36px, 3.8vw, 58px);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -.02em;
}

.why__text {
  max-width: 480px;
  color: var(--sage-tint);
  font-size: 17px;
  line-height: 1.65;
  text-wrap: pretty;
}

/* ---------- Desktop: sticky story ---------- */
.why__desktop {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(48px, 7vw, 120px);
  padding-top: clamp(100px, 10vw, 160px);
  padding-bottom: clamp(140px, 14vw, 220px);
}

.why__sticky-col { position: relative; }

.why__sticky {
  position: sticky;
  top: 132px;
  display: flex;
  gap: clamp(28px, 3vw, 48px);
  height: calc(100vh - 210px);
  min-height: 520px;
}

.why__track {
  position: relative;
  flex-shrink: 0;
  width: 1px;
  background: rgba(149, 186, 178, .35);
}

.why__bar {
  position: absolute;
  left: -1px;
  top: calc(var(--story, 0) * 33.333%);
  width: 3px;
  height: 33.333%;
  background: var(--sage);
  transition: top .9s cubic-bezier(.65, 0, .35, 1);
}

.why__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 0;
}

.why__panels { display: grid; }

.why__panel {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
  opacity: 0;
  transform: translateY(24px);
  pointer-events: none;
  transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
}
.why__panel.is-before { transform: translateY(-24px); }
.why__panel.is-active { opacity: 1; transform: none; pointer-events: auto; }

.why__media-col {
  display: flex;
  flex-direction: column;
  gap: clamp(80px, 10vw, 140px);
}

.why__media {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 82vh;
}

.why__photo {
  display: block;
  height: auto;
  object-fit: cover;
}

/* ---------- Tablet / mobile: stacked list ---------- */
.why__mobile {
  display: none;
  flex-direction: column;
  gap: 80px;
  padding-top: 88px;
  padding-bottom: 120px;
}

.why__item {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.why__item-media {
  display: block;
  width: 100%;
  margin-top: 8px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.why__item-model {
  margin-top: 8px;
  padding: 16px;
  background: var(--paper);
}
.why__item-model img { width: 100%; }

.why__notch {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 42%;
  height: clamp(40px, 5vw, 72px);
  background: var(--cream);
}

/* ==========================================================================
   4 What We Do
   ========================================================================== */
.services {
  padding: 80px 0 clamp(100px, 11vw, 180px);
  overflow: hidden;
  background: var(--cream);
}

.services__inner {
  display: flex;
  flex-direction: column;
  gap: clamp(80px, 3vw, 150px);
}

.services__header {
  display: flex;
  flex-direction: column;
  gap: 20px;
  /* max-width: 760px; */
}

.service {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(36px, 7vw, 120px);
}
.service--reverse { flex-direction: row-reverse; }

.service__media {
  position: relative;
  flex: 1 1 440px;
}

.service__accent {
  position: absolute;
  top: -24px;
  left: -24px;
  width: 62%;
  height: 62%;
  background: var(--white);
}
.service--reverse .service__accent { left: auto; right: -24px; }

.service__frame {
  position: relative;
  aspect-ratio: 5 / 4;
}

.service__image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.service__body {
  flex: 1 1 340px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  max-width: 520px;
}

.service__title {
  font-size: clamp(26px, 2.4vw, 36px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.015em;
}

.service__text {
  font-size: 17px;
  line-height: 1.65;
  text-wrap: pretty;
}

/* ==========================================================================
   5 Selected Experience (carousel)
   ========================================================================== */
.projects {
  position: relative;
  padding: clamp(100px, 10vw, 150px) 0 clamp(80px, 8vw, 120px);
  background: var(--burgundy-dark);
  color: var(--white);
}

.projects__notch {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: clamp(40px, 5vw, 72px);
  background: var(--cream);
}

.projects__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: clamp(40px, 4vw, 56px);
}

.projects__heading {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.carousel__track {
  display: flex;
  gap: 24px;
  max-width: 100%;
  padding: 0 var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.carousel__track::-webkit-scrollbar { display: none; }

.carousel__spacer { flex: 0 0 1px; }

.project-card {
  flex: 0 0 clamp(280px, 36vw, 520px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  color: var(--white);
  scroll-snap-align: start;
}

.project-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--burgundy-deep);
}
.project-card__media--light { background: var(--paper); }

.project-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(.2, .7, .2, 1);
}

.project-card__arrow {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--sage);
  color: var(--burgundy-dark);
  font-size: 20px;
  opacity: 0;
  transform: translate(8px, 8px);
  transition: opacity .4s ease, transform .4s ease;
}

.project-card:hover .project-card__image,
.project-card:focus-visible .project-card__image { transform: scale(1.06); }

.project-card:hover .project-card__arrow,
.project-card:focus-visible .project-card__arrow { opacity: 1; transform: none; }

.project-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-card__title { font-size: clamp(19px, 1.5vw, 22px); font-weight: 400; }

.project-card__location {
  color: var(--sage);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.carousel__controls {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 40px;
}

.carousel__button {
  width: 52px;
  height: 52px;
  background: transparent;
  border: 1px solid var(--sage);
  border-radius: 2px;
  color: var(--sage);
  font-size: 20px;
  cursor: pointer;
  transition: opacity .3s ease, background-color .3s ease, color .3s ease;
}
.carousel__button:hover:not(:disabled) { background: var(--sage); color: var(--burgundy-dark); }
.carousel__button:disabled { opacity: .35; cursor: default; }

/* ==========================================================================
   6 News & Insights
   ========================================================================== */
.news {
  padding: clamp(80px, 4vw, 150px) 0 clamp(80px, 4vw, 170px);
  background: var(--white);
}

.news__inner {
  display: flex;
  flex-direction: column;
  gap: clamp(36px, 4vw, 56px);
}

.news__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.news__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(24px, 3vw, 40px);
}

.news-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  color: var(--slate);
}
.news-card:hover { color: var(--burgundy); }

.news-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--cream);
}

.news-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}
.news-card:hover .news-card__image { transform: scale(1.04); }

.news-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--slate);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.news-card__category { color: var(--burgundy); }

.news-card__divider {
  width: 16px;
  height: 1px;
  background: var(--sage);
}

.news-card__title {
  font-size: clamp(20px, 1.7vw, 24px);
  font-weight: 400;
  line-height: 1.3;
  text-wrap: pretty;
}

/* ==========================================================================
   7 Footer
   ========================================================================== */
.site-footer {
  background: var(--slate);
  border-top: 1px solid rgba(149, 186, 178, .25);
  color: var(--white);
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    gap: 60px;
    padding-top: clamp(60px, 4vw, 120px);
    padding-bottom: 20px;}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(40px, 5vw, 72px);
}

.site-footer__brand {
  flex: 1.6 1 320px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.site-footer__logo-link { display: block; max-width: 400px; }
.site-footer__logo { width: 100%; height: auto; }

.site-footer__social { align-self: flex-start; }

.site-footer__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.site-footer__nav { flex: 1 1 180px; }
.site-footer__office { flex: 1 1 220px; }

.site-footer__heading { margin-bottom: 6px; }

.site-footer__link { color: var(--white); font-size: 15px; }
.site-footer__link:hover { color: var(--sage); }

.site-footer__address {
  font-style: normal;
  font-size: 15px;
  line-height: 1.6;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(149, 186, 178, .3);
  color: var(--sage-muted);
  font-size: 13px;
}

.site-footer__tagline {
  color: var(--sage);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablet: burger menu and stacked "Why TDEG" list */
@media (max-width: 959px) {
  .primary-nav,
  .site-header__cta { display: none; }
  .menu-toggle { display: flex; }

  .why__desktop { display: none; }
  .why__mobile { display: flex; }
  .why__title { font-size: 36px; line-height: 1.08; }
  .why__mobile .why__text { max-width: none; }
  .why__mobile .btn--outline-light { padding: 15px 22px; font-size: 15px; }
}

/* Mobile */
@media (max-width: 639px) {
  :root { --header-h: 68px; }

  .site-logo { height: 44px; }
  .menu-toggle { width: 44px; height: 44px; }

  .hero { height: max(640px, calc(100svh - var(--header-h) - var(--dc-topbar-h, 0px))); }
  .hero__panel { gap: 16px; padding: 28px var(--gutter) 32px; }
  .hero__aside { width: auto; }
  .hero__lede { font-size: 16px; }
  .hero__controls { flex-direction: column-reverse; align-items: flex-start; gap: 24px; margin-bottom: 64px; }

  .intro { padding: 72px 0; }

  .why__mobile { gap: 64px; padding-top: 72px; padding-bottom: 104px; }
  .why__title { font-size: 32px; }

  .services { padding: 80px 0 88px; }
  .services__inner { gap: 72px; }
  .service { gap: 32px; }
  .service__accent { top: -12px; left: -12px; }
  .service--reverse .service__accent { right: -12px; }
  .service__text { font-size: 16px; }

  .projects { padding: 88px 0 72px; }
  .project-card { flex-basis: 82%; }
  .carousel__controls { padding-top: 28px; }

  .news { padding: 72px 0 88px; }

  .site-footer__brand { flex-basis: 100%; }
  .site-footer__logo-link { max-width: 280px; }
  .site-footer__inner { padding-bottom: 76px; }
  .site-footer__bottom { flex-direction: column; gap: 10px; }
}

/* ==========================================================================
   Back to Home
   ========================================================================== */
.back-home{position:fixed;left:20px;bottom:20px;z-index:1000;display:inline-flex;align-items:center;gap:10px;padding:12px 18px;border:1px solid rgba(255,255,255,.18);border-radius:999px;background:#374B4C;color:#fff;font-family:inherit;font-size:14px;font-weight:500;line-height:1;text-decoration:none;box-shadow:0 8px 24px rgba(0,0,0,.25);transition:background-color .2s ease,transform .2s ease}
.back-home:hover{background:#960000;color:#fff;transform:translateY(-2px)}
.back-home:focus-visible{outline:2px solid #95BAB2;outline-offset:3px}
@media (max-width:639px){.back-home{left:12px;bottom:12px;padding:12px 14px}.back-home__label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .hero.is-started .hero__slide.is-active { transform: none; }
  .reveal, .why__panel, .why__bar, .project-card__image, .project-card__arrow, .news-card__image { transition: none; }
  .project-card:hover .project-card__image,
  .project-card:focus-visible .project-card__image,
  .news-card:hover .news-card__image { transform: none; }
}
