/* ============================================================
   Gallery Events — Hero
   ============================================================ */

.hero {
  --expand-progress: 0;
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: calc(var(--nav-h) + 2rem) clamp(1.5rem, 5vw, 4rem) 4rem;
}

.hero__expansion-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: calc(0.72 * (1 - var(--expand-progress)));
  transition: opacity 120ms linear;
}

.hero__expansion-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.78) brightness(0.58);
  transform: scale(1.02);
}

.hero__expansion-media {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: min(calc(300px + var(--expand-progress) * 1250px), 95vw);
  height: min(calc(400px + var(--expand-progress) * 400px), 85vh);
  transform: translate(-50%, -50%);
  overflow: hidden;
  border-radius: calc(22px - var(--expand-progress) * 14px);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.32);
  will-change: width, height, border-radius;
  background: #000;
}

.hero__expansion-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__expansion-shade {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #000;
}

.hero__expansion-media .hero__background-mark {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: min(53.2%, 434px);
  height: auto;
  object-fit: contain;
  transform: translate(-50%, -50%) scale(calc(0.86 + var(--expand-progress) * 0.14));
  opacity: calc(var(--expand-progress) * 0.13);
  filter: brightness(1.25);
  transition: opacity 450ms ease-out;
  will-change: opacity, transform;
}

/* ── Ambient floating blobs — pure gradients, GPU-cheap ── */
.hero__blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.hero__blob--green {
  width: 60vmax;
  height: 60vmax;
  top: -20vmax;
  left: -15vmax;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.14) 0%, transparent 60%);
  animation: blobFloatA 18s var(--ease-in-out) infinite alternate;
}

.hero__blob--blue {
  width: 50vmax;
  height: 50vmax;
  bottom: -20vmax;
  right: -12vmax;
  background: radial-gradient(circle, rgba(var(--blue-rgb), 0.10) 0%, transparent 60%);
  animation: blobFloatB 22s var(--ease-in-out) infinite alternate;
}

@keyframes blobFloatA {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vmax, 4vmax, 0) scale(1.15); }
}

@keyframes blobFloatB {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to   { transform: translate3d(-5vmax, -3vmax, 0) scale(0.95); }
}

/* ── Cursor spotlight — JS drives the gradient position ── */
.hero__spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    600px circle at 50% 50%,
    rgba(var(--accent-rgb), 0.10) 0%,
    transparent 70%
  );
  will-change: background;
}

/* Touch devices: static ambient glow instead */
@media not all and (hover: hover) and (pointer: fine) {
  .hero__spotlight {
    background: radial-gradient(
      700px circle at 50% 40%,
      rgba(var(--accent-rgb), 0.08) 0%,
      transparent 70%
    );
  }
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  max-width: 1200px;
  width: 100%;
  transform: scale(calc(1 - var(--expand-progress) * 0.025));
  will-change: transform;
}

.hero__tagline { opacity: calc(1 - var(--expand-progress) * 1.4); }

.hero__tagline {
  font-size: clamp(0.65rem, 1.2vw, 0.75rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}

/* ── Title — two lines, letter-staggered reveal via JS ── */
.hero__title {
  font-family: var(--font-display);
  line-height: 0.92;
  letter-spacing: 0.01em;
  color: var(--text);
  width: 100%;
}

.hero__title--logo {
  display: flex;
  justify-content: center;
}

.hero__brand-logo {
  position: relative;
  display: block;
  width: min(72vw, 760px);
  aspect-ratio: 1800 / 394;
}

.hero__brand-logo-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  filter: invert(1);
}

.hero__brand-logo-image--gallery {
  clip-path: inset(0 0 44% 0);
  opacity: calc(1 - var(--expand-progress) * 1.35);
}

.hero__brand-logo-image--gvo {
  clip-path: inset(44% 0 0 0);
}

.hero__title-line {
  display: block;
  font-size: clamp(4.5rem, 15vw, 15rem);
  white-space: nowrap;
}

/* Second line as outline — depth without a second color */
.hero__title-line--outline {
  color: transparent;
  -webkit-text-stroke: 2px rgba(var(--accent-rgb), 0.8);
  font-size: clamp(3rem, 10vw, 10rem);
}

/* Letter spans injected by JS */
.hero__title .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.35em) rotate(4deg);
  animation: letterIn 0.7s var(--ease-out) forwards;
}

@keyframes letterIn {
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

/* No-JS: letters stay plain text, fully visible */

.hero__sub {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  color: var(--muted);
  max-width: 520px;
  line-height: 1.65;
}

.hero__ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

/* ── Scroll cue ── */
.hero__scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  z-index: 1;
  opacity: calc(1 - var(--expand-progress) * 1.4);
}

.hero__scroll-cue span {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__scroll-cue__line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollLine 1.8s var(--ease-in-out) infinite;
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@media (max-width: 768px) {
  .hero__expansion-media {
    width: min(calc(280px + var(--expand-progress) * 650px), 94vw);
    height: min(calc(390px + var(--expand-progress) * 220px), 82vh);
  }

  .hero__brand-logo { width: min(88vw, 620px); }
  .hero__title-line { white-space: normal; }
  .hero__ctas { flex-direction: column; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__spotlight, .hero__blob { display: none; }
  .hero__title .letter { opacity: 1; transform: none; animation: none; }
  .hero { --expand-progress: 1; }
  .hero__tagline, .hero__brand-logo-image--gallery, .hero__scroll-cue { display: none; }
}
