/* =========================================================
   HERO — Unizin home-02 copy, then video expand on reach
   ========================================================= */

.hero {
  position: relative;
  z-index: 1;
  background: var(--white);
  color: var(--white);
}

.hero__stage {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: calc(100svh - var(--site-header-h, 8.5rem));
  overflow: visible;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 72%;
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.64) 48%,
    rgba(0, 0, 0, 0.7) 100%
  );
}

.hero__intro {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 3rem));
  margin-inline: auto;
  padding: clamp(4.5rem, 10vh, 7.5rem) 0 clamp(10rem, 22vh, 16rem);
}

.hero__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.hero__title {
  flex: 1 1 22rem;
  min-width: 0;
  max-width: 56rem;
  margin: 0;
  font-family: var(--font-primary);
  font-weight: 400;
  color: var(--white);
  text-align: left;
}

.hero__top {
  display: block;
  white-space: nowrap;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--white);
}

.hero__word-slot {
  --word-size: clamp(4.15rem, 8vw, 6.75rem);
  --o-size: calc(var(--word-size) * 0.48);
  position: relative;
  display: flex;
  justify-content: flex-start;
  height: calc(var(--word-size) * 1.15);
  margin-top: 0.12em;
  width: 100%;
  overflow: visible;
}

.hero__word {
  position: relative;
  width: max-content;
  max-width: 100%;
  font-size: var(--word-size);
  font-weight: 400;
  line-height: 1.1;
  white-space: nowrap;
  letter-spacing: -0.03em;
  text-align: left;
  color: var(--white);
  opacity: 0;
  transform: translateY(18px);
  will-change: opacity, transform;
  overflow: visible;
}

.hero__word.is-visible,
.hero__word.is-enter {
  opacity: 1;
  transform: none;
}

.hero__word.is-swap {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}

.hero__word.is-enter {
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}

.hero__o {
  display: inline-block;
  width: var(--o-size);
  height: var(--o-size);
  background: var(--gold);
  border-radius: 50%;
  vertical-align: middle;
  margin: 0 0.02em;
  transform: translateY(-0.06em);
  flex-shrink: 0;
}

.hero__i {
  position: relative;
  display: inline-block;
  line-height: inherit;
}

.hero__i-dot {
  position: absolute;
  left: 50%;
  top: 0.06em;
  width: 0.2em;
  height: 0.2em;
  border-radius: 50%;
  background: var(--gold);
  transform: translateX(-50%);
  pointer-events: none;
}

body.is-ready .hero__top {
  animation: riseIn 0.9s 0.12s var(--ease-out) both;
}

body.is-ready .hero__word {
  animation: riseIn 0.9s 0.28s var(--ease-out) forwards;
}

body.is-ready .hero__aside {
  animation: riseIn 0.9s 0.2s var(--ease-out) both;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.hero__aside {
  flex: 0 1 25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  max-width: 25rem;
  padding-top: 0.15rem;
}

.hero__lede {
  margin: 0;
  max-width: 25rem;
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.92);
}

.hero__expand {
  --hero-expand: 0;
  height: 280vh;
  margin-top: clamp(-27rem, -48vh, -21rem);
}

.hero__pin {
  position: sticky;
  top: 0;
  z-index: 0;
  height: 100svh;
  min-height: 22rem;
  overflow: visible;
  background: transparent;
}

.hero__frame {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: min(1625px, 76vw);
  aspect-ratio: 5 / 2;
  transform: translate(-50%, -50%);
  overflow: hidden;
  border-radius: 0;
  background: #111;
  will-change: left, top, width, height;
}

.hero__mask {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: #111;
}

.hero__poster,
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  border: 0;
  object-fit: cover;
  object-position: center center;
  background: #111;
}

.hero__poster {
  z-index: 0;
  transition: opacity 0.45s var(--ease);
}

.hero__mask.is-playing .hero__poster {
  opacity: 0;
  pointer-events: none;
}

.hero__video {
  z-index: 1;
  pointer-events: none;
}

.hero__media-btn {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.4rem;
  padding: 0.45rem 0.9rem 0.45rem 0.7rem;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.55);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.25s var(--ease);
}

.hero__media-btn:hover {
  background: rgba(17, 24, 39, 0.72);
}

.hero__media-btn-icon {
  width: 0.65rem;
  height: 0.65rem;
  background:
    linear-gradient(var(--gold), var(--gold)) left / 35% 100% no-repeat,
    linear-gradient(var(--gold), var(--gold)) right / 35% 100% no-repeat;
}

.hero__media-btn[aria-pressed="true"] .hero__media-btn-icon {
  background: var(--gold);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

@media (min-width: 768px) {
  .hero__expand {
    height: 300vh;
  }

  .hero__intro {
    width: min(1280px, calc(100% - 5rem));
  }
}

@media (max-width: 900px) {
  .hero__intro {
    width: min(1280px, calc(100% - 2rem));
    padding: 4.5rem 0 8rem;
  }

  .hero__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .hero__title {
    flex: none;
    width: 100%;
    max-width: none;
  }

  .hero__aside {
    max-width: 32rem;
    flex: none;
  }
}

@media (max-width: 780px) {
  .hero {
    height: auto;
  }

  .hero__stage {
    min-height: min(52svh, 28rem);
    display: flex;
    align-items: center;
    overflow: hidden;
  }

  .hero__intro {
    width: 100%;
    padding: 2.5rem 1.25rem 2.5rem;
  }

  .hero__top {
    font-size: clamp(1.35rem, 5.4vw, 1.65rem);
  }

  .hero__word-slot {
    --word-size: clamp(2.55rem, 12vw, 3.7rem);
    height: auto;
  }

  .hero__expand {
    height: auto;
    margin-top: 0;
    padding: 0 0 1.25rem;
  }

  .hero__pin {
    position: static;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .hero__frame {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
    height: auto;
    min-height: 18rem;
    aspect-ratio: 16 / 9;
    border-radius: 0;
  }

  [data-hero-expand] {
    --hero-expand: 0;
  }
}

@media (max-width: 520px) {
  .hero__stage {
    min-height: min(48svh, 26rem);
  }

  .hero__intro {
    padding: 2.15rem 1.15rem 2.25rem;
  }

  .hero__top {
    font-size: clamp(1.22rem, 5.8vw, 1.45rem);
  }

  .hero__lede {
    font-size: 1.02rem;
  }

  .hero__frame {
    min-height: 16.5rem;
  }
}

@media (max-width: 400px) {
  .hero__top {
    font-size: 1.18rem;
  }

  .hero__word-slot {
    --word-size: clamp(2.15rem, 10.8vw, 2.9rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__expand {
    height: auto;
    --hero-expand: 0;
  }

  .hero__pin {
    position: static;
    height: auto;
  }

  .hero__frame {
    position: relative;
    left: auto;
    top: auto;
    width: min(1280px, calc(100% - 2rem));
    height: auto;
    aspect-ratio: 5 / 2;
    margin: 0 auto 1.25rem;
    transform: none;
  }

  .hero__top,
  .hero__word,
  .hero__aside {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .hero__video {
    display: none;
  }
}
