/* Services page hero: same visual scale and viewport presence as the homepage hero. */
.services-hero {
  position: relative;
  display: flex;
  min-height: clamp(620px, calc(100svh - 76px), 760px);
  overflow: hidden;
  isolation: isolate;
  border-bottom: 0;
  --services-hero-image: url("../../images/services.png");
  background: #071522;
}

.services-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(5, 14, 29, 0.9) 0%, rgba(7, 19, 36, 0.68) 36%, rgba(7, 19, 36, 0.2) 64%, rgba(5, 14, 29, 0.08) 100%),
    linear-gradient(180deg, rgba(5, 14, 29, 0.08), rgba(5, 14, 29, 0.24));
}

.services-hero::after {
  position: absolute;
  z-index: -2;
  inset: 0;
  content: "";
  background: #071522 var(--services-hero-image) center / cover no-repeat;
  transform: scale(1.035);
  transform-origin: center center;
  will-change: transform;
  animation: services-hero-image-zoom 5s cubic-bezier(0.37, 0, 0.63, 1) both;
}

.services-hero .container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 28px;
  padding-bottom: 28px;
}

.services-hero .breadcrumb {
  margin-bottom: 26px;
  font-size: 15px;
}

.services-hero .kicker {
  font-size: 1.125rem;
}

.services-hero h1 {
  max-width: 980px;
  margin-bottom: 26px;
  font-size: clamp(2.5rem, 4.8vw, 4.375rem);
  line-height: 1.08;
}

.services-hero .lead {
  max-width: 900px;
  font-size: 18px;
  line-height: 1.6;
}

/* Match the staged copy entrance used by the AegisFace hero. */
.services-hero .container > * {
  opacity: 0;
  animation: services-hero-content-in 900ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.services-hero .container > :nth-child(1) { animation-delay: 80ms; }
.services-hero .container > :nth-child(2) { animation-delay: 160ms; }
.services-hero .container > :nth-child(3) {
  animation-name: services-hero-heading-in;
  animation-delay: 250ms;
}
.services-hero .container > :nth-child(4) { animation-delay: 350ms; }

@keyframes services-hero-content-in {
  from { opacity: 0; transform: translateX(-34px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes services-hero-heading-in {
  from { opacity: 0; transform: translateX(34px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes services-hero-image-zoom {
  from { transform: scale(1.035); }
  to { transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .services-hero .container > * {
    opacity: 1;
    animation: none;
  }

  .services-hero::after { animation: none; }
}

.service-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(420px, 0.94fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
  padding: clamp(30px, 4vw, 56px) 0;
}

.service-feature-copy {
  max-width: 950px;
}

.service-feature--reverse .service-feature-media {
  order: -1;
}

.service-feature-copy .kicker {
  font-size: 15px;
}

.service-feature-copy h2 {
  margin: 16px 0 22px;
  font-size: clamp(2.5rem, 3.4vw, 3.4375rem);
}

.service-feature-copy .lead,
.service-feature-copy > p:not(.lead) {
  max-width: 950px;
  font-size: 18px;
  line-height: 1.65;
}

.service-feature-copy > p:not(.lead) {
  color: var(--muted);
  font-style: italic;
}

.service-feature .feature-list {
  margin-bottom: 0;
}

.service-feature .feature-item p {
  /* Long service descriptions must be allowed to wrap inside the split layout. */
  min-width: 0;
  overflow-wrap: anywhere;
}

.service-feature-media {
  position: relative;
  width: min(100%, 760px);
  height: 510px;
  min-height: 0;
  justify-self: center;
  margin: 0;
  overflow: hidden;
  background: #0b1b2d;
  border: 1px solid rgba(91, 190, 255, 0.2);
  border-radius: 28px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.service-feature-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(135deg, rgba(10, 31, 53, 0.1), transparent 46%, rgba(84, 229, 255, 0.08));
  pointer-events: none;
}

.service-feature-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 640px) {
  .services-hero {
    min-height: calc(100svh - 68px);
    background-position: 64% center;
  }

  .services-hero .container {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .services-hero .breadcrumb {
    margin-bottom: 22px;
  }

  .services-hero h1 {
    margin-bottom: 20px;
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .services-hero .lead {
    font-size: clamp(0.95rem, 3.4vw, 1.125rem);
  }
}

@media (max-width: 900px) {
  .service-feature {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .service-feature-media,
  .service-feature-media img {
    width: 100%;
    height: 300px;
    min-height: 300px;
  }

  .service-feature .feature-item p {
    white-space: normal;
  }
}
