/* CONFIGURATOR — Option B: Full-bleed image + bottom pill tabs.
   Option-4 sticky-range pattern:
   - Outer .configurator defines a tall wrapper (min-height) that gives the
     sticky child a finite range to "stick" within.
   - Inner .configurator-inner is the actual sticky element. It stays at
     top: 0 while user scrolls through the wrapper, then releases when the
     wrapper's bottom approaches — letting the user scroll past the inner
     block (revealing tabs + CTAs at the top of viewport) before Film Reel
     covers it via z-index.
*/

.configurator {
  position: relative;
  z-index: 2;                                /* slides over the sticky hero */
  background: var(--bg-warm);
  color: var(--ivory);
  /* min-height = inner content height (~110vh) + ~65vh of stack-effect scroll range */
  min-height: 175vh;
  overflow: visible;                         /* MUST NOT clip the sticky child */
  border-top: 1px solid var(--gold-faint);
  box-shadow: 0 -24px 60px -20px rgba(0, 0, 0, 0.65);
}

.configurator-inner {
  position: sticky;
  top: 0;
  padding: clamp(72px, 8vw, 120px) 0 clamp(56px, 7vw, 96px);
}

.configurator__head {
  max-width: var(--max-w);
  margin: 0 auto clamp(36px, 5vw, 64px);
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.configurator__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.6vw, 60px);
  line-height: 1.1;
  font-weight: 400;
  color: var(--ivory);
  margin: 0;
}

.configurator__title em {
  font-style: italic;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* FULL-BLEED STAGE */
.configurator__stage {
  position: relative;
  width: 100vw;
  aspect-ratio: 21/9;
  max-height: 60vh;                          /* tighter so whole section fits viewport when sticky */
  overflow: hidden;
  background: var(--bg-hero);
}

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

.configurator__images img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s var(--ease-cinema), transform 8s var(--ease-cinema);
}

.configurator__images img.is-active {
  opacity: 1;
  transform: scale(1.04);
}

/* gradient overlays for legibility of overlay text */
.configurator__stage::before {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(5,4,3,.4) 0%, transparent 25%, transparent 55%, rgba(5,4,3,.85) 100%),
    linear-gradient(90deg, rgba(5,4,3,.55) 0%, transparent 35%);
  z-index: 2;
  pointer-events: none;
}

/* Virtuelle watermark top-right */
.configurator__watermark {
  position: absolute;
  top: 24px; right: 24px;
  z-index: 5;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12px;
  color: var(--gold-mid);
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}

/* Register name + tag overlaid center-left */
.configurator__name-overlay {
  position: absolute;
  left: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  max-width: 480px;
}

.configurator__name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(40px, 6vw, 96px);
  line-height: 1;
  color: var(--ivory);
  margin: 0 0 14px 0;
  text-shadow: 0 4px 20px rgba(0,0,0,.7);
  transition: opacity .6s var(--ease-cinema), transform .6s var(--ease-cinema);
}

.configurator__tag {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin: 0;
  text-shadow: 0 2px 10px rgba(0,0,0,.7);
}

/* TAB STRIP — overlaid at bottom of image as a refined pill row */
.configurator__tabs {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(20px, 3vw, 36px);
  z-index: 6;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 var(--gutter);
  flex-wrap: wrap;
}

.configurator__tab {
  flex: 0 0 auto;
  padding: 13px 26px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ivory);
  background: rgba(13, 13, 13, 0.62);
  border: 1px solid rgba(244, 237, 224, 0.18);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  border-radius: 999px;                      /* fully rounded pill */
  cursor: pointer;
  transition:
    color .35s var(--ease-soft),
    background .35s var(--ease-soft),
    border-color .35s var(--ease-soft),
    transform .35s var(--ease-soft),
    box-shadow .35s var(--ease-soft);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.configurator__tab:hover,
.configurator__tab:focus-visible {
  color: var(--gold-primary);
  border-color: var(--gold-line);
  transform: translateY(-1px);
  outline: none;
}

