/* ==========================================================================
   Homepage: the page IS the hero — one fixed 100vh viewport, no scrolling.
   This file is only linked from index.html, so scoping html/body here
   (rather than in main.css) keeps every other page scrolling normally.

   A tall Pinterest-style masonry grid of ALL hero photos (sized by each
   photo's own aspect ratio) auto-scrolls upward inside the clipped 100vh
   viewport — the page itself never scrolls, only the inner track. The grid
   is built entirely at runtime by js/hero.js from images/hero/manifest.json
   (see scripts/process-hero-images.py), including the per-cell
   grid-column/grid-row placement and the --hero-columns/--hero-scroll-duration
   custom properties this file reads below — there's no static markup for
   individual photos in index.html.
   ========================================================================== */

html, body {
  height: 100vh;
  overflow: hidden;
}

.hero-viewport {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* ---- Masonry scroll ---- */

.hero-masonry-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-masonry-track {
  display: grid;
  grid-template-columns: repeat(var(--hero-columns, 3), 1fr);
  grid-auto-rows: 8px; /* row unit hero.js's span-per-photo math is scaled against */
  gap: 16px; /* must match GAP_PX in js/hero.js -- it's baked into both the
                column-width math (already existed) and the span-per-photo
                height math (added alongside this change, see hero.js) */
  width: 100%;
  will-change: transform;
  /* hero.js renders the photo sequence twice back-to-back (so this element
     is exactly double the height of one copy) and sets
     --hero-scroll-duration from the actual rendered height, so translateY(-50%)
     always lands exactly one copy up — a seamless loop with no visible reset. */
  animation: hero-masonry-scroll var(--hero-scroll-duration, 90000ms) linear infinite;
}

.hero-masonry-track.is-paused {
  animation-play-state: paused;
}

@keyframes hero-masonry-scroll {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}

.hero-masonry-cell {
  position: relative;
  overflow: hidden;
}

.hero-masonry-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-masonry-cell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.22); /* keeps the wall dark/unified, not a Vegas billboard */
}

/* ---- Name overlay ---- */

.hero-mark {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hero-mark-glow {
  position: absolute;
  /* Sized to frame logo-vertical.png's actual proportions (1062x1286,
     roughly 0.83:1) with room for the radial falloff around it. */
  width: min(70vw, 460px);
  height: min(85vw, 560px);
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.32) 45%,
    rgba(0, 0, 0, 0) 75%
  );
}

.hero-mark-content {
  position: relative;
  text-align: center;
}

.hero-logo {
  display: block;
  max-width: min(60vw, 280px); /* native width is 1062px, so this never upscales */
  width: 100%;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 2px 20px rgba(0, 0, 0, 0.5));
}

@media (prefers-reduced-motion: reduce) {
  .hero-masonry-track {
    animation: none;
  }
}
