/* =====================================================================
   Zenia — page components (plan viewer, facilities, progress, contact)
   Loads after site.css.
   ===================================================================== */

/* Page hero helpers */
.subhead { max-width: 760px; }
.subhead .lead { margin-top: 1.2rem; }
.prose { max-width: 62ch; }
.prose p { margin-bottom: 1.2em; }

/* Feature list — responsive auto-fit (never overflows) */
.featurelist { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 2rem 2.4rem; }
.featurelist__item { border-top: 1px solid var(--line); padding-top: 1.3rem; }
.featurelist__item h4 { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; margin-bottom: .5rem; }
.featurelist__item p { color: var(--ink-soft); font-size: .98rem; margin: 0; }
@media (max-width: 480px) { .featurelist { grid-template-columns: 1fr; gap: 1.5rem; } }

/* Overview collection rows */
.collrow { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.collrow + .collrow { margin-top: clamp(3.5rem, 7vw, 6.5rem); }
.collrow--reverse .collrow__media { order: -1; }
.collrow__media img { width: 100%; border-radius: var(--radius); aspect-ratio: 5/4; object-fit: cover; }
.collrow__stat { display: flex; flex-wrap: wrap; gap: 1.4rem 2.2rem; margin: 1.6rem 0; }
.collrow__stat b { font-family: var(--serif); font-weight: 500; font-size: 1.7rem; display: block; color: var(--teal); }
.collrow__stat span { font-size: .78rem; letter-spacing: .04em; color: var(--ink-soft); }
@media (max-width: 820px) { .collrow { grid-template-columns: 1fr; gap: 1.8rem; } .collrow--reverse .collrow__media { order: 0; } }

/* Plan viewer */
.planviewer { margin-top: 1rem; }
.pv-tabs { display: flex; flex-wrap: wrap; gap: .4rem; border-bottom: 1px solid var(--line); margin-bottom: clamp(1.6rem, 3vw, 2.6rem); }
.pv-tab { font-family: var(--sans); font-size: .76rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft); background: none; border: 0; cursor: pointer; padding: .85em 1.15em; position: relative; transition: color .3s var(--ease); }
.pv-tab:hover { color: var(--ink); }
.pv-tab.is-active { color: var(--teal); }
.pv-tab.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--teal); }
.pv-stage { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(1.6rem, 4vw, 3.4rem); align-items: start; }
.pv-plan { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1rem, 2.5vw, 2rem); }
.pv-plan img { width: 100%; height: auto; object-fit: contain; cursor: zoom-in; }
.pv-zoom { position: absolute; top: 1rem; right: 1rem; z-index: 2; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
  background: rgba(255,255,255,.9); border: 1px solid var(--line); color: var(--teal-deep); padding: .5em .85em; border-radius: 2px; cursor: pointer; display: inline-flex; align-items: center; gap: .5em; }
.pv-zoom:hover { background: #fff; }
.pv-info { position: sticky; top: 100px; }
.pv-code { font-family: var(--sans); font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); }
.pv-title { font-family: var(--serif); font-weight: 500; font-size: clamp(1.7rem, 3vw, 2.3rem); margin: .35rem 0 1.3rem; letter-spacing: -.01em; }
.pv-specs { list-style: none; margin: 0 0 1.8rem; padding: 0; }
.pv-specs li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.pv-specs li span:first-child { color: var(--ink-soft); }
.pv-specs li span:last-child { font-weight: 500; }
.pv-specs li.pv-size { border-bottom: 0; padding-top: 1rem; }
.pv-specs li.pv-size span:last-child { font-family: var(--serif); font-size: 1.4rem; color: var(--teal); }
.pv-specs li.pv-has-note { border-bottom: 0; padding-bottom: .2rem; }
.pv-specs li.pv-note { display: block; white-space: pre-line; padding-top: 0; font-size: .78rem; line-height: 1.6; color: var(--ink-soft); }
.pv-variants__label { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .8rem; }
.pv-variants { display: flex; flex-wrap: wrap; gap: .5rem; }
.pv-variant { font-family: var(--sans); font-size: .78rem; font-weight: 500; border: 1px solid var(--line); background: var(--white); color: var(--ink);
  padding: .55em 1em; border-radius: 2px; cursor: pointer; transition: all .25s var(--ease); }
.pv-variant:hover { border-color: var(--teal); color: var(--teal); }
.pv-variant.is-active { background: var(--teal); border-color: var(--teal); color: #fff; }
@media (max-width: 820px) { .pv-stage { grid-template-columns: 1fr; } .pv-info { position: static; } }

/* Facilities plan switcher */
.facplan__tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem; }
.facplan__tab { font-family: var(--sans); font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid var(--line); background: var(--white); color: var(--teal); padding: .7em 1.3em; border-radius: 2px; cursor: pointer; transition: all .25s var(--ease); }
.facplan__tab:hover { color: var(--teal); border-color: var(--teal); }
.facplan__tab.is-active { background: var(--teal); border-color: var(--teal); color: #fff; }
.facplan__stage { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1rem, 2.5vw, 2rem); }
.facplan__stage img { width: 100%; height: auto; cursor: zoom-in; }

/* Construction progress */
.progress__meta { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.progress__date { font-family: var(--sans); font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
.progress__pct { font-family: var(--serif); font-size: 1.1rem; color: var(--ink-soft); }
.progress__grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; gap: clamp(.7rem, 1.6vw, 1.1rem); }
.progress__grid figure { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); background: #ddd; }
.progress__grid img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; transition: transform 1s var(--ease); cursor: zoom-in; }
.progress__grid figure:hover img { transform: scale(1.05); }
.progress__grid .is-feature { grid-column: span 2; grid-row: span 2; }
.progress__grid .is-feature img { aspect-ratio: auto; height: 100%; }
.progress__cap { position: absolute; left: 0; bottom: 0; z-index: 1; font-size: .68rem; letter-spacing: .08em; color: #fff;
  padding: .7rem .9rem; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(6,20,24,.7)); width: 100%; }