.configurator__tab.is-active {
  color: var(--bg-primary);
  background: var(--gold-primary);
  border-color: var(--gold-primary);
  box-shadow:
    0 8px 24px -8px rgba(255, 215, 0, 0.45),
    0 0 0 1px rgba(255, 215, 0, 0.4);
  transform: translateY(-1px);
}

.configurator__tab.is-active:hover {
  color: var(--bg-primary);                  /* keep dark text when active */
}

.configurator__tab-dot {
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(244, 237, 224, 0.4);
  transition: background .35s var(--ease-soft), transform .35s var(--ease-soft);
}

.configurator__tab:hover .configurator__tab-dot {
  background: var(--gold-primary);
  transform: scale(1.3);
}

.configurator__tab.is-active .configurator__tab-dot {
  background: var(--bg-primary);
}

/* CTAs below stage */
.configurator__ctas {
  max-width: var(--max-w);
  margin: clamp(32px, 4vw, 56px) auto 0;
  padding: 0 var(--gutter);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.configurator__cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 30px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ivory);
  border: 1px solid var(--gold-line);
  background: rgba(13, 13, 13, 0.42);
  border-radius: 999px;
  transition:
    background .35s var(--ease-soft),
    color .35s var(--ease-soft),
    border-color .35s var(--ease-soft),
    transform .35s var(--ease-soft),
    box-shadow .35s var(--ease-soft);
}

.configurator__cta span[aria-hidden] {
  transition: transform .35s var(--ease-soft);
  display: inline-block;
}

.configurator__cta:hover,
.configurator__cta:focus-visible {
  background: var(--gold-primary);
  color: var(--bg-primary);
  border-color: var(--gold-primary);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -10px rgba(255, 215, 0, 0.4);
  outline: none;
}

.configurator__cta:hover span[aria-hidden],
.configurator__cta:focus-visible span[aria-hidden] {
  transform: translateX(4px);
}

.configurator__cta--solid {
  background: var(--gold-primary);
  color: var(--bg-primary);
  border-color: var(--gold-primary);
  box-shadow: 0 8px 22px -8px rgba(255, 215, 0, 0.35);
}

.configurator__cta--solid:hover,
.configurator__cta--solid:focus-visible {
  background: transparent;
  color: var(--ivory);
  border-color: var(--gold-line);
  box-shadow: none;
}

@media (max-width: 880px) {
  /* Mobile: keep cinematic 4:5 image, shorter wrap range */
  .configurator {
    min-height: 165vh;
  }
  .configurator-inner {
    padding: clamp(56px, 7vw, 80px) 0 clamp(48px, 6vw, 72px);
  }
  .configurator__stage {
    aspect-ratio: 4/5;
    max-height: 70vh;
  }
  .configurator__name-overlay {
    left: 20px;
    right: 20px;
    top: auto;
    bottom: 110px;
    transform: none;
    max-width: none;
  }
  .configurator__name {
    font-size: clamp(36px, 12vw, 64px);
  }
  .configurator__tag {
    font-size: 11px;
  }
  .configurator__watermark {
    top: 18px;
    right: 18px;
    font-size: 11px;
  }
  .configurator__tabs {
    bottom: 18px;
    gap: 8px;
    padding: 0 16px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    scrollbar-width: none;
    /* fade edges to suggest more tabs to the left/right */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, black 24px, black calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, black 24px, black calc(100% - 24px), transparent 100%);
  }
  .configurator__tabs::-webkit-scrollbar { display: none; }
  .configurator__tab {
    flex: 0 0 auto;
    padding: 11px 18px;
    font-size: 10px;
    letter-spacing: .2em;
    scroll-snap-align: center;               /* center each tab when snapped — no crop */
    border-radius: 999px;
  }
  .configurator__tab-dot { display: none; }
  .configurator__cta {
    flex: 1 1 auto;
    justify-content: center;
    padding: 16px 24px;
  }
}
