/* ============================================
   KINGDOM WORKSHOP — Homepage-Specific Styles
   ============================================ */

/* ============================================
   LOADER
   ============================================ */

#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

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

.loader-brand {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: 2.5rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

#loader-bar {
  width: 200px;
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 1px;
  overflow: hidden;
}

#loader-fill {
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

#loader-percent {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* ============================================
   HERO (standalone 100vh)
   ============================================ */

.hero-standalone {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0 0 4rem 5vw;
  background: var(--bg-primary);
  z-index: 10;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0.65;
  z-index: 0;
}

.hero-standalone::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.0) 0%,
    rgba(10, 10, 10, 0.25) 30%,
    rgba(10, 10, 10, 0.65) 70%,
    var(--bg-primary) 100%
  );
  z-index: 1;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  position: relative;
  z-index: 2;
}

.scroll-indicator {
  z-index: 2;
}

.hero-heading {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: clamp(5rem, 14vw, 14rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-align: left;
  color: var(--text-primary);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.7), 0 4px 40px rgba(0, 0, 0, 0.5);
}

.hero-heading .word {
  display: block;
  opacity: 0;
  transform: translateY(40px);
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.5vw, 1.25rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(20px);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
}

.scroll-indicator {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.5;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ============================================
   CANVAS
   ============================================ */

.canvas-wrap {
  position: fixed;
  top: 0;
  right: 0;
  width: 50vw;
  height: 100vh;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
}

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

/* ============================================
   BLUE OVERLAY
   ============================================ */

#blue-overlay {
  position: fixed;
  inset: 0;
  z-index: 4;
  background: linear-gradient(
    135deg,
    rgba(13, 31, 34, 0.85) 0%,
    rgba(13, 31, 34, 0.65) 50%,
    rgba(13, 31, 34, 0.85) 100%
  );
  opacity: 0;
  pointer-events: none;
}

/* ============================================
   DARK OVERLAY
   ============================================ */

#dark-overlay {
  position: fixed;
  inset: 0;
  z-index: 6;
  background: var(--bg-primary);
  opacity: 0;
  pointer-events: none;
}

/* ============================================
   MARQUEE
   ============================================ */

.marquee-wrap {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  z-index: 5;
  width: 100%;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.marquee-text {
  font-family: var(--font-display);
  font-size: clamp(6rem, 12vw, 14vw);
  white-space: nowrap;
  color: rgba(232, 228, 222, 0.08);
  letter-spacing: 0.04em;
  line-height: 1;
  will-change: transform;
}

/* ============================================
   SCROLL CONTAINER
   ============================================ */

#scroll-container {
  position: relative;
  height: 650vh;
  z-index: 7;
}

/* ============================================
   SCROLL SECTIONS
   ============================================ */

.scroll-section {
  position: absolute;
  width: 100%;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.scroll-section.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Side-aligned text zones */
.align-left {
  padding-left: 8vw;
  padding-right: 55vw;
  justify-content: flex-start;
}

.align-right {
  padding-left: 55vw;
  padding-right: 5vw;
  justify-content: flex-end;
}

.align-left .section-inner,
.align-right .section-inner {
  max-width: 40vw;
}

/* ============================================
   STATS SECTION
   ============================================ */

.section-stats {
  justify-content: center;
  text-align: center;
  padding: 0 5vw;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  max-width: 1100px;
  width: 100%;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.stat-number {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: clamp(3rem, 5vw, 4.5rem);
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1;
}

.stat-suffix {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stat-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* ============================================
   BLOG LIST
   ============================================ */

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 1rem;
}

.blog-item {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid rgba(232, 228, 222, 0.08);
  transition: border-color 0.3s ease;
}

.blog-item:first-child {
  border-top: 1px solid rgba(232, 228, 222, 0.08);
}

.blog-item:hover {
  border-color: var(--accent);
}

.blog-date {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  min-width: 70px;
  flex-shrink: 0;
}

.blog-title {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-primary);
  transition: color 0.3s ease, transform 0.3s ease;
}

.blog-item:hover .blog-title {
  color: var(--accent);
  transform: translateX(4px);
}

/* ============================================
   CTA SECTION
   ============================================ */

.section-cta {
  justify-content: center;
  text-align: center;
}

.section-cta .section-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 600px;
}

