/**
 * Homepage "How To Play" — uses theme tokens from style.css
 */
#how-it-works.hp-htp-section {
  padding: 3rem 0;
  background: var(--bg-color, var(--dark-bg));
  overflow-x: hidden;
}

.hp-htp-inner {
  max-width: 1060px;
  margin: 0 auto;
  position: relative;
}

.hp-htp-eyebrow {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3.5px;
  color: var(--arcade-gold-dark);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hp-htp-title {
  font-family: "Barlow Condensed", "Rajdhani", var(--font-heading), sans-serif;
  font-weight: 900;
  font-style: italic;
  font-size: clamp(32px, 5vw, 56px);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--arcade-gold);
  text-align: center;
  line-height: 1;
  text-shadow: 0 0 40px rgba(var(--brand-secondary-rgb), 0.2);
  margin: 0;
}

.hp-htp-sub {
  text-align: center;
  color: var(--text-muted, var(--text-dim));
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-top: 10px;
}

.hp-htp-rule {
  width: 70px;
  height: 3px;
  background: linear-gradient(
    90deg,
    #fff47c,
    rgba(var(--brand-secondary-rgb), 0.85) 10%,
    #fff47c 22%,
    rgba(var(--brand-secondary-rgb), 0.78) 32%,
    #fff47c,
    rgba(var(--brand-secondary-rgb), 0.86),
    #fff47c,
    rgba(var(--brand-secondary-rgb), 0.8) 80%,
    #fff47c
  );
  border-radius: 99px;
  margin: 16px auto 56px;
}

.hp-htp-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
}

.hp-htp-steps::before {
  content: "";
  position: absolute;
  top: 72px;
  left: calc(16.666% + 20px);
  right: calc(16.666% + 20px);
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--arcade-gold-dark) 15%,
    var(--arcade-gold-dark) 85%,
    transparent
  );
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.hp-htp-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 clamp(12px, 3vw, 36px);
  position: relative;
  z-index: 1;
}

.hp-htp-step-num-wrap {
  position: relative;
  margin-bottom: 24px;
}

.hp-htp-step-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid rgba(var(--brand-secondary-rgb), 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--darker-bg, #050506);
  position: relative;
  transition: border-color 0.3s, box-shadow 0.3s;
  cursor: default;
}

.hp-htp-step-ring::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: linear-gradient(
    90deg,
    #fff47c,
    rgba(var(--brand-secondary-rgb), 0.85) 10%,
    #fff47c 22%,
    rgba(var(--brand-secondary-rgb), 0.78) 32%,
    #fff47c,
    rgba(var(--brand-secondary-rgb), 0.86),
    #fff47c,
    rgba(var(--brand-secondary-rgb), 0.8) 80%,
    #fff47c
  );
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
}

.hp-htp-step:hover .hp-htp-step-ring {
  border-color: transparent;
  box-shadow: 0 0 28px rgba(var(--brand-secondary-rgb), 0.4);
}

.hp-htp-step:hover .hp-htp-step-ring::before {
  opacity: 1;
}

.hp-htp-step-num {
  font-family: "Barlow Condensed", "Rajdhani", sans-serif;
  font-weight: 900;
  font-size: 30px;
  color: var(--arcade-gold);
  line-height: 1;
  letter-spacing: -1px;
}

.hp-htp-step-icon-wrap {
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  
  display: flex;
  align-items: center;
  justify-content: center;
  
  font-size: 14px;
  line-height: 1;
}

