:root {
  --bg1: #0a0a0a;
  --bg2: #1a1a1a;
  --bg3: #2a2a2a;
  --fg0: #ffffff;
  --fg1: #e0e0e0;
  --fg3: #a0a0a0;
  --separator1: rgba(255, 255, 255, 0.1);
  --separator2: rgba(255, 255, 255, 0.2);
  --accent: #1fd5f9;
}

.how-it-works-section {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  color: var(--fg0);
  line-height: 1.6;
  width: 100%;
}

/* Utility Classes */
.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.flex-row {
  flex-direction: row;
}
.items-center {
  align-items: center;
}
.items-start {
  align-items: flex-start;
}
.items-end {
  align-items: flex-end;
}
.justify-center {
  justify-content: center;
}
.justify-start {
  justify-content: flex-start;
}
.justify-end {
  justify-content: flex-end;
}
.gap-1 {
  gap: 0.25rem;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-4 {
  gap: 1rem;
}
.gap-8 {
  gap: 2rem;
}
.w-full {
  width: 100%;
}
.h-full {
  height: 100%;
}
.relative {
  position: relative;
}
.absolute {
  position: absolute;
}
.z-10 {
  z-index: 10;
}
.z-20 {
  z-index: 20;
}
.hidden {
  display: none;
}
.overflow-hidden {
  overflow: hidden;
}
.rounded-lg {
  border-radius: 0.5rem;
}
.rounded-md {
  border-radius: 0.375rem;
}
.rounded-full {
  border-radius: 9999px;
}
.border {
  border: 1px solid var(--separator1);
}
.bg-bg1 {
  background: var(--bg1);
}
.bg-bg2 {
  background: var(--bg2);
}
.text-fg0 {
  color: var(--fg0);
}
.text-fg1 {
  color: var(--fg1);
}
.text-fg3 {
  color: var(--fg3);
}
.font-light {
  font-weight: 300;
}
.font-semibold {
  font-weight: 600;
}
.font-bold {
  font-weight: 700;
}
.font-mono {
  font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas,
    "Courier New", monospace;
}
.text-xs {
  font-size: 0.75rem;
}
.text-sm {
  font-size: 0.875rem;
}
.text-3xl {
  font-size: 1.875rem;
}
.text-4xl {
  font-size: 2.25rem;
}
.leading-snug {
  line-height: 1.375;
}
.tracking-tight {
  letter-spacing: -0.025em;
}
.text-pretty {
  text-wrap: pretty;
}
.cursor-pointer {
  cursor: pointer;
}
.transition-all {
  transition: all 0.2s ease;
}
.ease-out {
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}
.duration-200 {
  transition-duration: 200ms;
}
.duration-300 {
  transition-duration: 300ms;
}
.active\:scale-\[0\.99\]:active {
  transform: scale(0.99);
}

/* Main Section */
.how-it-works-section {
  height: 300vh;
}

.sticky {
  position: sticky;
  top: 112.5px;
}

.sticky-container {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid var(--separator1);
  height: 580px;
  background: var(--bg1);
  position: relative;
}

.bg-pattern {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  min-width: 1280px;
  height: 100%;
  /* z-index: -10; */
  pointer-events: none;
  /* background-image: radial-gradient(
            circle at 25% 25%,
            rgba(31, 213, 249, 0.1) 0%,
            transparent 50%
          ),
          radial-gradient(
            circle at 75% 75%,
            rgba(31, 213, 249, 0.05) 0%,
            transparent 50%
          ),
          linear-gradient(
            45deg,
            transparent 49%,
            rgba(255, 255, 255, 0.02) 50%,
            transparent 51%
          ); */
  background-size: 200px 200px, 300px 300px, 20px 20px;
}

.content-container {
  display: flex;
  flex-direction: row;
  height: 100%;
}

.left-content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 3rem 2rem 2rem 2rem;
  flex: 0 0 387px;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.025em;
  z-index: 20;
}

.title-highlight {
  opacity: 1;
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(3, 92, 109, 0.8));
}

.steps-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

.step-group {
  display: flex;
  flex-direction: column;
  /* gap: 0.25rem; */
}

.step-content {
  display: flex;
  gap: 0.75rem;
}

.step-indicator {
  position: relative;
}

.step-number {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--separator1);
  background: var(--bg2);
  color: var(--fg0);
  font-family: "SF Mono", Monaco, monospace;
  font-size: 10px;
  font-weight: 700;
  transition: all 300ms ease;
  z-index: 2;
}

.step-number.active {
  background: var(--fg0);
  color: var(--bg1);
}

.progress-circle {
  position: absolute;
  left: -5px;
  top: -5px;
  width: 30px;
  height: 30px;
  color: var(--fg1);
  z-index: 1;
  opacity: 0; /* Hide the progress circle completely */
  pointer-events: none;
}

