/* HOME · Visual Banner: the Taipei drone video (loaded by index.html only).
   The opening plays once, then the loop keeps circling (home.js). White header and copy over it.
   Reduced motion: a still of the modelled city (home-poster-city.jpg), no video downloads.
   Colours from MOTION.md §1. No boxes: legibility comes from a soft charcoal falloff. */

.hero.is-video { background: var(--charcoal) url("../video/home-poster-city.jpg") center / cover no-repeat; }
.hero.is-video .hero-pattern,
.hero.is-video .hairline { display: none; }

/* wordmark: ONEWORK in the logo's letter shapes */
.wordmark { display: block; color: var(--teal-700); }
.wordmark-svg { display: block; width: clamp(220px, 20vw, 380px); height: auto; }

.hero-video { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-video video.is-hidden { visibility: hidden; }
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(26, 26, 26, 0.55) 0%, rgba(26, 26, 26, 0) 20%),
    linear-gradient(90deg, rgba(26, 26, 26, 0.35) 0%, rgba(26, 26, 26, 0) 30%, rgba(26, 26, 26, 0) 52%, rgba(26, 26, 26, 0.55) 100%);
}
@media (prefers-reduced-motion: reduce) {
  .hero-video video { display: none; }
}

.hero.is-video .hero-title,
.hero.is-video .hero-tagline,
.hero.is-video .wordmark { color: var(--white); }

/* header: white over the video; normal once it turns light on scroll or while the phone menu is open */
:root:not(.menu-open) body:has(.hero.is-video) .site-header:not(.is-scrolled) .brand img { filter: brightness(0) invert(1); }
:root:not(.menu-open) body:has(.hero.is-video) .site-header:not(.is-scrolled) .main-nav a { color: var(--white); }
:root:not(.menu-open) body:has(.hero.is-video) .site-header:not(.is-scrolled) .main-nav a::after { background: var(--white); }
:root:not(.menu-open) body:has(.hero.is-video) .site-header:not(.is-scrolled) .menu-btn { color: var(--white); }
:root:not(.menu-open) body:has(.hero.is-video) .site-header:not(.is-scrolled) .lang {
  color: var(--white); background: transparent; border-color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 900px) {
  .wordmark-svg { width: min(70vw, 300px); }
  .hero-scrim {
    background:
      linear-gradient(180deg, rgba(26, 26, 26, 0.5) 0%, rgba(26, 26, 26, 0) 25%),
      linear-gradient(0deg, rgba(26, 26, 26, 0.7) 0%, rgba(26, 26, 26, 0) 50%);
  }
}
