/* ============================================
   ScrollExpand Component — GSAP ScrollTrigger
   Ported from React Bits, powered by GSAP pin
   ============================================ */

/* Root container — full-viewport stage */
.scroll-expand {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #0f0f0f;
}

/* The visual frame that clips the media */
.scroll-expand__frame {
  position: absolute;
  inset: 0;
  clip-path: inset(21% 29% 21% 29% round 24px);
  will-change: clip-path;
}

/* Media (image or video) */
.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;
}

/* Dark gradient scrim for text readability */
.scroll-expand__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.55) 35%,
    rgba(0, 0, 0, 0.25) 60%,
    rgba(0, 0, 0, 0.45) 100%
  );
  opacity: 0;
}

/* Overlay container for children content */
.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;
}

/* Title over the frame */
.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, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  will-change: opacity, transform;
}

/* Scroll hint at the bottom */
.scroll-expand__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.25rem;
  text-align: center;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
  will-change: opacity, transform;
  animation: se-hint-bounce 2s ease-in-out infinite;
}

/* ===== Card panel behind overlay text ===== */
.scroll-expand__card {
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  border-radius: 20px;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.75rem, 5vw, 3.5rem);
  max-width: 560px;
  width: 90%;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.18),
    0 2px 8px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.45);
  text-align: center;
}

.scroll-expand__card h2 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: clamp(1.5rem, 4vw, 2.75rem);
  font-weight: 700;
  color: #1A1A1A;
  margin: 0 0 0.75rem;
  text-shadow: none;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.scroll-expand__card p {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: clamp(0.875rem, 1.4vw, 1.0625rem);
  color: #4a4a4a;
  margin: 0 0 1.5rem;
  line-height: 1.7;
  text-shadow: none;
  max-width: none;
}

.scroll-expand__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, #2F4F3E, #3D6350);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 14px rgba(47, 79, 62, 0.35);
}

.scroll-expand__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(47, 79, 62, 0.45);
}

/* ===== Hint bounce animation ===== */
@keyframes se-hint-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* ===== GSAP pin-spacer background match ===== */
.pin-spacer {
  background: #0f0f0f !important;
}
