/* The home hero is the only full-screen canvas on the site. */
.hero {
  position: relative;
  overflow: hidden;
  background: #f1f0ed;
}

.hero-inner {
  position: relative;
  min-height: max(610px, calc(100svh - var(--header-height) - 72px));
  isolation: isolate;
}

.hero-scene,
.hero-fallback,
.hero-scene canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-scene {
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 52%, rgb(255 255 255 / .9), transparent 47%),
    linear-gradient(135deg, #eeeae4, #f7f6f3 65%, #ede9e3);
  pointer-events: none;
}

.hero-scene::after {
  position: absolute;
  inset: 0;
  content: "";
  background-image: linear-gradient(rgb(115 85 54 / .045) 1px, transparent 1px), linear-gradient(90deg, rgb(115 85 54 / .045) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to right, transparent 35%, #000 80%);
}

.hero-fallback { z-index: 1; }
.hero-scene canvas { z-index: 2; display: block; opacity: 0; transition: opacity 450ms ease; }
.hero-scene.is-ready canvas { opacity: 1; }
.hero-scene.is-ready .hero-fallback { visibility: hidden; }

.hero-object {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  max-width: none;
  height: auto;
  opacity: var(--opacity, 1);
  transform: translate(-50%, -50%) rotate(var(--tilt, 0deg));
  filter: drop-shadow(5px 9px 7px rgb(48 43 38 / .11));
}

.hero-object--mobile { display: none; }

.hero-object--aircon { --x: 64%; --y: 18%; --size: 130px; --tilt: -11deg; }
.hero-object--stove { --x: 88%; --y: 32%; --size: 105px; --tilt: 11deg; }
.hero-object--outdoor { --x: 55%; --y: 68%; --size: 120px; --tilt: 8deg; }
.hero-object--oil { --x: 93%; --y: 79%; --size: 95px; --tilt: -14deg; }
.hero-object--boiler { --x: 76%; --y: 77%; --size: 105px; --tilt: 12deg; }
.hero-object--distant { --size: 85px; --opacity: .55; filter: none; }
.hero-object--distant.a { --x: 48%; --y: 13%; --size: 72px; --tilt: 18deg; }
.hero-object--distant.b { --x: 79%; --y: 51%; --size: 62px; --tilt: -19deg; }
.hero-object--distant.c { --x: 97%; --y: 9%; --size: 85px; --tilt: 24deg; }
.hero-object--distant.d { --x: 47%; --y: 94%; --size: 72px; --tilt: -26deg; }
.hero-object--distant.e { --x: 27%; --y: 73%; --size: 80px; --tilt: 16deg; }

.hero-copy {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 42%;
  min-height: inherit;
  padding: 60px clamp(28px, 4.4vw, 76px);
  background: rgb(255 254 250 / .82);
  border-right: 1px solid rgb(166 125 78 / .32);
  -webkit-backdrop-filter: blur(13px);
  backdrop-filter: blur(13px);
}

.hero-location { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; color: var(--accent-ink); font-size: 12px; font-weight: 700; letter-spacing: .06em; white-space: nowrap; }
.hero-location > span { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--accent-ink); }
.hero h1 { font-family: var(--font-body); font-size: clamp(36px, 3.5vw, 54px); font-weight: 700; line-height: 1.54; letter-spacing: .025em; }
.hero h1 > span { display: block; white-space: nowrap; }
.hero h1 em { padding-bottom: 2px; border-bottom: 2px solid var(--brand); font-style: normal; }
.hero-lead { margin-top: 30px; color: var(--ink-soft); font-size: 15px; line-height: 2.05; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 30px; }
.hero-actions .button { gap: 14px; padding-inline: 20px; }
.hero-phone { font-family: var(--font-display); font-size: 14px; letter-spacing: .04em; white-space: nowrap; }

.hero-bottom {
  position: relative;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(24px, 4.4vw, 76px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--paper);
  font-size: 12px;
}
.hero-bottom a { display: inline-flex; min-height: 32px; align-items: center; gap: 16px; color: var(--ink); }
.hero-bottom a .icon { width: 18px; }
.hero-bottom a:hover .icon { transform: translateY(4px); }
.hero-bottom i { padding-inline: 12px; color: var(--muted); font-style: normal; }
.hero-motion-toggle { display: none; min-height: 40px; align-items: center; gap: 7px; padding: 5px 8px; border: 0; background: transparent; color: var(--ink-soft); font-size: 12px; cursor: pointer; }
.hero-motion-toggle.is-available { display: inline-flex; }
.hero-motion-toggle:hover { color: var(--accent-ink); }
.hero-motion-icon { display: inline-block; width: 12px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.hero-motion-toggle.is-paused .hero-motion-icon { width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 10px solid currentColor; border-right: 0; }

@media (max-width: 1180px) {
  .hero-copy { width: 47%; }
  .hero h1 { font-size: clamp(34px, 3.6vw, 42px); }
  .hero-phone { display: none; }
}

@media (min-width: 761px) and (max-width: 960px) {
  .hero-object--desktop { width: calc(var(--size) * .72); }
}

@media (max-width: 760px) {
  .hero-inner { display: flex; min-height: max(580px, calc(100svh - var(--header-height) - 60px - 64px)); flex-direction: column; }
  .hero-copy { width: 100%; min-height: 0; justify-content: flex-start; padding: 34px 22px 22px; background: var(--paper); border-right: 0; border-bottom: 1px solid var(--line); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .hero-location { gap: 8px; margin-bottom: 16px; font-size: 11px; letter-spacing: .015em; }
  .hero-location > span { width: 5px; height: 5px; }
  .hero h1 { font-size: clamp(29px, 8.2vw, 38px); line-height: 1.52; }
  .hero-lead { margin-top: 20px; font-size: 13px; line-height: 1.9; }
  .hero-actions { margin-top: 22px; }
  .hero-actions .button { min-height: 50px; padding-inline: 17px; }
  .hero-scene { position: relative; flex: 1; min-height: 260px; }
  .hero-scene::after { mask-image: none; background-size: 56px 56px; }
  .hero-object--desktop { display: none; }
  .hero-object--mobile { display: block; }
  .hero-object--aircon { --x: 22%; --y: 22%; --size: 70px; }
  .hero-object--stove { --x: 74%; --y: 23%; --size: 58px; }
  .hero-object--outdoor { --x: 22%; --y: 70%; --size: 74px; }
  .hero-object--oil { --x: 85%; --y: 70%; --size: 54px; }
  .hero-object--boiler { --x: 55%; --y: 67%; --size: 65px; }
  .hero-bottom { min-height: 60px; gap: 6px; padding: 8px 16px 8px 22px; font-size: 11px; }
  .hero-bottom > span { display: none; }
  .hero-motion-toggle { font-size: 11px; }
}

@media (max-width: 359px) {
  .hero-location { font-size: 10px; }
  .hero h1 { font-size: 28px; }
  .hero-lead { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scene canvas { display: none; }
  .hero-fallback { visibility: visible !important; }
  .hero-motion-toggle { display: none !important; }
}
