/*
 * Minimal production wave integration.
 * Scope is intentionally limited to the new first screen and the existing
 * showreel immediately below it. No global section or video rules live here.
 */

body.home-page .wave-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  background: #050508;
  color: #f4f2f5;
}

body.home-page .wave-hero::after {
  content: "";
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: -1px;
  left: 0;
  height: clamp(96px, 15vh, 180px);
  pointer-events: none;
  background: linear-gradient(180deg, rgb(5 5 8 / 0), #050508 88%);
}

body.home-page .wave-hero-media,
body.home-page .wave-hero-shade {
  position: absolute;
  inset: 0;
}

body.home-page .wave-hero-media {
  z-index: 0;
  overflow: hidden;
  background: #030305 url("../public/works/wave-hero/wave-hero-poster.webp") center / cover no-repeat;
}

body.home-page .wave-hero-video {
  --wave-video-y: 8%;
  --wave-video-scale: 1.055;
  --wave-video-exit-y: 12%;
  --wave-video-exit-scale: 1.095;
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: center 54%;
  opacity: 0.96;
  transform: translate3d(0, var(--wave-video-y), 0) scale(var(--wave-video-scale));
  transform-origin: center;
}

body.home-page .wave-hero-shade {
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgb(3 3 5 / 0.46) 0%, rgb(3 3 5 / 0.04) 30%, rgb(3 3 5 / 0.08) 66%, #050508 100%),
    linear-gradient(90deg, rgb(3 3 5 / 0.92) 0%, rgb(3 3 5 / 0.76) 28%, rgb(3 3 5 / 0.32) 55%, rgb(3 3 5 / 0.06) 80%, rgb(3 3 5 / 0.16) 100%);
}

body.home-page .wave-hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: min(1520px, calc(100vw - 64px));
  min-height: 100svh;
  min-height: 100dvh;
  padding: min(96px, 12vh) 0 8vh;
  text-align: left;
}

body.home-page .wave-hero-kicker {
  margin: 0 0 22px;
  color: #c9c5cc;
  font-family: "Spline Sans", "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.17em;
  line-height: 1.3;
  text-transform: uppercase;
}

body.home-page .wave-hero-title {
  max-width: min(1180px, 92vw);
  margin: 0;
  color: #f4f2f5;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 6.25vw, 6.8rem);
  font-weight: 600;
  font-kerning: normal;
  font-feature-settings: "kern" 1, "liga" 1;
  letter-spacing: -0.055em;
  line-height: 0.94;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 0 2px 34px rgb(0 0 0 / 0.34);
}

body.home-page .wave-hero-title span {
  display: block;
  white-space: nowrap;
}

body.home-page .wave-hero-title span:first-child {
  word-spacing: 0.08em;
}

body.home-page .wave-hero-title span:last-child {
  margin-top: 0.12em;
  color: #dedbe3;
  font-size: 0.72em;
  font-weight: 500;
  letter-spacing: 0.085em;
}

body.home-page .wave-hero-copy {
  max-width: 700px;
  margin: 28px 0 0;
  color: #d0ccd3;
  font-family: "Spline Sans", "Segoe UI", sans-serif;
  font-size: clamp(16px, 1.45vw, 20px);
  line-height: 1.48;
  text-wrap: balance;
}

body.home-page .wave-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

body.home-page .wave-hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #f5f2f5;
  font-family: "Spline Sans", "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 220ms ease,
    border-color 220ms ease,
    color 220ms ease;
}

body.home-page .wave-hero-cta:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

body.home-page .wave-hero-cta:active {
  transform: scale(0.98);
}

body.home-page .wave-hero-cta:focus-visible {
  outline: 2px solid #ff6fed;
  outline-offset: 4px;
}

body.home-page .wave-hero-cta-primary {
  border-color: #f018d6;
  background: #f018d6;
  color: #140310;
}

body.home-page .wave-hero-cta-primary:hover {
  border-color: #ff69ec;
  background: #ff69ec;
  color: #140310;
}

body.home-page .wave-hero-cta-secondary {
  border-color: rgb(245 242 245 / 0.32);
  background: rgb(5 5 8 / 0.56);
}

body.home-page .wave-hero-cta-secondary:hover {
  border-color: rgb(245 242 245 / 0.72);
  background: rgb(5 5 8 / 0.78);
}

body.wave-experience-ready .wave-hero [data-wave-reveal] {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
}

body.wave-experience-ready .wave-hero.is-ready [data-wave-reveal] {
  animation: waveHeroEnter 0.82s cubic-bezier(0.22, 1, 0.36, 1) both !important;
}

body.wave-experience-ready .wave-hero.is-ready [data-wave-reveal]:nth-child(2) {
  animation-delay: 0.12s !important;
}

