/* Broad feathered light fields avoid tracing or cutting out the product. */
.hero {
  isolation: isolate;
  min-height: max(740px, 100svh);
  background: var(--bg);
}

.hero-scene {
  position: absolute;
  top: 50%;
  right: -2vw;
  width: min(62vw, 1100px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  overflow: hidden;
  isolation: isolate;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%, #000 94%, transparent), linear-gradient(0deg, transparent, #000 12%, #000 83%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 16%, #000 94%, transparent), linear-gradient(0deg, transparent, #000 12%, #000 83%, transparent);
  mask-composite: intersect;
}

.hero-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.scene-light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  animation-play-state: paused;
}

.scene-background-only,
.scene-controller-only {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.scene-background-only {
  /* Light enters from the far right / above, with no silhouette-shaped gap. */
  -webkit-mask-image: linear-gradient(90deg, transparent 76%, rgb(0 0 0 / 4%) 84%, #000 100%), linear-gradient(180deg, #000, transparent 30%);
  -webkit-mask-composite: source-over;
  mask-image: linear-gradient(90deg, transparent 76%, rgb(0 0 0 / 4%) 84%, #000 100%), linear-gradient(180deg, #000, transparent 30%);
  mask-composite: add;
  mix-blend-mode: screen;
}

.scene-controller-only {
  /* A wide continuous fade preserves the photograph's natural contours. */
  -webkit-mask-image: radial-gradient(ellipse 50% 40% at 52% 54%, #000 36%, rgb(0 0 0 / 55%) 66%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 40% at 52% 54%, #000 36%, rgb(0 0 0 / 55%) 66%, transparent 100%);
}

.scene-halo {
  background:
    radial-gradient(ellipse 42% 56% at 105% 44%, rgb(235 6 22 / 85%), transparent 95%),
    radial-gradient(ellipse 30% 9% at 89% 88%, rgb(244 6 18 / 48%), transparent 100%);
  opacity: .66;
  animation: right-backlight 9s ease-in-out infinite;
  animation-play-state: paused;
}

.scene-ceiling-light {
  background: radial-gradient(ellipse 24% 12% at 58% 23%, rgb(255 238 231 / 22%), transparent 95%);
  transform-origin: 52% 33%;
  opacity: .45;
  animation: overhead-orbit 12s linear infinite;
  animation-play-state: paused;
}

.scene-orbit-shadow {
  inset: -50%;
  background: linear-gradient(90deg, rgb(0 0 0 / 94%) 24%, rgb(0 0 0 / 74%) 43%, rgb(0 0 0 / 28%) 61%, transparent 78%);
  transform-origin: 50% 42%;
  opacity: .22;
  animation: shadow-orbit 12s linear infinite;
  animation-play-state: paused;
}

.scene-relight {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* A registered copy retains detail instead of adding a white veil. */
  filter: brightness(1.16) contrast(1.025);
  -webkit-mask-image: linear-gradient(110deg, transparent 30%, #000 47%, #000 55%, transparent 72%);
  mask-image: linear-gradient(110deg, transparent 30%, #000 47%, #000 55%, transparent 72%);
  -webkit-mask-size: 250% 100%;
  mask-size: 250% 100%;
  opacity: .3;
  animation: surface-reflection 12s linear infinite;
  animation-play-state: paused;
}

.scene-rim-reflection {
  background: radial-gradient(ellipse 5% 25% at 82% 53%, rgb(246 13 20 / 28%), transparent 100%);
  mix-blend-mode: soft-light;
  opacity: .45;
  animation: right-backlight 9s ease-in-out infinite;
  animation-play-state: paused;
}

.hero[data-motion="playing"][data-in-view="true"] .scene-light {
  animation-play-state: running;
}

.hero h1 {
  max-width: 56%;
  font-size: clamp(3.2rem, 6.2vw, 6.5rem);
}

.hero-copy { max-width: min(43vw, 560px); }
.hero-actions { max-width: 49%; }

.hero .trust {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(50%, 680px);
  gap: 0;
}

.hero .trust > div {
  min-width: 0;
  margin: 0;
  padding: 0 12px;
}

.hero .trust > div:first-child { padding-left: 0; }
.hero .trust strong { font-size: clamp(.875rem, 1.3vw, 1.15rem); }
.hero .trust span { display: block; font-size: .875rem; line-height: 1.4; margin-top: 5px; }

.motion-toggle {
  position: absolute;
  z-index: 4;
  right: 5vw;
  bottom: 30px;
  min-height: 44px;
  padding: .6rem 1rem;
  border: 1px solid #505053;
  border-radius: 2px;
  color: #f4f4f2;
  background: rgb(8 9 10 / 85%);
  font-size: .875rem;
  cursor: pointer;
}

.motion-toggle:hover { border-color: #f14949; }
.motion-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.hero .scroll-mark { display: none; }

@keyframes right-backlight {
  0%, 100% { opacity: .5; }
  50% { opacity: .92; }
}

@keyframes overhead-orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes shadow-orbit {
  0% { transform: rotate(0deg); opacity: .08; }
  25% { transform: rotate(90deg); opacity: .3; }
  50% { transform: rotate(180deg); opacity: .45; }
  75% { transform: rotate(270deg); opacity: .24; }
  90% { transform: rotate(324deg); opacity: .03; }
  100% { transform: rotate(360deg); opacity: .08; }
}

@keyframes surface-reflection {
  0%, 100% { -webkit-mask-position: 100% 0; mask-position: 100% 0; opacity: .7; }
  25% { -webkit-mask-position: 55% 0; mask-position: 55% 0; opacity: .46; }
  50% { -webkit-mask-position: 0% 0; mask-position: 0% 0; opacity: .08; }
  75% { -webkit-mask-position: 45% 0; mask-position: 45% 0; opacity: .5; }
  90% { -webkit-mask-position: 80% 0; mask-position: 80% 0; opacity: .8; }
}

@media (max-width: 900px) {
  .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
    padding: 66px 0 40px;
  }

  .hero-scene {
    position: relative;
    flex-shrink: 0;
    top: auto;
    right: auto;
    width: min(100%, 720px);
    margin: -7% auto -6%;
    transform: none;
  }

  .hero-content { width: 90%; margin: 0 auto; padding-top: 0; }
  .hero h1 { max-width: none; font-size: clamp(2.35rem, 7.8vw, 4.5rem); }
  .hero-copy { max-width: 600px; }
  .hero-actions { max-width: none; }
  .trust { margin-top: 2.5rem; }
  .hero .trust { width: min(100%, 640px); }
  .hero .trust strong { font-size: 1rem; }
  .motion-toggle { position: relative; right: auto; bottom: auto; align-self: flex-start; margin: 30px 5vw 0; }
}

@media (max-width: 560px) {
  .hero .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; }
  .hero .trust > div { padding: 0 16px; }
  .hero .trust > div:nth-child(odd) { padding-left: 0; }
  .hero .trust > div:nth-child(even) { border-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  /* Explicitly opting in with the button still enables the slow effects. */
  .hero:not([data-motion="playing"]) .scene-light { animation: none; }
  html { scroll-behavior: auto; }
}
