/* =========================================================
   /how page layout.
   Extends landing.css + solar.css (loaded first).
   ========================================================= */

.how-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(40px, 7vh, 96px) clamp(18px, 4.5vw, 64px) 96px;
  display: flex;
  flex-direction: column;
  gap: 64px;
  box-sizing: border-box;
}

.how-intro {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.how-title {
  font-family: var(--display);
  font-size: clamp(1.95rem, 3.4vw, 3rem);
  font-weight: 600;
  margin: 0 0 24px;
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--ink);
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 24ch;
  padding-bottom: 0.1em;
}

.how-figure {
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
}

.how-figure-title {
  margin: 0 0 20px;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

/* A line in, a loop, a line out. The arrows are the gaps between nodes. */
.pipeline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pipe-node {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-bright);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
}

.pipe-node strong {
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
}

.pipe-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--violet);
}

.pipe-node:not(:last-child)::after {
  content: "\2192";
  position: absolute;
  top: 50%;
  right: -22px;
  transform: translateY(-50%);
  color: var(--cyan);
  font-family: var(--mono);
}

.pipe-loop {
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.04);
}

.pipe-out {
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(251, 191, 36, 0.06);
}

.pipe-out .pipe-tag {
  color: var(--gold);
}

.loop {
  display: grid;
  gap: 6px;
  margin: 4px 0;
  padding: 0;
  list-style: none;
  counter-reset: loop;
}

.loop li {
  counter-increment: loop;
  padding-left: 22px;
  position: relative;
}

.loop li::before {
  content: counter(loop);
  position: absolute;
  left: 0;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--cyan);
}

.loop b {
  color: var(--ink);
  font-weight: 600;
}

.loop-beat {
  padding-top: 8px;
  border-top: 1px dashed rgba(251, 191, 36, 0.4);
  color: var(--gold);
  font-size: 0.82rem;
}

.memory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 28px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-bright);
}

.memory ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

@media (max-width: 960px) {
  .pipeline {
    grid-template-columns: minmax(0, 1fr);
  }

  .pipe-node:not(:last-child)::after {
    content: "\2193";
    top: auto;
    right: auto;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
  }

  .memory {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
}

.how-steps {
  max-width: 920px;
  margin: 0 auto;
  width: 100%;
}

/* The five steps are a real sequence - each depends on the one before -
   so they read as one: a single column with a rail joining the numbers.
   (As a 3+2 card grid the order was ambiguous, the last row had a hole,
   and the copy wrapped at ~22 characters.) */
.steps-how {
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 680px;
  margin: 0 auto;
}

.steps-how .step {
  position: relative;
  padding: 0 0 32px;
  gap: 22px;
  border: 0;
  border-radius: 0;
  background: none;
}

.steps-how .step:last-child {
  padding-bottom: 0;
}

.steps-how .step:hover {
  background: none;
  box-shadow: none;
}

.steps-how .step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 22.5px;
  top: 54px;
  bottom: 8px;
  width: 1px;
  background: var(--border-bright);
}

.steps-how .step-body {
  padding-top: 10px;
}

.steps-how .step-body p {
  max-width: 58ch;
  font-size: 1rem;
}

.how-cta {
  max-width: 920px;
  margin: 0 auto;
  width: 100%;
}
