/* ════════════════════════════════════════
   HOW IT WORKS — Alternating Step Layout
   ════════════════════════════════════════ */

/* ── Container + spine line ── */
.hiw-steps {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 72px;
  padding: 16px 0 8px;
}
/* ── Spine track (real DOM element for JS-driven fill) ── */
.hiw-spine-track {
  position: absolute;
  left: 50%;
  top: 30px; bottom: 30px;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(72,192,191,0.1);
  border-radius: 2px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.hiw-spine-fill {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 0%;
  background: linear-gradient(to bottom, #48c0bf 0%, rgba(72,192,191,0.5) 100%);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(72,192,191,0.45);
  transition: height 0.12s ease-out;
}

/* ── Active step node pulse ── */
@keyframes hiwNodePulse {
  0%, 100% { box-shadow: 0 0 0 7px rgba(72,192,191,0.08), 0 0 18px rgba(72,192,191,0.18); }
  50%       { box-shadow: 0 0 0 11px rgba(72,192,191,0.13), 0 0 28px rgba(72,192,191,0.35); }
}
.hiw-step--active .hiw-step__node {
  border-color: #48c0bf !important;
  animation: hiwNodePulse 2.2s ease-in-out infinite;
}

/* ── Step row ── */
.hiw-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
  align-items: center;
}

/* ── Spine column ── */
.hiw-step__spine {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}
.hiw-step__node {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #062634;
  border: 1.5px solid rgba(72,192,191,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading, 'Bomstad Display', system-ui, sans-serif);
  font-size: 15px;
  font-weight: 700;
  color: #48c0bf;
  box-shadow: 0 0 0 7px rgba(72,192,191,0.05), 0 0 20px rgba(72,192,191,0.1);
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.hiw-step:hover .hiw-step__node {
  border-color: rgba(72,192,191,0.7);
  box-shadow: 0 0 0 9px rgba(72,192,191,0.07), 0 0 28px rgba(72,192,191,0.2);
}

/* ── Visual panel ── */
.hiw-step__panel { padding: 0 40px 0 0; min-width: 0; }
.hiw-step--flip .hiw-step__panel { padding: 0 0 0 40px; }

/* ── Text copy ── */
.hiw-step__copy {
  padding: 12px 0 12px 40px;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  min-width: 0;
  --mx: 50%;
  --my: 50%;
  display: flex;
  flex-direction: column;
}
.hiw-step--flip .hiw-step__copy {
  padding: 12px 40px 12px 20px;
}

/* Cursor glow on copy panels */
.hiw-step__copy::after {
  content: '';
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle at center,
    rgba(72,192,191,0.13) 0%,
    rgba(72,192,191,0.05) 42%,
    transparent 68%);
  top: calc(var(--my) - 190px);
  left: calc(var(--mx) - 190px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.32s ease;
  z-index: 0;
}
.hiw-step__copy:hover::after { opacity: 1; }

/* ── Step label ── */
.hiw-step__label {
  display: block;
  font-family: var(--font-body, 'General Sans', system-ui, sans-serif);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(6,38,52,0.25);
  margin-bottom: 10px;
}

/* ── Title ── */
.hiw-step__title {
  font-family: var(--font-heading, 'Bomstad Display', system-ui, sans-serif) !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  color: #062634 !important;
  margin: 0 0 12px !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em !important;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ── Phase badge ── */
.hiw-step__phase {
  display: inline-flex;
  align-items: center;
  background: rgba(72,192,191,0.08);
  color: #2e9899;
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--font-body, 'General Sans', system-ui, sans-serif);
  letter-spacing: 0.05em;
  padding: 3px 12px;
  border-radius: 20px;
  border: 1px solid rgba(72,192,191,0.18);
  margin-bottom: 16px;
  width: fit-content;
}

/* ── Body copy ── */
.hiw-step__body {
  font-family: var(--font-body, 'General Sans', system-ui, sans-serif) !important;
  font-size: 14px !important;
  color: rgba(6,38,52,0.52) !important;
  line-height: 1.72 !important;
  margin: 0 !important;
  max-width: 360px;
}

/* ════════════════════════════════════════
   MOCK UI PANELS
   ════════════════════════════════════════ */

.hiw-mock {
  background: linear-gradient(145deg, #072e40 0%, #041a24 100%);
  border: 1px solid rgba(72,192,191,0.13);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(6,38,52,0.2), 0 2px 8px rgba(6,38,52,0.15);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s ease,
              border-color 0.4s ease;
}
.hiw-step:hover .hiw-mock {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 24px 56px rgba(6,38,52,0.32), 0 4px 16px rgba(72,192,191,0.1);
  border-color: rgba(72,192,191,0.3);
}

/* Chrome bar */
.hiw-mock__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.025);
  border-bottom: 1px solid rgba(72,192,191,0.07);
}
.hiw-mock__dots { display: flex; gap: 5px; }
.hiw-mock__dots i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.11);
  display: block;
}
.hiw-mock__tag {
  font-size: 10px;
  font-family: var(--font-body, system-ui, sans-serif);
  color: rgba(227,225,226,0.3);
  letter-spacing: 0.04em;
}

