/* ============================================================
   SECTION 3 — "ONE DAY ON VOLT POWER"  (oscilloscope instrument)
   Paper ground · ink instrument screen · yellow trace
   ============================================================ */

.why{
  background:var(--paper); color:var(--ink);
  padding:clamp(56px,9vh,104px) 18px;
  border-bottom:1.5px solid var(--ink);
}
.why-inner{ max-width:1180px; margin:0 auto; }

/* ---- datasheet header (top-center) ---- */
.why-head{ text-align:center; margin-bottom:clamp(34px,5vh,56px); }
.why-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); }
.why-rule{ position:relative; display:flex; align-items:center; justify-content:center; height:1px; background:var(--ink); }
.why-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); }
.why-rule .ends span{ background:var(--paper); padding:0 12px; }
.why-rule .ends span:last-child{ display:none; }
@media(min-width:680px){ .why-rule .ends span:last-child{ display:inline; } }
.why-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.9; text-transform:lowercase; }
.why-sub{ max-width:50ch; margin:50px auto 0 !important; font-size:clamp(15px,1.7vw,18px); line-height:1.5; color:var(--n-600); text-wrap:pretty; }

/* ============================================================
   THE SCOPE (instrument)
   ============================================================ */
.scope{ border:1.5px solid var(--ink); background:var(--ink); color:var(--paper); box-shadow:var(--e-3); }