.hp-htp-step-card {
  background: linear-gradient(160deg, rgba(var(--brand-secondary-rgb), 0.08) 0%, var(--darker-bg, #050506) 100%);
  border: 1.5px solid rgba(var(--brand-secondary-rgb), 0.3);
  border-radius: 18px;
  padding: 28px 20px 24px;
  width: 100%;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  position: relative;
  overflow: hidden;
}

.hp-htp-step-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    #fff47c,
    rgba(var(--brand-secondary-rgb), 0.85) 10%,
    #fff47c 22%,
    rgba(var(--brand-secondary-rgb), 0.78) 32%,
    #fff47c,
    rgba(var(--brand-secondary-rgb), 0.86),
    #fff47c,
    rgba(var(--brand-secondary-rgb), 0.8) 80%,
    #fff47c
  );
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.hp-htp-step:hover .hp-htp-step-card {
  border-color: rgba(var(--brand-secondary-rgb), 0.45);
  box-shadow: 0 0 32px rgba(var(--brand-secondary-rgb), 0.18), 0 8px 32px rgba(0, 0, 0, 0.5);
  transform: translateY(-4px);
}

.hp-htp-step:hover .hp-htp-step-card::after {
  transform: scaleX(1);
}

.hp-htp-step-card-watermark {
  position: absolute;
  bottom: -10px;
  right: 10px;
  font-family: "Barlow Condensed", "Rajdhani", sans-serif;
  font-weight: 900;
  font-size: 90px;
  color: rgba(var(--brand-secondary-rgb), 0.06);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  letter-spacing: -2px;
}

.hp-htp-step-label {
  font-family: "Barlow Condensed", "Rajdhani", sans-serif;
  font-weight: 900;
  font-style: italic;
  font-size: clamp(18px, 2.5vw, 24px);
  color: var(--text-color, var(--text-main));
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
  line-height: 1.1;
}

.hp-htp-step-desc {
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-muted, var(--text-dim));
  font-weight: 400;
}

.hp-htp-cta {
  display: flex;
  justify-content: center;
  margin-top: 52px;
}

.hp-htp-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, #f5d020 0%, var(--arcade-gold) 40%, var(--arcade-gold-dark) 100%);
  border: none;
  border-radius: 12px;
  padding: 16px 40px;
  font-family: "Barlow Condensed", "Rajdhani", sans-serif;
  font-weight: 900;
  font-size: clamp(14px, 2vw, 18px);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--darker-bg, #1a0800);
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(var(--brand-secondary-rgb), 0.45), 0 1px 0 rgba(255, 240, 100, 0.3) inset;
  transition: opacity 0.2s, transform 0.15s;
  text-decoration: none;
}

.hp-htp-cta-btn:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  color: var(--darker-bg, #1a0800);
}

.hp-htp-cta-btn:active {
  transform: translateY(0);
}

.hp-htp-cta-arrow {
  font-size: 18px;
  transition: transform 0.2s;
}

.hp-htp-cta-btn:hover .hp-htp-cta-arrow {
  transform: translateX(4px);
}

@media (max-width: 680px) {
  .hp-htp-steps {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hp-htp-steps::before {
    display: none;
  }

  .hp-htp-step {
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
    gap: 20px;
    padding: 0 0 24px;
  }

  .hp-htp-step:last-child {
    padding-bottom: 0;
  }

  .hp-htp-step-num-wrap {
    flex-shrink: 0;
    margin-bottom: 0;
  }

  .hp-htp-step-ring {
    width: 64px;
    height: 64px;
  }

  .hp-htp-step-num {
    font-size: 24px;
  }

  .hp-htp-step-card {
    flex: 1;
    text-align: left;
  }

  .hp-htp-step-card-watermark {
    display: none;
  }
}

/* Light theme */
.light-theme #how-it-works.hp-htp-section {
  background: var(--bg-color, var(--dark-bg));
}

.light-theme .hp-htp-step-ring {
  background: var(--card-bg, #fff);
  border-color: rgba(0, 0, 0, 0.12);
}

.light-theme .hp-htp-step-card {
  background: linear-gradient(160deg, rgba(var(--brand-secondary-rgb), 0.08) 0%, var(--card-bg, #fff) 100%);
  border-color: rgba(0, 0, 0, 0.08);
}

.light-theme .hp-htp-step-label {
  color: var(--text-color, #1a1a1b);
}

.light-theme .hp-htp-step-desc {
  color: var(--text-muted, #64748b);
}
