/* Air source heat pump page: the opener touch (frost: vapour and a falling outside temperature) and the set piece
   "Heat from cold air" (the refrigerant loop). */

/* ---------- opener touch: vapour rising off the unit, the outside temperature falling while indoors holds ---------- */
.page-ashp .op__frame > img { object-position: 50% 42%; }
.touch-vapour { position: absolute; z-index: 1; inset: 0; pointer-events: none; }
.touch-vapour i { position: absolute; top: 22%; width: 18%; height: 18%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.6), rgba(255,255,255,0)); filter: blur(8px); opacity: 0; }
.touch-vapour i:nth-child(1) { left: 38%; } .touch-vapour i:nth-child(2) { left: 46%; } .touch-vapour i:nth-child(3) { left: 54%; }
.touch-vapour i:nth-child(4) { left: 42%; } .touch-vapour i:nth-child(5) { left: 60%; }
.touch-temp { position: absolute; z-index: 2; right: clamp(16px, 2.4vw, 32px); top: clamp(16px, 2.4vw, 32px); display: grid; gap: 6px; min-width: 196px; padding: 14px 18px 16px; border-radius: 16px; background: rgba(8,20,13,.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; }
.touch-temp__row { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.touch-temp__row small { font-size: 15px; color: rgba(255,255,255,.8); }
.touch-temp__row b { display: inline-block; width: 2.9em; text-align: right; white-space: nowrap; font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -.02em; color: #a9dcff; font-variant-numeric: tabular-nums; }
.touch-temp__row--in b { color: var(--sun); }
.touch-temp__bar { height: 6px; border-radius: 6px; margin-top: 4px; background: linear-gradient(90deg, #6fb7ff, #f3c04c); position: relative; }
.touch-temp__bar i { position: absolute; top: 50%; left: 40%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(111,183,255,.6); }

@media (max-width: 999px) {
  .touch-temp { top: 10px; right: 10px; min-width: 0; grid-auto-flow: column; gap: 14px; padding: 8px 12px; border-radius: 12px; }
  .touch-temp__row { gap: 6px; }
  .touch-temp__row small { font-size: 13px; }
  .touch-temp__row b { font-size: 18px; }
  .touch-temp__bar { display: none; }
}

/* ------------------------------------------------ the set piece ------------------------------------------------ */
.loop { position: relative; }
.loop__pin { padding-block: clamp(48px, 5vw, 72px); }
.loop__grid { display: grid; gap: clamp(28px, 4vw, 64px); align-items: center; }
.loop__copy { display: grid; gap: 16px; align-content: center; }
.loop__rail { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.loop__rail i { height: 4px; border-radius: 4px; background: rgba(255,255,255,.16); position: relative; overflow: hidden; }
.loop__rail i::after { content: ''; position: absolute; inset: 0; background: var(--green); transform-origin: left; transform: scaleX(var(--fill, 1)); }
.loop__steps { display: grid; gap: 14px; }
.loop__steps li { display: grid; gap: 6px; align-content: start; }
.loop__num { font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--green); }
.loop__steps h3 { color: #fff; font-size: clamp(24px, 1.9vw, 30px); }
.loop__steps p { color: rgba(255,255,255,.82); }

.loop__read { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; border-top: 1px solid rgba(255,255,255,.14); }
.loop__read > div { padding: 14px 14px 0 0; display: grid; gap: 6px; align-content: start; }
.loop__read > div + div { padding-left: 14px; border-left: 1px solid rgba(255,255,255,.14); }
.loop__read dt { font-size: 15px; color: rgba(255,255,255,.7); }
.loop__read dd { margin: 0; display: grid; gap: 4px; }
.loop__read b { font-family: var(--display); font-weight: 800; font-size: clamp(26px, 2.1vw, 34px); line-height: 1; letter-spacing: -.02em; color: #fff; font-variant-numeric: tabular-nums; }
.loop__read dd > span { font-size: 15px; line-height: 1.3; color: rgba(255,255,255,.78); }
.loop__read dd [data-loop-water] { color: var(--sun); }
.loop__read dd b:not([data-loop-water]) { color: #a9dcff; }
.loop__bar { display: block; position: relative; height: 10px; margin: 10px 0 6px; border-radius: 10px; background: linear-gradient(90deg, #6fb7ff, #9fe0d6 35%, #f3c04c 65%, #ff6a4d); }
.loop__bar i { position: absolute; top: 50%; left: 0; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.22), 0 4px 10px rgba(0,0,0,.4); transform: translateX(0); }
.loop__gauge [data-loop-state] { min-height: 2.6em; }

.loop__stage { display: grid; gap: 14px; width: min(100%, calc((100svh - 300px) * 1.9)); margin-inline: auto; }
.loop__svg { width: 100%; height: auto; overflow: visible; }
.loop__note { font-size: var(--small); color: rgba(255,255,255,.78); }
.loop__note strong { color: #fff; }

/* the drawing */
.loop__case { fill: rgba(255,255,255,.035); stroke: rgba(255,255,255,.3); stroke-width: 2; }
.loop__wall { opacity: .9; }
.loop__label { fill: rgba(255,255,255,.62); font-family: var(--body); font-weight: 600; font-size: 24px; transition: fill .4s; }
.loop__label--case { fill: rgba(255,255,255,.5); font-size: 20px; letter-spacing: .02em; }
.loop__label.is-on { fill: #fff; }
.loop__air path { fill: none; stroke: #a9dcff; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 18 14; opacity: .7; animation: loop-air 1.4s linear infinite; }
@keyframes loop-air { to { stroke-dashoffset: -32; } }
.loop__pipe { fill: none; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; transition: opacity .4s; }
.loop__pipe--cold { stroke: #6fb7ff; } .loop__pipe--cool { stroke: #9fe0d6; } .loop__pipe--hot { stroke: #ff6a4d; } .loop__pipe--warm { stroke: #f3c04c; }
.loop__track { fill: none; stroke: none; }
.loop__water { fill: none; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.loop__water--flow { stroke: #e8775f; }
.loop__water--back { stroke: rgba(243,192,76,.55); }
.loop__dot { fill: #fff; stroke: rgba(255,255,255,.35); stroke-width: 5; paint-order: stroke; }
.loop__wdot { fill: #ffd9b8; }
.loop__hi { fill: rgba(122,188,99,.1); stroke: var(--green); stroke-width: 2; stroke-dasharray: 6 6; opacity: 0; transition: opacity .45s; animation: loop-dash 1.2s linear infinite; }
@keyframes loop-dash { to { stroke-dashoffset: -24; } }
.loop__part.is-on .loop__hi { opacity: 1; }
.loop__coil { fill: rgba(169,220,255,.08); stroke: rgba(169,220,255,.5); stroke-width: 1.5; }
.loop__fins { stroke: rgba(169,220,255,.42); stroke-width: 1.4; }
.loop__grille { fill: none; stroke: rgba(255,255,255,.28); stroke-width: 2; }
.loop__grille--in { stroke: rgba(255,255,255,.12); }
.loop__blades { fill: rgba(255,255,255,.2); transform-box: view-box; transform-origin: 330px 300px; animation: loop-fan 2.4s linear infinite; }
@keyframes loop-fan { to { transform: rotate(360deg); } }
.loop__comp { fill: #2a4636; stroke: rgba(255,255,255,.55); stroke-width: 2; }
.loop__comp-band { stroke: rgba(255,255,255,.3); stroke-width: 2; }
.loop__hx { fill: #2a4636; stroke: rgba(255,255,255,.55); stroke-width: 2; }
.loop__hx-plates { fill: none; stroke: rgba(255,255,255,.35); stroke-width: 1.4; }
.loop__valve { fill: #2a4636; stroke: rgba(255,255,255,.6); stroke-width: 2; stroke-linejoin: round; }
.loop__valve-stem { stroke: rgba(255,255,255,.6); stroke-width: 2.5; stroke-linecap: round; }
.loop__rad-body { fill: #2a4636; stroke: rgba(255,255,255,.5); stroke-width: 2; transition: fill .6s; }
.loop__rad-ch { stroke: rgba(255,255,255,.18); stroke-width: 2; }
.loop__rad.is-warm .loop__rad-body { fill: url(#loopRad); }
.loop__rad.is-warm .loop__rad-ch { stroke: rgba(120,40,20,.25); }
.loop__heat { fill: none; stroke: rgba(243,192,76,.7); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 6 8; opacity: 0; transition: opacity .6s; animation: loop-air 1.6s linear infinite; }
.loop__rad.is-warm .loop__heat { opacity: 1; }
.loop__cyl-body { fill: #2a4636; stroke: rgba(255,255,255,.55); stroke-width: 2; }
.loop__cyl-fill { fill: url(#loopCyl); opacity: .85; }
.loop__cyl-coil { fill: none; stroke: rgba(255,255,255,.7); stroke-width: 2.5; stroke-linejoin: round; }

@media (min-width: 1000px) {
  .loop__pin { min-height: 100svh; display: flex; align-items: center; padding-top: calc(var(--header-h) + 16px); padding-bottom: 24px; }
  .loop__pin > .wrap { width: min(100% - var(--gutter) * 2, var(--wrap)); }
  .loop__grid { grid-template-columns: minmax(0, .6fr) minmax(0, 1.4fr); }
}
/* with motion the five stages share one place and swap as you scroll; without it they are a list */
html.has-js.motion .loop__steps { grid-template-areas: 'one'; }
html.has-js.motion .loop__steps li { grid-area: one; opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity .45s, transform .55s var(--ease), visibility 0s .55s; }
html.has-js.motion .loop__steps li.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .45s .1s, transform .55s var(--ease) .1s, visibility 0s; }
@media (max-width: 999px) {
  .loop__copy { display: contents; }
  .loop__stage { display: contents; }
  .loop__copy > h2 { order: 1; } .loop__copy > .lede { order: 2; } .loop__svg { order: 3; } .loop__rail { order: 4; } .loop__steps { order: 5; } .loop__read { order: 6; } .loop__note { order: 7; }
  .loop__grid { gap: 18px; }
  .loop__label { font-size: 34px; }
  .loop__label--case { font-size: 28px; }
  .loop__read { grid-template-columns: 1fr 1.3fr 1fr; }
  .loop__read > div { padding-right: 10px; }
  .loop__read > div + div { padding-left: 10px; }
}
@media (max-width: 520px) {
  .loop__read { grid-template-columns: 1fr 1fr; }
  .loop__read .loop__gauge { grid-column: 1 / -1; order: 3; border-left: 0; padding-left: 0; border-top: 1px solid rgba(255,255,255,.14); margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .loop__air path, .loop__blades, .loop__hi, .loop__heat { animation: none; }
  .loop__steps li { opacity: 1; visibility: visible; transform: none; }
}
