/* Stage 6 — Dream Spark hero. Original Figma artwork; no runtime dependencies.
   Reference frames: 86:2410, 128:2410, 143:2494, 143:2707, 150:2578, 150:2792. */

/* Share the first grid row so the existing header overlays the artwork,
   while the semantic header and main remain separate landmarks. */
.home-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "content" "footer";
  grid-template-rows: 1fr auto;
}
.home-page > .site-header { grid-area: content; align-self: start; }
.home-page > .home-main { grid-area: content; min-inline-size: 0; }
.home-page > footer { grid-area: footer; }
.home-page .site-header__divider { opacity: .65; }

.hero {
  --hero-art-width: 748.8px;
  --hero-art-height: 468px;
  --hero-fade-height: 210px;
  --hero-safe-space: max(160px, 10rem);
  --hero-center-offset: 5px;
  --hero-short-min: 560px;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-block-size: var(--hero-min-height);
  padding-block: calc(var(--hero-safe-space) + 2 * var(--hero-center-offset)) var(--hero-safe-space);
  background: var(--color-background);
  text-align: center;
}
/* Match the three reference heights at their viewport sizes, and accommodate
   short windows, mobile browser chrome and enlarged text without clipping. */
@supports (height: 100svh) {
  .hero { min-block-size: max(100svh, var(--hero-short-min)); }
}
.hero__atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero__art {
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  inline-size: max(100%, var(--hero-art-width));
  block-size: var(--hero-art-height);
  overflow: hidden;
}
.hero__image {
  display: block;
  inline-size: 100%;
  max-inline-size: none;
  block-size: 100%;
  object-fit: cover;
  object-position: center;
  transform-origin: center bottom;
}
/* Three original Figma radial light fills, scaled with the artwork frame.
   Effective center alpha includes the original layer opacity of 22%. */
.hero__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 18.0556% 28.8889% at 50% 47.7778%, rgb(255 23 79 / 1.64%), transparent),
    radial-gradient(ellipse 30.5556% 42.2222% at 50% 56.6667%, rgb(20 99 255 / 2.76%), transparent),
    radial-gradient(ellipse 31.25% 47.2222% at 50% 50.5556%, rgb(139 53 245 / 3.62%), transparent);
}
.hero__fade {
  position: absolute;
  inset-inline: 0;
  inset-block-end: calc(var(--hero-art-height) - var(--hero-fade-height) + 2px);
  block-size: var(--hero-fade-height);
  background: linear-gradient(180deg, var(--color-background) 0% 3%, rgb(16 13 37 / 70%) 38%, rgb(16 13 37 / 0%) 100%);
}
.hero > .hero-content {
  position: relative;
  z-index: 1;
  inline-size: min(calc(100% - var(--gutter) * 2), var(--hero-title-max));
  min-inline-size: 0;
}
.hero .type-hero { inline-size: 100%; font-variation-settings: "CRSV" 0, "SHRP" 0; }
.hero .type-hero > span { display: block; }
.hero .type-hero-subtitle { inline-size: min(100%, var(--hero-subtitle-max)); }
.hero .button--explore { gap: 22px; padding-inline: min(31px, var(--button-padding)); }
.hero .button--explore .button__icon { inline-size: 14px; line-height: 1.22; }
.hero .button--explore > span:first-child { min-inline-size: 0; overflow-wrap: anywhere; }

@media (min-width: 768px) {
  .hero {
    --hero-art-width: 1152px;
    --hero-art-height: 720px;
    --hero-fade-height: 240px;
    --hero-center-offset: 0px;
    --hero-short-min: 680px;
  }
}
@media (min-width: 1200px) {
  .hero { --hero-safe-space: max(136px, 8.5rem); --hero-short-min: 620px; }
  .hero__art {
    inset: 0;
    transform: none;
    inline-size: 100%;
    block-size: 100%;
  }
  .hero__fade { display: none; }
  /* English subtitle's reference width differs by 2px. */
  html:lang(en) .hero .type-hero-subtitle { --hero-subtitle-max: 523px; }
}

/* One subtle, finite breath (under five seconds). Only the raster's transform
   changes; no JS loop, filters, canvas, extra images or permanent will-change.
   The static composition is both the beginning and end of the animation. */
@keyframes dream-spark-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}
@media (prefers-reduced-motion: no-preference) {
  .hero__image { animation: dream-spark-breathe 4.8s ease-in-out 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__image { animation: none; transform: none; }
}
