.reference-home {
  --home-soft-white: var(--site-paper);
}

.home-hero-frame {
  --site-stage-bottom: 14px;
  padding-bottom: var(--site-stage-bottom);
}

/* The homepage's moving traces sit on top of the shared rack image. */
.reference-home .hero .infrastructure-scene {
  position: absolute;
  inset: calc(14px - var(--site-header-slot)) 0 auto auto;
  width: var(--site-photo-width);
  height: var(--site-photo-height);
  margin: 0;
  opacity: 1;
  background: none;
  mask-image: linear-gradient(to bottom, transparent, black 32% 82%, transparent);
}

.reference-home .hero .infrastructure-scene::before {
  content: none;
}

.home-services-process {
  position: relative;
  background: var(--home-soft-white);
  border-top: 1px solid #bfd3ea;
  color: #12233d;
}

.home-services-process .capabilities {
  padding-block: clamp(32px, 4vw, 52px) 30px;
}

.home-services-process .capabilities::before {
  content: none;
}

.home-services-process .capabilities > h2 {
  position: static;
  width: auto;
  height: auto;
  margin: 0 0 24px;
  clip-path: none;
  overflow: visible;
  text-align: center;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  white-space: normal;
}

.home-services-process .service-tile:focus-visible {
  outline-color: #155a9e;
}

/* A short highlight inside the top edge of the active service card. */
.home-services-process .service-tile {
  position: relative;
}

.home-services-process .service-tile::before {
  content: "";
  position: absolute;
  inset: 1px 14px auto;
  height: 3px;
  border-radius: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #399fff 28%, #a4e1ff 43%, #fff 50%, #a4e1ff 57%, #399fff 72%, transparent)
    -75% center / 42% 100% no-repeat;
  box-shadow: 0 0 7px #45b0ffb3, 0 0 15px #149eff66;
  opacity: 0;
}

.home-services-process .service-tile:focus-visible::before {
  opacity: 1;
  background-color: #369fffad;
  --service-edge-animation: cpt-service-edge-sweep;
}

@media (hover: hover) and (pointer: fine) {
  .home-services-process .service-tile:hover::before {
    opacity: 1;
    background-color: #369fffad;
    --service-edge-animation: cpt-service-edge-sweep;
  }
}

@keyframes cpt-service-edge-sweep {
  from { background-position: -75% center; }
  to { background-position: 175% center; }
}

@media (prefers-reduced-motion: no-preference) {
  .home-services-process .service-tile::before {
    animation: var(--service-edge-animation, none) 1.3s ease-out;
    transition: opacity .18s ease;
  }
}

/* Reserve each row before hover so expanding a card cannot push the process strip. */
@media (min-width: 1200px) {
  .reference-home .home-services-process .service-grid .service-tile {
    min-block-size: 276px;
    container-name: cpt-service-card;
    container-type: inline-size;
  }

  /* Keep the icon and title baseline steady while only the width expands. */
  .reference-home .home-services-process .service-tile .service-symbol {
    width: 40px;
    height: 40px;
    margin-bottom: 20px;
  }

  .reference-home .home-services-process .service-tile h3 {
    margin-bottom: 14px;
  }

  @supports (container-type: inline-size) {
    .reference-home .home-services-process .service-tile.is-expanded p {
      display: none;
    }

    /* Queries use the card's content box, not its still-narrow border box. */
    @container cpt-service-card (min-width: 180px) {
      .reference-home .home-services-process .service-tile.is-expanded p {
        display: block;
      }
    }
  }
}

@media (min-width: 1100px) and (max-width: 1199px) {
  .reference-home .home-services-process .service-row,
  .reference-home .home-services-process .service-grid .service-tile {
    min-block-size: 300px;
  }

  .reference-home .home-services-process .service-grid .service-tile.is-expanded {
    flex-grow: 1.65;
  }
}

.home-services-process .process.process-reference {
  padding-block: 16px clamp(36px, 4vw, 52px);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.home-services-process .process::before {
  content: none;
}

.home-services-process .process-title::before,
.home-services-process .process-title::after {
  background: linear-gradient(90deg, transparent, #a0b9d7);
}

.home-contact-backdrop {
  --fade-depth: clamp(180px, 23vw, 340px);
  padding-block: clamp(8px, 2vw, 28px) clamp(52px, 7vw, 96px);
  background: linear-gradient(
    to bottom,
    var(--home-soft-white) calc(100% - var(--fade-depth)),
    #d9e4f2 calc(100% - var(--fade-depth) * .67),
    #485a74 calc(100% - var(--fade-depth) * .28),
    #020a1c 100%
  );
}

.home-contact-backdrop .glass-contact {
  width: min(1440px, calc(100% - 2 * clamp(16px, 4vw, 48px)));
  margin: 0 auto;
  padding-block: clamp(40px, 5vw, 70px);
  border: 1px solid #6590c46b;
  box-shadow: 0 18px 42px #132a492e;
}

.reference-home .home-contact-backdrop .glass-contact-layout {
  width: min(1240px, calc(100% - 2 * clamp(20px, 5vw, 100px)));
  gap: clamp(24px, 4vw, 72px);
}

.home-contact-backdrop .glass-contact #contact-title {
  font-size: clamp(36px, 5vw, 76px);
}

.reference-home .home-cta-backdrop {
  padding-top: 0;
  background: linear-gradient(to bottom, #020a1c, var(--site-footer-ink));
}

@media (min-width: 981px) and (max-width: 1100px) {
  .home-contact-backdrop .glass-form {
    padding-inline: 26px;
  }
}

@media (max-width: 980px) {
  .reference-home .home-contact-backdrop .glass-contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.reference-home .home-hero-eyebrow {
  max-width: 34rem;
  margin-bottom: 14px;
  color: #a5d3ff;
  line-height: 1.55;
}

.home-work-standards {
  padding-block: clamp(30px, 5vw, 52px) 0;
}

.home-work-standards > h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.home-standard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 26px);
}

.home-standard-grid > section {
  padding: 18px 20px;
  border: 1px solid #c7d8ed;
  border-radius: 16px;
}

.home-standard-grid h3 {
  margin-bottom: 8px;
}

.home-standard-grid p,
.home-band-intro {
  color: #3b506b;
}

.home-standard-grid p:last-child {
  margin-bottom: 0;
}

.home-services-process .capabilities > h2 {
  margin-bottom: 10px;
}

.home-band-intro {
  max-width: 50ch;
  margin: 0 auto 24px;
  text-align: center;
}

@media (max-width: 700px) {
  .home-standard-grid {
    grid-template-columns: 1fr;
  }
}
