*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #0d0d0d;
  --surface: #161616;
  --border:  rgba(255,255,255,.08);
  --text:    #f7f7f5;
  --muted:   rgba(247,247,245,.4);
  --accent:  #f7f7f5;
  --font:    'Inter', 'Helvetica Neue', sans-serif;
  --ease:    cubic-bezier(.16,1,.3,1);
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ───────────────────────────────────────────────── */
.g-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(13,13,13,.9);
  backdrop-filter: blur(12px);
  z-index: 10;
}

.g-header__back {
  font-size: .75rem;
  letter-spacing: .06em;
  color: var(--muted);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: color .2s;
}
.g-header__back:hover { color: var(--text); }

.g-header__title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.g-header__title .accent { opacity: .5; }

.g-header__count {
  font-size: .75rem;
  color: var(--muted);
  letter-spacing: .06em;
}

/* ── Main ─────────────────────────────────────────────────── */
.g-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 2.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── Hero image ───────────────────────────────────────────── */
.g-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
}

.g-hero img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity .4s var(--ease);
}
.g-hero img.is-switching { opacity: 0; }

.g-hero__label {
  position: absolute;
  bottom: 1.2rem;
  left: 1.5rem;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(247,247,245,.6);
  background: rgba(0,0,0,.45);
  padding: .35rem .8rem;
  border-radius: 2px;
  backdrop-filter: blur(6px);
  transition: opacity .3s;
}

/* ── Thumbnails ───────────────────────────────────────────── */
.g-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .75rem;
}

.g-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .2s, opacity .2s;
}
.g-thumb img {
  width: 100%;
  height: 100%;
  -webkit-object-fit: cover;
  object-fit: cover;
  -webkit-object-position: top center;
  object-position: top center;
  display: block;
  transition: transform .35s var(--ease);
}
.g-thumb:hover img { transform: scale(1.05); }
.g-thumb:hover { opacity: 1 !important; }
.g-thumb.is-active {
  border-color: var(--text);
}
.g-thumbs:has(.is-active) .g-thumb:not(.is-active) {
  opacity: .45;
}

/* ── Footer ───────────────────────────────────────────────── */
.g-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: .7rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .g-thumbs { grid-template-columns: repeat(3, 1fr); }
  .g-hero { aspect-ratio: 4 / 3; }
}
@media (max-width: 600px) {
  .g-main { padding: 1.25rem; }
  .g-header { padding: 1rem 1.25rem; }
  .g-thumbs { grid-template-columns: repeat(2, 1fr); gap: .5rem; }
  .g-hero { aspect-ratio: 1 / 1; }
}
