[data-facade-hero] .facade-visual {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  margin-top: 26px;
}
[data-facade-hero] .pg-img { margin: 0; }
[data-facade-hero] .pg-img img { height: auto; aspect-ratio: 8 / 5; object-fit: cover; object-position: center 43%; }
.facade-panel, .facade-sticky, .facade-calc-view {
  background: #fff;
  border: 1px solid #dfdfdf;
  border-radius: 12px;
  padding: clamp(12px, 2vw, 20px);
  min-width: 0;
}
.facade-panel summary { cursor: pointer; font-weight: 700; padding: 3px 0; }
.facade-panel p { margin: 8px 0 0; }
.facade-layer-buttons, .facade-stage-buttons, .facade-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.facade-btn {
  background: #f5f5f5;
  border: 1px solid #d9d9d9;
  border-radius: 7px;
  color: #1a1a1a;
  cursor: pointer;
  font: inherit;
  font-size: .87rem;
  font-weight: 600;
  min-height: 44px;
  padding: 5px 10px;
}
.facade-btn[aria-pressed="true"], .facade-btn[aria-current="step"] { color: #fff; background: #202020; border-color: #202020; }
.facade-btn:focus-visible, .facade-panel summary:focus-visible, .facade-photo-open:focus-visible { outline: 2px solid #22659c; outline-offset: 3px; }
.facade-btn:active { transform: scale(.97); }
.facade-art {
  --wall: #c3bab0;
  --insulation: #ceaf6e;
  --gap: #f8f9fa;
  --frame: #657680;
  --finish: #9b7960;
  --spread: 13%;
  position: relative;
  height: clamp(106px, 15vw, 184px);
  margin: 10px 0;
  background: #f0f1f2;
  border-radius: 9px;
  overflow: hidden;
  isolation: isolate;
}
.facade-art[hidden] { display: none; }
.facade-art .facade-stack {
  position: absolute;
  inset: 11% 7% 12%;
  transform: perspective(520px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 180ms ease-out;
}
.facade-art i {
  display: block;
  position: absolute;
  width: 31%;
  height: 83%;
  top: 7%;
  left: calc(5% + var(--layer) * var(--spread));
  transform: skewY(-11deg);
  border: 1px solid #20202042;
  border-right: 5px solid #2020203c;
  border-bottom: 5px solid #20202036;
  border-radius: 3px;
  transition: left 250ms ease, opacity 250ms ease, background 200ms ease;
}
.facade-art i:nth-child(1) { --layer: 0; background: repeating-linear-gradient(0deg, transparent 0 18px, #55453440 18px 19px), var(--wall); }
.facade-art i:nth-child(2) { --layer: 1; background: repeating-linear-gradient(135deg, #b49150 0 1px, transparent 1px 8px), var(--insulation); }
.facade-art i:nth-child(3) { --layer: 2; background: var(--gap); border-style: dashed; }
.facade-art i:nth-child(4) { --layer: 3; background: repeating-linear-gradient(90deg, var(--frame) 0 4px, #e1e5e6 4px 17px); }
.facade-art i:nth-child(5) { --layer: 4; background: repeating-linear-gradient(0deg, #201b1849 0 1px, transparent 1px 20px), var(--finish); }
.facade-art[data-open="true"] { --spread: 16%; }
.facade-art[data-selected] i { opacity: .58; }
.facade-art[data-selected="0"] i:nth-child(1),
.facade-art[data-selected="1"] i:nth-child(2),
.facade-art[data-selected="2"] i:nth-child(3),
.facade-art[data-selected="3"] i:nth-child(4),
.facade-art[data-selected="4"] i:nth-child(5) { opacity: 1; outline: 2px solid #263c4b; z-index: 1; }
.facade-art[data-step="0"] i:nth-child(n+2),
.facade-art[data-step="1"] i:nth-child(2), .facade-art[data-step="1"] i:nth-child(3), .facade-art[data-step="1"] i:nth-child(5),
.facade-art[data-step="2"] i:nth-child(5) { opacity: 0; }
.facade-art[data-step="1"] i:nth-child(4) { left: 31%; }
.facade-art[data-step="2"] i:nth-child(4) { left: 53%; }
.facade-primary-step { margin: 0 0 12px; font-weight: 700; }
.facade-stage-list { margin: 0; padding: 0; list-style: none; }
.facade-stage-list li { padding: 14px; border-left: 2px solid #d2d2d2; scroll-margin-top: 78px; }
.facade-stage-list li[aria-current="step"] { border-color: #1a1a1a; background: #f2f2f2; }
.facade-stage-list h3 { margin-top: 0; }
.facade-stage-list p { margin-bottom: 0; }
.facade-stage-list .facade-art { max-width: 330px; }
.facade-story.is-interactive .facade-story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}
.facade-story.is-interactive .facade-stage-list li { min-height: clamp(210px, 33vh, 300px); }
.facade-sticky { position: sticky; top: 90px; z-index: 2; }
.facade-sticky[hidden], [data-facade-portfolio] [hidden], [data-facade-calc] [hidden], [data-facade-hero] [hidden] { display: none !important; }
.facade-story.is-interactive .facade-stage-list .facade-art { display: none; }
.facade-story .facade-sticky .facade-art { height: clamp(100px, 16vw, 210px); }
.facade-story .facade-stage-list li:last-child { margin-bottom: 14px; }
.facade-calc-view { margin-top: 15px; }
.facade-calc-view input[type="range"] { width: 100%; margin: 8px 0; accent-color: #242424; }
.facade-calc-view output { display: block; min-height: 2.5em; font-weight: 700; }
.facade-calc-view .facade-art { height: 118px; }
.facade-calc-view .facade-stack { transform: scale(var(--preview-scale, 1)); }
.facade-calc-modes { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.facade-calc-modes label { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.facade-calc-view .facade-art[data-material="1"] { --finish: #a8aeb5; }
.facade-calc-view .facade-art[data-material="2"] { --finish: #b8aaa0; }
.facade-calc-view .facade-art[data-material="3"] { --finish: #627c89; }
.facade-calc-view .facade-art[data-material="4"] { --finish: #aa7358; }
.facade-calc-view .facade-art[data-material="5"] { --finish: #8f9690; }
.facade-calc-view .facade-art[data-material="6"] { --finish: #876448; }
.facade-calc-view .facade-art[data-view="front"] { --spread: 0%; }
.facade-calc-view .facade-art[data-view="front"] i { transform: none; width: 65%; left: 17%; }
.facade-filters { margin-bottom: 14px; }
.facade-photo-open { display: block; width: 100%; border: 0; padding: 0; background: transparent; cursor: zoom-in; }
.facade-gallery {
  border: 1px solid #d9d9d9; border-radius: 12px; width: min(calc(100% - 24px), 940px);
  max-height: calc(100dvh - 24px); padding: 12px; color: #1a1a1a; background: #fff;
}
.facade-gallery::backdrop { background: #121212d9; }
.facade-gallery img { display: block; width: 100%; height: min(62dvh, 590px); object-fit: contain; touch-action: pan-y; background: #ebebeb; }
.facade-gallery figure { margin: 9px 0; }
.facade-gallery figcaption { margin-top: 8px; }
.facade-gallery nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  [data-facade-cards] .card {
    position: relative;
    transform: perspective(760px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
    transition: transform 180ms ease-out;
  }
  [data-facade-cards] .card:hover::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: radial-gradient(circle at var(--gloss-x, 50%) var(--gloss-y, 50%), #fff5, transparent 48%);
  }
  [data-facade-hero] .btn-p:hover { transform: translate(var(--pull-x, 0px), var(--pull-y, 0px)); }
}
@media (max-width: 760px) {
  [data-facade-hero] .facade-visual { grid-template-columns: 1fr; gap: 12px; }
  [data-facade-hero] .facade-panel { order: -1; }
  [data-facade-hero] .pg-img img { aspect-ratio: 4 / 3; }
  .facade-story.is-interactive .facade-story-grid { grid-template-columns: 1fr; gap: 10px; }
  .facade-story.is-interactive .facade-stage-list li { min-height: 210px; }
  .facade-sticky { top: 68px; }
  .facade-story .facade-sticky .facade-art { height: 88px; }
  .facade-stage-buttons { gap: 4px; }
  .facade-stage-buttons .facade-btn { padding-inline: 6px; flex: 1 0 40%; }
}
@media (max-height: 630px) {
  .facade-sticky { position: static; }
}
@media (prefers-reduced-motion: no-preference) and (hover: none) {
  [data-facade-cards] .facade-enter { animation: facade-enter 260ms ease-out both; }
  @keyframes facade-enter { from { opacity: .7; transform: translateY(8px); } }
}
@media (prefers-reduced-motion: reduce) {
  [data-facade-hero] *, .facade-story *, [data-facade-cards] *, [data-facade-calc] * {
    animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
  .facade-story.is-interactive .facade-sticky { display: none; }
  .facade-story.is-interactive .facade-story-grid { display: block; }
  .facade-story.is-interactive .facade-stage-list li { min-height: auto; }
  .facade-story.is-interactive .facade-stage-list .facade-art { display: block; }
}
