/* v215 — Homepage "Our Easy 4-Step Process": one card, so there's one place to look. The house
   acts out a step, and that step's words are written beside it in the same card (under it on phones
   and tablets): its number, its title, a sentence, and three short facts.
   The house is Blender renders from one camera (old roof, bare deck, underlayment, the new roof in
   four colors and each of those at dusk; made by tools/how-it-works-render), stacked in the card.
   It stands in a yard (lawn fading into the card, beds, a driveway, a tree) that's the same in
   every render, and two props sit over it as layers of their own: our ladder and the dumpster.
   how-it-works.js puts the current step on the card as data-step, and that step plays here:
   1 the inspection: our ladder is up against the gutter, and a gold ring marks each spot it finds
     on the old roof, with a flash;
   2 pick your look: four Timberline HDZ colors try on over the old roof before one is picked, and
     visitors can tap a swatch (with the step's words) to try one themselves;
   3 install day: a dumpster on the driveway, the old roof comes off from the ridge down, the
     underlayment goes on from the eave up, then the new shingles in the picked color one course at
     a time;
   4 dusk: the dumpster is gone, the lights come on and the finished house is photographed.
   Step 3 swaps the renders inside a band laid along the roof (the clip-paths near the end of
   this file). Outside the band the renders are identical, so only the roof changes.
   With .hiw-pin (how-it-works.js) the card pins in the middle of the screen while the section
   scrolls past it, a quarter of the stretch per step. Only that step's words show, and the numbered
   bar over them fills as you scroll. Without it (no JS, reduced motion, a short screen) the card
   shows the finished house over all four steps. */
