/* ============================================================
   SCROLL ANIMATION SECTION
   Apple-style canvas frame scroll + glassmorphism feature cards
   ============================================================ */

/* Outer container — 500vh scroll space. No bg here — page cream shows through. */
.scroll-animation {
  position: relative;
  background: transparent;
}

/* Sticky viewport-height inner — canvas stays pinned */
.scroll-animation__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: visible;
  will-change: transform;
}

.scroll-animation__sticky canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ============================================================
   LOADING OVERLAY
   ============================================================ */
.scroll-animation__loading {
  position: absolute;
  inset: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
  z-index: 10;
  pointer-events: none;
}

.scroll-animation__loading.hidden {
  opacity: 0;
}

.scroll-animation__loading-bar {
  width: 200px;
  height: 1px;
  background: #2A2C2B;
}

.scroll-animation__loading-fill {
  height: 100%;
  background: var(--awan-accent);
  transition: width 0.1s ease;
  width: 0%;
}

.scroll-animation__loading-percent {
  font-size: 0.75rem;
  color: #7A7870;
  margin-top: 0.75rem;
  letter-spacing: 0.1em;
  font-family: inherit;
}

/* ============================================================
   FEATURE CARD OVERLAYS
   ============================================================ */
.scroll-feature-cards {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.scroll-feature-card {
  position: absolute;
  top: 50%;
  width: min(45vw, 520px);
  max-height: 85vh;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  background: rgba(233,230,215,0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(13,15,14,0.1);
  border-radius: 2rem;
  box-shadow: 0 8px 32px rgba(13,15,14,0.15);
  padding: 2.5rem;
  transform: translateY(-50%);
  overflow-y: auto;
  box-sizing: border-box;
}

.dark .scroll-feature-card {
  background: rgba(23, 23, 23, 0.9);
  border-color: rgba(233,230,215,0.1);
  box-shadow: 0 8px 32px rgba(13,15,14,0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.scroll-feature-card--left {
  left: 2rem;
}

.scroll-feature-card--right {
  right: 2rem;
  left: auto;
}

/* ============================================================
   CARD INNER CONTENT
   ============================================================ */
.scroll-fc-category {
  font-size: 0.8rem;
  font-weight: 500;
  color: #7A7870;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem;
}

.dark .scroll-fc-category {
  color: #7A7870;
}

.scroll-fc-icon {
  margin-bottom: 0.75rem;
  display: block;
  line-height: 1;
}

.scroll-fc-title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--awan-text);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.dark .scroll-fc-title {
  color: var(--awan-surface);
}

.scroll-fc-desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--awan-muted);
  margin: 0 0 1.25rem;
}

.dark .scroll-fc-desc {
  color: #7A7870;
}

/* Stats */
.scroll-fc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.scroll-fc-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--awan-accent);
  line-height: 1;
  display: block;
}

.scroll-fc-stat-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--awan-text);
  margin-top: 0.2rem;
  display: block;
}

.dark .scroll-fc-stat-label {
  color: var(--awan-surface);
}

/* Brands */
.scroll-fc-brands-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--awan-accent);
  margin: 0 0 0.4rem;
}

.scroll-fc-brands-text {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--awan-text);
  margin: 0;
}

.dark .scroll-fc-brands-text {
  color: var(--awan-surface);
}

/* ============================================================
   MOBILE — cards slide from bottom, full width
   ============================================================ */
@media (max-width: 768px) {
  .scroll-feature-card {
    width: calc(100vw - 2rem);
    left: 1rem !important;
    right: 1rem !important;
    top: auto;
    bottom: 1.5rem;
    transform: none;
    max-height: 55vh;
    padding: 1.5rem;
    border-radius: 1.25rem;
  }

  .scroll-fc-title {
    font-size: 1.25rem;
  }

  .scroll-fc-stats {
    gap: 0.5rem;
  }

  .scroll-fc-stat-value {
    font-size: 1.4rem;
  }
}

/* ============================================================
   RTL support — mirror left/right positions
   ============================================================ */
[dir="rtl"] .scroll-feature-card--left {
  left: auto;
  right: 2rem;
}

[dir="rtl"] .scroll-feature-card--right {
  right: auto;
  left: 2rem;
}
