/* ==========================================================================
   Land Design Build — inner pages and site-specific components
   (services, new home, renovation, projects, contact). Builds on styles.css.
   ========================================================================== */

/* ---------- Header additions ---------- */
.utility-note { display: inline-block; padding: 0.5rem 0; color: var(--c-text-2); }
.header-cta { margin-right: 0.25rem; white-space: nowrap; }
.header-call { display: none; }
@media (max-width: 63.98rem) {
  .header-cta { display: none; }
  .header-call { display: grid; }
  .nav-mobile-utility .button { justify-self: start; margin-bottom: 0.5rem; color: var(--c-on-btn); }
}
/* Desktop nav needs room for 5 menus + CTA beside the wide logo */
@media (min-width: 64rem) and (max-width: 74rem) {
  .nav-link { padding: 0 0.6rem; }
  .nav-link::after { left: 0.6rem; right: 0.6rem; }
  .brand img { width: 15.5rem; }
}
.button--outline-light { border-color: rgba(255,255,255,.7); color: #fff; }
.button--outline-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* ---------- Page hero ---------- */
.page-hero { padding-block: var(--sp-5); background: var(--s-2); border-bottom: 1px solid var(--c-border); }
.page-hero--white { background: var(--s-1); border-bottom: 0; }
.page-hero .lede { margin-top: var(--sp-2); }
.page-hero__inner { display: grid; gap: var(--sp-4); align-items: end; }
@media (min-width: 64rem) { .page-hero__inner { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--sp-7); } }
.page-hero__media { overflow: hidden; border-radius: var(--radius); aspect-ratio: 16 / 9; }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; }

.breadcrumb { list-style: none; margin-top: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: var(--fs-p090); color: var(--c-text-2); margin-bottom: var(--sp-3); }
.breadcrumb a { display: inline-block; padding: 0.4rem 0; } /* >= 32px tap height on touch screens */
.breadcrumb li + li::before { content: "/"; margin-right: 0.5rem; color: var(--c-border-2); }
.breadcrumb a:hover { color: var(--c-accent); }

.section--tight { padding-block: var(--sp-6); }

/* ---------- Chips, filters, in-page subnav ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: var(--sp-4); }
.chip {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.5rem;
  padding: 0.5rem 1rem; border-radius: var(--radius-pill);
  border: 1px solid var(--c-border-2); background: var(--s-card);
  font-size: var(--fs-p090); font-weight: 500; color: var(--c-text-2); white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { color: var(--c-text); border-color: var(--c-text-2); }
.chip.is-active { background: var(--c-title); color: var(--s-1); border-color: var(--c-title); }
.chip__count { font-weight: 300; opacity: .7; }
.catalog-empty { padding: var(--sp-5) 0; color: var(--c-text-2); }

.subnav { position: sticky; top: calc(var(--header-h) + var(--utility-h)); z-index: 50; background: var(--glass); border-bottom: 1px solid var(--c-border); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.subnav__list {
  display: flex; gap: 0.5rem; padding-block: 0.75rem;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.subnav__list::-webkit-scrollbar { display: none; }
.subnav__list li { flex: none; }
@media (max-width: 63.98rem) { .subnav { top: var(--header-h); } }
/* anchors on pages with the sticky subnav land below it too */
.svc-row[id], .split-card[id] { scroll-margin-top: calc(var(--header-h) + var(--utility-h) + 5rem); }
@media (max-width: 63.98rem) { .svc-row[id], .split-card[id] { scroll-margin-top: calc(var(--header-h) + 5rem); } }

/* ---------- Category tiles ---------- */
.cat-tiles { display: grid; gap: 0.75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 64rem) { .cat-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.cat-tiles .tile { aspect-ratio: 4 / 5; }

/* ---------- Service cards (home) ---------- */
.service-cards { display: grid; gap: var(--sp-3); }
@media (min-width: 48rem) { .service-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.service-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--s-1); border: 1px solid var(--c-border); border-radius: var(--radius);
  transition: box-shadow .3s, transform .3s var(--ease);
}
.service-card:hover { box-shadow: 0 16px 40px var(--shadow); transform: translateY(-2px); }
.service-card__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.service-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.service-card:hover .service-card__media img { transform: scale(1.04); }
.service-card__body { flex: 1; display: flex; flex-direction: column; padding: var(--sp-3); }
.service-card__body .eyebrow { margin-bottom: 0.5rem; }
.service-card__body p:not(.eyebrow) { margin-top: 0.5rem; color: var(--c-text-2); flex: 1; }
.service-card__body h3 a:hover { color: var(--c-accent); }
@media (hover: none) { .service-card:hover { transform: none; } .service-card:hover .service-card__media img { transform: none; } }

