/* Home page floor visualizer: a framed, lite editor (js/home-viz.js). Loaded after every other stylesheet.
   Sharp and flat: one hairline frame, one radius (--r-s), no glow, no shadow, no gradient. Orange marks the selected blend and the dot
   that says the preview is live; white marks the active choice in a segmented control. */

/* ---------- layout: editor on the left, copy on the right; one column under 900px ---------- */
.h-viz{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);grid-template-areas:"app copy";gap:48px;align-items:center}
.h-viz__copy{grid-area:copy}
.h-viz__copy h2{text-wrap:balance}
.hv{grid-area:app}
.h-viz [hidden]{display:none}

/* ---------- the frame ---------- */
.hv{
  --hv-ground:color-mix(in srgb,var(--white) 5%,var(--ink));
  --hv-strip:color-mix(in srgb,var(--white) 9%,var(--ink));
  --hv-line:var(--paper-alpha-14);
  min-width:0;overflow:hidden;color:var(--on-dark);
  background:var(--hv-ground);border:1px solid var(--hv-line);border-radius:var(--r-s);
}

/* title strip */
.hv__bar{display:flex;align-items:center;gap:12px;min-height:48px;padding:0 16px;background:var(--hv-strip);border-bottom:1px solid var(--hv-line);font:600 var(--t-caption)/1.2 var(--font-body);white-space:nowrap}
.hv__title{display:inline-flex;align-items:center;gap:10px;font-weight:800;letter-spacing:.01em}
.hv__title svg{flex:none;color:var(--paper-alpha-70)}
.hv__room{min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--paper-alpha-70)}
.hv__room::before{content:"/";margin-right:12px;color:var(--paper-alpha-35)}
.hv__live{display:inline-flex;align-items:center;gap:8px;margin-left:auto;font-size:var(--t-eyebrow);font-weight:700;letter-spacing:.04em;color:var(--paper-alpha-70)}
.hv__live i{width:8px;height:8px;border-radius:var(--r-circle);background:var(--paper-alpha-35);transition:background-color var(--dur-2) var(--ease-standard)}
[data-hv-state=loading] .hv__live i{background:var(--paper-alpha-70)}
[data-hv-state=ready] .hv__live i{background:var(--orange)}
[data-hv-state=ready] .hv__live{color:var(--on-dark)}

/* ---------- the picture ---------- */
.hv__stage{position:relative;aspect-ratio:4/3;overflow:hidden;background:var(--ink);touch-action:pan-y;cursor:ew-resize;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}
.hv__stage picture{display:contents}
.hv__poster,.hv__canvas{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;-webkit-user-drag:none}
.hv__canvas{opacity:0;transition:opacity var(--dur-3) var(--ease-standard)}
.hv__canvas.is-on{opacity:1}
[data-hv-busy] .hv__canvas.is-on{opacity:.55}
[data-hv-state=static] .hv__stage{cursor:default;touch-action:auto}
[data-hv-state=static] :is(.hv__split,.hv__tag,.hv__hint){display:none}

.hv__tag,.hv__hint{position:absolute;padding:6px 10px;border-radius:var(--r-s);background:var(--scrim-alpha-65);color:var(--white);font:700 12px/1.2 var(--font-body);letter-spacing:.08em;text-transform:uppercase;pointer-events:none}
.hv__tag{top:12px}
.hv__tag--l{left:12px}
.hv__tag--r{right:12px}
.hv__hint{bottom:12px;left:0;right:0;width:max-content;margin-inline:auto;letter-spacing:.04em;text-transform:none;font-size:13px}

/* before / after handle: a 2px rule and a 44px grip. The grip turns orange while it is held. */
.hv__split{position:absolute;top:0;bottom:0;width:44px;margin-left:-22px;display:grid;place-items:center;cursor:ew-resize;touch-action:pan-y}
.hv__split::before{content:"";position:absolute;top:0;bottom:0;left:50%;width:4px;margin-left:-2px;box-sizing:border-box;background:var(--white);background-clip:padding-box;border-inline:1px solid var(--scrim-alpha-35)}
.hv__grip{position:relative;display:grid;place-items:center;width:44px;height:44px;border-radius:var(--r-circle);background:var(--white);color:var(--ink);border:1px solid var(--scrim-alpha-35);transition:background-color var(--dur-1) var(--ease-standard)}
[data-hv-drag] .hv__grip{background:var(--orange)}
.hv__split:focus-visible{outline:none}
.hv__split:focus-visible .hv__grip{outline:3px solid var(--orange);outline-offset:3px}

