/* Home transformation showcase (#transformation).
   Default styles are the static fallback (no JavaScript, no WebGL2, reduced motion):
   still renderings with a before/after slider, the scene copy and the quote buttons.
   .sc--live turns the section into a ~5-screen scroll track with a pinned 3D stage. */

.showcase { position: relative; color: var(--white); background: var(--navy); border-bottom: 1px solid rgba(215,169,40,.35); }
.sc-skip { position: absolute; top: 8px; left: 8px; z-index: 20; padding: .6rem .9rem; border-radius: 6px; color: var(--navy); background: var(--white); font-size: .85rem; font-weight: 600; transform: translateY(-160%); }
.sc-skip:focus { transform: none; }

/* ---------- Static layout ---------- */
.sc-stage { position: relative; display: grid; gap: 2.5rem; width: min(1180px, calc(100% - 40px)); margin-inline: auto; padding: 96px 0; }
.sc-canvas-wrap, .sc-labels, .sc-rail, .sc-quick, .sc-hint, .sc-compare, .sc-info, .sc-scrim, [data-compare-toggle] { display: none; }
.sc-poster { --split: 50%; position: relative; overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid rgba(215,169,40,.35); border-radius: var(--radius); background: var(--navy-2); }
.sc-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sc-poster .sc-poster-before { clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.sc-poster::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--split); width: 2px; margin-left: -1px; background: var(--gold); pointer-events: none; }
.sc-poster-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.sc-poster-tag { position: absolute; top: 14px; z-index: 1; padding: .3rem .65rem; border-radius: 4px; color: var(--white); background: rgba(9,15,32,.72); font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; pointer-events: none; }
.sc-poster-tag.before { left: 14px; }
.sc-poster-tag.after { right: 14px; color: var(--navy); background: var(--gold); }
.sc-poster-note { position: absolute; right: 14px; bottom: 12px; left: 14px; margin: 0; color: rgba(255,255,255,.8); font-size: .74rem; text-align: center; text-shadow: 0 1px 6px rgba(0,0,0,.6); pointer-events: none; }

.sc-scenes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2.5rem; }
.sc-scene { max-width: 560px; }
.sc-scene h2, .sc-scene h3 { margin: 0 0 .7rem; color: var(--white); font-family: var(--serif); font-weight: 500; line-height: 1.05; letter-spacing: -.01em; }
.sc-scene h2 { font-size: clamp(2.3rem, 4.6vw, 4.2rem); }
.sc-scene h3 { font-size: clamp(1.7rem, 3vw, 2.6rem); }
.sc-scene h2 em, .sc-scene h3 em { color: var(--gold-light); font-style: normal; }
.sc-scene p { margin: 0; color: rgba(255,255,255,.8); font-size: clamp(.98rem, 1.3vw, 1.1rem); }
.sc-scene .eyebrow { color: var(--gold-light); }
.sc-scene:first-child, .sc-final { grid-column: 1 / -1; }
.sc-final { display: grid; justify-items: start; gap: .9rem; max-width: 640px; }
.sc-final .sc-logo { width: auto; height: 64px; }
.sc-final .sc-sub { color: var(--white); font-family: var(--serif); font-size: clamp(1.25rem, 2vw, 1.6rem); }
.sc-final .sc-values { color: var(--gold-light); font-size: .82rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.sc-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .4rem; }
.sc-disclaimer { color: rgba(255,255,255,.55) !important; font-size: .76rem !important; }
.sc-compare-toggle { min-height: 44px; padding: .55rem 1rem; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; color: var(--white); background: rgba(9,15,32,.4); font-size: .85rem; font-weight: 600; cursor: pointer; }
.sc-compare-toggle:hover, .sc-compare-toggle[aria-pressed="true"] { border-color: var(--gold); color: var(--gold-light); }