body.wave-experience-ready .wave-hero.is-ready [data-wave-reveal]:nth-child(3) {
  animation-delay: 0.24s !important;
}

body.wave-experience-ready .wave-hero.is-ready [data-wave-reveal]:nth-child(4) {
  animation-delay: 0.36s !important;
}

@keyframes waveHeroEnter {
  from {
    opacity: 0;
    transform: translate3d(0, 26px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes waveHeroContentExit {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    opacity: 0;
    transform: translate3d(0, -5vh, 0) scale(0.985);
  }
}

@keyframes waveHeroMediaExit {
  from {
    opacity: 0.96;
    transform: translate3d(0, var(--wave-video-y), 0) scale(var(--wave-video-scale));
  }

  to {
    opacity: 0.58;
    transform: translate3d(0, var(--wave-video-exit-y), 0) scale(var(--wave-video-exit-scale));
  }
}

@supports (animation-timeline: scroll()) {
  body.home-page .wave-hero-content {
    animation-name: waveHeroContentExit;
    animation-duration: 1ms !important;
    animation-timing-function: linear;
    animation-fill-mode: both;
    animation-timeline: scroll(root block);
    animation-range: 0 50dvh;
  }

  body.home-page .wave-hero-video {
    animation-name: waveHeroMediaExit;
    animation-duration: 1ms !important;
    animation-timing-function: linear;
    animation-fill-mode: both;
    animation-timeline: scroll(root block);
    animation-range: 0 100dvh;
  }
}

body.home-page .hero.showreel-section {
  position: relative;
  min-height: auto;
  margin-top: -1px;
  padding: clamp(36px, 4vw, 56px) 32px 84px;
  overflow: visible;
  background: #050508;
  text-align: left;
}

body.home-page .hero.showreel-section::before {
  inset: 0;
  background: linear-gradient(180deg, #050508 0%, #08070b 46%, #050505 100%);
  opacity: 1;
  filter: none;
}

body.home-page .hero.showreel-section::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  right: 9%;
  left: 9%;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgb(240 24 214 / 0.58) 46%, rgb(202 184 255 / 0.38) 64%, transparent);
  opacity: 0;
  transform: scaleX(0.24);
  transform-origin: center;
  transition: opacity 0.72s ease, transform 1.1s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

body.wave-experience-ready .showreel-section.is-visible::after {
  opacity: 0.82;
  transform: scaleX(1);
}

body.home-page .showreel-section .hero-reel {
  width: min(1400px, 94vw);
  max-width: 1400px;
  min-height: 0;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  border: 0;
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.14),
    0 28px 72px rgb(0 0 0 / 0.52);
  cursor: pointer;
}

body.home-page .showreel-section .hero-video-frame,
body.home-page .showreel-section .hero-reel-video,
body.home-page .showreel-section .hero-reel-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  border-radius: inherit;
}

body.home-page .showreel-section .hero-video-frame {
  display: block;
}

body.home-page .showreel-section .hero-reel-overlay {
  display: block;
  background:
    linear-gradient(180deg, rgb(5 5 8 / 0.06) 52%, rgb(5 5 8 / 0.68) 100%),
    radial-gradient(circle at 82% 82%, rgb(240 24 214 / 0.12), transparent 44%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.14);
}

/* Media reaches the clipped card edge; the neutral top stroke replaces the
   colored one-pixel seam created when the card gradient showed through. */
body.home-page .service-simple-bg-image,
body.home-page .service-simple-bg-video {
  inset: -1px;
  width: calc(100% + 2px);
  max-width: none;
  height: calc(100% + 2px);
  border-radius: inherit;
}

body.home-page .service-simple-card::after {
  content: "";
  position: absolute;
  z-index: 6;
  inset: -1px;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.14);
  pointer-events: none;
}

body.home-page .showreel-section .hero-controls {
  bottom: 18px;
  width: calc(100% - 64px);
}

body.home-page .showreel-offer-strip {
  position: relative;
  z-index: 2;
  width: min(1400px, 94vw);
  margin: 42px auto 0;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 0;
  border-top: 1px solid rgb(255 255 255 / 0.16);
}

