/* CNC Family photo wall (2026-11-18). Section + lightbox. Uses tokens from styles.css. */
.pw[hidden] { display: none; }
.pw-head .pw-kicker { color: var(--orange); font-weight: 800; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 14px; }
.pw-head p:not(.pw-kicker) { max-width: 34em; margin-inline: auto; }

.pw-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; grid-auto-flow: dense; gap: 10px; }
.pw-grid li { position: relative; aspect-ratio: 1 / 1; border-radius: var(--r-tile); overflow: hidden; background: var(--surface); }
/* Every 7th tile is a 2×2 feature so the wall has rhythm, not a spreadsheet. */
.pw-grid li.feat { grid-column: span 2; grid-row: span 2; }
.pw-grid button { all: unset; display: block; position: absolute; inset: 0; cursor: zoom-in; }
.pw-grid button:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; border-radius: var(--r-tile); }
.pw-grid img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.03); transition: opacity .5s var(--ease), transform .8s var(--ease); }
.pw-grid img.is-loaded { opacity: 1; transform: none; }
.pw-grid button:hover img.is-loaded { transform: scale(1.04); }
.pw-grid li::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }

.pw-actions { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.pw-more { font-family: inherit; cursor: pointer; }
.pw-more[hidden] { display: none; }

/* Lightbox */
.pw-lb { padding: 0; margin: 0; border: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: rgba(5,5,8,.94); color: #fff; overflow: hidden; }
.pw-lb::backdrop { background: rgba(5,5,8,.8); }
.pw-lb[open] { display: grid; place-items: center; animation: pw-in .3s var(--ease); }
@keyframes pw-in { from { opacity: 0; } }
.pw-lb-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: calc(100vw - 160px); }
.pw-lb-fig img { max-width: 100%; max-height: calc(100dvh - 140px); object-fit: contain; border-radius: 8px; user-select: none; -webkit-user-drag: none; }
.pw-lb-fig figcaption { color: var(--text-2); font-size: 15px; text-align: center; max-width: 40em; min-height: 1.6em; }
.pw-lb-count { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); color: var(--text-3); font-size: 14px; font-weight: 600; }
.pw-lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: #fff; font-size: 22px; display: grid; place-items: center; cursor: pointer; transition: background-color .2s, border-color .2s; }
.pw-lb-btn:hover { background: rgba(255,107,44,.18); border-color: var(--orange); }
.pw-lb-btn[disabled] { opacity: .3; cursor: default; }
.pw-lb-close { top: 14px; right: 14px; width: 44px; height: 44px; font-size: 20px; }
.pw-lb-prev { left: 20px; top: 50%; margin-top: -24px; }
.pw-lb-next { right: 20px; top: 50%; margin-top: -24px; }

@media (max-width: 1180px) and (min-width: 901px) {
  /* 5 nav items: tighten so the header keeps its width budget. */
  .nav ul { gap: 18px; }
  .header-inner { gap: 24px; }
}
@media (max-width: 900px) {
  .pw-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}
@media (max-width: 600px) {
  .pw-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .pw-actions .btn { flex: 1 1 100%; }
  .pw-lb-fig { max-width: 100vw; padding: 0 8px; }
  .pw-lb-fig img { max-height: calc(100dvh - 160px); border-radius: 0; }
  .pw-lb-prev, .pw-lb-next { top: auto; bottom: 18px; margin-top: 0; width: 44px; height: 44px; }
  .pw-lb-prev { left: 16px; }
  .pw-lb-next { right: 16px; }
  .pw-lb-fig figcaption { padding: 0 64px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .pw-grid img { transition: none; transform: none; }
  .pw-lb[open] { animation: none; }
}
