/* Project detail pages: title size, mobile spacing, photo lightbox.
   Hand-written on purpose - site.css is compiled by Tailwind from
   src/css/input.css and does not know these classes. */

/* Title: smaller than the site-wide .section-title (3rem) on desktop. */
@media (min-width: 768px) {
  .project-title { font-size: 2.25rem; }
}
@media (max-width: 767px) {
  .project-title { font-size: 1.625rem; line-height: 1.2; }
}

/* Mobile: the suburb label, title and Location / Style / Completion rows were
   spaced like desktop sections. Pull them together. */
@media (max-width: 767px) {
  .project-head { padding-top: 1.75rem; padding-bottom: 1.5rem; }
  .project-head p { margin-bottom: 0.25rem; }
  .project-head + .section-padding { padding-top: 1.75rem; }
  .project-facts {
    gap: 0.875rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
  }
  .project-facts p:first-child { margin-bottom: 0.125rem; }
}

/* Lightbox trigger */
img[data-lightbox] { cursor: zoom-in; transition: opacity .2s ease, filter .2s ease; }
img[data-lightbox]:hover { filter: brightness(.92); }
img[data-lightbox]:focus-visible { outline: 2px solid var(--color-brand, #ed5521); outline-offset: 3px; }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column;
  background: rgba(255, 255, 255, .28); -webkit-backdrop-filter: blur(22px) saturate(1.1); backdrop-filter: blur(22px) saturate(1.1);
  opacity: 0; transition: opacity .25s ease; touch-action: none; }
.lb.is-open { opacity: 1; }
.lb-top { display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1rem; color: #fff; font: 500 .875rem/1 var(--font-heading, system-ui, sans-serif);
  letter-spacing: .08em; }
.lb-count { background: rgba(0,0,0,.45); padding: .45rem .8rem; border-radius: 999px; font-variant-numeric: tabular-nums; }
.lb-btn { appearance: none; border: 0; background: rgba(0,0,0,.45); color: #fff; cursor: pointer;
  width: 2.75rem; height: 2.75rem; border-radius: 999px; display: inline-flex; align-items: center;
  justify-content: center; transition: background .2s ease; }
.lb-btn:hover { background: var(--color-brand, #ed5521); }
.lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lb-btn svg { width: 1.25rem; height: 1.25rem; }
.lb-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
  padding: 0 .5rem; overflow: hidden; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 3px; user-select: none;
  -webkit-user-drag: none; box-shadow: 0 12px 60px rgba(0,0,0,.35);
  transition: opacity .25s ease, transform .3s ease; opacity: 0; transform: scale(.97); }
.lb-img.is-ready { opacity: 1; transform: none; }
.lb-img.is-zoomed { transform: scale(2); cursor: grab; transition: transform .25s ease; }
.lb-nav { position: absolute; top: 50%; translate: 0 -50%; }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
.lb-cap { color: #fff; margin: .5rem auto 0; background: rgba(0,0,0,.45); border-radius: 999px; padding: .35rem 1rem; width: fit-content; max-width: 90%; text-align: center; font-size: .875rem; }
.lb-cap:empty { display: none; }
.lb-thumbs { display: flex; gap: .5rem; overflow-x: auto; padding: .75rem 1rem 1rem; justify-content: safe center;
  scrollbar-width: none; }
.lb-thumbs::-webkit-scrollbar { display: none; }
.lb-thumb { flex: 0 0 auto; width: 4.25rem; height: 3.25rem; padding: 0; border: 2px solid transparent;
  border-radius: 3px; overflow: hidden; background: #222; cursor: pointer; opacity: .55;
  transition: opacity .2s ease, border-color .2s ease; }
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-thumb:hover { opacity: .9; }
.lb-thumb[aria-current="true"] { opacity: 1; border-color: var(--color-brand, #ed5521); }
@media (max-width: 767px) {
  .lb-nav { display: none; }   /* swipe on phones */
  .lb-thumbs { display: none; }
}
html.lb-lock, html.lb-lock body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .lb, .lb-img { transition: none; }
}
