/* =========================================================================
   OUR OFFICE TEMPLATE (template-our-office.php)

   A short hero (the source page has very little unique copy — this is
   primarily a photo tour) followed by the real 12-photo office gallery,
   opened in a lightbox. Every rule here is presentation only — the words
   it styles are copied verbatim from the live Our Office page, and the
   12 photos are the real photos from that page (downloaded, not
   invented) into template-our-office.php's content, not invented by
   this stylesheet.
   ========================================================================= */

/* -------------------------------------------------------------------------
   HERO
   ------------------------------------------------------------------------- */
.ooff-hero.fold { padding-top: calc(var(--fold) + var(--sp-2)); padding-bottom: var(--sp-6); }

.ooff-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr);
  gap: clamp(1.75rem, 3.4vw, 3.6rem);
  align-items: center;
}
.ooff-hero-copy { max-width: 62ch; }
.ooff-hero-copy .eyebrow + h1 { margin-top: var(--sp-2); }
.ooff-hero-copy h2 {
  margin-top: var(--sp-3);
  font-size: var(--fs-lg); font-weight: 700; letter-spacing: var(--track-tight); line-height: 1.3;
  color: var(--ink);
}
.ooff-hero-copy .lead { margin-top: var(--sp-2); }
.ooff-hero-copy h1 { font-size: var(--fs-d3); }

.ooff-hero-shot {
  position: relative;
  margin: 0; border-radius: var(--r-md); overflow: hidden;
  background: var(--n-10);
  height: 538px;
  box-shadow: 0 30px 60px -34px rgba(var(--deep-rgb), 0.35);
}
.ooff-hero-shot img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform var(--t-3) var(--ease);
}
@media (hover: hover) {
  .ooff-hero-shot:hover img { transform: scale(1.05); }
}

.ooff-hero-actions { margin-top: var(--sp-4); }

/* -------------------------------------------------------------------------
   GALLERY GRID — 12 real office photos, click/tap opens the lightbox.
   ------------------------------------------------------------------------- */
.ooff-gallery.fold { padding-block: calc(var(--fold) / 2); }

.ooff-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}
.ooff-gallery-item {
  position: relative;
  display: block;
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--n-10);
  box-shadow: inset 0 0 0 var(--hair) var(--rule-quiet);
}
/* Every 5th and 8th tile runs taller, so the grid reads as a considered
   layout rather than a flat spreadsheet of identical boxes. */
.ooff-gallery-item:nth-child(5),
.ooff-gallery-item:nth-child(8) {
  grid-row: span 2;
  aspect-ratio: auto;
}
.ooff-gallery-item img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform var(--t-3) var(--ease);
}
.ooff-gallery-item::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(var(--deep-rgb), 0);
  transition: background var(--t-2) var(--ease);
}
.ooff-gallery-item-zoom {
  position: absolute; right: 0.65rem; bottom: 0.65rem;
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(var(--deep-rgb), 0.55);
  color: var(--white);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity var(--t-2) var(--ease), transform var(--t-2) var(--ease);
}
.ooff-gallery-item-zoom svg { width: 14px; height: 14px; }
@media (hover: hover) {
  .ooff-gallery-item:hover img { transform: scale(1.08); }
  .ooff-gallery-item:hover::after { background: rgba(var(--deep-rgb), 0.12); }
  .ooff-gallery-item:hover .ooff-gallery-item-zoom { opacity: 1; transform: scale(1); }
}
.ooff-gallery-item:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* -------------------------------------------------------------------------
   LIGHTBOX
   ------------------------------------------------------------------------- */
.ooff-lightbox {
  position: fixed; inset: 0; z-index: 500;
  display: grid; place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
}
.ooff-lightbox[hidden] { display: none; }

.ooff-lightbox-backdrop {
  position: absolute; inset: 0;
  background: rgba(var(--shade-rgb), 0.92);
  opacity: 0;
  transition: opacity var(--t-2) var(--ease);
}
.ooff-lightbox.is-open .ooff-lightbox-backdrop { opacity: 1; }

.ooff-lightbox-stage {
  position: relative; z-index: 1;
  width: 100%; max-width: 1100px;
  display: flex; flex-direction: column; align-items: center;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity var(--t-2) var(--ease), transform var(--t-2) var(--ease);
}
.ooff-lightbox.is-open .ooff-lightbox-stage { opacity: 1; transform: none; }

.ooff-lightbox-frame {
  position: relative;
  width: 100%;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--deep);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.6);
}
.ooff-lightbox-frame img {
  display: block; width: 100%; height: auto;
  max-height: 78vh;
  object-fit: contain;
  margin: 0 auto;
}

.ooff-lightbox-bar {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  margin-top: var(--sp-3);
}
.ooff-lightbox-count {
  font-size: var(--fs-sm); font-weight: 600; color: var(--on-deep-mid);
}
.ooff-lightbox-controls { display: flex; gap: 0.6rem; }
.ooff-lightbox-btn {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(var(--white-rgb), 0.12);
  color: var(--white);
  transition: background var(--t-2) var(--ease), transform var(--t-1) var(--ease);
}
.ooff-lightbox-btn svg { width: 18px; height: 18px; }
.ooff-lightbox-btn:hover { background: rgba(var(--white-rgb), 0.22); }
.ooff-lightbox-btn:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
.ooff-lightbox-close {
  position: absolute; top: -3.2rem; right: 0;
}

/* -------------------------------------------------------------------------
   CLOSING CTA — same reasoning as the other reference pages: the
   half-padded gallery section above needs the CTA's own top space back.
   ------------------------------------------------------------------------- */
.ooff-cta { margin-top: calc(var(--sp-4) + 50px); }

/* -------------------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .ooff-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .ooff-hero-shot { order: -1; aspect-ratio: 16 / 9; height: auto; }
  .ooff-gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  /* Mobile-only unification: every reference page's CTA lands on the same
     top space here, though each keeps its own desktop value above. */
  .ooff-cta { margin-top: var(--sp-5); }
  .ooff-hero.fold { padding-bottom: var(--sp-5); }
  .ooff-hero-shot { aspect-ratio: 4 / 3; }
  .ooff-hero-actions .btn i { display: none; }

  .ooff-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ooff-gallery-item:nth-child(5),
  .ooff-gallery-item:nth-child(8) { grid-row: auto; aspect-ratio: 4 / 3; }

  .ooff-lightbox-frame img { max-height: 60vh; }
  .ooff-lightbox-close { top: -2.8rem; }
  .ooff-lightbox-btn { width: 38px; height: 38px; }
}
