/* SAFE POLISH OVERRIDES */

/* --------------------------------------------------
   Header / hero overlay fixes
   -------------------------------------------------- */

html,
body {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body > .hero-site-header,
.hero-site-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.home-hero.home-hero-single,
body > main,
body > main#top {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.home-hero.home-hero-single {
  min-height: 100svh !important;
  min-height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  overflow: hidden !important;
}

.hero-showreel,
.hero-showreel .editorial-slide,
.editorial-slide {
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
}

.editorial-slide img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
}

.program-page .site-header,
.program-page .program-header {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* --------------------------------------------------
   Homepage CTA rail polish
   -------------------------------------------------- */

.hero-cta-rail-expanded {
  max-width: min(920px, 92vw);
  margin-left: auto;
  margin-right: auto;
}

.hero-cta-rail-expanded .hero-metal-btn,
.hero-cta-row .hero-metal-btn {
  min-width: 140px;
}

.hero-cta-two-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-cta-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* --------------------------------------------------
   Remove zoom; keep image stable
   -------------------------------------------------- */

.editorial-slide img {
  animation: none !important;
  transform: none !important;
}

/* --------------------------------------------------
   Glitch transition
   -------------------------------------------------- */

/* Smoother transition — chromatic shift only, no dramatic clip slice */
.editorial-slide.is-transitioning img {
  animation: glitchFlash 0.7s ease !important;
}

.hero-showreel.is-glitching .editorial-slide.is-active img,
.editorial-slide.is-transitioning img {
  filter: contrast(1.10) saturate(1.08) brightness(.92);
}

@keyframes glitchFlash {
  0%   { transform: translate3d(0,0,0); filter: grayscale(55%) contrast(1.08) brightness(.75) saturate(1.1); }
  20%  { transform: translate3d(-3px,0,0); filter: grayscale(45%) contrast(1.18) brightness(.78) saturate(1.4) hue-rotate(-6deg); }
  45%  { transform: translate3d(2px,0,0);  filter: grayscale(50%) contrast(1.12) brightness(.74) saturate(1.25) hue-rotate(4deg); }
  72%  { transform: translate3d(-1px,0,0); filter: grayscale(55%) contrast(1.06) brightness(.76) saturate(1.1); }
  100% { transform: translate3d(0,0,0);   filter: grayscale(55%) contrast(1.08) brightness(.75) saturate(1.1); }
}

@media (max-width: 640px) {
  .home-hero.home-hero-single {
    padding-top: calc(env(safe-area-inset-top, 0px) + 76px) !important;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 24px) !important;
    align-items: flex-end !important;
  }

  .hero-cta-rail-expanded {
    max-width: 420px;
  }
}
