/* Videos page */

:root {
  --videos-accent: #ad0800;
  --videos-bg: #111;
  --videos-radius: 8px;
}

.grain-overlay {
  pointer-events: none;
}

body {
  overflow-x: hidden;
}

body.lightbox-open {
  overflow: hidden;
}

/* Header */

.videos-hero {
  background: var(--videos-bg);
  padding: 8rem 2rem 6rem;
}

.videos-header {
  max-width: 720px;
  margin: 0 auto 4rem;
  text-align: center;
  color: #fff;
}

.videos-eyebrow {
  margin-bottom: 1.5rem;
  font-family: zuume, sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--videos-accent);
}

.videos-title {
  margin: 0;
  font-family: zuume, sans-serif;
  font-size: 4rem;
  line-height: 1.05;
  text-transform: uppercase;
}

.videos-intro {
  margin: 1.25rem 0 0;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Sections */

.videos-featured,
.videos-group {
  max-width: 1200px;
  margin: 0 auto;
}

.videos-group {
  margin-top: 5rem;
}

.videos-group-title {
  margin: 0 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  font-family: zuume, sans-serif;
  font-size: 2rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem 1.5rem;
}

/* Video tile */

.video-tile {
  --play-size: 64px;
  --caption-size: 1.4rem;

  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  color: #fff;
  cursor: pointer;
}

.video-tile--featured {
  --play-size: 88px;
  --caption-size: 2rem;
}

.video-tile:focus-visible {
  outline: 2px solid var(--videos-accent);
  outline-offset: 4px;
  border-radius: var(--videos-radius);
}

.video-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--videos-radius);
  background: #000;
}

.video-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--play-size);
  height: var(--play-size);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.6);
  transform: translate(-50%, -50%);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

/* Triangle, sized relative to the circle and nudged right to look centred */
.video-play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  border-style: solid;
  border-width: calc(var(--play-size) * 0.16) 0 calc(var(--play-size) * 0.16) calc(var(--play-size) * 0.27);
  border-color: transparent transparent transparent #fff;
  transform: translate(-38%, -50%);
}

.video-duration {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.75);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: #fff;
}

.video-tile:hover .video-thumb img,
.video-tile:focus-visible .video-thumb img {
  opacity: 1;
  transform: scale(1.04);
}

.video-tile:hover .video-play,
.video-tile:focus-visible .video-play {
  border-color: var(--videos-accent);
  background: var(--videos-accent);
  transform: translate(-50%, -50%) scale(1.08);
}

.video-caption {
  display: block;
  margin-top: 0.75rem;
  font-family: zuume, sans-serif;
  font-size: var(--caption-size);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.videos-note {
  margin: 5rem 0 0;
  text-align: center;
}

.videos-note a {
  font-size: 0.95rem;
  color: #fff;
  opacity: 0.7;
  text-decoration: underline;
}

.videos-note a:hover {
  opacity: 1;
}

/* Lightbox */

.video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.92);
}

.video-lightbox[hidden] {
  display: none;
}

/* Fit 16:9 inside the viewport whichever dimension is the limit */
.video-lightbox-frame {
  position: relative;
  width: min(100%, 1200px, (100vh - 6rem) * 16 / 9);
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-lightbox-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  width: 48px;
  height: 48px;
  border: 0;
  background: none;
  font-size: 2.5rem;
  line-height: 1;
  color: #fff;
  cursor: pointer;
}

.video-lightbox-close:hover,
.video-lightbox-close:focus-visible {
  color: var(--videos-accent);
}

/* Footer */

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-content {
  display: flex;
  flex-grow: 1;
  justify-content: center;
  align-items: center;
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 15px;
}

.social-text {
  margin-right: 10px;
  font-size: 16px;
  color: #fff;
}

.social-logo {
  width: 32px;
  height: 32px;
}

/* Responsive */

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

@media (max-width: 768px) {
  .videos-hero {
    padding: 6rem 1rem 4rem;
  }

  .videos-title {
    font-size: 2.5rem;
  }

  .videos-group {
    margin-top: 3.5rem;
  }

  .videos-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .video-tile--featured {
    --caption-size: 1.6rem;
  }

  .video-lightbox {
    padding: 4rem 0 0;
  }
}
