/* ═══════════════════════════════════════════════════
   How It Works – Interactive Section
   ═══════════════════════════════════════════════════ */

/* Keyframe Animations */
@keyframes hiw-scan-line {
  0%   { top: 0; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

@keyframes hiw-eq-bar {
  0%   { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

@keyframes hiw-fade-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

@keyframes hiw-float-in-right {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes hiw-float-in-left {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Base layout */
.hiw-section {
  min-height: 100vh;
  background: #0a0a1a;
  font-family: 'DM Sans', sans-serif;
  color: #f0eef8;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 24px;
}

.hiw-main {
  width: 100%;
  max-width: 1000px;
  display: flex;
  gap: 32px;
  align-items: stretch;
}

.hiw-mockup-wrap {
  flex: 1 1 55%;
  background: #0e0e24;
  border-radius: 20px;
  border: 1px solid rgba(140,120,255,0.12);
  overflow: hidden;
  position: relative;
}

.hiw-content-wrap {
  flex: 1 1 40%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 0;
}

/* Step nav */
.hiw-step-nav {
  display: flex;
  gap: 4px;
  margin-bottom: 32px;
  background: #131332;
  border-radius: 14px;
  padding: 4px;
  border: 1px solid rgba(140,120,255,0.06);
}

.hiw-step-btn {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  transition: all 0.2s ease;
}

/* Progress bar */
.hiw-progress-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(140,120,255,0.06);
  z-index: 10;
}

.hiw-progress-fill {
  height: 100%;
  background: #7c5cfc;
  width: 0%;
}

/* Mockup panels — inactive are absolute+hidden, active flows normally to size the container */
.hiw-mockup-panel {
  position: absolute;
  inset: 0;
  display: none;
}

.hiw-mockup-panel.active {
  position: relative;
  inset: auto;
  display: block;
  width: 100%;
  min-height: 420px;
}

/* See More */
.hiw-see-more-btn {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #7c5cfc;
  font-family: 'DM Sans', sans-serif;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(124,92,252,0.08);
  border: 1px solid rgba(124,92,252,0.13);
  transition: all 0.2s ease;
}

.hiw-see-more-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16,1,0.3,1);
}

.hiw-see-more-body.open {
  max-height: 300px;
}

/* Step dots */
.hiw-dot {
  all: unset;
  cursor: pointer;
  height: 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

/* Floating elements */
.hiw-floating {
  transition: all 0.6s cubic-bezier(0.16,1,0.3,1);
}

/* ─── Responsive ─── */

@media (max-width: 860px) {
  .hiw-main {
    flex-direction: column;
  }
  .hiw-mockup-wrap {
    flex: none;
  }
  .hiw-content-wrap {
    flex: none;
    padding: 24px 0 0;
  }
  .hiw-step-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .hiw-step-nav::-webkit-scrollbar {
    display: none;
  }
  .hiw-section {
    padding: 60px 16px;
  }
}

@media (max-width: 640px) {
  .hiw-section {
    padding: 48px 12px;
  }
  .hiw-mockup-wrap {
    /* height driven by active panel content */
  }
  .hiw-step-btn {
    padding: 8px 14px;
    font-size: 11px;
    gap: 6px;
  }
  .hiw-step-btn .hiw-step-circle {
    width: 18px;
    height: 18px;
    font-size: 9px;
  }
  /* Hide some floating elements on small screens */
  .hiw-driver-indicators,
  .hiw-spotify-badge {
    display: none !important;
  }
}
