/*
 * TOP hero (SPEC §3.1 #1). Values from tokens.css only.
 *
 * HTML contract
 *   <section class="hero" aria-labelledby="hero-title">
 *     <img class="hero__image" src srcset sizes alt="" width height
 *          fetchpriority="high">
 *     <div class="hero__content">
 *       <h1 class="hero__title" id="hero-title">
 *         <img class="hero__logo" src="../../assets/img/hero-logo.svg"
 *              alt="SUN MUSIC GOLF AGENCY" width="678" height="240">
 *       </h1>
 *       <p class="hero__catch">夢を育て、才能を輝かせる。</p>
 *       <p class="hero__lead"><span class="hero__line">…</span> × 4</p>
 *     </div>
 *   </section>
 *   Full bleed, under the floating header (.header--overlay). The photo is
 *   the page's largest image, so it is not lazy. The logo is the page h1;
 *   its alt is the text it shows. Design v2 adds the catch, a 4-line lead
 *   (one XD line per .hero__line) and a 24.5% black multiply overlay
 *   (::after) under the white text.
 *
 * XD: no states; the hero is not interactive.
 */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  block-size: var(--hero-height);
  padding-block-start: var(--hero-content-start);
  overflow: hidden;
  color: var(--color-on-dark);
  background-color: var(--color-green-700); /* while the photo loads */
}

.hero__image {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: var(--hero-image-position);
}

/* v2: black multiply overlay between the photo and the text. */
.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background-color: var(--hero-overlay-color);
  opacity: var(--hero-overlay-opacity);
  mix-blend-mode: multiply;
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  inline-size: 100%;
  text-align: center;
}

.hero__title {
  margin: 0;
  line-height: 0;
}

.hero__logo {
  inline-size: var(--hero-logo-width);
  block-size: auto;
}

.hero__catch {
  max-inline-size: calc(100% - 2 * var(--hero-lead-inset));
  margin: var(--hero-catch-gap) 0 0;
  font-size: var(--text-hero-catch-size);
  font-weight: var(--font-weight-bold);
  line-height: var(--text-hero-catch-lh);
}

.hero__lead {
  inline-size: min(100% - 2 * var(--hero-lead-inset), var(--hero-lead-max));
  margin: var(--hero-lead-gap) 0 0;
  font-size: var(--text-hero-lead-size);
  font-weight: var(--font-weight-bold);
  line-height: var(--text-hero-lead-lh);
}

/* One XD line each; a line still wraps if the viewport is narrower. */
.hero__line {
  display: block;
}

@media print {
  .hero {
    block-size: auto;
    padding-block: var(--space-6);
  }
}
