/* Insulation page: the opener touch (a thermal band sweeping across the photo) and the set piece "Where the heat goes". */

/* ---------- opener touch: a thermal-camera band wipes across the room in the roof ---------- */
.touch-thermal { position: absolute; inset: 0; z-index: 1; pointer-events: none; clip-path: inset(0 100% 0 0); }
.touch-thermal__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: url(#thermalMap) saturate(1.2); }
.touch-thermal__edge { position: absolute; top: 0; bottom: 0; left: 0; width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 18px 4px rgba(255,190,90,.75); opacity: 0; }
.touch-thermal__defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.no-js .touch-thermal { display: none; }

/* ---------- set piece ---------- */
.therm__grid { display: grid; gap: clamp(28px, 4vw, 64px); align-items: center; }
.therm__copy { display: grid; gap: 18px; align-content: center; }
.therm__bars { display: grid; gap: 18px; margin-top: 6px; }
.therm__bars li { display: grid; gap: 8px; padding: 16px 18px 18px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); transition: background .4s, border-color .4s; }
.therm__bars li.is-on { background: rgba(243,192,76,.1); border-color: rgba(243,192,76,.45); }
.therm__row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.therm__row h3 { color: #fff; font-size: clamp(21px, 1.6vw, 26px); }
.therm__row b { font-family: var(--display); font-weight: 800; font-size: clamp(24px, 2vw, 32px); letter-spacing: -.02em; color: var(--sun); line-height: 1; }
.therm__bar { position: relative; display: block; height: 14px; border-radius: 14px; background: rgba(255,255,255,.1); overflow: hidden; }
.therm__bar i { position: absolute; inset: 0; border-radius: 14px; background: linear-gradient(90deg, #7a2a7a, #e2452f 45%, #f3a03c 75%, #ffe08a); transform-origin: left; transform: scaleX(var(--v)); }
.therm__bars p { font-size: var(--small); color: rgba(255,255,255,.8); }
.therm__src { font-size: var(--small); color: rgba(255,255,255,.7); }

.therm__stage { display: grid; gap: 12px; width: min(100%, calc(min(76svh, 760px) * 1.49)); margin-inline: auto; }
.therm__note { font-size: var(--small); color: rgba(255,255,255,.72); }

.ba { --pos: 50%; position: relative; aspect-ratio: 2000 / 1342; border-radius: var(--radius); overflow: hidden; background: var(--ink-2); box-shadow: 0 40px 80px -40px rgba(0,0,0,.7), 0 0 0 8px rgba(255,255,255,.06); user-select: none; -webkit-user-select: none; }
.ba__img { position: absolute; inset: 0; }
.ba__img img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba__img--photo { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__zones { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ba__zone { fill: rgba(255,224,138,0); stroke: #fff; stroke-width: 5; stroke-dasharray: 22 16; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: .9; transition: fill .45s; }
.ba__zone.is-on { fill: rgba(255,224,138,.16); }
.ba__tag { position: absolute; top: 16px; z-index: 3; padding: 7px 14px; border-radius: 999px; background: rgba(8,20,13,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; font-family: var(--display); font-weight: 700; font-size: 16px; transition: opacity .3s; }
.ba__tag--left { left: 16px; }
.ba__tag--right { right: 16px; }
.ba__handle { position: absolute; z-index: 4; top: 0; bottom: 0; left: var(--pos); width: 48px; margin-left: -24px; display: grid; place-items: center; cursor: ew-resize; touch-action: pan-y; }
.ba__line { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.ba__knob { position: relative; width: 48px; height: 48px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; box-shadow: 0 8px 20px -6px rgba(0,0,0,.5); cursor: ew-resize; }
.ba__knob svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 1000px) {
  .therm__grid { grid-template-columns: minmax(0, .66fr) minmax(0, 1.34fr); }
}
@media (max-width: 999px) {
  .therm__copy { display: contents; }
  .therm__copy > h2 { order: 1; } .therm__copy > .lede { order: 2; } .therm__stage { order: 3; } .therm__bars { order: 4; } .therm__src { order: 5; }
  .therm__grid { gap: 18px; }
  .ba__tag { top: 10px; font-size: 15px; padding: 6px 11px; }
  .ba__tag--left { left: 10px; } .ba__tag--right { right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .touch-thermal { display: none; }
}