.step-line {
  position: absolute;
  left: 50%;
  top: 20px;
  width: 1.5px;
  height: calc(100% - 8px);
  background: var(--fg1);
  transform: translateX(-50%) translateY(3px);
  transform-origin: top;
  transition: transform 200ms ease-out;
}

/* .step-line.hidden {
  transform: translateX(-50%) translateY(3px) scaleY(0);
} */

.step-text {
 
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.375;
  max-width: 20rem;
  color: var(--fg3);
  transition: all 300ms ease-out;
}

.step-text.active {
  color: var(--fg0);
  transform: translateX(4px);
}

.how-it-works-section .step-content-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.step-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  opacity: 0;
  transform: translateY(-5px);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-in, opacity 0.2s ease-in,
    transform 0.2s ease-in;
}

.step-group.active .step-bullets {
  opacity: 1;
  transform: translateY(0);
  max-height: 500px; /* set higher than your content's expected height */
  overflow: visible;
  /* transition: max-height 0.8s ease-out, opacity 0.6s ease-out,
    transform 0.6s ease-out; */
}

.step-bullets li {
  font-size: 0.75rem;
  color: var(--fg3);
  font-weight: 400;
  line-height: 1.4;
  position: relative;
  padding-left: 1rem;
}

.step-bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.step-group.active .step-bullets li {
  color: var(--fg1);
}

.step-description {
  max-width: 24rem;
  padding-left: 2.5rem;
  font-size: 0.875rem;
  color: var(--fg3);
  opacity: 0;
  transform: translateY(-10px);
  transition: all 300ms ease;
}

.step-description.active {
  opacity: 1;
  transform: translateY(0);
}

.bottom-links {
  display: flex;
  align-items: end;
  justify-content: end;
  gap: 0.5rem;
  flex: 1;
  z-index: 10;
}

.link-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid var(--separator1);
  background: var(--bg2);
  color: var(--fg1);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 200ms ease-out;
}

.link-button:hover {
  background: var(--bg3);
}

/* Right Content - 3D Visualization */
.right-content {
  position: absolute;
  left: 387px;
  top: 0;
  width: 864px;
  height: 580px;
  margin-left: -4rem;
}

.visualization-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.isometric-container {
  position: absolute;
  top: 120px;
  left: -72px;
  width: 100%;
  /* max-width: 20rem; */
  height: 100%;
  perspective: 1000px;
  opacity: 1;
}

.card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 160px;
  height: 160px;
  border-radius: 0.375rem;
  border: 1px solid var(--separator2);
  background: var(--bg1);
  cursor: pointer;
  transition: all 350ms ease-out;
  transform-style: preserve-3d;
}

.card-content {
  position: absolute;
  z-index: 10;
  width: 100%;
  height: 100%;
  opacity: 0.2;
  transition: opacity 300ms ease;
}
.card-content img {
  max-width: 100%;
  height: 100%;
}
.card.active .card-content {
  opacity: 1;
}

.card.active {
  border-color: var(--fg0);
}

.card-label {
  position: absolute;
  right: -1rem;
  bottom: 0.25rem;
  transform: translateX(100%);
  font-family: "SF Mono", Monaco, monospace;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--fg0);
  opacity: 0;
  transition: opacity 300ms ease;
}

.card.active .card-label {
  opacity: 1;
}

.card-grid-lines {
  position: absolute;
  bottom: 0;
  left: 100%;
  width: 1000px;
  height: 1px;
  border-bottom: 1px dashed var(--separator1);
  z-index: 0;
}

.card-grid-lines-vertical {
  position: absolute;
  right: 0;
  top: 100%;
  width: 1px;
  height: 1000px;
  border-right: 1px dashed var(--separator1);
  z-index: 0;
}

.card-glow-top {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 10rem;
  background: linear-gradient(
    rgba(255, 255, 255, 0) 0%,
    rgb(255, 255, 255) 100%
  );
  transform: translateY(-100%) skewX(-40deg);
  transform-origin: center bottom;
  transition: opacity 100ms ease-out;
  opacity: 0;
  pointer-events: none;
}

.card-glow-right {
  position: absolute;
  right: 0;
  top: 0;
  width: 8rem;
  height: 100%;
  background: linear-gradient(
    -90deg,
    rgba(255, 255, 255, 0) 0%,
    rgb(255, 255, 255) 100%
  );
  transform: translateX(100%) skewY(-50deg) translateY(-76px);
  transform-origin: center bottom;
  transition: opacity 100ms ease-out;
  opacity: 0;
  pointer-events: none;
}

.card.active .card-glow-top,
.card.active .card-glow-right {
  opacity: 0.1;
  transition-duration: 1000ms;
}

.card-border-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 0.5rem;
  border: 1px solid whitesmoke;
  pointer-events: none;
  opacity: 0;
  /* animation: waveForward 5s ease-in-out infinite; */
  z-index: 1;
  /* filter: blur(0.5px); */
}