/* ── Config mock (step 1) ── */
.hiw-mock__field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.035);
  gap: 12px;
}
.hiw-mock__field:last-child { border-bottom: none; }
.hiw-mock__lbl {
  font-size: 11px;
  color: rgba(227,225,226,0.35);
  font-family: var(--font-body, system-ui, sans-serif);
  white-space: nowrap;
  flex-shrink: 0;
}
.hiw-mock__val {
  font-size: 12px;
  font-weight: 600;
  color: rgba(227,225,226,0.8);
  font-family: var(--font-body, system-ui, sans-serif);
  text-align: right;
}
.hiw-mock__chips { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.hiw-chip {
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-body, system-ui, sans-serif);
  background: rgba(72,192,191,0.1);
  color: #48c0bf;
  border: 1px solid rgba(72,192,191,0.2);
  padding: 2px 8px;
  border-radius: 20px;
}
.hiw-chip--dim {
  background: rgba(72,192,191,0.04);
  color: rgba(72,192,191,0.5);
  border-color: rgba(72,192,191,0.1);
}

/* ── Table mock (step 2) ── */
.hiw-mock__thead {
  display: grid;
  grid-template-columns: 1.6fr 1fr 0.65fr;
  padding: 8px 16px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(227,225,226,0.28);
  font-family: var(--font-body, system-ui, sans-serif);
  letter-spacing: 0.07em;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.hiw-mock__trow {
  display: grid;
  grid-template-columns: 1.6fr 1fr 0.65fr;
  padding: 9px 16px;
  font-size: 11.5px;
  color: rgba(227,225,226,0.65);
  font-family: var(--font-body, system-ui, sans-serif);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.15s;
}
.hiw-mock__trow:hover { background: rgba(72,192,191,0.04); }
.hiw-mock__trow:last-child { border-bottom: none; }
.hiw-mock__co { font-weight: 600; color: rgba(227,225,226,0.85); }
.hiw-teal { color: #48c0bf; font-weight: 600; }
.hiw-mock__trow--dim { opacity: 0.38; font-style: italic; }

/* ── Score mock (step 3) ── */
.hiw-mock__score-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 16px 10px;
}
.hiw-mock__score-num {
  font-size: 52px;
  font-weight: 700;
  color: #48c0bf;
  font-family: var(--font-heading, system-ui, sans-serif);
  line-height: 1;
}
.hiw-mock__score-lbl {
  font-size: 8px;
  letter-spacing: 0.14em;
  color: rgba(227,225,226,0.28);
  font-family: var(--font-body, system-ui, sans-serif);
  margin-top: 4px;
}
.hiw-mock__bars {
  padding: 4px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hiw-mock__bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: rgba(227,225,226,0.4);
  font-family: var(--font-body, system-ui, sans-serif);
}
.hiw-mock__bar-row > span:first-child { width: 90px; flex-shrink: 0; }
.hiw-mock__bar-row > span:last-child { width: 22px; text-align: right; color: rgba(227,225,226,0.6); font-weight: 600; }
.hiw-mock__bar-track {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
}
.hiw-mock__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3aadac, #48c0bf);
  border-radius: 4px;
}
.hiw-mock__qualify {
  margin: 0 16px 14px;
  background: rgba(94,212,165,0.09);
  border: 1px solid rgba(94,212,165,0.22);
  color: #5ED4A5;
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--font-body, system-ui, sans-serif);
  text-align: center;
  padding: 5px 0;
  border-radius: 8px;
  letter-spacing: 0.04em;
}

