/* On Seven athlete reveal — stage 3
   Scroll-controlled monochrome-to-colour transition for the existing athlete carousel. */

body[data-page="home"] .home-athlete {
  --athlete-reveal-progress: 0;
  --athlete-reveal-mask: 100%;
  --athlete-line-position: 0%;
  position: relative;
}

body[data-page="home"] .home-athlete::before {
  content: "BERTUMBUH";
  position: absolute;
  right: 4vw;
  top: 96px;
  color: transparent;
  font: 800 clamp(58px,9vw,138px)/1 var(--font-heading);
  letter-spacing: -.065em;
  -webkit-text-stroke: 1px rgba(17,24,39,.07);
  pointer-events: none;
}

body[data-page="home"] .athlete-spotlight {
  isolation: isolate;
}

body[data-page="home"] .spotlight-photo.has-athlete-reveal {
  isolation: isolate;
  background: #d9d4ca;
}

body[data-page="home"] .spotlight-photo.has-athlete-reveal .athlete-reveal-color,
body[data-page="home"] .spotlight-photo.has-athlete-reveal .athlete-reveal-mono {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

body[data-page="home"] .spotlight-photo.has-athlete-reveal .athlete-reveal-color {
  z-index: 1;
}

body[data-page="home"] .spotlight-photo.has-athlete-reveal .athlete-reveal-mono {
  z-index: 2;
  filter: grayscale(1) contrast(.94) brightness(.76);
  clip-path: inset(var(--athlete-line-position) 0 0 0);
  will-change: clip-path;
}

body[data-page="home"] .athlete-reveal-line {
  position: absolute;
  z-index: 3;
  top: var(--athlete-line-position);
  right: 0;
  left: 0;
  height: 3px;
  background: #c65316;
  box-shadow: 0 0 0 1px rgba(255,255,255,.15),0 0 20px rgba(198,83,22,.32);
  transform: translateY(-1px);
  pointer-events: none;
  will-change: top;
}

body[data-page="home"] .athlete-reveal-line::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f5b91f;
  transform: translateY(-50%);
}

body[data-page="home"] .spotlight-photo.has-athlete-reveal small {
  z-index: 4;
}

body[data-page="home"] .home-athlete .spotlight-copy {
  opacity: var(--athlete-copy-opacity,.68);
  transform: translate3d(var(--athlete-copy-shift,18px),0,0);
  transition: opacity 100ms linear;
  will-change: opacity,transform;
}

body[data-page="home"] .home-athlete.reveal-complete .spotlight-copy,
body[data-page="home"] .home-athlete:not(.is-revealing) .spotlight-copy {
  will-change: auto;
}

body[data-page="home"] .athlete-reveal-status {
  position: absolute;
  z-index: 5;
  right: 22px;
  top: 20px;
  min-width: 68px;
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border-left: 2px solid #c65316;
  background: rgba(8,20,35,.78);
  color: rgba(255,255,255,.72);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

body[data-page="home"] .athlete-reveal-status span {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

body[data-page="home"] .athlete-reveal-status strong {
  color: #fff;
  font: 700 12px/1 var(--font-heading);
}

@media(max-width:820px) {
  body[data-page="home"] .home-athlete::before {
    right: 15px;
    top: 76px;
    font-size: clamp(48px,16vw,86px);
  }

  body[data-page="home"] .home-athlete .spotlight-copy {
    transform: translate3d(0,var(--athlete-copy-shift-mobile,12px),0);
  }
}

@media(max-width:720px) {
  body[data-page="home"] .spotlight-photo.has-athlete-reveal .athlete-reveal-color {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  body[data-page="home"] .spotlight-photo.has-athlete-reveal .athlete-reveal-mono {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  body[data-page="home"] .athlete-reveal-status {
    right: 14px;
    top: 14px;
  }
}

@media(prefers-reduced-motion:reduce) {
  body[data-page="home"] .spotlight-photo.has-athlete-reveal .athlete-reveal-mono,
  body[data-page="home"] .athlete-reveal-line,
  body[data-page="home"] .athlete-reveal-status {
    display: none !important;
  }

  body[data-page="home"] .home-athlete .spotlight-copy {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

html[data-motion-mode="reduced"] body[data-page="home"] .spotlight-photo.has-athlete-reveal .athlete-reveal-mono,
html[data-motion-mode="reduced"] body[data-page="home"] .athlete-reveal-line,
html[data-motion-mode="reduced"] body[data-page="home"] .athlete-reveal-status {
  display: none !important;
}

html[data-motion-mode="reduced"] body[data-page="home"] .home-athlete .spotlight-copy {
  opacity: 1 !important;
  transform: none !important;
}