.card.active .card-border-glow {
  animation: waveForward 5s ease-in-out infinite;
}

/* Card Positions */
.card-1 {
  transform: translate(calc(-50% + 0px), calc(-59% + 0px)) skewX(0deg)
    skewY(30deg);
  z-index: 1000;
  transition-delay: 0.2s;
}

.card-2 {
  transform: translate(calc(-50% + 140px), calc(-59% - 85.4px)) skewX(0deg)
    skewY(30deg);
  z-index: 999;
  transition-delay: 0.15s;
}

.card-3 {
  transform: translate(calc(-50% + 190px), calc(-59% - 115.9px)) skewX(0deg)
    skewY(30deg);
  z-index: 998;
  transition-delay: 0.1s;
}

.card-4 {
  transform: translate(calc(-50% + 240px), calc(-59% - 146.4px)) skewX(0deg)
    skewY(30deg);
  z-index: 997;
  transition-delay: 0.05s;
}

.card-5 {
  transform: translate(calc(-50% + 290px), calc(-59% - 176.9px)) skewX(0deg)
    skewY(30deg);
  z-index: 996;
  transition-delay: 0s;
}

.card-6 {
  transform: translate(calc(-50% + 340px), calc(-59% - 207.4px)) skewX(0deg)
    skewY(30deg);
  z-index: 995;
  transition-delay: 0.05s;
}

/* Audio Visualizer */
.audio-visualizer {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding-bottom: 1rem;
  gap: 0.5rem;
}

.audio-bar {
  width: 8%;
  background: white;
  border-radius: 9999px;
  height: 10.2%;
  transition: height 0.1s ease-in-out;
}

.speech-bubble {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--fg0);
  color: var(--bg1);
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  z-index: 50;
}

/* 3D Canvas */
.canvas-container {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--bg1);
  border-radius: 0.375rem;
  overflow: hidden;
}

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

/* Mobile Styles */
@media (max-width: 1024px) {
  .sticky-container {
    flex-direction: column;
    height: auto;
  }

  .left-content {
    flex: none;
    padding: 2rem 1rem;
  }
  .sticky {
    top: 94.5px;
  }

  .right-content {
    position: relative;
    left: 0;
    width: 100%;
    height: 400px;
    margin-left: 0;
  }

  .isometric-container {
    /* position: relative;
          top: 0;
          left: 0; */
    max-width: 20rem;
    height: 400px;
	   top: 0;
  }
  .content-container {
    flex-direction: column;
  }

  .bottom-links {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    align-items: start;
    justify-content: start;
  }

  .hidden {
    display: none;
  }

  .lg\:block {
    display: none;
  }

  .lg\:hidden {
    display: none;
  }

  .lg\:flex {
    display: flex;
  }
  .card {
    width: 120px;
    height: 120px;
  }
  .bottom-links {
    display: none;
  }
}

/* Animations */
@keyframes audioPulse {
  0%,
  100% {
    height: 10.2%;
  }
  25% {
    height: 30%;
  }
  50% {
    height: 60%;
  }
  75% {
    height: 40%;
  }
}

.audio-bar.animate {
  animation: audioPulse 1.5s ease-in-out infinite;
}

.audio-bar:nth-child(1).animate {
  animation-delay: 0s;
}
.audio-bar:nth-child(2).animate {
  animation-delay: 0.1s;
}
.audio-bar:nth-child(3).animate {
  animation-delay: 0.2s;
}
.audio-bar:nth-child(4).animate {
  animation-delay: 0.3s;
}
.audio-bar:nth-child(5).animate {
  animation-delay: 0.4s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.card.active {
  /* animation: float 3s ease-in-out infinite; */
}

/* Letter Animation */
.letter {
  display: inline-block;
  font-family: "SF Mono", Monaco, monospace;
  font-size: 10px;
  text-transform: uppercase;
  line-height: 1;
}

/* Animate shrinking inward */
@keyframes waveForward {
  0% {
    opacity: 0.6;
    transform: scale(1) translate(0px, 0px);
  }
  20% {
    opacity: 0.6;
    transform: scale(1) translate(0px, -3px);
  }
  40% {
    opacity: 0.6;
    transform: scale(1) translate(60px, -70px);
  }
  60% {
    opacity: 0.6;
    transform: scale(1) translate(90px, -100px);
  }
  80% {
    opacity: 0.05;
    transform: scale(1) translate(95px, -116px);
  }
  100% {
    opacity: 0.02;
    transform: scale(0) translate(100px, -125px);
  }
}

.card.active .layer-1 {
  animation-delay: 0s;
}
.card.active .layer-2 {
  animation-delay: 1s;
}
.card.active .layer-3 {
  animation-delay: 2s;
}
.card.active .layer-4 {
  animation-delay: 3s;
}
.card.active .layer-5 {
  animation-delay: 4s;
}
