/* Inner pages — services, about, contact, galleries */
.section { padding: 4rem 0; }
.section.alt { background: var(--paper); }

.service-prose-section { padding-top: 3rem; padding-bottom: 3rem; }
.service-detail-section {
  padding-top: 3rem;
  padding-bottom: 4rem;
}
.service-detail-grid {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}
.service-prose {
  max-width: none;
  min-width: 0;
}
.service-prose p {
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 1.1rem;
}
.service-prose h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ink);
  margin: 2rem 0 .85rem;
}
.service-prose a {
  color: var(--green);
  font-weight: 500;
  text-decoration: none;
}
.service-prose a:hover {
  color: var(--green-dark);
  text-decoration: underline;
}
.service-gallery-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.service-gallery-rail {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.gallery-grid-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: .65rem;
  width: 100%;
}
.gallery-grid-sidebar .g-item,
.gallery-grid-sidebar .js-gallery-preview {
  grid-column: 1;
  width: 100%;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
}
.gallery-grid-sidebar .g-item img,
.gallery-grid-sidebar .js-gallery-preview img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform .3s ease, opacity .3s ease;
}
.gallery-grid-sidebar .g-item:hover img,
.gallery-grid-sidebar .js-gallery-preview:hover img {
  transform: scale(1.03);
  opacity: .92;
}
.section-alt {
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.section.dark {
  background: var(--green-dark);
  color: var(--white);
}
.section.dark .lede { color: rgba(255, 255, 255, .75); }
.section h2 { font-size: clamp(1.85rem, 4vw, 2.75rem); margin-bottom: .85rem; font-weight: 700; }
.section .lede { max-width: 52ch; margin-bottom: 1.75rem; color: var(--muted); line-height: 1.7; }

.grid-2 { display: grid; gap: 2.5rem; align-items: center; }
.grid-3 { display: grid; gap: 1.25rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--green-muted);
}
.card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.card-photo {
  position: relative;
  display: block;
  text-decoration: none;
}

/* Visible photo ID for reclassification workflow */
.photo-tag {
  position: absolute;
  top: .5rem;
  left: .5rem;
  z-index: 2;
  background: rgba(30, 61, 53, 0.88);
  color: #fff;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: .28rem .5rem;
  border-radius: 6px;
  line-height: 1;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.g-item {
  position: relative;
}
.card-fallback,
.media-fallback {
  display: grid;
  place-items: center;
  aspect-ratio: 4/3;
  width: 100%;
  background: linear-gradient(160deg, var(--green-soft) 0%, var(--green-muted) 100%);
  color: var(--green);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: .08em;
}
.card-body { padding: 1.25rem 1.35rem 1.45rem; }
.card-body h3 {
  font-size: 1.25rem; margin-bottom: .4rem; font-family: var(--font-display); font-weight: 700;
}
.card-body h3 a { text-decoration: none; color: var(--ink); }
.card-body h3 a:hover { color: var(--green); }
.card-body p { font-size: .9rem; color: var(--muted); line-height: 1.6; }
.card-body a.more {
  display: inline-flex; align-items: center; gap: .25rem;
  margin-top: .85rem;
  font-family: var(--font-body); letter-spacing: .02em;
  font-size: .82rem; font-weight: 600; color: var(--green); text-decoration: none;
}
.card-body a.more:hover { color: var(--green-dark); }

.stat-row { display: flex; flex-wrap: wrap; gap: 1.75rem 3rem; margin: 1.75rem 0; }
.stat-row div strong {
  display: block; font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem); color: var(--green); line-height: 1;
  font-weight: 700;
}
.stat-row div span {
  font-size: .72rem; color: var(--muted); text-transform: uppercase;
  letter-spacing: .12em; font-weight: 600;
}

.gallery-grid {
  display: grid; gap: .75rem;
  grid-template-columns: repeat(2, 1fr);
}
.gallery-grid img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; cursor: pointer;
  border-radius: 8px;
}
.gallery-grid img:first-child { grid-column: span 2; aspect-ratio: 16/9; }

