/* Home page: services scene. A 175vh track holds a sticky stage so the page keeps scrolling natively while the scene reads as a light parallax:
   the background drifts slowly and the text, image and meta travel faster. Everything is driven by --svc-p (0 to 1), which ddk-services-scroll.js writes. */
#services {
  position: relative;
  height: 175vh;
  overflow: clip;
  touch-action: pan-y;
}

#services-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: clip;
  isolation: isolate;
}

#services-bg {
  position: absolute;
  inset: -10% 0;
  background:
    radial-gradient(120% 80% at 88% 0%, rgba(182, 139, 75, 0.20) 0%, transparent 55%),
    radial-gradient(90% 70% at 0% 100%, rgba(37, 99, 235, 0.16) 0%, transparent 60%),
    linear-gradient(165deg, #14233C 0%, #0F1B2E 55%, #0B1424 100%);
  box-shadow: inset 0 1px 0 rgba(182, 139, 75, 0.35);
  translate: 0 calc(var(--svc-p, 0) * -8vh);
}

.svc-eyebrow {
  position: absolute;
  inset: 5.25rem 0 auto;
  z-index: 30;
}

#solid-text-container,
#stroked-text-container {
  position: absolute;
  left: 10%;
  top: 50%;
  z-index: 10;
  width: min(34vw, 34rem);
  pointer-events: none;
  translate: 0 calc(-50% + var(--svc-p, 0) * -18vh);
}

#stroked-text-container {
  z-index: 30;
}

#solid-title,
#stroked-title {
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.05;
}

#center-image-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 20;
  width: min(50vw, 700px, 81svh);
  max-height: 56svh;
  aspect-ratio: 16 / 11;
  translate: -50% calc(-50% + var(--svc-p, 0) * -18vh);
}

#meta-container {
  position: absolute;
  right: 12%;
  top: 50%;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  text-align: right;
  pointer-events: none;
  translate: 0 calc(-50% + var(--svc-p, 0) * -14vh);
}

.svc-nav {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.625rem;
  pointer-events: auto;
  translate: 0 -50%;
}

#indicator-dash {
  position: absolute;
  left: -1.5rem;
  top: 0;
  display: flex;
  align-items: center;
  color: #B68B4B;
  font-size: 0.875rem;
  font-weight: 600;
  pointer-events: none;
  transition: transform 0.3s ease-out;
}

.svc-controls {
  position: absolute;
  left: 50%;
  bottom: 1.75rem;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  pointer-events: auto;
  translate: -50% 0;
}

@media (max-width: 1023px) {
  #services {
    height: auto;
    overflow: visible;
  }

  #services-stage {
    position: static;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 7rem 1.5rem 3rem;
    overflow: visible;
  }

  #services-bg {
    inset: 0;
    translate: none;
  }

  .svc-eyebrow {
    position: static;
  }

  #solid-text-container {
    order: 2;
    position: static;
    width: auto;
    max-width: none;
    translate: none;
  }

  #center-image-frame {
    order: 3;
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: none;
    aspect-ratio: 4 / 3;
    max-height: 52svh;
    translate: none;
  }

  #stroked-text-container {
    display: none;
  }

  #meta-container {
    order: 4;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    text-align: left;
    translate: none;
  }

  #meta-container .meta-item {
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
  }

  .svc-nav {
    order: 5;
    position: static;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    translate: none;
  }

  #indicator-dash {
    display: none;
  }

  .svc-controls {
    order: 6;
    position: static;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    translate: none;
  }

  #solid-title,
  #stroked-title {
    font-size: clamp(1.5rem, 6.5vw, 1.95rem);
  }

  .thumb-btn img {
    width: 56px;
    height: 36px;
  }

  .thumb-btn,
  #prev-slide,
  #next-slide,
  #service-link {
    min-height: 44px;
  }
}

@media (min-width: 1024px) and (max-width: 1439px) {
  #meta-container {
    right: 8%;
  }

  /* Keep the gold slide marker from sitting against the meta list on tighter desktops. */
  #indicator-dash {
    display: none;
  }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  #meta-container {
    font-size: 0.75rem;
  }
}

@media (min-width: 1024px) and (max-height: 760px) {
  #center-image-frame {
    width: min(42vw, 540px, 81svh);
    max-height: 56svh;
  }

  #solid-title,
  #stroked-title {
    font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  }

  .svc-controls {
    bottom: 0.9rem;
  }

  .svc-eyebrow {
    top: 4.5rem;
  }
}