/* top readout bar */
.scope-bar{
  display:flex; align-items:stretch; flex-wrap:wrap;
  border-bottom:1px solid rgba(255,255,255,0.16);
}
.ro{ display:flex; flex-direction:column; gap:6px; justify-content:center; padding:14px 20px; border-right:1px solid rgba(255,255,255,0.16); min-width:0; }
.ro-k{ font-family:var(--font-mono); font-size:9.5px; letter-spacing:0.16em; text-transform:uppercase; color:var(--n-400); white-space:nowrap; }
.ro-v{ font-family:var(--font-mono); font-weight:700; font-size:clamp(20px,2.4vw,26px); letter-spacing:-0.01em; line-height:1; color:#fff; font-variant-numeric:tabular-nums; }
.ro-time .ro-v{ color:var(--volt); }
.mode-badge{ display:inline-flex; align-items:center; gap:7px; align-self:flex-start; background:var(--volt); color:var(--ink); font-family:var(--font-mono); font-weight:700; font-size:13px; letter-spacing:0.02em; padding:5px 10px; white-space:nowrap; }
.mode-badge .dot{ width:7px; height:7px; border-radius:999px; background:var(--ink); }
.mode-badge.backup{ background:var(--ink); color:var(--volt); box-shadow:inset 0 0 0 1.5px var(--volt); }
.mode-badge.backup .dot{ background:var(--volt); animation:bpulse 0.9s steps(1) infinite; }
@keyframes bpulse{ 50%{ opacity:0.25; } }

/* scale toggle pushed to the right */
.scale-toggle{ margin-left:auto; display:flex; align-items:center; gap:0; padding:12px 16px; }
.st-btn{ font-family:var(--font-mono); font-weight:700; font-size:12px; letter-spacing:0.1em; color:var(--n-400); background:transparent; border:1.5px solid rgba(255,255,255,0.28); padding:9px 16px; cursor:pointer; transition:all var(--dur-fast) var(--ease-standard); }
.st-btn:first-child{ border-right:none; }
.st-btn:hover{ color:#fff; }
.st-btn.on{ background:var(--volt); color:var(--ink); border-color:var(--volt); }

/* the screen */
.scope-screen{ position:relative; width:100%; height:clamp(240px,42vh,400px); touch-action:pan-y; cursor:ew-resize; overflow:hidden; }
.scope-svg{ position:absolute; inset:0; width:100%; height:100%; display:block; }

/* svg primitives (styled via classes on generated nodes) */
.scope-svg .grid-line{ stroke:rgba(255,255,255,0.08); stroke-width:1; vector-effect:non-scaling-stroke; }
.scope-svg .axis-line{ stroke:rgba(255,255,255,0.28); stroke-width:1; vector-effect:non-scaling-stroke; }
.scope-svg .axis-lbl{ fill:var(--n-400); font-family:var(--font-mono); font-size:11px; letter-spacing:0.06em; }
.scope-svg .trace{ fill:none; stroke:var(--volt); stroke-width:2.5; vector-effect:non-scaling-stroke; stroke-linejoin:round; stroke-linecap:round; filter:drop-shadow(0 0 5px rgba(229,255,3,0.55)); }
.scope-svg .trace-draw{ stroke-dasharray:var(--len); stroke-dashoffset:var(--len); }
.scope-svg .area{ fill:url(#voltArea); opacity:0.9; }
.scope-svg .outage-band{ fill:rgba(240,20,47,0.10); }
.scope-svg .outage-edge{ stroke:rgba(240,20,47,0.55); stroke-width:1; stroke-dasharray:3 3; vector-effect:non-scaling-stroke; }
.scope-svg .outage-lbl{ fill:#FF8A8A; font-family:var(--font-mono); font-weight:700; font-size:10px; letter-spacing:0.12em; }
.scope-svg .ev-node{ fill:var(--ink); stroke:var(--volt); stroke-width:2; vector-effect:non-scaling-stroke; }
.scope-svg .ev-tick{ stroke:rgba(255,255,255,0.25); stroke-width:1; stroke-dasharray:2 3; vector-effect:non-scaling-stroke; }
.scope-svg .step-node{ fill:var(--volt); }

/* playhead (HTML overlay positioned in %) */
.playhead{ position:absolute; top:0; left:0; height:100%; pointer-events:none; will-change:left; }
.scope.gliding .playhead{ transition:left .52s var(--ease-out); }
.scope.gliding .ph-node{ transition:top .52s var(--ease-out); }
.scope.gliding .ph-chip{ transition:top .52s var(--ease-out); }
.ph-line{ position:absolute; top:6%; bottom:10%; left:0; width:1.5px; background:rgba(255,255,255,0.6); }
.ph-node{ position:absolute; width:13px; height:13px; border-radius:999px; background:var(--volt); box-shadow:0 0 12px 2px var(--volt); transform:translate(-50%,-50%); }
.ph-chip{ position:absolute; top:1%; left:0; transform:translateX(-50%); background:var(--volt); color:var(--ink); font-family:var(--font-mono); font-weight:700; font-size:12px; padding:3px 8px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.ph-chip::after{ content:""; position:absolute; left:50%; bottom:-4px; transform:translateX(-50%); border-left:4px solid transparent; border-right:4px solid transparent; border-top:4px solid var(--volt); }

.scope-hint{ position:absolute; right:14px; top:12px; font-family:var(--font-mono); font-size:10px; letter-spacing:0.1em; color:var(--n-400); text-transform:uppercase; transition:opacity var(--dur-base); pointer-events:none; }
.scope.touched .scope-hint{ opacity:0; }

/* ============================================================
   BENEFIT CARDS
   ============================================================ */
.why-benefits{ display:grid; grid-template-columns:repeat(4,1fr); gap:0; margin-top:clamp(28px,4vh,44px); border:1.5px solid var(--ink); border-bottom:none; }
.bcard{
  position:relative; text-align:left; background:var(--paper); color:var(--ink);
  border-right:1.5px solid var(--ink); border-bottom:1.5px solid var(--ink);
  padding:22px 22px 24px; cursor:pointer; font-family:inherit;
  display:flex; flex-direction:column; min-height:0;
  transition:background var(--dur-base) var(--ease-standard), transform var(--dur-fast) var(--ease-standard);
}
.bcard:last-child{ border-right:none; }
.bcard:hover{ background:var(--n-050); }
.bc-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
.bc-i{ display:inline-flex; width:42px; height:42px; align-items:center; justify-content:center; border:1.5px solid var(--ink); }
.bc-i svg{ width:21px; height:21px; }
.bc-n{ font-family:var(--font-mono); font-weight:700; font-size:12px; letter-spacing:0.1em; color:var(--n-400); }
.bc-h{ font-family:var(--font-sans); font-weight:700; font-size:21px; letter-spacing:-0.02em; line-height:1.05; margin-bottom:9px; }
.bc-p{ font-size:14px; line-height:1.5; color:var(--n-600); margin-bottom:18px; text-wrap:pretty; }
.bc-stat{ margin-top:auto; display:flex; align-items:baseline; gap:8px; padding-top:14px; border-top:1px solid var(--n-200); }
.bc-stat-v{ font-family:var(--font-mono); font-weight:700; font-size:23px; letter-spacing:-0.02em; }
.bc-stat-k{ font-family:var(--font-mono); font-size:10px; letter-spacing:0.08em; text-transform:uppercase; color:var(--n-500); }

/* active card (synced to playhead / mode) */
.bcard::before{ content:""; position:absolute; top:0; left:0; right:0; height:4px; background:var(--volt); transform:scaleX(0); transform-origin:left; transition:transform var(--dur-base) var(--ease-out); }
.bcard.active::before{ transform:scaleX(1); }
.bcard.active{ background:var(--volt); }
.bcard.active:hover{ background:var(--volt); }
.bcard.active .bc-i{ background:var(--ink); color:var(--volt); }
.bcard.active .bc-n{ color:var(--ink); }
.bcard.active .bc-p{ color:var(--ink); }
.bcard.active .bc-stat{ border-top-color:rgba(1,2,4,0.25); }
.bcard.active .bc-stat-k{ color:var(--ink); }
.bcard--grow .bc-hint{ font-family:var(--font-mono); font-size:10px; letter-spacing:0.06em; color:var(--n-500); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media(max-width:900px){
  .why-benefits{ grid-template-columns:repeat(2,1fr); }
  .bcard:nth-child(2n){ border-right:none; }
}
@media(max-width:560px){
  .scope-bar{ }
  .ro{ flex:1 1 50%; border-right:1px solid rgba(255,255,255,0.16); }
  .ro-mode{ flex-basis:100%; border-right:none; }
  .scale-toggle{ margin-left:0; flex-basis:100%; border-top:1px solid rgba(255,255,255,0.16); }
  .st-btn{ flex:1; }
  .why-benefits{ grid-template-columns:1fr; }
  .bcard{ border-right:none; }
  .bcard:nth-child(2n){ border-right:none; }
}

@media (prefers-reduced-motion: reduce){
  .scope-svg .trace-draw{ stroke-dashoffset:0 !important; }
  .mode-badge.backup .dot{ animation:none; }
}
