/* =========================================================
   Commercial Spaces page only (loaded by commercial.html).
   Uses the site's existing tokens; adds nothing global.
   ========================================================= */

.hero--commercial .hero__media img { object-position: 50% 42%; }
.facts dd .unit { font-family: var(--f-body); font-size: .8rem; color: var(--ink-soft); margin-left: .15rem; }

/* overview index: three destinations, set as a quiet editorial row */
.com-index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--ink); }
.com-index a { display: flex; flex-direction: column; gap: .5rem; padding: 1.6rem 2rem 1.8rem 0; text-decoration: none; position: relative; }
.com-index a + a { padding-left: 2rem; border-left: 1px solid var(--sand); }
.com-index a::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 3px; background: var(--copper); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease-out); }
.com-index a + a::before { left: 0; }
.com-index a:hover::before, .com-index a:focus-visible::before { transform: scaleX(1); }
.com-index__t { font-family: var(--f-display); font-size: clamp(1.4rem, 1.2rem + .8vw, 2rem); line-height: 1.15; }
.com-index__d { color: var(--ink-soft); font-size: .95rem; flex: 1; }
.com-index .text-link { align-self: flex-start; font-size: .9rem; }

/* retail explorer */
.com-explorer { grid-template-columns: 320px minmax(0, 1fr); }
.com-explorer .layout-list small { white-space: nowrap; }
.com-detail__t { font-family: var(--f-display); font-size: 1.6rem; margin: 0 0 .75rem; }
.com-detail .btn { width: 100%; margin-top: 1rem; }
.com-plan-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .75rem 1rem; border-top: 1px solid var(--sand); }
.com-plan-foot .text-link { display: inline-flex; align-items: center; gap: .4rem; }
.com-plan-foot svg { width: 16px; height: 16px; }
#retail-viewer { height: min(80vh, 920px); background: #fff; }

.com-dl { margin: 0 0 .5rem; }
.com-dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid rgba(246, 240, 232, .16); }
.com-dl dt { font-size: .85rem; opacity: .75; }
.com-dl dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.com-dl--light div { border-bottom-color: var(--sand); }
.com-dl--light dt { opacity: 1; color: var(--ink-soft); }

