/* The architecture fills the hero; copy and controls keep their own flow.
   The shared canvas retains the route coordinate system from app.js. */
.homepage .site-header {
  position:absolute; inset:0 0 auto; min-height:110px;
  padding:24px 3.8%; background:transparent; border:0;
}
.homepage .brand { width:340px; }
.homepage .hero {
  display:flex; flex-direction:column; align-items:flex-start; gap:0;
  min-height:max(820px,100svh); aspect-ratio:auto;
  padding:clamp(140px,9.2vw,160px) 3.8% 28px;
  background:#111b24; overflow:clip; scroll-margin-top:0;
}
.homepage .hero-stage {
  position:absolute; inset:0; width:100%; height:100%;
  border:0; border-radius:0; background:none; z-index:0; pointer-events:none;
}
.homepage .scene-wrap { inset:0; overflow:clip; }
.homepage .scene-canvas {
  height:108%; width:auto; aspect-ratio:1672 / 941;
  top:53%; right:0; transform:translateY(-50%); transform-origin:100% 50%;
  translate:var(--scene-pan-x, 0px) 0;
  transition:transform 1.6s cubic-bezier(.2,.6,.2,1),translate .75s cubic-bezier(.2,.6,.2,1);
}
.homepage .scene-camera-button {
  position:absolute; right:3.8%; bottom:104px; z-index:6; pointer-events:auto;
  display:inline-flex; align-items:center; gap:10px; min-height:42px;
  padding:10px 14px; border:1px solid #9caeb65c; border-radius:3px;
  background:#101920ed; color:#e2eaf0; font-size:11px;
}
.homepage .scene-camera-button:hover { border-color:#f26a76; background:#202a34; }
.homepage .scene-camera-indicator { color:#ff7180; font-size:10px; font-weight:650; }
.motion-paused .homepage .scene-canvas { transition:none; }
.homepage .scene-image { filter:none; }
.homepage .hero-shade {
  inset:0; background:
    linear-gradient(90deg,#101920d9 0%,#101920b8 22%,#10192050 36%,transparent 53%),
    linear-gradient(0deg,#101820f5,transparent 19%,transparent 88%,#10182077);
}
.homepage .hero-copy {
  width:35%; max-width:545px; min-width:0; padding:0; z-index:2;
}
.homepage .hero h1 {
  font-size:clamp(76px,6.1vw,104px); line-height:.95;
  margin:22px 0; letter-spacing:-.045em;
}
.homepage .hero-description {
  font-size:clamp(16px,1.2vw,20px); line-height:1.7; min-height:0;
}
.homepage .hero-service-area { font-size:12px; color:#bac5cf; }
.homepage .hero-actions { margin-top:24px; gap:12px; }
.homepage .hero-actions .button { padding:15px 19px; font-size:12px; gap:18px; }
.homepage .hero-console {
  position:relative; z-index:2; width:33%; max-width:460px; margin:24px 0 18px;
}
.homepage .scene-readout {
  position:static; min-height:0; padding:0 0 0 17px;
  border:0; border-left:1px solid #e14755; background:none; gap:7px;
}
.homepage .scene-readout-kicker { font-size:8px; letter-spacing:.12em; }
.homepage #scene-readout-title { font-size:23px; }
#scene-system-picker { display:none; }
.homepage #scene-readout-hint { font-size:12px; line-height:1.65; color:#bfccd6; }
.homepage .hero-tools {
  position:static; height:auto; margin-top:14px; border:0;
  justify-content:flex-start; flex-wrap:wrap; gap:24px;
}
.homepage .tool-button { color:#adbbc7; }
.homepage .hero-tools { gap:10px 20px; }
.homepage .tour-running #scene-readout-hint { min-height:9.9em; }
#narration-button svg { flex-shrink:0; }
#narration-button .voice-muted { display:none; }
#narration-button[aria-pressed=false] .voice-waves { display:none; }
#narration-button[aria-pressed=false] .voice-muted { display:block; }
.tool-button:disabled { opacity:.55; cursor:default; }
.homepage .market-tabs {
  width:min(100%,25rem); margin:0 0 18px; gap:clamp(4px,1vw,15px);
  flex-wrap:nowrap; justify-content:space-between; align-items:stretch;
}
.homepage .market-tabs button {
  min-height:44px; min-width:44px; padding:9px 2px;
  color:#d0d9e0; font-size:14px; font-weight:500; white-space:nowrap;
}
.homepage .market-tabs button[aria-selected=true] { color:#ff7583; }
.homepage .market-tabs button:hover { color:white; }
.homepage .hotspot { pointer-events:auto; }
.division-service-links { display:flex; flex-wrap:wrap; justify-content:center; gap:15px 36px; margin-top:30px; }
.division-service-links .text-button { font-size:13px; }
.homepage .film-active .scene-canvas { transform:translateY(-50%) scale(1.025); }
.homepage .scene-status-error { position:relative; z-index:3; margin-top:18px; }

/* Match Residential's copy footprint so changing divisions or normal-length
   system descriptions does not change the artwork's height or left edge. */
@media(min-width:1001px) and (orientation:landscape) {
  /* Fill the established frame without enlarging a scene that already covers it. */
  .homepage .scene-canvas { height:clamp(100%,56.28vw,108%); top:50%; }
  .homepage .hero-copy { display:flex; flex-direction:column; }
  .homepage .hero-service-area { order:1; }
  .homepage .hero-service-area[hidden] { display:block!important; visibility:hidden; }
  .homepage #scene-readout-hint { min-height:3.3em; }
}

@media(max-width:1400px) and (min-width:1001px) {
  .homepage .hero { min-height:max(820px,100svh); padding-top:140px; }
  .homepage .brand { width:290px; }
  .homepage .hero-copy { width:38%; }
  .homepage .hero h1 { font-size:clamp(74px,6.25vw,90px); }
  .homepage .hero-console { width:36%; margin-top:28px; }
  .homepage .hero-actions .button { padding:14px; font-size:11px; gap:12px; }
}

/* On narrower screens the borderless artwork gets its own full-width row,
   while every line of copy remains in normal document flow. */
@media(max-width:1000px), (orientation:portrait) {
  .homepage .site-header { position:relative; min-height:96px; padding:20px 5%; background:#111b24; }
  .homepage .brand { width:285px; }
  .homepage .hero {
    display:grid; grid-template-columns:minmax(0,1fr);
    grid-template-areas:"copy" "scene" "console";
    aspect-ratio:auto; min-height:0; padding:26px 0 28px; gap:0;
  }
  .homepage .hero-copy {
    grid-area:copy; display:block; width:auto; max-width:680px; margin:0 5%; padding:0;
  }
  .homepage .hero h1 { font-size:clamp(66px,9.7vw,90px); line-height:1; margin:24px 0; }
  .homepage .hero-description { font-size:17px; padding:0; }
  .homepage .hero-actions { margin-top:23px; }
  .homepage .hero-stage {
    grid-area:scene; position:relative; inset:auto; width:100%; height:auto;
    aspect-ratio:var(--scene-ratio, 1584 / 993); margin-top:18px;
  }
  .homepage .scene-wrap { inset:0; }
  .homepage .scene-canvas {
    width:100%; height:100%; aspect-ratio:auto; top:50%;
    translate:none; transition:none;
  }
  .homepage .film-active .scene-canvas { transform:translateY(-50%); }
  .homepage .hero-shade {
    inset:0; background:linear-gradient(0deg,#111b24,transparent 4%);
  }
  .homepage .hero-console { grid-area:console; width:auto; max-width:none; margin:8px 5% 25px; }
  .homepage .scene-readout { min-height:0; padding:0 0 0 16px; }
  .homepage .hero-tools { gap:27px; margin-top:14px; }
}
@media(min-width:701px) and (max-width:1000px), (min-width:701px) and (orientation:portrait) {
  .homepage .hero-copy { display:grid; grid-template-columns:1.05fr 1fr; gap:0 35px; max-width:none; }
  .homepage .hero-copy>.eyebrow { grid-column:1 / -1; }
  .homepage .hero h1 { grid-column:1; grid-row:2 / 6; font-size:clamp(66px,8.5vw,84px); margin-bottom:0; }
  .homepage .market-tabs { grid-column:2; grid-row:2; align-self:end; margin:12px 0; }
  .homepage .hero-description { grid-column:2; grid-row:3; align-self:start; padding:0; }
  .homepage .hero-service-area { grid-column:2; grid-row:4; }
  .homepage .hero-actions { grid-column:2; grid-row:5; align-self:start; }
  .homepage .hero-console { display:grid; grid-template-columns:1.2fr 1fr; gap:30px; align-items:center; }
  .homepage .hero-tools { margin:0; justify-content:flex-end; gap:22px; }
}
@media(max-width:700px) {
  .homepage .site-header { min-height:86px; padding:18px 5%; }
  .homepage .brand { width:min(270px,68vw); }
  .homepage .hero { padding-top:22px; }
  .homepage .hero-copy { margin-inline:6%; }
  .homepage .hero h1 { font-size:clamp(46px,11.4vw,72px); margin:15px 0 18px; }
  .homepage .hero h1 br:last-of-type { display:none; }
  .homepage .hero-description { font-size:16px; }
  .homepage .hero-console { margin:14px 6% 12px; }
  .homepage .hotspot {
    width:clamp(24px,6.5vw,34px); height:clamp(24px,6.5vw,34px);
    font-size:clamp(9px,2.3vw,11px); box-shadow:0 1px 4px #0009;
  }
  .homepage .hotspot::before { inset:0; }
  .js-ready .homepage #scene-readout-title { position:absolute; clip-path:inset(50%); width:1px; height:1px; overflow:hidden; }
  .js-ready .homepage #scene-system-picker {
    display:block; width:100%; max-width:26rem; min-height:46px; padding:7px 10px;
    border:1px solid #465660; border-radius:3px; background-color:#19242d;
    color:#edf2f5; font:600 17px/1.3 var(--display);
  }
  .homepage .market-tabs { margin-bottom:16px; }
  .homepage .market-tabs button { font-size:clamp(12px,3.5vw,14px); }
}
@media(max-width:430px) {
  .homepage .hero-description { font-size:15px; }
  .homepage .hero-actions { gap:9px; }
  .homepage .hero-actions .button { padding:14px 13px; font-size:11px; gap:10px; }
  .homepage .scene-readout-kicker { font-size:7px; }
  .homepage #scene-readout-hint { font-size:11px; }
}
@media(max-width:360px) {
  .homepage .hero-actions .button { padding:13px 8px; font-size:10px; gap:6px; }
}
/* Keep the division choices on the first screen when a phone is turned sideways. */
@media (max-width:1000px) and (max-height:500px) and (orientation:landscape) {
  .homepage .hero-copy { display:block; }
  .homepage .hero h1 { font-size:clamp(32px,6.7vw,60px); margin:14px 0 8px; }
  .homepage .hero h1 br { display:none; }
  .homepage .market-tabs { margin:0 0 14px; }
}