.section-cta .section-heading {
  font-size: clamp(3.5rem, 7vw, 6rem);
  white-space: nowrap;
}

.section-cta .cta-button {
  margin-bottom: 2rem;
}

.cta-contact {
  margin-top: 2rem;
}

.cta-contact a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(232, 228, 222, 0.15);
  padding-bottom: 2px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.cta-contact a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.cta-socials {
  margin-top: 1.5rem;
  display: flex;
  gap: 1.5rem;
}

.cta-socials a {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.cta-socials a:hover {
  color: var(--accent);
}

/* ============================================
   PROGRESS TRACKER (desktop only)
   ============================================ */

.progress-tracker {
  position: fixed;
  left: 2.5vw;
  top: 50%;
  transform: translateY(-50%);
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 50vh;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.progress-track {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
}

.progress-track-bg {
  position: absolute;
  inset: 0;
  background: rgba(232, 228, 222, 0.1);
  border-radius: 1px;
}

.progress-track-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: var(--accent);
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(39, 182, 196, 0.5);
  transition: height 0.15s ease-out;
}

.progress-node {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
}

.progress-node[data-index="1"] { top: 0%; }
.progress-node[data-index="2"] { top: 25%; }
.progress-node[data-index="3"] { top: 50%; }
.progress-node[data-index="4"] { top: 75%; }
.progress-node[data-index="5"] { top: 100%; }

.progress-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(232, 228, 222, 0.12);
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.progress-circle span,
.progress-circle svg {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(232, 228, 222, 0.15);
  transition: color 0.4s ease;
}

.progress-node.is-active .progress-circle {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(39, 182, 196, 0.4);
}

.progress-node.is-active .progress-circle span,
.progress-node.is-active .progress-circle svg {
  color: var(--accent);
}

/* ============================================
   TABLET (< 1024px)
   ============================================ */

@media (max-width: 1024px) {
  .canvas-wrap {
    width: 45vw;
  }

  .align-left {
    padding-right: 48vw;
  }

  .align-right {
    padding-left: 48vw;
    padding-right: 5vw;
  }
}

/* ============================================
   MOBILE (< 768px)
   ============================================ */

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

  .canvas-wrap {
    width: 100vw;
    height: 100svh;
    right: 0;
    left: 0;
  }

  .hero-standalone {
    padding: 0 0 3rem 4vw;
  }

  .hero-heading {
    font-size: clamp(3.5rem, 16vw, 7rem);
  }

  .hero-tagline {
    font-size: clamp(0.85rem, 3.5vw, 1.1rem);
    padding: 0 2rem 0 0;
  }

  .scroll-indicator {
    bottom: -1.5rem;
  }

  .align-left,
  .align-right {
    padding-left: 0;
    padding-right: 0;
    justify-content: center;
  }

  .align-left .section-inner,
  .align-right .section-inner {
    max-width: 100%;
    padding: 2.5rem 6vw;
    background: rgba(10, 10, 10, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(39, 182, 196, 0.1);
    border-bottom: 1px solid rgba(39, 182, 196, 0.1);
  }

  .section-heading {
    font-size: clamp(2.2rem, 8vw, 3rem);
  }

  .section-body {
    font-size: 1rem;
    max-width: 100%;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 0 4vw;
  }

  .stat-number {
    font-size: clamp(2.5rem, 10vw, 3.5rem);
  }

  .blog-item {
    flex-direction: column;
    gap: 0.25rem;
  }

  .marquee-text {
    font-size: clamp(3rem, 10vw, 6rem);
  }

  .section-cta {
    padding: 0 6vw;
  }

  .section-cta .section-inner {
    background: rgba(10, 10, 10, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 2.5rem 6vw;
    border-top: 1px solid rgba(39, 182, 196, 0.1);
    border-bottom: 1px solid rgba(39, 182, 196, 0.1);
  }

  .section-cta .section-heading {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }
}

/* ============================================
   SMALL MOBILE (< 480px)
   ============================================ */

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

  .hero-standalone {
    padding: 0 0 2rem 4vw;
  }

  .hero-heading {
    font-size: clamp(3rem, 15vw, 5rem);
  }

  .section-heading {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .stat-number {
    font-size: clamp(2rem, 9vw, 3rem);
  }
}

@media (max-width: 768px) {
  .progress-tracker {
    display: none;
  }
}