/* offices: floor stack + plan */
.com-office { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.com-label { font-family: var(--f-body); font-size: .8rem; font-weight: 500; letter-spacing: .06em; color: rgba(246, 240, 232, .6); margin-bottom: .75rem; }
html[lang="gu"] .com-label { font-size: .9rem; letter-spacing: 0; }
.floor-stack { display: flex; flex-direction: column; border: 1px solid rgba(246, 240, 232, .22); margin-bottom: 2rem; }
.floor-stack > * {
  display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: .75rem;
  min-height: 46px; padding: 0 1rem; border: 0; border-bottom: 1px solid rgba(246, 240, 232, .14);
  background: transparent; color: var(--ivory); text-align: left; text-decoration: none; position: relative;
  transition: background-color .4s var(--ease), color .3s;
}
.floor-stack > *:last-child { border-bottom: 0; }
.floor-stack > *::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 3px; background: var(--copper); transform: scaleY(0); transition: transform .5s var(--ease-out); }
.floor-stack > *:hover { background: rgba(246, 240, 232, .06); }
.floor-stack [aria-checked="true"] { background: rgba(202, 133, 76, .16); }
.floor-stack [aria-checked="true"]::before { transform: scaleY(1); }
.fs-n { font-family: var(--f-display); font-size: 1.45rem; line-height: 1; }
.fs-u { font-size: .85rem; opacity: .75; }
.floor-stack__g { border-top: 3px double rgba(246, 240, 232, .3) !important; }
.floor-stack__g .fs-n { color: var(--copper); }
.com-office__title { font-family: var(--f-display); font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.6rem); margin: 0 0 .5rem; line-height: 1.1; }
.com-office__info .btn { width: 100%; margin-top: 1.25rem; }
.com-office__plan .viewer { height: min(78vh, 860px); min-height: 440px; background: #fff; }
.com-offices .source { color: rgba(246, 240, 232, .62); }
.office-poly { fill: rgba(202, 133, 76, .2) !important; stroke: var(--copper) !important; stroke-width: 2 !important; }
.viewer.is-swap .office-poly { animation: office-pulse 1.1s var(--ease-out); }
@keyframes office-pulse { 0% { fill: rgba(202, 133, 76, .55); } 100% { fill: rgba(202, 133, 76, .2); } }
.floor-badge {
  position: absolute; left: 1rem; top: .5rem; z-index: 4; pointer-events: none;
  font-family: var(--f-display); font-size: clamp(3.5rem, 6vw, 6rem); line-height: 1; color: var(--copper);
  text-shadow: 0 2px 0 #fff;
}
.floor-badge::after { content: ""; display: block; width: 100%; height: 2px; background: currentColor; margin-top: .2rem; }
.floor-badge.is-swap { animation: badge-in .7s var(--ease-out); }
@keyframes badge-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* building explorer: bands placed over the builder's render */
.bx { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.bx__figure { margin: 0; position: relative; }
.bx__canvas { position: relative; }
.bx__bands { position: absolute; top: 0; bottom: 0; left: var(--x1); width: calc(var(--x2) - var(--x1)); z-index: 3; }
.bx__band {
  position: absolute; left: 0; right: 0; padding: 0; border: 0; background: transparent; cursor: pointer;
  outline-offset: -2px; transition: background-color .45s var(--ease), box-shadow .45s var(--ease);
}
.bx__band:hover { background: rgba(246, 240, 232, .16); box-shadow: inset 0 0 0 1px rgba(246, 240, 232, .7); }
.bx__band.is-active { background: rgba(202, 133, 76, .32); box-shadow: inset 0 0 0 2px var(--copper), 0 0 40px rgba(202, 133, 76, .35); }
.bx__tag {
  position: absolute; left: calc(100% + 10px); top: 50%; translate: 0 -50%;
  min-width: 34px; height: 34px; border-radius: 17px; display: grid; place-items: center; padding: 0 .5rem;
  background: var(--facade); color: var(--ivory); font: 500 .85rem/1 var(--f-body);
  opacity: 0; scale: .7; transition: opacity .35s, scale .45s var(--ease-out);
}
.bx__tag::before { content: ""; position: absolute; right: 100%; top: 50%; width: 10px; height: 1px; background: var(--facade); }
.bx__band:hover .bx__tag, .bx__band.is-active .bx__tag, .bx__band:focus-visible .bx__tag { opacity: 1; scale: 1; }
.bx__band.is-active .bx__tag { background: var(--copper); }
.bx__band.is-active .bx__tag::before { background: var(--copper); }
.bx__figure figcaption { margin-top: .6rem; }
.bx__panel { border-top: 1px solid var(--ink); padding-top: 1.25rem; }
.bx__floor { font-family: var(--f-display); font-size: clamp(2rem, 1.5rem + 1.6vw, 3rem); line-height: 1.05; margin: 0 0 .5rem; }
.bx__desc { color: var(--ink-soft); margin-bottom: 1.5rem; }

/* editorial gallery */
.com-gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.75rem); align-items: end; }
.cg { margin: 0; }
.cg button { display: block; width: 100%; padding: 0; border: 0; background: #fff; }
.cg img { width: 100%; object-fit: cover; }
.cg figcaption { margin-top: .7rem; font-size: .92rem; display: flex; flex-direction: column; gap: .15rem; }
.cg--1 { grid-column: 1 / -1; }
.cg--1 img { aspect-ratio: 21 / 9; object-position: 50% 45%; }
.cg--2 { grid-column: 1 / 8; }
.cg--2 img { aspect-ratio: 4 / 3; }
.cg--3 { grid-column: 8 / -1; }
.cg--3 button { padding: clamp(.75rem, 2vw, 1.5rem); }
.cg--3 img { object-fit: contain; aspect-ratio: 1190 / 842; }
.cg--4 { grid-column: 4 / 10; margin-top: clamp(1rem, 3vw, 2.5rem); }
.cg--4 img { object-fit: contain; }

/* responsive */
@media (max-width: 1100px) {
  .com-explorer { grid-template-columns: 1fr; }
  .com-office { grid-template-columns: 1fr; }
  .floor-stack { flex-direction: row; flex-wrap: nowrap; }
  .floor-stack > * { flex: 1 1 0; grid-template-columns: 1fr; justify-items: center; text-align: center; padding: .6rem .25rem; border-bottom: 0; border-right: 1px solid rgba(246, 240, 232, .14); min-width: 0; }
  .floor-stack .fs-u { display: none; }
  .floor-stack__g { border-top: 0 !important; }
  .floor-stack > *::before { left: -1px; right: -1px; top: auto; bottom: -1px; width: auto; height: 3px; transform: scaleX(0); }
  .floor-stack [aria-checked="true"]::before { transform: scaleX(1); }
  .com-office__info { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; align-items: end; }
  .com-office__info .btn { grid-column: 1 / -1; }
  .bx { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .com-index { grid-template-columns: 1fr; }
  .com-index a, .com-index a + a { padding: 1.25rem 0; border-left: 0; border-bottom: 1px solid var(--sand); }
  #retail-viewer { height: 70vh; min-height: 420px; }
  .com-office__plan .viewer { height: 62vh; min-height: 380px; }
  .com-gallery > .cg { grid-column: 1 / -1; margin-top: 0; }
  .cg--1 img { aspect-ratio: 16 / 10; }
  /* building explorer: zoom the render onto Block A so each floor is a usable tap target */
  .bx__figure { overflow: hidden; aspect-ratio: 1 / 1.19; }
  .bx__canvas { width: 290%; margin-left: -88%; margin-top: -24.5%; }
  .bx__tag { min-width: 30px; height: 30px; }
}
@media (max-width: 640px) {
  .com-office__info { grid-template-columns: 1fr; }
  .floor-badge { font-size: 3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .viewer.is-swap .office-poly, .floor-badge.is-swap { animation: none; }
}
/* plan viewers sit on paper inside the dark office section — keep their controls and hints dark */
.com-offices .viewer { color: var(--ink); }
