/* AirForce — gallery tiles, video tiles, gallery + films pages. */

/* ===== Gallery (hero layout, shared by home and the gallery page) ===== */
.gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 180px; gap: var(--gutter); }
.g-tile { position: relative; overflow: hidden; background: var(--graphite); margin: 0; }
.g-link { display: block; width: 100%; height: 100%; }
.g-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease-out-quint); }
.g-tile:hover img, .g-tile:focus-within img { transform: scale(1.02); }
.g-tile::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0; background: var(--champagne); transition: width 500ms var(--ease-out-quint); pointer-events: none; }
.g-tile:hover::after, .g-tile:focus-within::after { width: 100%; }
.g-tile figcaption { position: absolute; left: 18px; right: 18px; bottom: 14px; font-family: var(--font-mono); font-size: var(--t-13); letter-spacing: 0.06em; color: var(--paper); text-shadow: 0 1px 2px rgba(0,0,0,0.8); pointer-events: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-1 { grid-column: span 7; grid-row: span 3; }
.g-2 { grid-column: span 5; grid-row: span 2; }
.g-3 { grid-column: span 5; grid-row: span 1; }
.g-4 { grid-column: span 4; grid-row: span 2; }
.g-5 { grid-column: span 8; grid-row: span 2; }
@media (max-width: 900px) {
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; }
  .g-1 { grid-column: span 2; grid-row: span 2; }
  .g-2, .g-3, .g-4 { grid-column: span 1; grid-row: span 1; }
  .g-5 { grid-column: span 2; grid-row: span 1; }
}

/* Gallery page: sets */
.af-gallery-page { display: grid; gap: 64px; }
.g-set__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 24px; border-top: 1px solid var(--gunmetal); padding-top: 24px; }
.g-set__count { font-size: var(--t-13); color: var(--steel); letter-spacing: 0.08em; }
.g-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.g-grid .g-tile { aspect-ratio: 3/2; }
.g-grid .g-tile.is-portrait { grid-row: span 2; aspect-ratio: auto; }
@media (max-width: 900px) { .g-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .g-grid { grid-template-columns: 1fr; } .g-grid .g-tile.is-portrait { grid-row: auto; aspect-ratio: 3/2; } }

/* ===== Video tiles ===== */
.videos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
.videos--page { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.video-tile { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--graphite); display: block; color: var(--paper); }
.video-tile img, .video-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease-out-quint), opacity 300ms; }
.video-tile video { opacity: 0; }
.video-tile.is-previewing video { opacity: 1; }
.video-tile:hover img, .video-tile:hover video, .video-tile:focus-visible img { transform: scale(1.02); }
.video-tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,11,12,0) 45%, rgba(11,11,12,0.85) 100%); z-index: 1; }
.video-tile::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0; background: var(--champagne); transition: width 500ms var(--ease-out-quint); z-index: 2; }
.video-tile:hover::after, .video-tile:focus-visible::after { width: 100%; }
.video-title { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 2; font-size: var(--t-15); font-weight: 500; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-play { position: absolute; top: 12px; left: 12px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; background: rgba(11,11,12,0.7); border: 1px solid var(--gunmetal); display: grid; place-items: center; }
.video-play::after { content: ""; border-left: 9px solid var(--paper); border-top: 5px solid transparent; border-bottom: 5px solid transparent; margin-left: 2px; }
.video-dur, .video-ext { position: absolute; top: 14px; right: 12px; z-index: 2; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--steel); }
.video-ext { top: auto; bottom: 56px; right: auto; left: 14px; color: var(--champagne); }
.videos--page .video-title { font-size: var(--t-17); }
@media (max-width: 1000px) { .videos, .videos--page { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .videos, .videos--page { grid-template-columns: repeat(2, minmax(0, 1fr)); } .video-title { font-size: var(--t-13); } }
@media (max-width: 420px) { .videos--page { grid-template-columns: 1fr; } }

/* Media pages share the dark ground and a tighter head */
.af-page--media .af-page__head { margin-bottom: 40px; }
