/* How It Works — Figma journey page (osc-page + compare-challenges base) */

.hiw-intro {
  padding-block: 48px 56px;
}

.hiw-intro__copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 920px;
  margin-inline: auto;
  text-align: center;
}

.hiw-intro__copy p {
  margin: 0;
  color: #ccc;
  font-size: 16px;
  line-height: 26px;
  letter-spacing: -0.16px;
}

@media (min-width: 768px) {
  .hiw-intro__copy p {
    font-size: 18px;
    line-height: 28px;
  }
}

/* Step-by-step Process — Figma node 14871:9031 / 14992:8792 */
#step-by-step-process.osc-section {
  padding-block: 80px;
}

#step-by-step-process .osc-heading {
  margin-bottom: 40px;
}

#step-by-step-process .osc-heading h2 .gradient-text {
  background: linear-gradient(180deg, #fff 21.82%, #f98715 73.08%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hiw-process {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
}

@media (max-width: 639px) {
  .hiw-process {
    container-type: inline-size;
  }
}

.hiw-process__frame {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 518px;
  border-radius: 24px;
  overflow: hidden;
  isolation: isolate;
  background: #070400;
}

.hiw-process__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hiw-process__bg-img {
  position: absolute;
  inset: 0;
  /* Beat HTML width/height attrs (e.g. height="auto") so Step 623×1200 SVG fills 518px frame */
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: fill !important;
  display: block;
}

.hiw-process__bg-img[hidden] {
  display: none;
}

.hiw-process__bg-img--mobile {
  display: none;
}

@media (max-width: 639px) {
  .hiw-process__bg-img--desktop {
    display: none !important;
  }

  .hiw-process__bg-img--mobile:not([hidden]) {
    display: block;
  }
}

@media (min-width: 640px) {
  .hiw-process__bg-img--mobile {
    display: none !important;
  }
}

.hiw-process__stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  padding: 18px 24px 24px;
  margin-top: 0;
  box-sizing: border-box;
}

.hiw-process__tablist {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  flex: 0 0 68px;
  min-height: 68px;
  align-items: stretch;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.hiw-process__tab {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  padding: 20px 12px;
  border: 0;
  background: transparent;
  color: #ccc;
  font-family: inherit;
  font-size: 18px;
  font-weight: 400;
  line-height: 24px;
  text-align: center;
  cursor: pointer;
  transition: color 0.2s ease, font-weight 0.2s ease;
}

@media (min-width: 640px) {
  .hiw-process__tab {
    font-size: 20px;
  }
}

.hiw-process__tab.is-active {
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.2px;
}

@media (max-width: 639px) {
  .hiw-process__tab.is-active {
    line-height: 15px;
    letter-spacing: 0;
    font-weight: 600;
  }
}

.hiw-process__tab:focus-visible {
  outline: 2px solid #f98715;
  outline-offset: 2px;
}

.hiw-process__panel {
  display: none;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.hiw-process__panel.is-active {
  display: flex;
}

.hiw-process__step {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 90px;
  padding: 9px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.hiw-process__step h3 {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: 0;
}

.hiw-process__step p {
  margin: 0;
  color: #ccc;
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: -0.16px;
}

/* Figma 14992:8792 — 518×1200 (4 steps); Step Challenges tab 14846 = 5 rows (~624px total) */
@media (min-width: 640px) {
  .hiw-process__frame {
    height: 518px;
    min-height: 518px;
    max-height: 518px;
  }

  .hiw-process[data-active-tab="step"] .hiw-process__frame {
    height: 624px;
    min-height: 624px;
    max-height: 624px;
  }

  .hiw-process__tablist {
    flex: 0 0 68px;
    min-height: 68px;
  }

  .hiw-process__tab {
    min-height: 68px;
    padding: 20px 12px;
    font-size: 20px;
    line-height: 24px;
  }

  .hiw-process__stage {
    padding: 18px 24px 24px;
    overflow: hidden;
  }
}

@media (max-width: 639px) {
  .hiw-process__frame {
    min-height: 0;
    /* Match -m.svg corner radius (12 @ 351); avoid 24px clip vs orange fill. */
    border: 0;
    border-radius: calc(100cqw * 12 / 351);
    --hiw-m-chrome-h: calc(100cqw * 195 / 351);
    --hiw-tab-h: calc(100cqw * 44 / 351);
    --hiw-m-chrome-tail: calc(100cqw * (195 - 44) / 351);
    --hiw-tab-label-nudge: calc(-100cqw * 2 / 351);
    --hiw-tab-pad-top: calc(100cqw * 12 / 351);
  }

  /* -m SVG only in top chrome band (not stretched over full step list). */
  .hiw-process__bg {
    inset: auto 0 auto 0;
    top: 0;
    left: 0;
    right: 0;
    height: var(--hiw-m-chrome-h);
    overflow: hidden;
  }

  /* Chrome box matches 351×195 — fill avoids corner crop from cover + radius. */
  .hiw-process__bg-img--mobile:not([hidden]) {
    object-fit: fill !important;
    object-position: top center !important;
  }

  .hiw-process__tablist {
    flex: 0 0 var(--hiw-tab-h);
    min-height: var(--hiw-tab-h);
    gap: 0;
    align-items: stretch;
    /* Match -m.svg column splits: 129 | 117 | 105 (= 351) for Step / Instant / Sprint bumps */
    grid-template-columns: minmax(0, 129fr) minmax(0, 117fr) minmax(0, 105fr);
  }

  .hiw-process__tab {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 0 !important;
    height: 100%;
    box-sizing: border-box;
    width: 100%;
    padding: var(--hiw-tab-pad-top) 4px 0;
    font-size: 12px;
    line-height: 15px;
    white-space: nowrap;
    transform: translateY(var(--hiw-tab-label-nudge));
  }

  /* Active bump flat-top center ≠ grid cell center (-m.svg artboard 351). */
  .hiw-process[data-active-tab="step"] .hiw-process__tab[data-hiw-process-tab="step"] {
    transform: translateY(var(--hiw-tab-label-nudge)) translateX(calc(-100cqw * 6 / 351));
  }

  .hiw-process[data-active-tab="instant"] .hiw-process__tab[data-hiw-process-tab="instant"] {
    transform: translateY(var(--hiw-tab-label-nudge)) translateX(calc(-100cqw * 12 / 351));
  }

  /* Pull steps over SVG gradient tail (y 44–195) so tab row doesn’t float on orange band. */
  .hiw-process__stage {
    margin-top: calc(-1 * var(--hiw-m-chrome-tail));
    padding: calc(12px + var(--hiw-m-chrome-tail)) 16px 20px;
  }

  @media (min-width: 480px) {
    .hiw-process__tab {
      padding: var(--hiw-tab-pad-top) 6px 0;
      font-size: 13px;
      line-height: 16px;
    }

    .hiw-process__tab.is-active {
      line-height: 16px;
      letter-spacing: 0;
      font-weight: 600;
    }
  }

  .hiw-process__step {
    min-height: 0;
    padding: 14px 16px;
  }

  .hiw-process__step p {
    font-size: 14px;
    line-height: 20px;
  }
}

/* Compare section — Figma 14833:86893 */
#compare-challenges .osc-heading p {
  color: #999;
}

#compare-challenges .osc-heading h2 .gradient-text {
  background: linear-gradient(180deg, #fff 21.82%, #f98715 73.08%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hiw-compare-glance.cmp-glance__grid {
  align-items: stretch;
}

.hiw-compare-glance .cmp-glance-card {
  justify-content: flex-start;
  gap: 0;
  height: 100%;
}

.hiw-compare-glance .cmp-glance-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  gap: 24px;
}

.hiw-compare-glance .cmp-glance-card__summary {
  margin: 0;
  color: #ccc;
  font-size: 16px;
  line-height: 22px;
  letter-spacing: -0.16px;
}

.hiw-compare-glance .cmp-glance-card__learn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  color: #f98715;
  font-size: 14px;
  font-style: italic;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: -0.14px;
  text-decoration: none;
}