/* ── Meeting mock (step 4) ── */
.hiw-mock__meeting {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin: 10px 14px 0;
  background: rgba(255,255,255,0.035);
  border-radius: 10px;
  border: 1px solid rgba(72,192,191,0.1);
}
.hiw-mock__meeting--2 { opacity: 0.65; }
.hiw-mock__meeting:last-of-type { margin-bottom: 0; }
.hiw-mock__meeting-icon { flex-shrink: 0; }
.hiw-mock__meeting-info { flex: 1; min-width: 0; }
.hiw-mock__meeting-name {
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(227,225,226,0.84);
  font-family: var(--font-body, system-ui, sans-serif);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hiw-mock__meeting-time {
  font-size: 10px;
  color: rgba(227,225,226,0.38);
  font-family: var(--font-body, system-ui, sans-serif);
  margin-top: 1px;
}
.hiw-mock__confirmed {
  font-size: 9.5px;
  font-weight: 700;
  color: #5ED4A5;
  background: rgba(94,212,165,0.1);
  border: 1px solid rgba(94,212,165,0.2);
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  font-family: var(--font-body, system-ui, sans-serif);
  flex-shrink: 0;
}
.hiw-mock__stats {
  display: flex;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255,255,255,0.04);
  margin-top: 12px;
}
.hiw-mock__stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border-right: 1px solid rgba(255,255,255,0.05);
}
.hiw-mock__stat:last-child { border-right: none; }
.hiw-mock__stat-n {
  font-size: 22px;
  font-weight: 700;
  color: rgba(227,225,226,0.7);
  font-family: var(--font-heading, system-ui, sans-serif);
  line-height: 1;
}
.hiw-mock__stat-l {
  font-size: 9px;
  color: rgba(227,225,226,0.28);
  font-family: var(--font-body, system-ui, sans-serif);
  letter-spacing: 0.06em;
}
.hiw-mock__stat--green .hiw-mock__stat-n { color: #5ED4A5; }

/* ════════════════════════════════════════
   SCROLL REVEAL
   ════════════════════════════════════════ */

.hiw-reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
.hiw-reveal.hiw-revealed {
  opacity: 1;
  transform: translateY(0);
}
/* Panel reveals slightly after copy */
.hiw-reveal.hiw-revealed .hiw-step__panel {
  transition-delay: 0.08s;
}
.hiw-reveal.hiw-revealed .hiw-step__copy {
  transition-delay: 0.04s;
}

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */

@media (max-width: 820px) {
  .hiw-steps { gap: 52px; }
  .hiw-steps::before { display: none; }

  .hiw-step,
  .hiw-step--flip {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto;
  }

  /* Mobile order: node → copy → visual */
  .hiw-step__spine  { order: 1; justify-content: flex-start; margin-bottom: 14px; }
  .hiw-step__copy   { order: 2; padding: 0 0 20px !important; }
  .hiw-step__panel  { order: 3; padding: 0 !important; }

  .hiw-step__body { max-width: 100%; }
  .hiw-step__title { font-size: 22px !important; }
  .hiw-mock { border-radius: 12px; }
}
