@property --reveal-pos {
  syntax: '<percentage>';
  inherits: false;
  initial-value: -15%;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.hero {
  position: relative;
  width: 100%;
  height: 800px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a5c1a 0%, #4caf50 60%, #76c442 100%);
}

.hero__text {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 55%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 6rem 0 6%;
  background: linear-gradient(135deg, #1a5c1a 0%, #4caf50 60%, #76c442 100%);
  clip-path: polygon(0 0, 100% 0, 82% 100%, 0 100%);
  z-index: 2;
}

.hero__tagline {
  font-family: sans-serif;
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 0.3rem;
}

.hero__sub {
  font-family: Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  font-style: italic;
  color: #a8e063;
  display: inline-block;
  border-bottom: 3px solid #a8e063;
  padding-bottom: 2px;
}

.hero__images {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero__phase {
  position: absolute;
  aspect-ratio: 3 / 2;
  top: 0;
  right: 0;
  height: 100%;
  width: auto;
  display: block;
  mask-image: linear-gradient(
    to right,
    black var(--reveal-pos),
    transparent calc(var(--reveal-pos) + 15%)
  );
  -webkit-mask-image: linear-gradient(
    to right,
    black var(--reveal-pos),
    transparent calc(var(--reveal-pos) + 15%)
  );
  animation: reveal-sweep 2s ease-out forwards;
}

.hero__phase--1 { animation-delay: 0s; }
.hero__phase--2 { animation-delay: 2s; }
.hero__phase--3 { animation-delay: 4s; }

@keyframes reveal-sweep {
  from { --reveal-pos: -15%; }
  to   { --reveal-pos: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__phase {
    animation: none;
    mask-image: none;
    -webkit-mask-image: none;
  }
}