@media (max-width: 720px) {
  .progress__grid { grid-template-columns: repeat(2, 1fr); }
  .progress__grid .is-feature { grid-column: span 2; grid-row: span 1; }
  .progress__grid .is-feature img { aspect-ratio: 16/9; }
}

/* Contact */
.contactgrid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.contact-info h4 { font-family: var(--sans); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); margin: 0 0 .6rem; font-weight: 600; }
.contact-info__block { padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.contact-info__block:first-of-type { padding-top: 0; }
.contact-info p { margin: 0; line-height: 1.7; }
.contact-info p a { color: var(--teal); }
.contact-map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-height: 420px; }
.contact-map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }
@media (max-width: 820px) { .contactgrid { grid-template-columns: 1fr; } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(10,18,20,.92);
  display: flex; align-items: center; justify-content: center; padding: clamp(1rem, 4vw, 3rem);
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease); }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 2px; }
.lightbox__close { position: absolute; top: 1.2rem; right: 1.4rem; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.4); color: #fff; font-size: 1.3rem; cursor: pointer;
  display: grid; place-items: center; transition: background .3s var(--ease); }
.lightbox__close:hover { background: rgba(255,255,255,.22); }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.4); color: #fff; font-size: 1.4rem; cursor: pointer;
  display: grid; place-items: center; transition: background .3s var(--ease); }
.lightbox__nav:hover { background: rgba(255,255,255,.22); }
.lightbox__nav--prev { left: clamp(.6rem, 3vw, 2.2rem); }
.lightbox__nav--next { right: clamp(.6rem, 3vw, 2.2rem); }
.lightbox__count { position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.8);
  font-size: .74rem; letter-spacing: .14em; }
.lightbox__nav[hidden] { display: none; }

/* The Nest logo (from brochure) */
.nest-logo-img { height: clamp(64px, 8vw, 104px); width: auto; display: block; margin: .4rem 0 1.4rem; }

/* Clickable township tile overlay */
.portfolio__cover { position: absolute; inset: 0; z-index: 3; display: block; }

/* Facilities showcase (image + title + description) */
.showcase { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.4rem, 3vw, 2.4rem); }
.showcase figure { margin: 0; }
.showcase__img { overflow: hidden; border-radius: var(--radius); background: #ddd; }
.showcase__img img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; cursor: zoom-in; transition: transform 1s var(--ease); }
.showcase figure:hover .showcase__img img { transform: scale(1.05); }
.showcase h4 { font-family: var(--serif); font-weight: 500; font-size: 1.35rem; margin: 1.1rem 0 .4rem; }
.showcase p { color: var(--ink-soft); font-size: .96rem; margin: 0; }
@media (max-width: 820px) { .showcase { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }

/* Full-width location map figure */
.mapfigure { margin: clamp(2.2rem, 5vw, 3.6rem) 0 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1rem, 2.5vw, 2rem); }
.mapfigure img { width: 100%; height: auto; display: block; cursor: zoom-in; }

/* Gallery — 3 x 3 */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(.7rem, 1.6vw, 1.1rem); }
.gallery figure { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); background: #ddd; }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; transition: transform 1s var(--ease); cursor: zoom-in; }
.gallery figure:hover img { transform: scale(1.05); }
.gallery figcaption { position: absolute; left: 0; bottom: 0; z-index: 1; font-size: .68rem; letter-spacing: .06em; color: #fff;
  padding: .7rem .9rem; width: 100%; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(6,20,24,.7)); opacity: 0; transition: opacity .3s var(--ease); }
.gallery figure:hover figcaption { opacity: 1; }
.gallery .g-wide { grid-column: span 2; }
.gallery .g-tall { grid-row: span 2; }
.gallery .g-tall img { aspect-ratio: auto; height: 100%; }
@media (max-width: 720px) { .gallery { grid-template-columns: repeat(2, 1fr); } .gallery .g-tall { grid-row: span 1; } .gallery .g-tall img { aspect-ratio: 4/3; } }

/* Video feature */
.videoblock { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; }
.videoblock video { width: 100%; height: 100%; display: block; object-fit: cover; aspect-ratio: 16/9; }
.videoblock__cover { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; cursor: pointer;
  background-size: cover; background-position: center; transition: opacity .5s var(--ease); }
.videoblock__cover::after { content: ""; position: absolute; inset: 0; background: rgba(6,22,26,.32); }
.videoblock__cover.is-hidden { opacity: 0; visibility: hidden; }
.videoblock__play { position: relative; z-index: 1; width: 84px; height: 84px; border-radius: 50%;
  background: rgba(255,255,255,.16); border: 1.5px solid rgba(255,255,255,.85); color: #fff;
  display: grid; place-items: center; transition: background .3s var(--ease), transform .3s var(--ease); }
.videoblock__cover:hover .videoblock__play { background: rgba(255,255,255,.28); transform: scale(1.06); }
.videoblock__play svg { margin-left: 4px; }

/* Video overlay */
.vmodal { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10,47,53,.94); display: none; place-items: center; }
.vmodal[open] { display: grid; }
.vmodal::backdrop { background: transparent; }
.vmodal__frame { height: min(86dvh, 160vw); aspect-ratio: 9 / 16; max-width: 92vw; background: #000; border-radius: 12px; overflow: hidden; }
.vmodal__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.vmodal__close { position: absolute; top: 14px; right: 18px; width: 44px; height: 44px; border: 0; background: none; color: #fff; font-size: 2.2rem; line-height: 1; cursor: pointer; }