.hiw{--hiw-gold:#ca964a;--hiw-gold-hi:#e2a94e;--hiw-bg:#1b1d20;--hiw-top:76px;--hiw-bot:0px;--hiw-vh:100vh;background:var(--hiw-bg)}
@supports (height:100svh){.hiw{--hiw-vh:100svh}}
.hiw .sec-heading{color:var(--white)}
.hiw .process-header .sec-desc{color:var(--neutral-400)}

/* ---------- The card ---------- */
.hiw-stage{
  position:relative;max-width:560px;margin:0 auto;border-radius:16px;overflow:hidden;isolation:isolate;
  background:#1d1e21;
  box-shadow:0 0 0 1px rgba(255,255,255,.07),0 24px 48px -24px rgba(0,0,0,.7),inset 0 1px 0 rgba(255,255,255,.05)}

/* ---------- The house ---------- */
/* The renders and the rings all fill the house's 360x200 frame */
.hiw-art{position:relative;overflow:hidden}
.hiw-art::before{content:'';display:block;padding-top:55.556%}
.hiw-art > *,.hiw-house > *{position:absolute;left:0;top:0;width:100%;height:100%}
.hiw-art svg{display:block}
/* Camera flash over the house (steps 1 and 4) */
.hiw-art::after{content:'';position:absolute;inset:0;background:#fff;opacity:0;pointer-events:none}
/* The renders leave room around the house (it spans about 15% to 92% of the frame's height), so it's
   zoomed in on its own middle and moved up to the card's. --hiw-cam moves in from there step by
   step (the camera, further down).
   The glow behind the house is the frame's own, so it's the same whatever the card's shape or the
   zoom, and it's the card's color well inside the frame's edges. The renders' soft edges are
   blended toward it (tools/how-it-works-render/compose.py has the same gradient: change both
   together). */
.hiw-house{
  --hiw-zoom:translateY(-3.4%) scale(1.18);--hiw-cam:translate(0,0) scale(1);
  transform:var(--hiw-zoom) var(--hiw-cam);transform-origin:50% 53.4%;
  background:radial-gradient(42.4% 39% at 50% 50%,#33322f 0%,#262629 55%,#1d1e21 100%);
  transition:transform 1.6s cubic-bezier(.22,1,.36,1),opacity .8s ease}
.hiw-l{position:absolute;left:0;top:0;display:block;width:100%;height:100%;opacity:0}
.hiw-lit{opacity:1}
/* Only the color picked in step 2 goes on in step 3 and shows at dusk in step 4 (how-it-works.js
   moves .is-pick; Weathered Wood until then, and without JS) */
.hiw-new:not(.is-pick),.hiw-lit:not(.is-pick){visibility:hidden}
.hiw-marks .st-pins{opacity:0;transition:opacity .3s ease}
/* Gold rings, not dots, so the damage stays visible; the dark ring under each keeps it clear of the light roof */
.hiw-marks .st-ring{fill:none;stroke:var(--hiw-gold-hi);stroke-width:1.5}
.hiw-marks .st-ring-b{fill:none;stroke:rgba(16,17,19,.45);stroke-width:3.4}
.hiw-marks .st-ping{fill:none;stroke:var(--hiw-gold-hi);stroke-width:1;vector-effect:non-scaling-stroke;opacity:0}
.hiw-marks :is(.st-pin,.st-ping){transform-box:fill-box;transform-origin:center}

/* ---------- The words ---------- */
/* The words' own width is the unit the desktop title and number are sized in (cqi) */
.hiw-panel{padding:16px 18px 20px;border-top:1px solid rgba(255,255,255,.07);container-type:inline-size}
.hiw-list{list-style:none;margin:0;padding:0}
.hiw-step + .hiw-step{margin-top:28px}
.page-home .hiw-step h3{
  font-family:var(--font-display);font-size:1.5rem;font-weight:700;line-height:1.05;letter-spacing:.01em;
  text-transform:uppercase;color:var(--white);margin:0 0 8px}
.hiw-t{display:block}
.hiw-num{color:var(--hiw-gold-hi);margin-right:10px}
.page-home .hiw-step p{font-size:.9375rem;line-height:1.6;color:rgba(255,255,255,.72);margin:0}
/* The three facts under the sentence, each over a hairline: what it's about in gold small caps,
   then the fact */
.hiw-spec{margin:14px 0 0}
.hiw-spec > div{
  position:relative;display:grid;grid-template-columns:5.75rem minmax(0,1fr);column-gap:12px;align-items:baseline;
  padding:9px 0}
.hiw-spec > div::before{content:'';position:absolute;left:0;right:0;top:0;height:1px;background:rgba(255,255,255,.1);transform-origin:0 50%}
.hiw-spec dt{font-size:.6875rem;font-weight:600;line-height:1.3;letter-spacing:.12em;text-transform:uppercase;color:var(--hiw-gold-hi)}
.hiw-spec dd{margin:0;font-size:.875rem;line-height:1.45;color:rgba(255,255,255,.88)}
.hiw-link{color:var(--hiw-gold-hi);font-weight:600;text-decoration:none;white-space:nowrap}
.hiw-link::after{content:'\2009\2192';display:inline-block;transition:transform .25s ease}
.hiw-link:hover{text-decoration:underline;text-underline-offset:3px}
.hiw-link:hover::after{transform:translateX(3px)}
.hiw-link:focus-visible{outline:2px solid var(--white);outline-offset:3px;border-radius:2px}
/* The bar: each step's number over a line that fills with gold as you scroll through it (--t0 to
   --t3, 0 to 1, from how-it-works.js). The step showing is lit, and each number goes to its step.
   Only while pinned. */
.hiw-bar{display:none;gap:6px;margin-bottom:14px}
/* Each number is a button, its tap area taller than it looks (::before) */
.hiw-go{
  position:relative;flex:1;display:flex;flex-direction:column;gap:7px;min-width:0;padding:0;border:0;background:none;
  cursor:pointer;text-align:left;color:rgba(255,255,255,.36);-webkit-tap-highlight-color:transparent;transition:color .3s ease}
.hiw-go::before{content:'';position:absolute;inset:-10px 0}
.hiw-go b{font-family:var(--font-display);font-size:.8125rem;font-weight:600;line-height:1;letter-spacing:.1em}
.hiw-go i{position:relative;display:block;height:2px;border-radius:2px;overflow:hidden;background:rgba(255,255,255,.14)}
.hiw-go i::after{content:'';position:absolute;inset:0;background:var(--hiw-gold-hi);transform-origin:0 50%;transform:scaleX(var(--t,0))}
.hiw-go:nth-child(1){--t:var(--t0,0)}
.hiw-go:nth-child(2){--t:var(--t1,0)}
.hiw-go:nth-child(3){--t:var(--t2,0)}
.hiw-go:nth-child(4){--t:var(--t3,0)}
.hiw-go:hover{color:rgba(255,255,255,.7)}
.hiw-go[aria-current]{color:var(--hiw-gold-hi)}
.hiw-go:focus-visible{outline:2px solid var(--white);outline-offset:2px;border-radius:2px}
/* The step's number, large (desktops, pinned) */
.hiw-big{display:none}

/* 2 — the swatches: a patch of each color's new roof (hiw-swatches.webp), ringed on the one showing */
.hiw-shop{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin-top:14px}
.hiw-sws{display:flex;gap:10px}
.hiw-sw{
  position:relative;flex:none;width:28px;height:28px;padding:0;border:0;border-radius:50%;cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  background:#55524e url(assets/images/hiw-swatches.webp) 0 0/400% 100%;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}
.hiw-sw[data-c="pewter-gray"]{background-position:33.333% 0}
.hiw-sw[data-c="weathered-wood"]{background-position:66.667% 0}
.hiw-sw[data-c="barkwood"]{background-position:100% 0}
.hiw-sw::after{
  content:'';position:absolute;inset:-4px;border-radius:50%;border:2px solid var(--hiw-gold-hi);
  opacity:0;transform:scale(.8);transition:opacity .2s ease,transform .35s cubic-bezier(.16,1,.3,1)}
.hiw-sw[aria-pressed="true"]::after{opacity:1;transform:none}
.hiw-sw:focus-visible{outline:2px solid var(--white);outline-offset:6px}
.hiw-pick{display:flex;flex-direction:column;min-width:0;line-height:1.3}
.hiw-pick b{font-size:.9375rem;font-weight:600;color:var(--white);white-space:nowrap}
.hiw-pick span{font-size:.8125rem;color:var(--neutral-400);white-space:nowrap}

/* ---------- Pinned: the card holds still mid-screen and the steps take turns by the house ----------
   It stays through 200vh of scrolling, a quarter per step, centered between the header and the bottom
   of the screen (less the phones' call bar) at its own height (--hiw-h, from how-it-works.js). The
   steps share one spot, so the card is as tall as the longest. */
.hiw-pin .hiw-run{height:calc(var(--hiw-h,100vh) + 200vh)}
.hiw-pin .hiw-stage{position:sticky;top:calc(var(--hiw-top) + max(0px,(var(--hiw-vh) - var(--hiw-top) - var(--hiw-bot) - var(--hiw-h,100vh)) / 2))}
.hiw-pin .hiw-bar{display:flex}
.hiw-pin .hiw-list{display:grid;grid-template-columns:minmax(0,1fr)}
.hiw-pin .hiw-step{grid-area:1 / 1;margin:0;pointer-events:none}
.hiw-pin .hiw-step.is-active{pointer-events:auto}
/* Short phones: the facts set closer, and on the shortest left out (they're there not pinned) */
.hiw-tight .hiw-spec{margin-top:10px}
.hiw-tight .hiw-spec > div{grid-template-columns:5rem minmax(0,1fr);padding:5px 0}
.hiw-tight .hiw-spec dt{font-size:.625rem}
.hiw-tight .hiw-spec dd{font-size:.8125rem;line-height:1.35}
.hiw-bare .hiw-spec{display:none}
/* A step's title rises into place from under a line and leaves over it as the next one comes up
   (how-it-works.js marks the steps already passed .is-past); scrolling back, they go the other way.
   Its words follow, a line at a time, and each fact's hairline draws in from the left. */
.hiw-pin .hiw-step h3{overflow:hidden;padding-bottom:.06em}
.hiw-pin .hiw-t{opacity:0;transform:translateY(110%);transition:transform .35s cubic-bezier(.55,0,.75,0),opacity .25s linear}
.hiw-pin .is-past .hiw-t{transform:translateY(-110%)}
.hiw-pin .is-active .hiw-t{opacity:1;transform:none;transition:transform .9s .18s cubic-bezier(.16,1,.3,1),opacity .3s .18s linear}
.hiw-pin :is(.hiw-body > p,.hiw-shop,.hiw-spec > div){opacity:0;transform:translateY(12px);transition:opacity .2s ease,transform .3s ease}
.hiw-pin .is-past :is(.hiw-body > p,.hiw-shop,.hiw-spec > div){transform:translateY(-12px)}
.hiw-pin .is-active :is(.hiw-body > p,.hiw-shop,.hiw-spec > div){
  opacity:1;transform:none;transition:opacity .5s var(--d) ease,transform .9s var(--d) cubic-bezier(.16,1,.3,1)}
.hiw-pin .hiw-body > p{--d:.2s}
.hiw-pin .hiw-shop{--d:.26s}
.hiw-pin .hiw-spec > div:nth-child(1){--d:.32s}
.hiw-pin .hiw-spec > div:nth-child(2){--d:.4s}
.hiw-pin .hiw-spec > div:nth-child(3){--d:.48s}
.hiw-pin .hiw-spec > div::before{transform:scaleX(0);transition:transform .3s ease}
.hiw-pin .is-active .hiw-spec > div::before{transform:none;transition:transform 1.1s var(--d) cubic-bezier(.16,1,.3,1)}

/* The house fades up the first time the card comes into view, once its pictures have loaded
   (JS only; without JS it's simply there) */
.hiw-js .hiw-house{opacity:0;transform:translateY(10px) var(--hiw-zoom) var(--hiw-cam)}
.hiw-js.is-live .hiw-house{opacity:1;transform:var(--hiw-zoom) var(--hiw-cam)}

/* The camera (pinned only): in close on the roof for the inspection, back for the colors, in on
   the roof again for install day, and out a little for the finished house at dusk */
.hiw-pin .hiw-stage[data-step="1"] .hiw-house{--hiw-cam:translate(2.5%,4%) scale(1.09)}
.hiw-pin .hiw-stage[data-step="3"] .hiw-house{--hiw-cam:translate(1.2%,2%) scale(1.05)}
.hiw-pin .hiw-stage[data-step="4"] .hiw-house{--hiw-cam:translate(0,-.5%) scale(.97)}

/* ---------- Scenes. With no data-step (no JS) the finished house shows, as in step 4. ---------- */
/* Steps 1 and 2 show the old roof, steps 3 and 4 the new one. The roof layers are only a band
   along the roof (transparent past it), so the old layer stays on under them in every step and
   shows the rest of the house and the yard. */
.hiw-stage[data-step] .hiw-lit{opacity:0}
.hiw-stage[data-step] .hiw-old{opacity:1}
.hiw-stage:is([data-step="3"],[data-step="4"]) .hiw-new{opacity:1}

/* 1 — Inspection: a ring lands on each spot with a flash, at 1.03s, 1.82s and 2.6s */
.hiw-stage[data-step="1"] .st-pins{opacity:1}
.hiw-stage[data-step="1"] .hiw-art::after{animation:hiw-flash3 2.8s .5s linear both}
.hiw-stage[data-step="1"] .st-pin{animation:hiw-pop .45s cubic-bezier(.16,1,.3,1) both}
.hiw-stage[data-step="1"] .st-ping{animation:hiw-ping .9s cubic-bezier(.16,1,.3,1) both}
.hiw-stage[data-step="1"] .st-pins > g:nth-child(1) *{animation-delay:1.03s}
.hiw-stage[data-step="1"] .st-pins > g:nth-child(2) *{animation-delay:1.82s}
.hiw-stage[data-step="1"] .st-pins > g:nth-child(3) *{animation-delay:2.6s}

/* 2 — Pick your look: each color tries on over the old roof (how-it-works.js puts .is-try on the
   one showing); the one coming in fades up over the one going out, which stays until it's covered */
.hiw-pin .hiw-stage[data-step="2"] .hiw-sw{animation:hiw-pop .35s cubic-bezier(.16,1,.3,1) both}
.hiw-pin .hiw-stage[data-step="2"] .hiw-sw:nth-child(1){animation-delay:.36s}
.hiw-pin .hiw-stage[data-step="2"] .hiw-sw:nth-child(2){animation-delay:.43s}
.hiw-pin .hiw-stage[data-step="2"] .hiw-sw:nth-child(3){animation-delay:.5s}
.hiw-pin .hiw-stage[data-step="2"] .hiw-sw:nth-child(4){animation-delay:.57s}
.hiw-stage[data-step="2"] .hiw-new{visibility:visible;transition:opacity 0s .5s}
.hiw-stage[data-step="2"] .hiw-new.is-try{opacity:1;z-index:1;transition:opacity .5s ease}

/* 3 — Install day: tear-off from the ridge down (.3s to 1s), underlayment from the eave up (1.15s
   to 1.72s), the shingles a course at a time (1.9s to 3.72s) */
.hiw-stage[data-step="3"] .hiw-old{animation:hiw-l-old 3.8s linear both}
.hiw-stage[data-step="3"] .hiw-deck{animation:hiw-l-deck 3.8s linear both}
.hiw-stage[data-step="3"] .hiw-under{animation:hiw-l-under 3.8s linear both}
.hiw-stage[data-step="3"] .hiw-new{animation:hiw-l-new 3.8s linear both}

/* The props (hiw-ladder.webp and hiw-dump.webp: only the prop and its shadow, transparent
   elsewhere): the ladder while we inspect, taken down as the colors come out, and the dumpster for
   install day, hauled off as dusk falls */
.hiw-prop{z-index:2;transition:opacity .4s ease}
.hiw-stage:is([data-step="0"],[data-step="1"]) .hiw-ladder,.hiw-stage[data-step="3"] .hiw-dump{opacity:1}

/* 4 — Walkthrough and warranty: dusk falls, the lights come on, and the finished house is photographed */
.hiw-stage[data-step="4"] .hiw-lit{opacity:1;animation:hiw-fade 1s .15s ease both}
.hiw-stage[data-step="4"] .hiw-day{opacity:0;animation:hiw-fade-out .5s 1.1s ease both}
.hiw-stage[data-step="4"] .hiw-art::after{animation:hiw-flash1 .6s 1.4s linear both}

@keyframes hiw-fade{from{opacity:0}to{opacity:1}}
@keyframes hiw-fade-out{from{opacity:1}to{opacity:0}}
@keyframes hiw-pop{from{opacity:0;transform:scale(.4)}to{opacity:1;transform:none}}
@keyframes hiw-ping{0%{opacity:0;transform:scale(1)}1%{opacity:.9}100%{opacity:0;transform:scale(3.6)}}
@keyframes hiw-flash3{
  0%,18.5%{opacity:0}19.5%{opacity:.16}25%{opacity:0}
  46.5%{opacity:0}47.5%{opacity:.16}53%{opacity:0}
  74.5%{opacity:0}75.5%{opacity:.16}81%,100%{opacity:0}}
@keyframes hiw-flash1{0%{opacity:0}12%{opacity:.18}100%{opacity:0}}

/* Step 3's layers. Each shows its roof inside a band laid along the roof: a across the roof
   (-0.05 just past the left rake to 1.7 out over the gable end's shadow), b up the slope (-3/12 the
   eave's shadow on the wall, 1 the ridge, 13/12 over the ridge cap, 1.5 over the chimney), from the
   front slope's corners in overlay.json. A course is 1/12 of the slope, so each of the shingles'
   16 steps lays one course. The old roof keeps everything outside the band, where every render is
   the same. Written by tools/how-it-works-render/clips.py; run it again if the camera moves. */
@keyframes hiw-l-old{
  0%{opacity:1;clip-path:polygon(evenodd,0 0,100% 0,100% 100%,0 100%,0 0,38.07% -0.24%,94.45% 50.59%,94.45% 50.59%,38.07% -0.24%,38.07% -0.24%)}
  7.89%{opacity:1;clip-path:polygon(evenodd,0 0,100% 0,100% 100%,0 100%,0 0,38.07% -0.24%,94.45% 50.59%,94.45% 50.59%,38.07% -0.24%,38.07% -0.24%);animation-timing-function:linear}
  10.53%{opacity:1;clip-path:polygon(evenodd,0 0,100% 0,100% 100%,0 100%,0 0,37.91% 0.18%,94.29% 51.00%,89.97% 62.71%,33.59% 11.88%,37.91% 0.18%);animation-timing-function:cubic-bezier(.45,0,.25,1)}
  26.32%{opacity:1;clip-path:polygon(evenodd,0 0,100% 0,100% 100%,0 100%,0 0,37.91% 0.18%,94.29% 51.00%,75.16% 102.84%,18.78% 52.02%,37.91% 0.18%)}
  100%{opacity:1;clip-path:polygon(evenodd,0 0,100% 0,100% 100%,0 100%,0 0,37.91% 0.18%,94.29% 51.00%,75.16% 102.84%,18.78% 52.02%,37.91% 0.18%)}
}
@keyframes hiw-l-deck{
  0%{opacity:1;clip-path:polygon(37.82% -0.47%,94.69% 50.81%,94.69% 50.81%,37.82% -0.47%)}
  7.89%{opacity:1;clip-path:polygon(37.82% -0.47%,94.69% 50.81%,94.69% 50.81%,37.82% -0.47%);animation-timing-function:linear}
  10.53%{opacity:1;clip-path:polygon(33.19% 12.08%,90.06% 63.35%,94.69% 50.81%,37.82% -0.47%);animation-timing-function:cubic-bezier(.45,0,.25,1)}
  26.32%{opacity:1;clip-path:polygon(18.38% 52.21%,75.25% 103.49%,94.69% 50.81%,37.82% -0.47%)}
  30.26%{opacity:1;clip-path:polygon(18.38% 52.21%,75.25% 103.49%,94.69% 50.81%,37.82% -0.47%);animation-timing-function:cubic-bezier(.45,0,.25,1)}
  43.42%{opacity:1;clip-path:polygon(33.19% 12.08%,90.06% 63.35%,94.69% 50.81%,37.82% -0.47%);animation-timing-function:linear}
  45.26%{opacity:1;clip-path:polygon(37.82% -0.47%,94.69% 50.81%,94.69% 50.81%,37.82% -0.47%)}
  100%{opacity:1;clip-path:polygon(37.82% -0.47%,94.69% 50.81%,94.69% 50.81%,37.82% -0.47%)}
}
@keyframes hiw-l-under{
  0%{opacity:1;clip-path:polygon(18.38% 52.21%,75.25% 103.49%,75.25% 103.49%,18.38% 52.21%)}
  30.26%{opacity:1;clip-path:polygon(18.38% 52.21%,75.25% 103.49%,75.25% 103.49%,18.38% 52.21%);animation-timing-function:cubic-bezier(.45,0,.25,1)}
  43.42%{opacity:1;clip-path:polygon(18.38% 52.21%,75.25% 103.49%,90.06% 63.35%,33.19% 12.08%);animation-timing-function:linear}
  45.26%{opacity:1;clip-path:polygon(18.38% 52.21%,75.25% 103.49%,94.69% 50.81%,37.82% -0.47%)}
  50%{opacity:1;clip-path:polygon(18.38% 52.21%,75.25% 103.49%,94.69% 50.81%,37.82% -0.47%);animation-timing-function:steps(16,jump-start)}
  95.26%{opacity:1;clip-path:polygon(33.19% 12.08%,90.06% 63.35%,94.69% 50.81%,37.82% -0.47%);animation-timing-function:linear}
  97.89%{opacity:1;clip-path:polygon(37.82% -0.47%,94.69% 50.81%,94.69% 50.81%,37.82% -0.47%)}
  100%{opacity:1;clip-path:polygon(37.82% -0.47%,94.69% 50.81%,94.69% 50.81%,37.82% -0.47%)}
}
@keyframes hiw-l-new{
  0%{opacity:1;clip-path:polygon(18.38% 52.21%,75.25% 103.49%,75.25% 103.49%,18.38% 52.21%)}
  50%{opacity:1;clip-path:polygon(18.38% 52.21%,75.25% 103.49%,75.25% 103.49%,18.38% 52.21%);animation-timing-function:steps(16,jump-start)}
  95.26%{opacity:1;clip-path:polygon(18.38% 52.21%,75.25% 103.49%,90.06% 63.35%,33.19% 12.08%);animation-timing-function:linear}
  97.89%{opacity:1;clip-path:polygon(18.38% 52.21%,75.25% 103.49%,94.69% 50.81%,37.82% -0.47%)}
  100%{opacity:1;clip-path:polygon(18.38% 52.21%,75.25% 103.49%,94.69% 50.81%,37.82% -0.47%)}
}

/* ---------- Phones: the call bar along the bottom covers part of the screen ---------- */
@media (max-width:768px){
  .hiw{--hiw-bot:72px}
}

/* ---------- Tablets: same as phones, under the taller header ---------- */
@media (min-width:769px) and (max-width:1024px){
  /* The header is 81px tall here (77px on phones), so pin 4px lower to keep the same gap */
  .hiw{--hiw-top:80px}
  .hiw-stage{max-width:600px}
}

/* ---------- Desktop: one wide card ----------
   The card is the container plus its padding, so a little wider than the sections around it, but
   never so wide or tall it won't fit the screen: the house is never taller than the screen allows
   (--hiw-art-h). Pinned, the step showing is on the left, large, and the house on the right; not
   pinned, the finished house is over all four steps side by side. */
@media (min-width:1025px){
  .hiw{
    --hiw-top:81px;--hiw-art-h:min(440px,calc(var(--hiw-vh) - var(--hiw-top) - 140px));
    --hiw-card-w:min(1296px,calc(100vw - 64px),calc(var(--hiw-art-h) * 1.8 * 12 / 7 + 136px))}
  .hiw .process-header .sec-desc{text-wrap:balance}
  .hiw-stage{max-width:none;width:var(--hiw-card-w);margin:0 calc((100% - var(--hiw-card-w)) / 2);padding:48px;border-radius:20px}
  /* The house's frame ends inside the card, where the lawn and the driveway reach its edges, so it
     fades out there: most on the left (next to the words, when pinned) and below, where the lawn
     is thickest */
  .hiw-art{
    max-width:760px;margin:0 auto;
    --hiw-fade:linear-gradient(to right,transparent,#000 12%),linear-gradient(to left,transparent,#000 6%),
               linear-gradient(to bottom,transparent,#000 6%),linear-gradient(to top,transparent,#000 12%);
    -webkit-mask-image:var(--hiw-fade);-webkit-mask-composite:source-in;
    mask-image:var(--hiw-fade);mask-composite:intersect}
  .hiw-panel{padding:32px 0 0;border-top:0}
  .hiw-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));column-gap:36px}
  .hiw-step + .hiw-step{margin-top:0}
  .hiw-spec > div{grid-template-columns:minmax(0,1fr);row-gap:3px}

  /* Pinned: the steps on the left and the house on the right */
  .hiw-pin .hiw-stage{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);column-gap:48px;align-items:center}
  .hiw-pin .hiw-art{grid-column:2;grid-row:1;max-width:none;margin:0}
  .hiw-pin .hiw-panel{grid-column:1;grid-row:1;padding:0}
  .hiw-pin .hiw-bar{gap:10px;margin-bottom:18px}
  .hiw-pin .hiw-go b{font-size:.875rem}
  /* The number, large and drawn in outline, in place of the small one in the title. Its second
     digit rolls to the next step's (--at, from how-it-works.js) and is the brighter of the two. */
  .hiw-pin .hiw-num{display:none}
  .hiw-pin .hiw-big{
    display:flex;margin:0 0 -.1em -.03em;font-family:var(--font-display);font-size:clamp(6rem,27cqi,8.5rem);font-weight:800;
    line-height:1;letter-spacing:-.01em;color:transparent;-webkit-text-stroke:1.5px rgba(226,169,78,.4);
    pointer-events:none;user-select:none}
  .hiw-roll{display:block;height:1em;overflow:hidden;-webkit-text-stroke-color:rgba(226,169,78,.9)}
  .hiw-roll > span{display:block;transform:translateY(calc(var(--at,0) * -100%));transition:transform .9s cubic-bezier(.65,0,.35,1)}
  /* The title is as large as the longest fits on one line: "Walkthrough & Warranty" is about 10.6
     times as wide as its size, so 9cqi leaves room to spare */
  .page-home .hiw-pin .hiw-step h3{font-size:clamp(2rem,9cqi,3rem);line-height:.98;margin:0 0 16px;text-wrap:balance}
  .page-home .hiw-pin .hiw-step p{font-size:1.125rem;line-height:1.55;color:rgba(255,255,255,.76);text-wrap:pretty}
  .hiw-pin .hiw-shop{margin-top:18px}
  .hiw-pin .hiw-spec{margin-top:24px}
  .hiw-pin .hiw-spec > div{grid-template-columns:6.5rem minmax(0,1fr);padding:11px 0}
  .hiw-pin .hiw-spec > div:last-child{box-shadow:inset 0 -1px rgba(255,255,255,.1)}
  .hiw-pin .hiw-spec dd{font-size:.9375rem}
}

/* ---------- Reduced motion: nothing moves (and how-it-works.js doesn't pin) ---------- */
@media (prefers-reduced-motion:reduce){
  .hiw-stage,.hiw-stage *,.hiw-art::after{animation:none !important;transition:none !important}
}
