/* =========================================================
   ScrollExpand — Vanilla JS port of React Bits ScrollExpand
   https://reactbits.dev
   ========================================================= */

/* ── container ───────────────────────────────────────────────── */
.scroll-expand {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Self-contained scroller variant (useWindowScroll: false) */
.scroll-expand--scroller {
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior: contain;
}

.scroll-expand--scroller::-webkit-scrollbar {
  display: none;
}

/* ── structural elements ─────────────────────────────────────── */
.scroll-expand__track {
  position: relative;
  width: 100%;
  /* height set by JS: stageH × (1 + scrollDistance + holdDistance) */
}

.scroll-expand__stage {
  position: sticky;
  top: 0;
  width: 100%;
  overflow: hidden;
  background: #0a0e1a; /* dark fallback while image loads */
  --se-title-size: 4rem; /* overridden by JS per viewport width */
}

/* Initial clip-path matches startWidth=65 startHeight=65 radius=20 at p=0 */
.scroll-expand__frame {
  position: absolute;
  inset: 0;
  clip-path: inset(17.5% 17.5% 17.5% 17.5% round 20px);
  will-change: clip-path;
}

.scroll-expand__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
  transform-origin: center;
  user-select: none;
  -webkit-user-drag: none;
  transform: scale(1.25); /* matches mediaZoom default until JS kicks in */
}

.scroll-expand__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75),
    rgba(0, 0, 0, 0.1) 45%,
    rgba(0, 0, 0, 0.35)
  );
  opacity: 0;
}

.scroll-expand__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6%;
  opacity: 0;
  will-change: opacity, transform;
}

.scroll-expand__title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 6%;
  text-align: center;
  font-size: var(--se-title-size);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  will-change: opacity, transform;
}

/* Allow an h1 inside the title div without overriding parent typography */
.scroll-expand__title h1 {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  text-shadow: inherit;
}

.scroll-expand__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  will-change: opacity, transform;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

/* Animated scroll indicator arrow */
.scroll-expand__hint::after {
  content: '';
  display: block;
  width: 1px;
  height: 2rem;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
  animation: se-hint-drop 1.6s ease-in-out infinite;
}

@keyframes se-hint-drop {
  0%, 100% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  30%       { transform: scaleY(1); transform-origin: top; opacity: 1; }
  70%       { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  99%       { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ── overlay hero content ────────────────────────────────────── */
.se-hero-content {
  max-width: 780px;
  width: 100%;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}

.se-hero-content .hero__badge {
  display: inline-block;
  padding: 0.3em 1em;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.se-hero-content .hero__subtitle {
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  line-height: 1.65;
  opacity: 0.88;
  max-width: 620px;
  margin: 0;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.se-hero-content .hero__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.25rem;
}

.se-hero-content .hero__stats {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.se-hero-content .hero__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.se-hero-content .hero__stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
}

.se-hero-content .hero__stat-label {
  font-size: 0.72rem;
  opacity: 0.65;
  color: #fff;
  text-align: center;
  letter-spacing: 0.03em;
}

/* ── reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .scroll-expand__frame,
  .scroll-expand__media,
  .scroll-expand__scrim,
  .scroll-expand__overlay,
  .scroll-expand__title,
  .scroll-expand__hint {
    transition: none !important;
    animation: none !important;
  }

  /* Show content immediately at rest */
  .scroll-expand__hint::after {
    display: none;
  }
}
