/* ── Strip section ───────────────────────────────────────────────────── */

#services-strip {
  position: relative;
  margin-top: 40px;
  padding: 143px 0 99px;
  overflow: hidden;
  cursor: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}

#services-strip.is-dragging {
  cursor: none;
}

/* ── Section header ──────────────────────────────────────────────────── */

.services__header {
  padding: 0 28px 48px;
}

.services__heading {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-navy);
  margin-bottom: 0.5rem;
}

.services__descriptor {
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  line-height: 1.7;
  color: rgba(14, 14, 40, 0.5);
}

/* ── Track (flex row of 12 panels across 3 sets) ────────────────────── */

.strip__track {
  display: flex;
  gap: 28px;
  height: 30vh;
  will-change: transform;
}

/* ── Panel ───────────────────────────────────────────────────────────── */

.strip__panel {
  position: relative;
  flex: 0 0 var(--panel-width);
  height: 100%;
  overflow: hidden;
  cursor: none;
  background: #0e0e28;
  border-radius: 24px;
}


/* No-image fallback panel (Web Design — no projects yet) */
.strip__panel--no-image {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--service-color) 18%, #1a1a3c),
    #0e0e28
  );
}

/* ── Stacked slideshow images ────────────────────────────────────────── */

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

.strip__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.85s ease;
  pointer-events: none;
  display: block;
  border-radius: 24px;
}

.strip__img.is-active {
  opacity: 1;
}

/* Dark scrim so label is always readable */
.strip__panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8, 8, 20, 0.65) 0%,
    transparent 50%
  );
  z-index: 1;
  pointer-events: none;
}

/* ── Panel label ─────────────────────────────────────────────────────── */

.strip__label {
  position: absolute;
  bottom: 18px;
  left: 20px;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: lowercase;
  color: rgba(255, 255, 255, 0.65);
  z-index: 3;
  transition: color 0.3s ease;
  pointer-events: none;
}

.strip__panel:hover .strip__label {
  color: rgba(255, 255, 255, 1);
}

/* ── Overlay (backdrop, fixed) ───────────────────────────────────────── */

#services-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(8, 8, 20, 0.90);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#services-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  cursor: none;
}

/* ── Panel (constrained floating card) ───────────────────────────────── */

.overlay__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1100px;
  height: 80vh;
  border-radius: 24px;
  overflow: hidden;
  background: #edf4f7;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}

#services-overlay.is-open .overlay__panel {
  /* panel is always visible once overlay is open */
}

/* ── Gallery (left ~60%) ─────────────────────────────────────────────── */

.overlay__gallery {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: #000;
}

.overlay__gallery::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(8, 8, 20, 0.45) 0%, transparent 15%),
    linear-gradient(to top,    rgba(8, 8, 20, 0.45) 0%, transparent 15%);
  pointer-events: none;
  z-index: 1;
}

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

/* Prev / Next buttons */
.overlay__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #edf4f7;
  border: none;
  color: #0e0e28;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.2s ease;
  line-height: 1;
  padding: 0 0 2px 0;
}

.overlay__nav:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.overlay__nav--prev { left: 20px; }
.overlay__nav--next { right: 20px; }

/* Slide counter */
.overlay__counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
  white-space: nowrap;
}

/* ── Header (service name + descriptor, above photo) ─────────────────── */

.overlay__header {
  flex-shrink: 0;
  padding: 1.75rem 2.25rem;
  background: #edf4f7;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  opacity: 0;
  transition: opacity 0.3s ease 0.2s;
}

#services-overlay.is-open .overlay__header {
  opacity: 1;
}

/* Service name */
.overlay__service-name {
  font-size: clamp(0.85rem, 1.4vw, 1.1rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #0e0e28;
  margin: 0 0 0.2rem;
}

/* Service descriptor */
.overlay__service-desc {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(14, 14, 40, 0.45);
  margin: 0;
}

/* ── Footer (project name + description, below photo) ────────────────── */

.overlay__footer {
  flex-shrink: 0;
  padding: 1.75rem 2.25rem;
  background: #edf4f7;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  opacity: 0;
  transition: opacity 0.3s ease 0.2s;
}

#services-overlay.is-open .overlay__footer {
  opacity: 1;
}

/* Project name (dynamic) */
.overlay__project-name {
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 700;
  color: #0e0e28;
  line-height: 1.15;
  margin: 0 0 0.35rem;
}

/* Project description (dynamic) */
.overlay__project-desc {
  font-size: clamp(0.75rem, 1vw, 0.85rem);
  line-height: 1.6;
  color: rgba(14, 14, 40, 0.6);
  margin: 0;
}

/* Close button — positioned on the panel */
.overlay__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #edf4f7;
  border: none;
  color: #0e0e28;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.2s ease;
  line-height: 1;
  padding: 0 0 1px 0;
}

.overlay__close:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ── View Transition animations ──────────────────────────────────────── */

/* Hide native cursor during transitions — ::view-transition sits above the
   DOM at max z-index and doesn't inherit cursor:none from regular elements. */
::view-transition {
  cursor: none;
}

/* Suppress root crossfade — only the named image + label morph */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

/* Image morph: ease-in-out, 0.45s */
::view-transition-old(active-service-img),
::view-transition-new(active-service-img) {
  animation-duration: 0.3s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Service label → overlay heading morph */
::view-transition-old(active-service-label),
::view-transition-new(active-service-label) {
  animation-duration: 0.25s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Drag hint ────────────────────────────────────────────────────────── */

.strip__drag-hint {
  position: absolute;
  bottom: 52px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 5;
  color: rgba(14, 14, 40, 0.4);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: lowercase;
  white-space: nowrap;
}

#services-strip:hover .strip__drag-hint {
  opacity: 1;
}

.strip__drag-arrow {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

.strip__drag-arrow--left {
  animation: drag-nudge-left 1.8s ease-in-out infinite;
}

.strip__drag-arrow--right {
  animation: drag-nudge-right 1.8s ease-in-out infinite;
}

@keyframes drag-nudge-left {
  0%, 100% { transform: translateX(0)    rotate(90deg); }
  50%       { transform: translateX(-5px) rotate(90deg); }
}

@keyframes drag-nudge-right {
  0%, 100% { transform: translateX(0)   rotate(-90deg); }
  50%       { transform: translateX(5px) rotate(-90deg); }
}

/* ── Mobile fallback ─────────────────────────────────────────────────── */

@media (max-width: 600px) {
  #services-overlay {
    padding: 16px;
  }

  .overlay__nav--prev { left: 12px; }
  .overlay__nav--next { right: 12px; }
}