/* ---------- controls ---------- */
.hv__tray{display:grid;gap:16px;padding:16px 16px 18px}
.hv__row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}

/* segmented control: one bar, one radius, the active choice filled white */
.hv__seg{display:inline-flex;overflow:hidden;border:1px solid var(--paper-alpha-20);border-radius:var(--r-s);background:var(--ink)}
.hv__seg a{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:0 16px;color:var(--paper-alpha-85);font:700 var(--t-caption)/1 var(--font-body);letter-spacing:.02em;text-decoration:none;white-space:nowrap;transition:background-color var(--dur-1) var(--ease-standard),color var(--dur-1) var(--ease-standard)}
.hv__seg a+a{border-left:1px solid var(--paper-alpha-20)}
.hv__seg a:focus-visible{outline-offset:-3px}
.hv__seg a[aria-current]{background:var(--white);color:var(--ink)}
@media (hover:hover){.hv__seg a:not([aria-current]):hover{background:var(--paper-alpha-12);color:var(--white)}}

/* swatches */
.hv__pick{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px 24px}
.hv__sw{display:flex;gap:10px}
.hv__s{position:relative;flex:none;display:block;width:44px;height:44px;box-sizing:border-box;border:1px solid var(--paper-alpha-20);border-radius:var(--r-s);background:var(--paper-alpha-8) 50% 20%/130% auto no-repeat;outline:2px solid transparent;outline-offset:3px;transition:outline-color var(--dur-1) var(--ease-standard)}
.hv__s--metal{background:var(--hv-grad)}
.hv__s[aria-current]{outline-color:var(--orange);border-color:var(--orange)}
.hv__s:focus-visible{outline-color:var(--white);outline-width:3px}
/* name and code on hover or focus (pointer devices; the caption beside them always says it) */
.hv__s::after{content:attr(data-tip);position:absolute;bottom:calc(100% + 12px);left:50%;padding:6px 10px;border-radius:var(--r-s);background:var(--white);color:var(--ink);font:700 13px/1.2 var(--font-body);white-space:nowrap;opacity:0;visibility:hidden;pointer-events:none;transform:translateX(-50%);transition:opacity var(--dur-1) var(--ease-standard)}
.hv__s:first-child::after{left:0;transform:none}
.hv__s:last-child::after{left:auto;right:0;transform:none}
@media (hover:hover){.hv__s:hover::after{opacity:1;visibility:visible}}
.hv__s:focus-visible::after{opacity:1;visibility:visible}

.hv__cap{margin:0;min-width:0;text-align:right;line-height:1.25}
.hv__cap b{display:block;font:800 var(--t-body)/1.25 var(--font-body)}
.hv__cap span{display:block;margin-top:2px;color:var(--paper-alpha-70);font-size:var(--t-caption)}

/* ---------- copy column ---------- */
.h-viz__copy .btn{white-space:normal}
.h-viz__alt{display:inline-block;margin-top:16px;min-height:44px;padding:10px 0;font-weight:700;color:inherit;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:5px}
.h-viz__alt:hover{color:var(--orange)}
.h-viz__alt:focus-visible{outline:2px solid currentColor;outline-offset:3px}

