/* How it works: the bridge (sticky scroll scene on desktop, a lit trace on phones), six rules, your data, the honest part */

/* ---------- the bridge drawing ---------- */
.hiw-bridge{position:relative;background:var(--white);padding:var(--section-y) 0 clamp(64px,10vh,120px)}
.hiw-bridge__art{position:relative}
.hiw-svg{width:100%;height:auto;overflow:visible}
:where(.hiw-svg) :where(path,circle){fill:none;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.hiw-land path,.hiw-land circle{stroke:var(--line-soft);stroke-width:1.9}
.hiw-land{opacity:.62}
.hiw-base path{stroke:var(--gold);stroke-width:1.9;opacity:.62}
.hiw-lit__s{stroke:var(--gold-deep);stroke-width:2.3}
.hiw-svg .hiw-cur{stroke:var(--gold-deep);stroke-width:4.6;vector-effect:none}
.hiw-pad circle{fill:var(--gold-deep);stroke:var(--gold-deep);stroke-width:2}
.hiw-pad .hiw-pad__dot{fill:var(--white);stroke:none}
.hiw-pad{transform-box:fill-box;transform-origin:center;transition:transform .5s var(--ease-spring)}
.hiw-pad circle{transition:fill .35s ease,stroke .35s ease}
/* the soft glow (hiw-glow) rides only on the current while it moves; a lit span keeps a tight, crisp edge (hiw-crisp) */
.hiw-flood{flood-color:var(--gold);flood-opacity:.95}
.hiw-flood-soft{flood-color:var(--gold);flood-opacity:.45}
.hiw-pulse{opacity:0;pointer-events:none;transition:opacity .3s ease}
.hiw-pulse circle{stroke:none}
.hiw-pulse__halo{fill:rgba(189,164,109,.34)}
.hiw-pulse__core{fill:var(--gold-deep)}
.hiw-pulse__hot{fill:var(--white)}

/* ---------- the four steps, static (still mode, no JS, and the base for everything else) ---------- */
.hiw-meter{display:none}
.hiw-steps{list-style:none;margin:0;padding:0}
.hiw-step__num{display:block;font-family:var(--f-display);font-weight:800;color:var(--gold);line-height:.86;letter-spacing:-.045em;font-variant-numeric:tabular-nums lining-nums}
.hiw-step h3{margin:0 0 12px}
.hiw-step p{max-width:46ch}

@media (min-width:901px){
  /* no column gap: each column starts exactly on its pier (5%, 27.5%, 50%, 72.5% of the drawing), the dot sits on it */
  .hiw-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;padding:0 5%;margin-top:clamp(36px,6vh,64px)}
  .hiw-step{border-top:1px solid var(--line);padding-top:26px;padding-right:clamp(22px,2.6vw,44px);position:relative}
  .hiw-step::before{content:"";position:absolute;left:-4.5px;top:-5px;width:9px;height:9px;border-radius:50%;background:var(--gold-deep)}
  .hiw-step__num{font-size:clamp(64px,6.4vw,104px);margin-bottom:20px}
  .hiw-step p{font-size:16.5px}
}