.gallery-grid-expand {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.gallery-grid-expand .g-item {
  border: 0; padding: 0; background: none; cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
}
.gallery-grid-expand .g-item img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  transition: transform .3s ease, opacity .3s ease;
}
.gallery-grid-expand .g-item:hover img { transform: scale(1.03); opacity: .92; }
.gallery-grid-expand .g-item-hero {
  grid-column: 1 / -1;
  border-radius: var(--radius);
}
.gallery-grid-expand .g-item-hero img { aspect-ratio: 16/9; }

.sec-head { margin-bottom: 2rem; max-width: 52ch; }
.sec-head h2 { margin-top: .4rem; }
.svc-cards { margin-top: 1rem; }

@media (min-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid-expand { grid-template-columns: repeat(4, 1fr); }
}

.spec-list { display: grid; gap: .9rem; margin-top: 1.25rem; }
.spec-list li {
  list-style: none; padding-left: 1.5rem; position: relative;
  font-size: .95rem; color: rgba(255, 255, 255, .8); line-height: 1.6;
}
.spec-list li::before {
  content: "—"; position: absolute; left: 0; color: var(--wood-light);
}

.process-steps { display: grid; gap: 2rem; counter-reset: step; }
.process-steps li {
  list-style: none; display: grid; gap: .5rem;
  padding-left: 3.75rem; position: relative;
}
.process-steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  font-family: var(--font-display);
  font-size: 1.75rem; font-weight: 700;
  color: var(--green); line-height: 1;
}
.process-steps li strong {
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 700;
}
.process-steps li p { color: var(--muted); line-height: 1.7; }

.contact-grid { display: grid; gap: 2.5rem; }
.contact-info p { margin-bottom: .65rem; color: var(--muted); }
.contact-info a { color: var(--green); text-decoration: none; font-weight: 500; }

.project-media { background: var(--paper); }
.g-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(2, 1fr);
}
.g-item {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  display: block;
  overflow: hidden;
  border-radius: 8px;
}
.g-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform .35s ease, opacity .35s ease;
}
.g-item:hover img { transform: scale(1.04); opacity: .92; }

/* Gallery lightbox */
.gallery-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.gallery-lightbox.is-open { display: flex; }
.gallery-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 36, 33, .88);
  backdrop-filter: blur(4px);
}
.gallery-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: calc(100vh - 2rem);
}
.gallery-lightbox-panel figure { margin: 0; }
.gallery-lightbox-panel img {
  width: 100%;
  max-height: calc(100vh - 8rem);
  object-fit: contain;
  background: var(--ink);
  border-radius: var(--radius);
}
.gallery-lightbox-panel figcaption {
  margin-top: .85rem;
  color: rgba(255, 255, 255, .75);
  font-size: .88rem;
  text-align: center;
  letter-spacing: .02em;
}
.gallery-lightbox-close {
  position: absolute;
  top: -2.75rem;
  right: 0;
  background: rgba(255, 255, 255, .12);
  border: 0;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gallery-lightbox-close:hover { background: rgba(255, 255, 255, .22); }
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}
.gallery-nav:hover { background: rgba(255, 255, 255, .22); }
.gallery-prev { left: -3.25rem; }
.gallery-next { right: -3.25rem; }

@media (min-width: 640px) {
  .g-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .process-steps { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .service-detail-grid {
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
  }
  .service-prose {
    grid-column: 1;
    grid-row: 1;
  }
  .service-gallery-sidebar {
    grid-column: 2;
    grid-row: 1;
    height: 0;
    min-height: 100%;
    overflow: hidden;
  }
  .g-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 899px) {
  .service-gallery-sidebar {
    display: none;
  }
  .gallery-prev { left: .25rem; }
  .gallery-next { right: .25rem; }
}
