:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #141414;
  --panel-2: #1d1d1d;
  --line: #343434;
  --text: #f5f5f5;
  --muted: #aaa;
  --accent: #d8b76a;
  --accent-soft: rgba(216, 183, 106, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hero {
  min-height: 42vh;
  display: grid;
  align-items: end;
  padding: 58px 24px 34px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.16), #050505 90%),
    repeating-linear-gradient(90deg, #070707 0 26px, #111 26px 27px);
  border-bottom: 1px solid var(--line);
}

.hero__inner,
main {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
}

.kicker {
  margin: 0 0 10px;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 104px);
  line-height: 0.95;
  font-weight: 700;
}

.intro {
  max-width: 760px;
  margin: 20px 0 0;
  color: #ddd;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.45;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.stats span,
.section-button,
.controls,
.group__head,
.day-nav,
.video-card,
.empty {
  background: rgba(20, 20, 20, 0.94);
  border: 1px solid var(--line);
}

.stats span {
  padding: 10px 13px;
  color: var(--muted);
}

.stats strong {
  color: var(--text);
  font-weight: 700;
}

main {
  padding: 22px 0 64px;
}

.section-menu {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.section-button {
  min-height: 52px;
  padding: 12px 14px;
  color: var(--text);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.section-button:hover,
.section-button.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.section-button:hover {
  transform: translateY(-1px);
}

.controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 270px);
  gap: 12px;
  margin-bottom: 22px;
  padding: 14px;
}

.search,
.filter {
  display: grid;
  gap: 6px;
}

.search span,
.filter span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

input,
select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  color: var(--text);
  background: #070707;
  border: 1px solid var(--line);
  border-radius: 0;
}

input:focus,
select:focus {
  outline: 1px solid var(--accent);
}

.day-nav {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 6px;
  padding: 10px;
  margin-bottom: 22px;
}

.day-link {
  min-height: 42px;
  padding: 7px 8px;
  color: var(--text);
  background: #0b0b0b;
  border: 1px solid #2a2a2a;
  transition: border-color 160ms ease, background 160ms ease;
}

.day-link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.day-link small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.groups {
  display: grid;
  gap: 26px;
}

.group {
  scroll-margin-top: 18px;
}

.group__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}

.group__head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}

.group__head span {
  flex: none;
  color: var(--muted);
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  padding-top: 8px;
}

.thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  background: #101010;
  border: 1px solid #202020;
  transition: border-color 160ms ease, transform 160ms ease;
}

.thumb:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb__date {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 9px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.9));
  color: var(--text);
  font-size: 12px;
  text-align: left;
}

.empty {
  padding: 28px;
  color: var(--muted);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.video-card {
  display: grid;
  gap: 9px;
  padding: 14px;
}

.video-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  word-break: break-word;
}

.video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.play-button,
.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  color: var(--text);
  text-decoration: none;
  background: #080808;
  border: 1px solid var(--line);
  transition: border-color 160ms ease, background 160ms ease;
}

.play-button:hover,
.download-link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.lightbox,
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  background: #000;
}

.lightbox.is-open,
.video-modal.is-open {
  display: flex;
}

.lightbox__figure {
  width: 100vw;
  height: 100vh;
  margin: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  padding: 22px 72px 20px;
}

.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 78px);
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.lightbox figcaption {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding-top: 10px;
  color: var(--muted);
}

#lightboxDate {
  color: var(--text);
}

.lightbox__close,
.lightbox__nav {
  position: fixed;
  z-index: 21;
  color: var(--text);
  background: rgba(18, 18, 18, 0.78);
  border: 1px solid var(--line);
  transition: background 160ms ease, border-color 160ms ease;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: rgba(50, 50, 50, 0.9);
  border-color: var(--accent);
}

.lightbox__close {
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  font-size: 28px;
  line-height: 1;
}

.lightbox__nav {
  top: 50%;
  width: 50px;
  height: 78px;
  transform: translateY(-50%);
  font-size: 28px;
}

.lightbox__nav--prev {
  left: 16px;
}

.lightbox__nav--next {
  right: 16px;
}

.video-modal__panel {
  width: min(980px, calc(100vw - 32px));
  display: grid;
  gap: 12px;
}

.video-modal__panel h2 {
  margin: 0;
  font-size: 20px;
  word-break: break-word;
}

.video-modal video {
  width: 100%;
  max-height: 72vh;
  background: #000;
}

.video-fallback {
  margin: 0;
  color: var(--muted);
}

.video-fallback a {
  color: var(--accent);
}

body.lightbox-open {
  overflow: hidden;
}

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

  .controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .hero {
    min-height: 36vh;
    padding: 42px 16px 24px;
  }

  .thumb-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .group__head {
    position: static;
  }

  .lightbox__figure {
    padding: 58px 12px 18px;
  }

  .lightbox__nav {
    top: auto;
    bottom: 18px;
    width: 48px;
    height: 48px;
    transform: none;
  }

  .lightbox__nav--prev {
    left: 12px;
  }

  .lightbox__nav--next {
    right: 12px;
  }

  .lightbox figcaption {
    padding: 8px 60px 0;
    font-size: 14px;
    flex-wrap: wrap;
  }
}

@media (max-width: 520px) {
  .hero__inner,
  main {
    width: min(100% - 20px, 1480px);
  }

  .stats {
    display: grid;
  }

  .section-menu {
    grid-template-columns: 1fr;
  }

  .section-button {
    text-align: left;
  }

  .thumb-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .group__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}