/* ---------- desktop scroll scene: site JS adds .is-run at 901 px and up, never in still mode ---------- */
@media (min-width:901px){
  .hiw-bridge.is-run{height:400vh;padding:0}
  .is-run .hiw-bridge__stage{position:sticky;top:0;height:100vh;height:100svh;display:flex;flex-direction:column;justify-content:center;padding-top:var(--nav-h);overflow:hidden}
  /* gutters inside the width (like the nav), so the pinned stage never runs wider than the window */
  .is-run .hiw-bridge__in{width:100%;box-sizing:border-box;max-width:var(--wrap-wide)}
  /* the drawing stays width-bound (viewBox 1200 x 330 = 3.636 : 1), and the meter and steps share its exact width,
     so their 5% insets and the --k offsets land on the real piers at any window height */
  .is-run .hiw-bridge__fit{width:min(100%,calc(min(40vh,400px) * 3.6364));margin-inline:auto}
  .is-run .hiw-svg{height:auto}
  .is-run .hiw-meter{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;padding:0 5%;margin-bottom:clamp(14px,3vh,34px)}
  .hiw-meter__seg{display:block;padding-right:clamp(12px,1.4vw,22px)}
  .hiw-meter__label{display:block;font-family:var(--f-display);font-weight:600;font-size:var(--fs-label);letter-spacing:.16em;text-transform:uppercase;color:var(--charcoal);opacity:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:opacity .3s ease,color .3s ease}
  .hiw-meter__track{display:block;height:2px;margin-top:12px;background:var(--line-soft);overflow:hidden;border-radius:2px}
  .hiw-meter__fill{display:block;height:100%;background:var(--gold-deep);transform:scaleX(0);transform-origin:left center}
  .hiw-meter__seg.is-active .hiw-meter__label{opacity:1;color:var(--night);font-weight:800}
  .is-run .hiw-steps{grid-template-columns:minmax(0,1fr);margin-top:clamp(18px,3.4vh,40px)}
  .is-run .hiw-step{grid-area:1/1;border:0;padding:0;display:grid;grid-template-columns:auto minmax(0,1fr);gap:0 clamp(24px,2.6vw,44px);align-items:start;width:min(700px,100%);margin-left:calc((100% - min(700px,100%)) * var(--k,0));opacity:0;transform:translateY(18px);transition:opacity .4s ease,transform .6s var(--ease);pointer-events:none}
  .is-run .hiw-step::before{content:none}
  .is-run .hiw-step.is-active{opacity:1;transform:none;pointer-events:auto;transition-delay:.06s}
  .is-run .hiw-step__num{font-size:clamp(120px,12.5vw,196px);line-height:.76;margin:0;color:var(--gold)}
  .is-run .hiw-step__body{padding-top:clamp(4px,1vh,14px)}
  .is-run .hiw-step p{font-size:17.5px}
  .is-run .hiw-lit__s{opacity:0}
  .is-run .hiw-cur{stroke-dasharray:1 1;stroke-dashoffset:1}
  .is-run .hiw-lit.is-moving .hiw-cur{filter:url(#hiw-glow)}
  .is-run .hiw-pad:not(.is-on) circle{fill:var(--white);stroke:var(--gold)}
  .is-run .hiw-pad:not(.is-on) .hiw-pad__dot{fill:var(--gold);stroke:none}
  .is-run .hiw-pad.is-on{transform:scale(1.18)}
  .is-run .hiw-pulse{opacity:1}
  .is-run .hiw-pulse.is-docked{opacity:0}
  .is-run .hiw-pulse__halo{transform-box:fill-box;transform-origin:center;animation:hiw-breathe 1.6s ease-in-out infinite}
}
/* 901 to 960 px: the meter columns are narrow, so "Walk through it" at 14 px gets tighter tracking to stay whole */
@media (min-width:901px) and (max-width:960px){.hiw-meter__label{letter-spacing:.08em}}
@keyframes hiw-breathe{0%,100%{transform:scale(.8);opacity:.9}50%{transform:scale(1.25);opacity:.45}}

/* ---------- phones and tablets: a vertical trace with four nodes ---------- */
@media (max-width:900px){
  .hiw-bridge{padding:clamp(56px,10vh,96px) 0 clamp(56px,9vh,88px)}
  .hiw-bridge__art{margin:0 calc(var(--gutter) * -.4)}
  .hiw-svg .hiw-cur{stroke-width:9}
  .hiw-pad{transform:scale(1.9)}
  .hiw-steps{position:relative;display:grid;--gap:clamp(34px,6vh,52px);gap:var(--gap);margin-top:clamp(36px,6vh,56px)}
  /* one trace segment per step, from its node's center to the next node's center, so the line ends on node 4;
     JS sets --f (0 to 1) on each step as the fill passes, and lights a node when the fill reaches its center */
  .hiw-step:not(:last-child)::before,.hiw-step:not(:last-child)::after{content:"";position:absolute;left:21px;top:22px;width:2px;height:calc(100% + var(--gap));border-radius:2px}
  .hiw-step:not(:last-child)::before{background:var(--line-soft)}
  .hiw-step:not(:last-child)::after{background:var(--gold-deep);transform-origin:top center;transform:scaleY(var(--f,1))}
  .hiw-step{position:relative;padding-left:68px;min-height:44px}
  .hiw-step__num{position:absolute;left:0;top:0;z-index:1;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;font-size:19px;line-height:1;letter-spacing:0;background:var(--gold-deep);color:var(--night);box-shadow:0 0 0 6px rgba(189,164,109,.2),0 0 18px rgba(189,164,109,.55);transition:background-color .4s ease,color .4s ease,box-shadow .5s ease}
  .hiw-step h3{padding-top:6px}
  .is-trace .hiw-step:not(.is-on) .hiw-step__num{background:var(--white);color:var(--gold-deep);box-shadow:inset 0 0 0 2px var(--gold),0 0 0 6px rgba(189,164,109,0)}
}

/* ---------- six rules: hairline cells ---------- */
/* the hairline is drawn inside the content box, so it matches every other hairline instead of running into the gutters */
.hiw-rules-sec .wrap::before{content:"";display:block;border-top:1px solid var(--line);margin-bottom:clamp(56px,9vh,96px)}
.hiw-rules-sec{padding-top:0}
.hiw-rules__head .h2{margin-top:16px;max-width:16ch}
.hiw-rules{list-style:none;margin:clamp(40px,6vh,64px) 0 0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:1px solid var(--line)}
.hiw-rule{padding:clamp(28px,4vh,40px) clamp(22px,2.6vw,40px) clamp(30px,4.4vh,44px);border-bottom:1px solid var(--line)}
.hiw-rule:not(:nth-child(3n)){border-right:1px solid var(--line)}
.hiw-rule:nth-child(3n+1){padding-left:0}
.hiw-rule:nth-child(3n){padding-right:0}
.hiw-rule__t{font-family:var(--f-display);font-weight:700;font-size:clamp(19px,1.5vw,22px);line-height:1.2;letter-spacing:-.012em;margin:22px 0 10px}
.hiw-rule p{font-size:16.5px;max-width:34ch}
.hiw-rule .ic{transition:transform .5s var(--ease-spring),background-color var(--t-micro) ease}
.hiw-rule:hover .ic{transform:translateY(-3px) rotate(-6deg);background:var(--gold-deep)}
@media (max-width:900px){
  .hiw-rules{grid-template-columns:1fr}
  .hiw-rule,.hiw-rule:nth-child(3n),.hiw-rule:nth-child(3n+1){padding:28px 0 30px;border-right:0}
  .hiw-rule:not(:nth-child(3n)){border-right:0}
  .hiw-rule{display:grid;grid-template-columns:44px minmax(0,1fr);gap:0 18px}
  .hiw-rule .ic{grid-row:span 2}
  .hiw-rule__t{margin:8px 0 8px}
}

/* ---------- your data: gold ---------- */
.hiw-data__art{position:absolute;left:-4%;bottom:-6%;width:min(52%,720px);height:84%;pointer-events:none;opacity:.7;z-index:-1;-webkit-mask-image:radial-gradient(ellipse 100% 100% at 0% 100%,#000 38%,transparent 72%);mask-image:radial-gradient(ellipse 100% 100% at 0% 100%,#000 38%,transparent 72%)}
.hiw-data__art svg{width:100%;height:100%}
.hiw-data__in{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.3fr);gap:clamp(36px,6vw,110px);align-items:start}
.hiw-data__head .h2{margin-top:16px;max-width:12ch}
.hiw-data__list{list-style:none;margin:0;padding:0;border-top:1px solid var(--line-on-gold)}
.hiw-data__list li{display:grid;grid-template-columns:44px minmax(0,1fr);gap:0 20px;align-items:start;padding:clamp(22px,3.4vh,32px) 0;border-bottom:1px solid var(--line-on-gold)}
.hiw-data__list p{color:var(--night);font-size:17.5px;font-weight:500;line-height:1.55;padding-top:8px;max-width:52ch}
@media (max-width:900px){
  .hiw-data__in{grid-template-columns:1fr}
  /* phones: the engraving lives in a band above the eyebrow and fades out before the first line of text */
  .hiw-data__head{padding-top:124px}
  .hiw-data__art{width:min(80%,440px);height:calc(var(--section-y) + 110px);left:auto;right:-8%;top:0;bottom:auto;opacity:.45;-webkit-mask-image:linear-gradient(to bottom,#000 35%,transparent 100%);mask-image:linear-gradient(to bottom,#000 35%,transparent 100%)}
  .hiw-data__list p{font-size:16.5px}
}

/* ---------- the honest part (the closer after it is the shared .closer in site.css) ---------- */
/* the honest part and the closer read as one ending: a short gap, not two full section paddings */
.hiw-end{padding-bottom:clamp(32px,5vh,64px)}
.hiw-honest{border-left:3px solid var(--gold);padding:6px 0 6px clamp(22px,3.4vw,52px);max-width:980px}
.hiw-honest__q{font-family:var(--f-display);font-weight:700;font-size:clamp(26px,3vw,44px);line-height:1.22;letter-spacing:-.02em;color:var(--charcoal);margin-top:22px;max-width:30ch}

/* ---------- still mode: the end state, nothing moving ---------- */
html.still .hiw-pulse{display:none}
html.still .hiw-pad{transition:none}

/* ---------- v3.1 closer: a soft gold band with the circuit engraving on both sides, the knife beside the words ---------- */
.hiw-close{position:relative;isolation:isolate;overflow:hidden;background:linear-gradient(180deg,var(--wash) 0%,#F6EEDB 100%);border-top:1px solid var(--line-soft);padding-bottom:clamp(64px,10vh,120px)}
.hiw-close__art{position:absolute;inset:0;z-index:-1;pointer-events:none;opacity:.55;-webkit-mask-image:linear-gradient(to right,#000 0,rgba(0,0,0,.35) 38%,rgba(0,0,0,.35) 62%,#000 100%);mask-image:linear-gradient(to right,#000 0,rgba(0,0,0,.35) 38%,rgba(0,0,0,.35) 62%,#000 100%)}
.hiw-close__art svg{width:100%;height:100%}
.hiw-close .closer{border-top:0;padding-top:0}
@media (max-width:900px){.hiw-close__art{opacity:.35}}
