/* Scroll-driven ecosystem experience */
#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: #0e0d0c;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-brand {
  font-family: Vazirmatn, sans-serif;
  font-weight: 100;
  letter-spacing: 0.35em;
  font-size: 0.8rem;
  color: #c2a06a;
}

.loader-track {
  width: min(240px, 60vw);
  height: 1px;
  background: rgba(247, 245, 242, 0.12);
  overflow: hidden;
}

#loader-bar {
  height: 100%;
  width: 0%;
  background: #c2a06a;
  transition: width 0.15s ease-out;
}

#loader-percent {
  font-size: 0.75rem;
  font-weight: 300;
  color: rgba(247, 245, 242, 0.45);
}

#experience {
  position: relative;
  background: #0e0d0c;
}

.experience-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  z-index: 1;
}

.experience-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(14, 13, 12, 0.55) 0%, transparent 42%, transparent 58%, rgba(14, 13, 12, 0.55) 100%),
    linear-gradient(180deg, rgba(14, 13, 12, 0.35) 0%, transparent 30%, transparent 70%, rgba(14, 13, 12, 0.45) 100%);
}

.canvas-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  clip-path: circle(12% at 50% 50%);
  opacity: 1;
  will-change: clip-path;
}

#exp-canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#dark-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 13, 12, 0.9);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}

.marquee-wrap {
  position: absolute;
  top: 38%;
  left: 0;
  width: 100%;
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
}

.panels-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.marquee-text {
  white-space: nowrap;
  font-family: Vazirmatn, sans-serif;
  font-weight: 100;
  font-size: clamp(3.5rem, 11vw, 9rem);
  letter-spacing: 0.08em;
  color: rgba(194, 160, 106, 0.18);
  line-height: 1;
}

#scroll-container {
  position: relative;
  height: 650vh;
  pointer-events: none;
}

.scroll-section {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  width: 100%;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.scroll-section.is-active,
.scroll-section.is-shown {
  opacity: 1;
  visibility: visible;
}

.scroll-section .section-inner,
.scroll-section .cta-button {
  pointer-events: auto;
}

.scroll-section .section-inner {
  pointer-events: auto;
}

.align-start {
  justify-content: flex-start;
  padding: 0 6vw;
}

.align-end {
  justify-content: flex-end;
  padding: 0 6vw;
}

.align-start .section-inner,
.align-end .section-inner {
  max-width: min(420px, 86vw);
  padding: 28px 24px;
  background: rgba(14, 13, 12, 0.78);
  border: 1px solid rgba(194, 160, 106, 0.22);
  backdrop-filter: blur(10px);
}

.section-stats {
  justify-content: center;
  padding-inline: 8vw;
}

.scroll-label {
  display: block;
  margin-bottom: 16px;
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.28em;
  color: #c2a06a;
}

.scroll-heading {
  margin: 0;
  font-family: Vazirmatn, sans-serif;
  font-weight: 200;
  font-size: clamp(1.75rem, 3.4vw, 3rem);
  line-height: 1.35;
  color: #f7f5f2;
}

.scroll-body {
  margin-top: 16px;
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.9;
  color: rgba(247, 245, 242, 0.62);
}

.scroll-note {
  display: inline-block;
  margin-top: 20px;
  font-size: 0.8rem;
  font-weight: 300;
  color: #d4bc8e;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  text-align: center;
}

.stat-number {
  display: block;
  font-family: Vazirmatn, sans-serif;
  font-weight: 200;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  color: #c2a06a;
  line-height: 1;
}

.stat-suffix {
  font-size: 1.25rem;
  color: #d4bc8e;
}

.stat-label {
  display: block;
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 300;
  color: rgba(247, 245, 242, 0.55);
}

.cta-persist .section-inner {
  text-align: center;
  max-width: 36rem;
  margin-inline: auto;
  padding: 32px;
  pointer-events: auto;
}

.cta-persist .cta-button {
  display: inline-flex;
  margin-top: 24px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  background: #c2a06a;
  color: #0e0d0c;
  padding: 14px 28px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease;
}

.cta-persist .cta-button:hover {
  background: #d4bc8e;
}

@media (max-width: 768px) {
  #scroll-container {
    height: 520vh;
  }

  .align-start,
  .align-end {
    justify-content: center;
    padding-inline: 5vw;
  }

  .align-start .section-inner,
  .align-end .section-inner {
    max-width: none;
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .marquee-text {
    font-size: 14vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .canvas-wrap {
    clip-path: none !important;
    opacity: 0.35;
  }
}
