/* How it works page (how-it-works.html). New classes are namespaced hw-*.
   Loaded only on this page, after css/styles.css. No animations.
   Numbered circles and colours mirror the How it works video. */

.hw-hero {
  background: linear-gradient(180deg, var(--hero-top) 0%, var(--hero-mid) 48%, var(--hero-bottom) 100%);
  color: #fff;
  padding: 48px 0 56px;
}

.hw-hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  gap: 32px;
  align-items: center;
}

@media (min-width: 960px) {
  .hw-hero-inner {
    grid-template-columns: 1fr 1.15fr;
    gap: 40px;
  }
}

.hw-kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 16px;
}

.hw-hero h1 {
  font-size: 34px;
  line-height: 40px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: #fff;
  margin-bottom: 14px;
}

.hw-hero-sub {
  font-size: 17px;
  line-height: 26px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 18px;
}

.hw-hero-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.hw-hero-chips li {
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 6px 12px;
}

.hw-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hw-video {
  margin: 0;
  scroll-margin-top: 90px;
}

.hw-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: var(--purple-deep);
  box-shadow: 0 18px 40px rgba(10, 4, 30, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hw-video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: var(--purple-deep);
}

.hw-video figcaption {
  font-size: 13.5px;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 10px;
}

/* Overview strip: six numbered dots, like the top of each video scene */
.hw-overview {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.hw-ov-row {
  list-style: none;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 0;
  -webkit-overflow-scrolling: touch;
}

.hw-ov-row li {
  flex: 0 0 auto;
}

.hw-ov-row a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--purple);
  background: var(--chip-bg);
  border-radius: 999px;
  padding: 6px 14px 6px 6px;
  white-space: nowrap;
  text-decoration: none;
}

.hw-ov-row a:hover,
.hw-ov-row a:focus-visible {
  background: var(--line);
}

.hw-ov-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

@media (min-width: 1000px) {
  .hw-ov-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    overflow: visible;
  }

  .hw-ov-row a {
    display: flex;
    height: 100%;
    white-space: normal;
    line-height: 18px;
    border-radius: 16px;
    padding: 8px 10px 8px 8px;
  }

  .hw-ov-num {
    flex: 0 0 26px;
  }
}

/* Headings */
.hw-h2 {
  font-size: 28px;
  line-height: 34px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--ink);
  margin: 0 0 8px;
}

.hw-lede {
  font-size: 16.5px;
  line-height: 25px;
  color: var(--muted);
  max-width: 46em;
  margin: 0 0 24px;
}

.hw-steps-section {
  padding: 48px 0 16px;
}

/* Step timeline */
.hw-steps {
  list-style: none;
  display: grid;
  gap: 0;
}

.hw-step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  scroll-margin-top: 90px;
}

.hw-rail {
  position: relative;
  display: flex;
  justify-content: center;
}

.hw-rail::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  margin-left: -2px;
  background: var(--line);
}

.hw-step:first-child .hw-rail::before {
  top: 24px;
}

.hw-step:last-child .hw-rail::before {
  bottom: auto;
  height: 24px;
}

.hw-num {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  font-style: italic;
  box-shadow: 0 0 0 6px var(--canvas);
}

.hw-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 20px 20px 18px;
  margin-bottom: 18px;
}

.hw-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.hw-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--chip-bg);
  color: var(--purple);
}

.hw-icon svg {
  width: 22px;
  height: 22px;
}

.hw-who {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--purple-mid);
}

.hw-card h3 {
  font-size: 20px;
  line-height: 26px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin: 0 0 6px;
}

.hw-card p {
  font-size: 15.5px;
  line-height: 24px;
  color: var(--ink);
  margin: 0;
}

.hw-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hw-chips li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--purple);
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px 5px 8px;
}

.hw-chips svg {
  width: 16px;
  height: 16px;
}

.hw-exits {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.hw-exits li {
  background: var(--purple);
  color: #fff;
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
}

.hw-exits strong {
  display: block;
  font-size: 16px;
  line-height: 20px;
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
}

.hw-exits span {
  display: block;
  font-size: 12.5px;
  line-height: 17px;
  color: #E4DCF5;
  margin-top: 2px;
}

@media (min-width: 760px) {
  .hw-step {
    grid-template-columns: 64px 1fr;
    gap: 20px;
  }

  .hw-num {
    width: 56px;
    height: 56px;
    font-size: 26px;
  }

  .hw-step:first-child .hw-rail::before {
    top: 28px;
  }

  .hw-step:last-child .hw-rail::before {
    height: 28px;
  }

  .hw-card {
    padding: 24px 26px 22px;
  }
}

/* Closing call to action */
.hw-cta {
  background: linear-gradient(180deg, var(--hero-mid) 0%, var(--hero-bottom) 100%);
  color: #fff;
  padding: 48px 0;
  text-align: center;
}

.hw-cta h2 {
  font-size: 28px;
  line-height: 34px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px;
}

.hw-cta p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 16px;
  line-height: 24px;
  margin: 0 auto 20px;
  max-width: 36em;
}

@media (min-width: 760px) {
  .hw-hero h1 {
    font-size: 42px;
    line-height: 48px;
  }
}