body.home-page .showreel-offer-strip .hero-offer-chip {
  min-height: 96px;
  padding: 20px 28px;
  border: 0;
  border-left: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  transition: background-color 220ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.home-page .showreel-offer-strip .hero-offer-chip:first-child {
  border-left: 0;
}

body.home-page .showreel-offer-strip .hero-offer-chip span {
  color: #96919b;
  font-family: "Spline Sans", "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 600;
}

body.home-page .showreel-offer-strip .hero-offer-chip strong {
  color: #f4f2f5;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.04em;
}

body.home-page .showreel-offer-strip .hero-offer-chip:hover,
body.home-page .showreel-offer-strip .hero-offer-chip:focus-visible {
  background: rgb(240 24 214 / 0.07);
  outline: none;
  transform: translate3d(0, -2px, 0);
}

body.home-page .showreel-offer-strip .hero-offer-chip:focus-visible {
  box-shadow: inset 0 0 0 2px #ff69ec;
}

body.wave-experience-ready [data-showreel-reveal] {
  opacity: 0;
  transform: translate3d(0, 34px, 0);
  transition: opacity 0.72s ease, transform 0.88s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

body.wave-experience-ready [data-showreel-stage] {
  opacity: 0;
  transform: translate3d(0, 44px, 0) scale(0.965);
  transform-origin: center top;
  transition: opacity 0.78s ease, transform 1s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

body.wave-experience-ready [data-showreel-reveal].is-visible,
body.wave-experience-ready [data-showreel-stage].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

@media (max-width: 900px) {
  body.home-page .wave-hero-content {
    width: calc(100vw - 40px);
    padding: 88px 0 7vh;
  }

  body.home-page .wave-hero-video {
    --wave-video-y: 6%;
    --wave-video-scale: 1.035;
    --wave-video-exit-y: 10%;
    --wave-video-exit-scale: 1.075;
    object-position: center 56%;
  }

  body.home-page .wave-hero-shade {
    background:
      linear-gradient(180deg, rgb(3 3 5 / 0.68) 0%, rgb(3 3 5 / 0.1) 35%, rgb(3 3 5 / 0.16) 67%, #050508 100%),
      linear-gradient(90deg, rgb(3 3 5 / 0.78) 0%, rgb(3 3 5 / 0.42) 52%, rgb(3 3 5 / 0.1) 100%);
  }

  body.home-page .wave-hero-kicker {
    margin-bottom: 16px;
    font-size: 10px;
  }

  body.home-page .wave-hero-title {
    max-width: 100%;
    font-size: clamp(1.85rem, 8.25vw, 3.15rem);
    line-height: 0.98;
  }

  body.home-page .wave-hero-copy {
    max-width: 34rem;
    margin-top: 22px;
    font-size: 16px;
    line-height: 1.45;
  }

  body.home-page .wave-hero-actions {
    gap: 10px;
    margin-top: 24px;
  }

  body.home-page .wave-hero-cta {
    min-height: 48px;
    padding: 0 18px;
    font-size: 13px;
  }

  body.home-page .hero.showreel-section {
    min-height: auto !important;
    padding: 28px 0 52px !important;
    overflow: hidden !important;
  }

  body.home-page .showreel-section .hero-reel {
    position: relative !important;
    display: block !important;
    width: calc(100vw - 24px) !important;
    max-width: none !important;
    min-height: 0 !important;
    aspect-ratio: 16 / 9 !important;
    margin: 0 auto !important;
    border-radius: 18px !important;
    box-shadow: 0 22px 48px rgb(0 0 0 / 0.45) !important;
    overflow: hidden !important;
  }

  body.home-page .showreel-section .hero-video-frame,
  body.home-page .showreel-section .hero-reel-video,
  body.home-page .showreel-section .hero-reel-overlay {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    margin: 0 !important;
    border-radius: inherit !important;
  }

  body.home-page .showreel-section .hero-video-frame {
    display: block !important;
    aspect-ratio: auto !important;
  }

  body.home-page .showreel-section .hero-reel-video {
    object-fit: cover !important;
  }

  body.home-page .showreel-section .hero-controls {
    position: absolute !important;
    inset: auto 12px 10px !important;
    z-index: 8 !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-direction: row !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
  }

  body.home-page .showreel-section .hero-video-tagline {
    display: none !important;
  }

  body.home-page .showreel-offer-strip {
    width: calc(100vw - 40px);
    margin-top: 34px;
    grid-template-columns: 1fr;
  }

  body.home-page .showreel-offer-strip .hero-offer-chip {
    min-height: 76px;
    padding: 15px 4px;
    border-top: 1px solid rgb(255 255 255 / 0.1);
    border-left: 0;
  }

  body.home-page .showreel-offer-strip .hero-offer-chip:first-child {
    border-top: 0;
  }
}

@media (max-width: 520px) {
  body.home-page .wave-hero-title {
    font-size: clamp(1.75rem, 7.9vw, 2.8rem);
  }

  body.home-page .wave-hero-copy {
    max-width: 22rem;
    font-size: 15px;
  }

  body.home-page .showreel-section .hero-progress-time {
    display: none;
  }
}

@media (max-width: 370px) {
  body.home-page .wave-hero-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  body.home-page .wave-hero-cta {
    width: 100%;
  }
}
