/* Tundra Construction: scroll homepage.
   Loads after scrollcraft.css (the engine, do not edit) and site.css (header,
   footer, buttons). Everything here is this page's own markup. */

:root {
  --sc-canvas: #0a0d11;
  --sc-surface: #10151b;
  --sc-ink: #e9eef2;
  --sc-ink-soft: #9db0bf;
  --sc-accent: #18a4d9;
  --sc-accent-ink: #0a0d11;
  --sc-font-display: "Archivo", "Segoe UI", system-ui, sans-serif;
  --sc-font-text: "Archivo", "Segoe UI", system-ui, sans-serif;
  --sc-shadow-color: 212 40% 4%;
}

.sc-display { font-stretch: 108%; line-height: 1.02; }
.sc-display em { font-style: normal; color: var(--blue); }
.h-note { margin: 0; font-size: 0.86rem; letter-spacing: 0.01em; color: var(--sc-ink-soft); }

/* Light grounds restate the ink, because colour is inherited as a computed value. */
.on-light {
  --sc-ink: #0a0d11; --sc-ink-soft: #4b5a67; --sc-accent: #14679b; --sc-accent-ink: #ffffff;
  color: var(--sc-ink);
}
.on-light .sc-display em { color: var(--blue-text); }

/* ------------------------------------------------------------ 1 · doorway */
.h-door { background: var(--ink); }
.h-door [data-sc-stage] {
  /* where the doorway sits before any scroll: top, right, left insets */
  --t: 15%; --r: 9%; --l: 60%;
  --o: clamp(0, calc(var(--sc-p, 0) / 0.62), 1);      /* 0 closed .. 1 fully inside */
  --k: calc(1 - var(--o));
  /* the edge nearest the headline waits until the headline has gone */
  --kd: calc(1 - clamp(0, calc((var(--sc-p, 0) - 0.22) / 0.4), 1));
  --kt: var(--k); --kl: var(--kd);
  background: var(--ink);
}
/* front plane: the panel wall, with its joints. Grows faster than the room. */
.h-door__wall {
  position: absolute; inset: -20%;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(11.5vw - 1px), rgba(233, 238, 242, 0.055) calc(11.5vw - 1px) 11.5vw),
    linear-gradient(180deg, #0d1117 0%, #0a0d11 62%, #07090c 100%);
  transform-origin: 72% 60%;
  transform: scale(calc(1 + var(--o) * 0.5));
}
/* cold light on the wall around the opening */
.h-door__spill {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(46% 62% at calc(100% - var(--r) - (100% - var(--r) - var(--l)) / 2) 62%, rgba(150, 205, 235, 0.16), transparent 70%);
  opacity: var(--k);
}
/* back plane: the room, seen through an opening that grows to the full frame */
.h-door__opening {
  position: absolute; inset: 0;
  clip-path: inset(calc(var(--kt) * var(--t)) calc(var(--k) * var(--r)) 0 calc(var(--kl) * var(--l)));
  will-change: clip-path;
}
.h-door__opening img, .h-door__settled {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: 50% 58%;
}
.h-door__opening img {
  transform-origin: 78% 62%;
  /* starts on the evaporators and lights, then tracks across as the room opens */
  transform: translate3d(calc(var(--k) * 46%), 0, 0) scale(calc(1.16 - var(--o) * 0.16));
  will-change: transform;
}
.h-door__settled { display: none; }
/* nearest plane: cold air rolling out at the threshold */
.h-door__air {
  position: absolute; left: 30%; right: -10%; bottom: -14%; height: 46%; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 60%, rgba(214, 234, 246, 0.2), transparent 70%);
  transform: translate3d(0, calc(var(--o) * 26vh), 0) scale(calc(1 + var(--o) * 0.6));
  opacity: calc(1 - var(--o) * 1.2);
}
/* a corner of density for the line that arrives inside the room. Sibling of the copy. */
.h-door__shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top right, rgba(10, 13, 17, 0.9) 0%, rgba(10, 13, 17, 0.66) 26%, rgba(10, 13, 17, 0.2) 48%, transparent 64%);
  opacity: clamp(0, calc((var(--sc-p, 0) - 0.5) / 0.22), 1);
}
.h-door__copy {
  position: absolute; z-index: 20; left: var(--sc-gutter); top: 50%;
  width: min(46vw, 40rem); translate: 0 -46%;
}
.h-door__copy h1 { font-size: clamp(2.6rem, 5.4vw, 5.2rem); }
.h-door__copy .lead { margin: 26px 0 34px; max-width: 34ch; }
.h-door__inside { position: absolute; z-index: 20; left: var(--sc-gutter); bottom: clamp(3rem, 11vh, 8rem); max-width: 34rem; }
.h-door__inside .h-note { margin-top: 14px; color: #c3d0da; }

@media (max-width: 860px) {
  .h-door [data-sc-stage] { --t: 56%; --r: 16%; --l: 16%; --kt: var(--kd); --kl: var(--k); }
  .h-door__wall { transform-origin: 50% 80%; background-size: auto; }
  /* phones: start on the evaporators and lights, not the bare floor */
  .h-door__opening img { transform-origin: 50% 80%; object-position: 42% 50%; transform: translate3d(0, calc(var(--k) * 24%), 0) scale(calc(1.16 - var(--o) * 0.16)); }
  .h-door__settled { object-position: 42% 50%; }
  .h-door__air { left: -10%; }
  .h-door__copy { top: calc(var(--header-h) + 3.5vh); translate: none; width: auto; right: var(--sc-gutter); }
  .h-door__copy h1 { font-size: clamp(2.1rem, 9.4vw, 3rem); }
  .h-door__copy .lead { margin: 16px 0 20px; font-size: 1rem; }
  .h-door__shade { background: linear-gradient(to top, rgba(10, 13, 17, 0.92) 0%, rgba(10, 13, 17, 0.7) 24%, rgba(10, 13, 17, 0.2) 44%, transparent 58%); }
  .h-door__inside { right: var(--sc-gutter); bottom: 9vh; }
}

/* --------------------------------------------------------------- 2 · fail */
.h-fail { background: #06080b; padding-block: clamp(5rem, 12vw, 11rem) clamp(5rem, 11vw, 10rem); }
.h-fail__grid { display: grid; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.h-fail__copy h2 { max-width: 15ch; }
.h-fail__copy .lead { margin: 30px 0 0; max-width: 40ch; }
.h-fail__media { display: grid; grid-template-columns: repeat(12, 1fr); align-items: end; }
.h-fail__media figure { margin: 0; overflow: hidden; background: var(--ink-3); }
.h-fail__media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.82) contrast(1.04); }
.h-fail__a { grid-column: 1 / 9; grid-row: 1; aspect-ratio: 4 / 5; }
.h-fail__b { grid-column: 7 / 13; grid-row: 1; aspect-ratio: 4 / 3; margin-bottom: -9% !important; box-shadow: var(--sc-e3); z-index: 1; }
.h-fail__cap { grid-column: 1 / 7; grid-row: 2; margin-top: 18px; }
@media (min-width: 900px) { .h-fail__grid { grid-template-columns: 1fr 0.92fr; } }

/* -------------------------------------------------------------- 3 · raise */
.h-raise { background: #0a0d11; }
.h-raise .sc-copy .lead { margin: 14px 0 0; color: #d5dfe6; }
.h-raise__scrim {
  background: linear-gradient(to top right, rgba(10, 13, 17, 0.95) 0%, rgba(10, 13, 17, 0.86) 28%, rgba(10, 13, 17, 0.42) 48%, transparent 64%);
}
/* signature: the gauge that reads the panel as the visitor stands it up */
.h-gauge {
  --ang: 22;
  position: absolute; z-index: 21; right: var(--sc-gutter); top: calc(var(--header-h) + 28px);
  display: grid; grid-template-columns: auto auto; column-gap: 18px; align-items: end;
  padding: 18px 22px 16px 18px;
  background: rgba(10, 13, 17, 0.9); box-shadow: var(--sc-e2), var(--sc-edge);
  transition: opacity 0.3s;
}
.h-gauge svg { grid-row: 1 / 3; width: 92px; height: 92px; overflow: visible; }
.h-gauge__base { stroke: rgba(233, 238, 242, 0.32); stroke-width: 1.5; }
.h-gauge__arc { stroke: rgba(233, 238, 242, 0.2); stroke-width: 1.5; stroke-dasharray: 2 5; }
.h-gauge__needle {
  stroke: var(--blue); stroke-width: 3; stroke-linecap: round;
  transform-box: view-box; transform-origin: 14px 106px;
  transform: rotate(calc(var(--ang) * -1deg));
}
.h-gauge__read { margin: 0; font-size: 2.5rem; font-weight: 500; font-stretch: 108%; line-height: 1; letter-spacing: -0.03em; color: #fff; min-width: 2.2ch; }
.h-gauge__read span:last-child { color: var(--blue); }
.h-gauge__label { margin: 6px 0 0; font-size: 0.68rem; font-weight: 700; font-stretch: 125%; letter-spacing: 0.18em; text-transform: uppercase; color: var(--sc-ink-soft); }
.h-gauge.is-plumb .h-gauge__label { color: var(--blue); }

@media (max-width: 860px) {
  /* phones: the clip sits as a 4:3 band, the gauge above it, the copy below */
  .h-raise .sc-stage :is(video[data-sc-scrub], .sc-stage__poster) { object-fit: contain; object-position: 50% 44%; }
  .h-raise__scrim { display: none; }
  .h-gauge { right: auto; left: var(--sc-gutter); top: calc(var(--header-h) + 2vh); padding: 12px 16px 12px 12px; }
  .h-gauge svg { width: 64px; height: 64px; }
  .h-gauge__read { font-size: 2rem; }
  .h-raise .sc-copy--lead { bottom: 7vh; }
  .h-raise .sc-display--lg { font-size: clamp(1.9rem, 8vw, 2.6rem); }
}

/* -------------------------------------------------------------- 4 · floor */
.h-floor { background: #0a0d11; }
.h-floor__img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.h-floor__top { position: absolute; inset: 0; }
.h-floor__scrim { --sc-scrim-a: 92%; background: linear-gradient(90deg, rgba(10, 13, 17, 0.93) 0%, rgba(10, 13, 17, 0.8) 30%, rgba(10, 13, 17, 0.3) 54%, transparent 70%); }
.h-floor__copy { position: absolute; z-index: 20; left: var(--sc-gutter); top: 50%; translate: 0 -50%; width: min(34rem, 44vw); }
.h-floor__steps { display: grid; margin-top: 28px; }
.h-floor__steps > * { grid-area: 1 / 1; max-width: 30ch; }
@media (max-width: 860px) {
  .h-floor__scrim { background: linear-gradient(to top, rgba(10, 13, 17, 0.95) 0%, rgba(10, 13, 17, 0.82) 34%, rgba(10, 13, 17, 0.3) 56%, transparent 70%); }
  .h-floor__copy { top: auto; bottom: 8vh; translate: none; width: auto; right: var(--sc-gutter); }
  .h-floor__steps { margin-top: 16px; min-height: 7.5em; }
}

/* -------------------------------------------------------------- 5 · rooms */
.h-rooms { padding-block: clamp(5rem, 11vw, 10rem); }
.h-rooms__head { display: grid; gap: 22px; margin-bottom: clamp(2.5rem, 6vw, 5rem); }
.h-rooms__head h2 { max-width: 16ch; }
.h-rooms__head .lead { margin: 0; }
@media (min-width: 900px) { .h-rooms__head { grid-template-columns: 1.1fr 0.9fr; align-items: end; gap: 6vw; } }
.h-rooms__grid { display: grid; gap: clamp(14px, 1.6vw, 24px); grid-template-columns: 1fr; }
.h-rooms__f { margin: 0; display: flex; flex-direction: column; }
.h-rooms__f img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: #dfe5ea; }
.h-rooms__f figcaption { padding-top: 12px; font-size: 0.78rem; font-weight: 700; font-stretch: 125%; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-dark); }
@media (min-width: 900px) {
  .h-rooms__grid { grid-template-columns: repeat(12, 1fr); }
  .h-rooms__f img { aspect-ratio: auto; height: clamp(300px, 36vw, 520px); }
  .h-rooms__f--a { grid-column: 1 / 8; }
  .h-rooms__f--b { grid-column: 8 / 13; }
  .h-rooms__f--c { grid-column: 1 / 5; margin-top: clamp(14px, 2vw, 34px); }
  .h-rooms__f--d { grid-column: 5 / 13; margin-top: clamp(14px, 2vw, 34px); }
}
.h-rooms__more { margin-top: clamp(2rem, 4vw, 3.5rem); }

/* -------------------------------------------------------------- 6 · lifts */
.h-lifts { background: var(--ink); padding-block: clamp(5rem, 11vw, 10rem); }
.h-lifts__grid { display: grid; gap: clamp(3rem, 6vw, 6rem); align-items: center; }
@media (min-width: 900px) { .h-lifts__grid { grid-template-columns: 0.9fr 1fr; } }
.h-lifts__media { position: relative; padding-right: 14%; padding-bottom: 8%; }
.h-lifts__shaft { margin: 0; position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--ink-3); }
.h-lifts__shaft img { position: absolute; left: 0; top: -70px; width: 100%; height: calc(100% + 140px); max-width: none; object-fit: cover; }
.h-lifts__detail { margin: 0; position: absolute; right: 0; bottom: 0; width: 38%; aspect-ratio: 3 / 4; overflow: hidden; box-shadow: var(--sc-e3); }
.h-lifts__detail img { width: 100%; height: 100%; object-fit: cover; }
.h-lifts__copy .lead { margin: 22px 0 0; }
.h-lifts__copy .eyebrow { margin-bottom: 22px; }

/* -------------------------------------------------------------- 7 · close */
.h-close { padding-block: clamp(5rem, 12vw, 11rem); border-top: 1px solid var(--line-dark); }
.h-close__grid { display: grid; gap: clamp(3rem, 6vw, 6rem); align-items: end; }
@media (min-width: 900px) { .h-close__grid { grid-template-columns: minmax(0, 1.2fr) minmax(19rem, 0.8fr); } }
.h-close .lead { margin: 22px 0 0; }
.h-close__phone {
  display: inline-block; margin: clamp(2rem, 4vw, 3.4rem) 0 clamp(1.6rem, 3vw, 2.4rem);
  font-size: clamp(2.5rem, 5.6vw, 5.6rem); font-variant-numeric: tabular-nums;
  color: var(--ink); text-decoration: none; white-space: nowrap;
  background: linear-gradient(var(--blue-text), var(--blue-text)) 0 100% / 0 3px no-repeat;
  transition: background-size 0.28s var(--sc-ease-out), color 0.2s;
}
.h-close__phone:hover, .h-close__phone:focus-visible { background-size: 100% 3px; color: var(--blue-text); }
.h-close__list { margin: 0; display: grid; gap: 0; border-top: 2px solid var(--ink); }
.h-close__list div { padding: 18px 0; border-bottom: 1px solid var(--line-dark); }
.h-close__list dt { font-size: 0.72rem; font-weight: 700; font-stretch: 125%; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted-dark); }
.h-close__list dd { margin: 6px 0 0; font-weight: 500; overflow-wrap: anywhere; }
.h-close__list a { text-decoration: none; }
.h-close__list a:hover { color: var(--blue-text); }

/* --------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  /* The doorway holds its composition and the room arrives by opacity alone. */
  .h-door__wall, .h-door__opening img, .h-door__air { transform: none; }
  .h-door__opening { clip-path: inset(var(--t) var(--r) 0 var(--l)); }
  .h-door__air { opacity: 1; }
  .h-door__spill { opacity: 1; }
  .h-door__settled { display: block; opacity: var(--o); }
}