.hiw-compare-glance .cmp-glance-card__learn:hover {
  color: #ffb057;
}

.hiw-compare-glance .cmp-glance-card__learn svg {
  width: 16px;
  height: 16px;
}

.hiw-compare-cta {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

/* What Happens After — Figma 14833:87205 */
#after-you-pass .osc-heading p {
  color: #999;
}

#after-you-pass .osc-heading h2 .gradient-text {
  background: linear-gradient(180deg, #fff 21.82%, #f98715 73.08%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hiw-outcomes-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 0;
  color: #fff;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

@media (min-width: 1024px) {
  .hiw-outcomes-heading {
    line-height: 68px;
    letter-spacing: -0.56px;
  }
}

.hiw-outcomes-heading__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.hiw-outcomes__grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  align-items: stretch;
}

@media (min-width: 900px) {
  .hiw-outcomes__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.hiw-outcome-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: #070400;
  overflow: hidden;
}

.hiw-outcome-card__glow {
  position: absolute;
  left: 19px;
  top: -363px;
  width: 726px;
  height: 726px;
  pointer-events: none;
}

.hiw-outcome-card__glow img {
  width: 100%;
  height: 100%;
  max-width: none !important;
}

.hiw-outcome-card__copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  padding: 24px;
}

.hiw-outcome-card__kicker {
  margin: 0;
  color: #f98715;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.hiw-outcome-card__title {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 22px;
  letter-spacing: -0.18px;
}

.hiw-outcome-card__text {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: -0.16px;
}

.hiw-outcome-card__visual {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 100%;
  height: 300px;
  margin-top: auto;
  overflow: hidden;
}

.hiw-outcome-card__visual-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none !important;
  object-fit: contain;
  object-position: center bottom;
}

.hiw-hero--journey .osc-hero__copy h1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hiw-hero--journey .osc-hero__copy h1 .gradient-text {
  display: block;
}

.cmp-hero--compare.hiw-hero--journey .osc-hero__copy p {
  max-width: 100%;
  margin-inline: auto;
  text-align: center;
}

@media (min-width: 1024px) {
  .cmp-hero--compare.hiw-hero--journey .osc-hero__copy p {
    width: max-content;
    max-width: none;
    white-space: nowrap;
    font-size: 18px;
    line-height: 28px;
  }
}