/* ---------- Live 3D mode ---------- */
.showcase.sc--live { height: 100vh; height: 100svh; border-bottom: 3px solid var(--gold); }
.sc--live .sc-stage { position: relative; display: block; width: 100%; height: 100vh; height: 100svh; padding: 0; overflow: hidden; background: #c9d8e6; }
.sc--live .sc-canvas-wrap { position: absolute; inset: 0; display: block; }
.sc--live .sc-canvas-wrap canvas { display: block; width: 100%; height: 100%; }
.sc--live .sc-poster { position: absolute; inset: 0; aspect-ratio: auto; border: 0; border-radius: 0; transition: opacity .8s ease; }
.sc--live .sc-poster .sc-poster-before { clip-path: none; }
.sc--live .sc-poster .sc-poster-after, .sc--live .sc-poster-range, .sc--live .sc-poster-tag, .sc--live .sc-poster::after, .sc--live .sc-poster-note { display: none; }
.sc--ready .sc-poster { opacity: 0; pointer-events: none; }

.sc--live .sc-scrim { position: absolute; inset: 0; display: block; pointer-events: none; background: linear-gradient(90deg, rgba(9,15,32,.66) 0%, rgba(9,15,32,.3) 28%, rgba(9,15,32,0) 50%), linear-gradient(0deg, rgba(9,15,32,.5) 0%, rgba(9,15,32,0) 32%), linear-gradient(180deg, rgba(9,15,32,.32) 0%, rgba(9,15,32,0) 18%); }
.sc--live .sc-scenes { position: absolute; inset: 0; display: block; pointer-events: none; }
.sc--live .sc-scene { position: absolute; left: max(32px, calc((100% - 1180px) / 2)); bottom: 12vh; width: min(540px, calc(100% - 64px)); opacity: 0; visibility: hidden; will-change: opacity, transform; text-shadow: 0 2px 18px rgba(9,15,32,.45); }
.sc--live .sc-scene:first-child { opacity: 1; visibility: visible; }
.sc--live .sc-scene.is-active a, .sc--live .sc-scene.is-active button { pointer-events: auto; }
.sc--live .sc-final { bottom: auto; top: 50%; width: min(460px, calc(100% - 64px)); gap: .75rem; translate: 0 -42%; padding: 1.7rem 1.9rem; border: 1px solid rgba(215,169,40,.4); border-radius: var(--radius); background: rgba(9,15,32,.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); text-shadow: none; }
.sc--live .sc-final .sc-sub { margin-top: -.4rem; line-height: 1.3; }
.sc--live .sc-final .sc-logo { height: 52px; }
.sc--live .sc-final .sc-actions { display: grid; width: 100%; }
.sc--live .sc-final .sc-actions .btn { width: 100%; }
.sc--live [data-compare-toggle] { display: inline-flex; align-items: center; }
.sc--live [data-compare-toggle][hidden] { display: none; }
.sc--comparing .sc-final { opacity: .0 !important; visibility: hidden !important; }

/* Floating product labels anchored to the 3D openings */
.sc--live .sc-labels { position: absolute; inset: 0; display: block; overflow: hidden; pointer-events: none; }
.sc-label { position: absolute; top: 0; left: 0; opacity: 0; will-change: transform, opacity; }
.sc-label span { position: absolute; bottom: 14px; left: 0; display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .8rem .45rem .65rem; border: 1px solid rgba(215,169,40,.55); border-radius: 999px; color: var(--navy); background: rgba(255,255,255,.94); box-shadow: 0 10px 28px rgba(9,15,32,.22); font-size: .78rem; font-weight: 600; white-space: nowrap; transform: translateX(-50%); }
.sc-label span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.sc-label::after { content: ""; position: absolute; bottom: 0; left: -1px; width: 1px; height: 14px; background: rgba(215,169,40,.8); }

/* Scene rail */
.sc--live .sc-rail { position: absolute; top: 50%; right: max(22px, calc((100% - 1240px) / 2)); z-index: 3; display: grid; gap: .3rem; transform: translateY(-50%); }
.sc-rail button { display: flex; align-items: center; justify-content: flex-end; gap: .65rem; min-height: 36px; padding: 0 .2rem; border: 0; color: rgba(255,255,255,.7); background: none; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; text-shadow: 0 1px 8px rgba(9,15,32,.6); }
.sc-rail button::after { content: ""; width: 9px; height: 9px; border: 1px solid rgba(255,255,255,.75); border-radius: 50%; background: rgba(9,15,32,.35); transition: background .3s, border-color .3s, transform .3s; }
.sc-rail button[aria-current="step"] { color: var(--white); }
.sc-rail button[aria-current="step"]::after { border-color: var(--gold); background: var(--gold); transform: scale(1.25); }
.sc-rail button span { opacity: 0; transform: translateX(6px); transition: opacity .25s, transform .25s; }
.sc-rail button:hover span, .sc-rail button:focus-visible span, .sc-rail button[aria-current="step"] span { opacity: 1; transform: none; }

/* Always-available quote shortcut */
.sc--live .sc-quick { position: absolute; top: 100px; right: max(22px, calc((100% - 1240px) / 2)); z-index: 3; display: inline-flex; min-height: 44px; padding: .55rem 1rem; font-size: .84rem; }

.sc--live .sc-hint { position: absolute; bottom: 26px; left: 50%; display: grid; justify-items: center; gap: .4rem; margin: 0; color: rgba(255,255,255,.85); font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; transform: translateX(-50%); pointer-events: none; }
.sc-hint::after { content: ""; width: 1px; height: 34px; background: linear-gradient(var(--gold), rgba(215,169,40,0)); animation: sc-hint 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes sc-hint { 0%, 100% { transform: scaleY(.35); opacity: .5; } 50% { transform: scaleY(1); opacity: 1; } }

/* Split-screen before/after handle */
.sc--live .sc-compare:not([hidden]) { --split: 50%; position: absolute; inset: 0; z-index: 4; display: block; pointer-events: none; }
.sc-compare-handle { position: absolute; top: 0; bottom: 0; left: var(--split); width: 48px; margin-left: -24px; padding: 0; border: 0; background: none; cursor: ew-resize; pointer-events: auto; touch-action: none; }
.sc-compare-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--gold); box-shadow: 0 0 0 1px rgba(9,15,32,.25); }
.sc-compare-handle::after { content: "‹ ›"; position: absolute; top: 50%; left: 50%; display: grid; width: 46px; height: 46px; place-items: center; border: 2px solid var(--gold); border-radius: 50%; color: var(--navy); background: var(--white); font-size: 1.1rem; font-weight: 700; letter-spacing: .1em; transform: translate(-50%, -50%); box-shadow: 0 8px 24px rgba(9,15,32,.3); }
.sc-compare-tag { position: absolute; top: 96px; padding: .3rem .65rem; border-radius: 4px; color: var(--white); background: rgba(9,15,32,.75); font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.sc-compare-tag.before { left: 24px; }
.sc-compare-tag.after { right: 24px; color: var(--navy); background: var(--gold); }
.sc-compare-done { position: absolute; bottom: 28px; left: 50%; min-height: 44px; padding: .55rem 1.1rem; border: 1px solid var(--gold); border-radius: 6px; color: var(--navy); background: var(--white); font-size: .85rem; font-weight: 600; transform: translateX(-50%); pointer-events: auto; cursor: pointer; }

/* Product info card (click or tap a window or door) */
.sc--live .sc-info:not([hidden]) { position: absolute; right: max(22px, calc((100% - 1240px) / 2)); bottom: 28px; z-index: 5; display: grid; gap: .5rem; width: min(360px, calc(100% - 44px)); padding: 1.2rem 1.25rem 1.25rem; border: 1px solid rgba(215,169,40,.5); border-radius: var(--radius); color: var(--ink); background: var(--white); box-shadow: 0 24px 60px rgba(9,15,32,.32); animation: sc-in .35s ease; }
.sc-info h3 { margin: 0; padding-right: 1.6rem; color: var(--navy); font-family: var(--serif); font-size: 1.45rem; font-weight: 600; }
.sc-info p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.sc-info a { justify-self: start; margin-top: .3rem; color: var(--gold-deep); font-size: .88rem; font-weight: 700; }
.sc-info a:hover { color: var(--navy); }
.sc-info-close { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; border-radius: 50%; color: var(--navy); background: var(--cream); font-size: 1.2rem; line-height: 1; cursor: pointer; }
@keyframes sc-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 820px) {
  .sc-stage { padding: 72px 0; }
  .sc-scenes { grid-template-columns: 1fr; }
  .sc-poster { aspect-ratio: 4 / 3; }
  .sc--live .sc-scrim { background: linear-gradient(0deg, rgba(9,15,32,.88) 0%, rgba(9,15,32,.6) 34%, rgba(9,15,32,0) 62%), linear-gradient(180deg, rgba(9,15,32,.45) 0%, rgba(9,15,32,0) 20%); }
  .sc--live .sc-scene { left: 20px; bottom: calc(88px + env(safe-area-inset-bottom)); width: calc(100% - 40px); }
  .sc--live .sc-scene h2 { font-size: clamp(2rem, 8.4vw, 2.7rem); }
  .sc--live .sc-scene h3 { font-size: clamp(1.6rem, 7vw, 2.1rem); }
  .sc--live .sc-scene p { font-size: .95rem; }
  .sc--live .sc-final { top: auto; bottom: calc(80px + env(safe-area-inset-bottom)); translate: none; padding: 1.3rem 1.2rem; gap: .65rem; }
  .sc-final .sc-logo { height: 46px; }
  .sc-actions { display: grid; width: 100%; }
  .sc-actions .btn { width: 100%; }
  .sc--live .sc-rail { top: 84px; right: auto; left: 20px; display: flex; gap: .15rem; transform: none; }
  .sc-rail button { min-height: 36px; padding: 0 .3rem; }
  .sc-rail button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .sc--live .sc-quick { top: 80px; right: 14px; min-height: 40px; padding: .45rem .8rem; font-size: .78rem; }
  .sc--live .sc-hint { bottom: calc(84px + env(safe-area-inset-bottom)); display: none; }
  .sc--live .sc-info:not([hidden]) { right: 14px; bottom: calc(80px + env(safe-area-inset-bottom)); width: calc(100% - 28px); }
  .sc-compare-tag { top: 132px; }
  .sc-compare-done { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .sc-label span { font-size: .7rem; padding: .35rem .65rem .35rem .55rem; }
}
@media (max-width: 820px) {
  .sc--live .sc-final { gap: .5rem; padding: 1.05rem 1.1rem 1.1rem; background: rgba(9,15,32,.82); }
  .sc--live .sc-final .sc-logo { height: 38px; }
  .sc--live .sc-final h3 { margin-bottom: 0; }
  .sc--live .sc-final .sc-sub { font-size: 1.08rem; }
  .sc--live .sc-final .sc-values { display: none; }
  .sc--live .sc-final .btn { min-height: 46px; }
  .sc--live .sc-final .sc-disclaimer { font-size: .7rem !important; line-height: 1.4; }
}
@media (max-width: 820px) and (max-height: 700px) {
  .sc--live .sc-final .sc-logo, .sc--live .sc-final .sc-sub { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-hint::after { animation: none; }
}
.sc-play { display: none; }
.sc--live .sc-play { position: absolute; bottom: 26px; right: max(22px, calc((100% - 1240px) / 2)); z-index: 3; display: inline-flex; align-items: center; min-height: 40px; padding: .45rem 1rem; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; color: var(--white); background: rgba(9,15,32,.55); font-size: .8rem; font-weight: 600; cursor: pointer; }
.sc--live .sc-play:hover { border-color: var(--gold); color: var(--gold-light); }
@media (max-width: 820px) { .sc--live .sc-play { top: 132px; bottom: auto; right: 14px; } }
