/* ============================================================
   SECTION 5.7 — HOW IT WORKS · energy-path schematic
   Capture → Store → Use. Paper plate, bordered stages joined by
   single-line connectors with a travelling energy pulse.
   ============================================================ */
.how{
  background:var(--paper); color:var(--ink);
  padding:clamp(56px,9vh,104px) 18px;
  border-bottom:1.5px solid var(--ink);
}
.how-inner{ max-width:1180px; margin:0 auto; }

/* ---- datasheet header (mirrors .why-head) ---- */
.how-head{ text-align:center; margin-bottom:clamp(34px,5vh,56px); }
.how-eyebrow{ font-family:var(--font-mono); font-weight:700; font-size:11px; letter-spacing:0.22em; text-transform:uppercase; color:var(--n-500); margin-bottom:clamp(26px,4vh,44px); }
.how-rule{ position:relative; display:flex; align-items:center; justify-content:center; height:1px; background:var(--ink); }
.how-rule .ends{ position:absolute; left:0; right:0; top:50%; transform:translateY(-50%); display:flex; justify-content:space-between; font-family:var(--font-mono); font-weight:700; font-size:11px; letter-spacing:0.1em; color:var(--n-500); }
.how-rule .ends span{ background:var(--paper); padding:0 12px; }
.how-rule .ends span:last-child{ display:none; }
@media(min-width:680px){ .how-rule .ends span:last-child{ display:inline; } }
.how-title{ position:relative; z-index:2; background:var(--paper); padding:0 22px; font-family:var(--font-sans); font-weight:700; font-size:clamp(34px,6vw,60px); letter-spacing:-0.035em; line-height:0.92; text-transform:lowercase; }
.how-sub{ max-width:54ch; margin:50px auto 0; font-size:clamp(15px,1.7vw,18px); line-height:1.5; color:var(--n-600); text-align:center; text-wrap:pretty; }

/* ---- the schematic ---- */
.how-flow{ display:flex; align-items:stretch; margin-top:clamp(30px,4.5vh,48px); }

.stage{
  flex:1 1 0; min-width:0;
  border:1.5px solid var(--ink); background:var(--paper);
  padding:24px 22px 22px;
  display:flex; flex-direction:column;
  transition:background var(--dur-fast) var(--ease-standard);
}
.stage:hover{ background:var(--n-050); }
.stage-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }
.stage-i{ display:inline-flex; width:46px; height:46px; align-items:center; justify-content:center; border:1.5px solid var(--ink); }
.stage-i svg{ width:23px; height:23px; }
.stage-n{ font-family:var(--font-mono); font-weight:700; font-size:13px; letter-spacing:0.1em; color:var(--n-400); }
.stage-h{ font-family:var(--font-sans); font-weight:700; font-size:clamp(24px,2.6vw,30px); letter-spacing:-0.025em; line-height:1; margin-bottom:11px; }
.stage-p{ font-size:14.5px; line-height:1.5; color:var(--n-600); text-wrap:pretty; margin-bottom:20px; }
.stage-foot{ margin-top:auto; display:flex; align-items:baseline; gap:9px; padding-top:14px; border-top:1px solid var(--n-200); }
.stage-v{ font-family:var(--font-mono); font-weight:700; font-size:21px; letter-spacing:-0.02em; }
.stage-k{ font-family:var(--font-mono); font-size:10px; letter-spacing:0.08em; text-transform:uppercase; color:var(--n-500); }

/* ---- connector (single-line bus + travelling pulse) ---- */
.conn{ flex:0 0 78px; position:relative; align-self:stretch; }
.conn-line{ position:absolute; left:-1px; right:-1px; top:50%; height:1.5px; background:var(--ink); transform:translateY(-50%); }
.conn-dot{ position:absolute; top:50%; left:0; width:8px; height:8px; border-radius:999px; background:var(--volt); box-shadow:0 0 9px 1px var(--volt); transform:translateY(-50%); animation:howFlowH 2s linear infinite; }
.conn-arrow{ position:absolute; right:-1px; top:50%; transform:translateY(-50%); width:0; height:0; border-top:5px solid transparent; border-bottom:5px solid transparent; border-left:8px solid var(--ink); }
.conn-lbl{ position:absolute; left:50%; bottom:calc(50% + 11px); transform:translateX(-50%); background:var(--paper); padding:0 6px; font-family:var(--font-mono); font-weight:700; font-size:9px; letter-spacing:0.14em; text-transform:uppercase; color:var(--ink); white-space:nowrap; }

@keyframes howFlowH{ 0%{ left:2px; opacity:0; } 14%{ opacity:1; } 86%{ opacity:1; } 100%{ left:calc(100% - 10px); opacity:0; } }
@keyframes howFlowV{ 0%{ top:2px; opacity:0; } 14%{ opacity:1; } 86%{ opacity:1; } 100%{ top:calc(100% - 10px); opacity:0; } }

/* ---- footer note ---- */
.how-note{ display:flex; align-items:center; justify-content:center; gap:9px; margin-top:clamp(24px,3.5vh,38px); font-family:var(--font-mono); font-size:12px; letter-spacing:0.02em; color:var(--n-600); text-align:center; flex-wrap:wrap; }
.how-note svg{ width:15px; height:15px; color:var(--ink); }
.how-note a{ color:var(--ink); font-weight:700; border-bottom:1.5px solid var(--volt); padding-bottom:1px; }
.how-note a:hover{ background:var(--volt); }

/* ---- mobile: stack vertically, connectors become vertical ---- */
@media(max-width:860px){
  .how-flow{ flex-direction:column; align-items:stretch; }
  .stage{ flex:none; }
  .conn{ flex:none; height:60px; width:100%; align-self:auto; }
  .conn-line{ left:50%; right:auto; top:-1px; bottom:-1px; width:1.5px; height:auto; transform:translateX(-50%); }
  .conn-dot{ left:50%; top:0; transform:translateX(-50%); animation:howFlowV 2s linear infinite; }
  .conn-arrow{ right:auto; bottom:-1px; top:auto; left:50%; transform:translateX(-50%);
    border-top:8px solid var(--ink); border-left:5px solid transparent; border-right:5px solid transparent; border-bottom:0; }
  .conn-lbl{ left:calc(50% + 14px); transform:none; bottom:50%; top:auto; }
}

@media (prefers-reduced-motion: reduce){
  .conn-dot{ animation:none; left:50%; }
}