/* ---------- phones and tablets: copy, then the editor, then the button ---------- */
@media (max-width:899.98px){
  .h-viz{display:flex;flex-direction:column;gap:20px}
  .h-viz__copy{display:contents}
  .h-viz__copy h2{order:1;margin-bottom:0}
  .h-viz__copy p{order:2;margin:0 auto 4px;max-width:36em;text-align:center}
  .hv{order:3;width:100%;max-width:720px;margin-inline:auto}
  .h-viz__copy .btn{order:4;align-self:center}
  .h-viz__alt{order:5;align-self:center;margin-top:0}
}
@media (max-width:639.98px){
  .h-viz__copy .btn{align-self:stretch;width:100%}
  .hv__bar{gap:10px;padding:0 12px}
  .hv__tray{padding:12px 12px 16px;gap:14px}
  .hv__row{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
  .hv__seg{display:flex}
  .hv__seg a{flex:1 1 0;min-width:0;padding:0 8px}
  .hv__pick{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
  .hv__sw{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
  .hv__s{width:100%;height:44px}
  .hv__cap{text-align:left}
  .hv__tag{top:8px}
  .hv__tag--l{left:8px}
  .hv__tag--r{right:8px}
  .hv__hint{bottom:8px}
}

@media (prefers-reduced-motion:reduce){
  .hv *,.hv *::before,.hv *::after{transition:none}
}
@media (max-width:479.98px){.hv__room{display:none}}

/* ---------- the intro: the handle sweeps by itself, and one call to action sits over the picture ---------- */
.hv__intro{position:absolute;inset:0;z-index:3;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;padding:44px 16px 20px;pointer-events:none;
  background:radial-gradient(ellipse 70% 60% at 50% 54%,rgba(0,0,0,.42),rgba(0,0,0,0) 100%),linear-gradient(to top,rgba(0,0,0,.6),rgba(0,0,0,0) 55%)}
.hv__file{position:absolute}
.hv__cta{position:relative;pointer-events:auto;display:flex;flex-direction:column;align-items:center;gap:6px;max-width:100%;text-align:center;cursor:pointer;-webkit-tap-highlight-color:transparent}
.hv__cam{position:relative;display:grid;place-items:center;width:72px;height:72px;margin-bottom:8px;border-radius:var(--r-circle);background:var(--orange);color:var(--ink);transition:transform var(--dur-2) var(--ease-standard)}
.hv__cam svg{width:32px;height:32px}
.hv__cam::before{content:"";position:absolute;inset:0;border-radius:var(--r-circle);border:1.5px solid var(--orange);pointer-events:none;animation:hv-ring 2.8s var(--ease-standard) infinite}
@keyframes hv-ring{0%{transform:scale(1);opacity:.8}100%{transform:scale(1.75);opacity:0}}
.hv__cta:hover .hv__cam{transform:scale(1.05)}
.hv__cta:active .hv__cam{transform:scale(.97)}
.hv__file:focus-visible+.hv__cta .hv__cam,.hv__file:focus-visible+.hv__alt{outline:3px solid var(--white);outline-offset:4px}
.hv__cta-t{font:800 clamp(20px,2.4vw,26px)/1.15 var(--font-head);color:var(--white);text-shadow:0 1px 12px rgba(0,0,0,.7),0 0 2px rgba(0,0,0,.45);text-wrap:balance}
.hv__cta-s{font:500 var(--t-caption)/1.35 var(--font-body);color:var(--white);text-shadow:0 1px 10px rgba(0,0,0,.75)}
.hv__alt{display:none;pointer-events:auto;margin-top:10px;padding:8px 10px;color:var(--white);font:600 13px/1.2 var(--font-body);text-decoration:underline;text-underline-offset:3px;text-shadow:0 1px 8px rgba(0,0,0,.8);cursor:pointer}
@media (pointer:coarse){.hv__alt{display:block}}
/* while the handle sweeps it rides near the top so the call to action stays clear */
[data-hv-sweep] .hv__split{place-items:start center}
[data-hv-sweep] .hv__grip{margin-top:46px}
[data-hv-sweep] .hv__hint{display:none}
/* once the visitor takes the handle, the call to action settles into a compact bar under the picture */
.hv__stage.is-used .hv__intro{justify-content:flex-end;padding:0 16px 14px;background:linear-gradient(to top,rgba(0,0,0,.55),rgba(0,0,0,0) 38%)}
.hv__stage.is-used .hv__cta{flex-direction:row;gap:12px}
.hv__stage.is-used .hv__cam{width:44px;height:44px;margin:0}
.hv__stage.is-used .hv__cam svg{width:22px;height:22px}
.hv__stage.is-used .hv__cam::before{animation:none;opacity:0}
.hv__stage.is-used .hv__cta-t{font-size:15px;text-align:left}
.hv__stage.is-used :is(.hv__cta-s,.hv__alt){display:none}
.hv__stage.is-used .hv__hint{display:none}
[data-hv-state=static] .hv__stage{cursor:default}
@media (max-width:639.98px){
  .hv__intro{padding:58px 12px 6px}
  .hv__cam{width:64px;height:64px;margin-bottom:4px}
  .hv__cam svg{width:28px;height:28px}
  .hv__cta-t{font-size:18px;max-width:270px}
  .hv__cta-s{font-size:12.5px;max-width:250px}
  [data-hv-sweep] .hv__grip{margin-top:12px}
  .hv__alt{margin-top:2px;padding:6px 10px}
}
@media (prefers-reduced-motion:reduce){
  .hv__cam::before{animation:none;opacity:.5;transform:scale(1.25)}
  .hv__cam{transition:none}
}
html.a11y-motion .hv__cam::before{animation:none;opacity:.5;transform:scale(1.25)}
