/* Project gallery page (gallery.html). Builds on the shared .gallery-item
   lightbox trigger from styles.css. */

.gx-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

.gx-filters {
  display: grid;
  gap: 14px;
  margin-bottom: clamp(24px, 3vw, 36px);
}

.gx-filters[hidden] {
  display: none;
}

.gx-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.gx-filter-label {
  flex: 0 0 100%;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone-700);
}

.gx-chip {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--grotesk);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.gx-chip:hover {
  border-color: var(--ink);
}

.gx-chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.gx-chip:focus-visible {
  outline: 2px solid var(--wood);
  outline-offset: 2px;
}

.gx-status {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.gx-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gallery-gap, 22px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.gx-item {
  margin: 0;
  min-width: 0;
}

.gx-item[hidden] {
  display: none;
}

/* Overrides the fixed one-third width the shared rule gives .gallery-item;
   the grid handles columns here. */
.gx-item .gallery-item {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
}

.gx-item .gallery-item img {
  display: block;
}

.gx-cap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.gx-credit {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.gx-cap a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gx-cap a:hover {
  color: var(--wood);
}

.gx-empty {
  margin-top: 24px;
  color: var(--muted);
}

.gx-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 960px) {
  .gx-intro {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .gx-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .gx-grid {
    grid-template-columns: 1fr;
  }

  .gx-cta-actions .btn {
    width: 100%;
  }
}

/* Gallery section tabs (Product Gallery / Lion Windows' Projects) */
.gx-tabs {
  display: flex;
  gap: 28px;
  margin-bottom: 36px;
  border-bottom: 1px solid rgba(18, 17, 13, .12);
  overflow-x: auto;
}
.gx-tabs a {
  padding: 0 0 14px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: #6b655c;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.gx-tabs a:hover { color: #12110d; }
.gx-tabs a[aria-current="page"] { color: #12110d; border-bottom-color: #a4703f; }

/* Lion Windows' Projects page */
.pj-project + .pj-project { margin-top: clamp(64px, 8vw, 112px); }
.pj-head { max-width: 680px; margin-bottom: 28px; }
.pj-head h2 { margin-top: 6px; }
.pj-head .body-copy { margin-top: 12px; }
.pj-ba-grid, .pj-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.pj-ba, .pj-photo { margin: 0; }
.pj-ba-toggle {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #e9e4da;
  cursor: pointer;
}
.pj-ba-toggle img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .45s ease;
}
.pj-ba-before { opacity: 0; }
.pj-ba-toggle[aria-pressed="true"] .pj-ba-before { opacity: 1; }
.pj-ba-label {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(18, 17, 13, .72);
  color: #fff;
  font-size: 12px;
  letter-spacing: .06em;
}
.pj-ba-state { font-weight: 700; text-transform: uppercase; letter-spacing: .14em; }
.pj-ba-toggle[aria-pressed="true"] .pj-ba-state { color: #e6c9a4; }
.pj-ba-hint { opacity: .8; }
.pj-ba-toggle:focus-visible { outline: 2px solid #a4703f; outline-offset: 3px; }
.pj-ba figcaption { margin-top: 10px; color: #6b655c; font-size: 15px; }
.pj-photo .gallery-item { display: block; width: 100%; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; }
.pj-photo img { display: block; width: 100%; height: auto; }
@media (max-width: 720px) {
  .pj-ba-grid, .pj-photo-grid { grid-template-columns: 1fr; }
  .gx-tabs { gap: 20px; }
}
@media (prefers-reduced-motion: reduce) { .pj-ba-toggle img { transition: none; } }

/* Project tiles */
.pj-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 24px;
}
.pj-tile {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  color: #12110d;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(18, 17, 13, .06), 0 12px 32px -18px rgba(18, 17, 13, .35);
  transition: transform .3s ease, box-shadow .3s ease;
}
.pj-tile:hover { transform: translateY(-3px); box-shadow: 0 1px 0 rgba(18, 17, 13, .06), 0 20px 40px -18px rgba(18, 17, 13, .45); }
.pj-tile:focus-visible { outline: 2px solid #a4703f; outline-offset: 3px; }
.pj-tile-media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: #e9e4da; }
.pj-tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.pj-tile:hover .pj-tile-media img { transform: scale(1.04); }
.pj-tile-body { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px 22px; }
.pj-tile-kind { color: #a4703f; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.pj-tile-title { font-family: Fraunces, Georgia, serif; font-size: 24px; line-height: 1.2; }
.pj-tile-cta { margin-top: 6px; color: #6b655c; font-size: 14px; }
.pj-back { margin: -12px 0 24px; font-size: 14px; }
.pj-back a, .pj-next a { color: #a4703f; }
.pj-next { margin-top: 40px; color: #6b655c; font-size: 15px; }
@media (prefers-reduced-motion: reduce) { .pj-tile, .pj-tile-media img { transition: none; } }
