/* ============================================================
   Projects index, project detail and inspiration gallery
   Loaded with services.css (shared crumbs, stats, prose, chips).
   ============================================================ */

/* ── Project cards ────────────────────────────────────────── */
.ihs-projects { display: grid; gap: 1.25rem; }
.ihs-project-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--gray-200);
  border-top: 4px solid var(--brand-primary);
  color: var(--brand-ink) !important;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.ihs-project-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.ihs-project-card__meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gray-600); }
.ihs-project-card__meta span:first-child { color: var(--brand-primary); }
.ihs-project-card h3 { font-size: 1.4rem; margin: 0; }
.ihs-project-card p { margin: 0; color: var(--gray-600); }
.ihs-project-card .ihs-stats { margin-top: auto; }
.ihs-project-card .ihs-stat { padding: 0.9rem 0.75rem; }
.ihs-project-card .ihs-stat strong { font-size: 1.5rem; }
.ihs-project-card__more { font-weight: 600; color: var(--brand-primary-dark); display: inline-flex; gap: 0.35rem; align-items: center; }

@media (min-width: 1024px) { .ihs-projects { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; } }

/* ── Project detail ───────────────────────────────────────── */
.ihs-snapshot {
  display: grid;
  gap: 1rem;
  margin: 0 0 2.5rem;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--brand-bg-soft);
  border: 1px solid var(--gray-200);
}
.ihs-snapshot dt { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray-600); }
.ihs-snapshot dd { margin: 0.2rem 0 0; font-weight: 500; }
.ihs-snapshot__logo img { max-height: 56px; width: auto; }
@media (min-width: 640px) { .ihs-snapshot { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .ihs-snapshot { grid-template-columns: repeat(4, 1fr); } }

.ihs-project-layout { display: grid; gap: 2.5rem; }
.ihs-project-layout .ihs-stats { margin: 2rem 0; }
.ihs-project-aside { display: grid; gap: 1.25rem; align-content: start; }
.ihs-aside-card { padding: 1.5rem; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--gray-200); }
.ihs-aside-card h2 { font-size: 1.1rem; margin: 0 0 0.75rem; }
.ihs-aside-card p { color: var(--gray-600); font-size: 0.95rem; margin: 0 0 1rem; }
.ihs-aside-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.ihs-aside-card--ink { background: var(--brand-ink); border-color: var(--brand-ink); }
.ihs-aside-card--ink h2 { color: #fff; }
.ihs-aside-card--ink p { color: rgba(255, 255, 255, 0.75); }

@media (min-width: 1024px) {
  .ihs-project-layout { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 4rem; }
  .ihs-project-aside { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
}

/* ── Inspiration gallery ──────────────────────────────────── */
.ihs-gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
.ihs-gallery__item button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--gray-100);
  cursor: zoom-in;
  position: relative;
}
.ihs-gallery__item img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform 0.5s ease; }
.ihs-gallery__item button:hover img, .ihs-gallery__item button:focus-visible img { transform: scale(1.04); }
.ihs-gallery__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.5rem 0.75rem 0.6rem;
  background: linear-gradient(transparent, rgba(11, 11, 11, 0.75));
  color: #fff;
  font-size: 0.8rem;
  text-align: left;
}
.ihs-gallery-note { margin: 1rem 0 0; font-size: 0.85rem; color: var(--gray-600); }

@media (min-width: 640px) { .ihs-gallery { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; } }
@media (min-width: 1024px) { .ihs-gallery { grid-template-columns: repeat(4, 1fr); } }

/* ── Lightbox (assets/js/gallery.js) ──────────────────────── */
.ihs-lightbox {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(11, 11, 11, 0.94);
}
.ihs-lightbox::backdrop { background: rgba(11, 11, 11, 0.94); }
.ihs-lightbox__inner { display: grid; place-items: center; height: 100%; padding: 3.5rem 1rem; }
.ihs-lightbox figure { margin: 0; text-align: center; }
.ihs-lightbox img { max-width: min(92vw, 1100px); max-height: 78vh; width: auto; height: auto; border-radius: var(--radius); }
.ihs-lightbox figcaption { margin-top: 0.75rem; color: rgba(255, 255, 255, 0.8); font-size: 0.9rem; }
.ihs-lightbox button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
}
.ihs-lightbox button:hover { background: rgba(255, 255, 255, 0.24); }
.ihs-lightbox__close { top: 1rem; right: 1rem; }
.ihs-lightbox__prev { left: 0.75rem; top: 50%; transform: translateY(-50%); }
.ihs-lightbox__next { right: 0.75rem; top: 50%; transform: translateY(-50%); }

/* Project photos: kept at their 4:3 shape, since the labels and caption bar are part of each image */
.ihs-gallery--photos { grid-template-columns: 1fr; gap: 1rem; margin: 0 0 2rem; }
.ihs-gallery--photos .ihs-gallery__item img { aspect-ratio: 4 / 3; height: auto; }
.ihs-gallery__photo-caption { margin: 0.5rem 0 0; font-size: 0.875rem; color: var(--gray-600); }
@media (min-width: 640px) {
  .ihs-gallery--photos { grid-template-columns: repeat(2, 1fr); }
  .ihs-gallery--photos .ihs-gallery__item:first-child { grid-column: 1 / -1; }
}
@media (min-width: 1024px) { .ihs-gallery--photos { grid-template-columns: repeat(2, 1fr); } }

/* Lead photo on the project listing cards, edge to edge above the text */
/* Two classes so it outranks the site-wide .ihs-body img { max-width: 100% } */
.ihs-project-card .ihs-project-card__image { display: block; width: calc(100% + 3.5rem); max-width: none; margin: -1.75rem -1.75rem 0; aspect-ratio: 4 / 3; height: auto; object-fit: cover; }
.ihs-project-card { overflow: hidden; }