/* ---------- Service / feature rows (image + copy, alternating) ---------- */
.svc-row { display: grid; gap: var(--sp-4); align-items: center; padding-block: var(--sp-5); }
.svc-row + .svc-row { border-top: 1px solid var(--c-border); }
.section--grey .svc-row + .svc-row { border-top-color: var(--c-border-2); }
@media (min-width: 64rem) {
  .svc-row { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--sp-7); }
  .svc-row--flip .svc-row__media { order: 2; }
}
.svc-row:first-of-type { padding-top: 0; }
.svc-row__media { overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 3; background: var(--s-3); }
.svc-row__media img { width: 100%; height: 100%; object-fit: cover; }
.svc-row__media--portrait img { object-position: center 35%; }
.svc-row__body > p:not(.eyebrow) { margin-top: var(--sp-2); color: var(--c-text-2); font-size: var(--fs-p150); }
.svc-row__body .checklist { margin-top: var(--sp-3); }

/* ---------- Feature grid ---------- */
.feature-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.feature-item h3 { font-size: var(--fs-h200); font-weight: 400; }
.feature-item p { margin-top: 0.5rem; color: var(--c-text-2); }
.feature-item__icon {
  width: 2.5rem; height: 2.5rem; border-radius: 50%; margin-bottom: var(--sp-2);
  display: grid; place-items: center;
  background: var(--c-accent-soft); color: var(--c-accent); font-weight: 500; font-size: var(--fs-p090);
}

/* ---------- Stats (licenses) ---------- */
.stats { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); max-width: 48rem; }
.stat { padding-top: var(--sp-3); border-top: 2px solid var(--c-brand); }
.stat__num { font-size: var(--fs-h500); line-height: 1.1; color: var(--c-title); font-variant-numeric: tabular-nums; }
.stat__label { margin-top: 0.35rem; font-size: var(--fs-p090); color: var(--c-text-2); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.steps li { counter-increment: step; padding-top: var(--sp-2); border-top: 1px solid var(--c-border); }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-size: var(--fs-p080); letter-spacing: 0.14em; color: var(--c-accent); font-weight: 500; margin-bottom: 0.5rem; }
.steps h3 { font-size: var(--fs-h200); font-weight: 400; }
.steps p { margin-top: 0.5rem; color: var(--c-text-2); font-size: var(--fs-p090); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--d-1); color: #fff; padding-block: var(--sp-6); border-top: 3px solid var(--c-brand); }
.cta-band__inner { display: grid; gap: var(--sp-3); align-items: center; }
@media (min-width: 64rem) { .cta-band__inner { grid-template-columns: minmax(0, 1.4fr) auto; } }
.cta-band h2 { color: #fff; }
.cta-band p { margin-top: 0.75rem; color: rgba(255,255,255,.72); max-width: 44rem; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Gallery ---------- */
.gallery { display: grid; gap: 0.75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 48rem) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 80rem) { .gallery--projects { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gallery__item {
  position: relative; display: block; overflow: hidden; border-radius: var(--radius);
  aspect-ratio: 4 / 3; background: var(--s-3); color: #fff; isolation: isolate;
}
.gallery__item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; transition: transform .8s var(--ease); }
.gallery__item::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.6), rgba(0,0,0,0) 55%); }
.gallery__item:hover img { transform: scale(1.04); }
.gallery__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 0.85rem 1rem; font-size: var(--fs-p090); line-height: 1.3; }
.gallery__eyebrow { display: block; margin-bottom: 0.2rem; font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,.8); }
@media (hover: none) { .gallery__item:hover img { transform: none; } }

/* ---------- Before / after ---------- */
.ba { display: grid; gap: var(--sp-4); }
.ba__pair { margin: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ba__pair figcaption { grid-column: 1 / -1; font-size: var(--fs-p090); color: var(--c-text-2); }
.ba__img { position: relative; display: block; overflow: hidden; border-radius: var(--radius); aspect-ratio: 16 / 10; background: var(--s-3); }
.ba__img img { width: 100%; height: 100%; object-fit: cover; }
.ba__tag {
  position: absolute; top: 0.75rem; left: 0.75rem; padding: 0.2rem 0.65rem; border-radius: var(--radius-pill);
  background: rgba(38,38,38,.75); color: #fff; font-size: var(--fs-p080); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
}
.ba__tag--after { background: var(--c-btn); color: var(--c-on-btn); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.5rem;
  padding: max(1rem, env(safe-area-inset-top)) 0.5rem max(1rem, env(safe-area-inset-bottom));
  background: rgba(10,10,10,.94); touch-action: pan-y;
}
.lightbox[hidden] { display: none !important; }
body.lightbox-open { overflow: hidden; }
.lightbox__figure { margin: 0; display: grid; justify-items: center; gap: 0.75rem; max-height: 100%; min-width: 0; }
.lightbox__img { max-width: 100%; max-height: calc(100vh - 7rem); max-height: calc(100dvh - 7rem); object-fit: contain; border-radius: var(--radius); }
.lightbox__cap { color: rgba(255,255,255,.8); font-size: var(--fs-p090); text-align: center; white-space: pre-wrap; }
.lightbox__btn {
  width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-size: 2rem; line-height: 1; background: rgba(255,255,255,.1); transition: background .2s;
}
.lightbox__btn:hover { background: rgba(255,255,255,.22); }
.lightbox__close { position: absolute; top: max(0.75rem, env(safe-area-inset-top)); right: 0.75rem; font-size: 1.75rem; }
@media (max-width: 40rem) {
  .lightbox { grid-template-columns: minmax(0, 1fr); }
  .lightbox__prev, .lightbox__next { position: absolute; bottom: max(1rem, env(safe-area-inset-bottom)); }
  .lightbox__prev { left: 1rem; } .lightbox__next { right: 1rem; }
  .lightbox__img { max-height: calc(100vh - 10rem); max-height: calc(100dvh - 10rem); }
}

/* ---------- Team ---------- */
.team { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); max-width: 52rem; }
.team-card { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-3); background: var(--s-card); border: 1px solid var(--c-border); border-radius: var(--radius); }
.team-card__avatar {
  flex: none; width: 4rem; height: 4rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--c-accent-soft); color: var(--c-accent); font-weight: 500; letter-spacing: 0.06em;
}
.team-card__links { margin-top: 0.35rem; color: var(--c-text-2); overflow-wrap: anywhere; }
.team-card__links a { display: inline-block; padding: 0.3rem 0; }
.team-card__links a:hover { color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Footer additions ---------- */
.footer__address { font-style: normal; }
.footer__hours { margin-top: var(--sp-2); }
.footer__news .button { margin-top: var(--sp-3); }
/* landscape tablets get the desktop layout but are tapped: give footer links >= 32px of height */
@media (hover: none) {
  .footer__col li { margin-bottom: 0.1rem; }
  .footer__col a { display: inline-block; padding: 0.45rem 0; }
}

/* ---------- Project page (light-house.html) ---------- */
.facts { margin: 0; display: grid; gap: var(--sp-3) var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.facts div { padding-top: var(--sp-2); border-top: 2px solid var(--c-brand); }
.facts dt { font-size: var(--fs-p080); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-text-2); }
.facts dd { margin: 0.35rem 0 0; font-size: var(--fs-h200); color: var(--c-title); }
.facts dd a { display: inline-block; padding: 0.2rem 0; color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; }
.facts__note { font-size: var(--fs-p090); color: var(--c-text-2); }
.lh-jump { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: var(--sp-4); }
.lh-group + .lh-group { margin-top: var(--sp-6); }
.lh-group__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; margin-bottom: var(--sp-3); }
.lh-group__head p { color: var(--c-text-2); }
/* Columns match the group sizes (4, 4, 8 and 6 photos) so no row ends with a lone photo */
.lh-group .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 64rem) { .lh-group .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 48rem) { #bathrooms .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lh-group[id] { scroll-margin-top: calc(var(--header-h) + var(--utility-h) + 1.5rem); }
@media (max-width: 63.98rem) { .lh-group[id] { scroll-margin-top: calc(var(--header-h) + 1.5rem); } }
.photo-credit { margin-top: var(--sp-5); font-size: var(--fs-p090); color: var(--c-text-2); }
.photo-credit a { display: inline-block; padding: 0.3rem 0; color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; }

/* Current page in nav */
.nav-link[aria-current="page"]::after { transform: scaleX(1); }
.nav-link[aria-current="page"] { color: var(--c-title); }

/* ---------- Theme toggle ---------- */
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.theme-switch {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: 100%; max-width: 16rem; padding: 0.5rem 0; color: var(--c-text-2); text-align: left;
}
.theme-switch__track {
  position: relative; flex: none; width: 2.75rem; height: 1.5rem; border-radius: 1rem;
  background: var(--s-3); border: 1px solid var(--c-border-2); transition: background .2s;
}
.theme-switch__track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.5rem - 6px); height: calc(1.5rem - 6px);
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .25s var(--ease);
}
.theme-switch[aria-checked="true"] .theme-switch__track { background: var(--c-btn); border-color: var(--c-btn); }
.theme-switch[aria-checked="true"] .theme-switch__track::after { transform: translateX(1.25rem); }
@media (max-width: 63.98rem) { .header-actions .theme-toggle { display: none; } }

/* Dark theme: photos sit a touch dimmer so they don't glare against the dark page */
[data-theme="dark"] .service-card__media img, [data-theme="dark"] .svc-row__media img,
[data-theme="dark"] .page-hero__media img, [data-theme="dark"] .case__media img,
[data-theme="dark"] .feature__media img, [data-theme="dark"] .media-text__media img { filter: brightness(.9); }
