/* =========================================================
   RESET
========================================================= */

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

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Montserrat", sans-serif;
  background: #050505;
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

h1 span,
.cta h2 span {
  color: #e10600;
}

.btn-red {
  background: #e10600;
  color: #fff;
}

/* =========================================================
   HERO
========================================================= */

.gallery-hero {
  --hero-image: url("/img/heroes/gallery.webp");
  min-height: 100vh;
  position: relative;
  padding: 160px 60px 170px;
  display: flex;
  align-items: end;
  overflow: hidden;
}

.gallery-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 1),
      rgba(0, 0, 0, 0.58),
      rgba(0, 0, 0, 0.24)
    ),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), #050505 95%),
    var(--hero-image) center / cover no-repeat;
  z-index: -2;
  transform: scale(1.04);
}

.gallery-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.hero-content {
  max-width: 980px;
}

h1 {
  font-size: clamp(72px, 8.8vw, 125px);
  letter-spacing: -0.05em;
  text-transform: uppercase;
  font-weight: 900;
  line-height: 1;
}

.hero-content p {
  margin-top: 28px;
  max-width: 720px;
  font-size: 20px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.74);
}

/* =========================================================
   GALLERY
========================================================= */

.gallery-section {
  padding: 110px 60px;
  max-width: 1400px;
  margin: 0 auto;
}

.picture-section {
  margin-top: 90px;
  content-visibility: auto;
  contain-intrinsic-size: auto 1200px;
}

@media (max-width: 620px) {
  .gallery-hero {
    --hero-image: url("/img/heroes/mobile/gallery.webp");
  }
}

.picture-section:first-of-type {
  margin-top: 40px;
}

.picture-section-title {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 34px;
}

.picture-section-title span {
  font-size: 14px;
  font-weight: 900;
  color: #f20d06;
  letter-spacing: 0.24em;
}

.picture-section-title h2 {
  font-size: clamp(38px, 4vw, 52px);
  text-transform: uppercase;
  letter-spacing: -0.05em;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 260px;
  gap: 18px;
}

.gallery-card {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: 0.3s;
}

.gallery-card.wide {
  grid-column: span 2;
}

.gallery-card.gallery-card--portrait-feature {
  grid-row: span 2;
}

.gallery-card:hover {
  transform: translateY(-5px);
  border-color: rgba(225, 6, 0, 0.55);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.65s;
  filter: saturate(1.08) contrast(1.05);
}

.gallery-card img.gallery-focus-lower {
    object-position: center 75%;
}

.gallery-card img.gallery-focus-bottom {
    object-position: center 88%;
}

.gallery-card img[loading="lazy"] {
  background: #111;
}

.gallery-card:hover img {
  transform: scale(1.08);
}

.gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.88));
  opacity: 0.95;
}

.gallery-info {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
}

.gallery-info h3 {
  margin-top: 10px;
  font-size: 23px;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: -0.04em;
}

.picture-section:not(.picture-section--captioned) .gallery-info {
  display: none;
}

.picture-section:not(.picture-section--captioned) .gallery-card::after {
  opacity: 0;
}

/* =========================================================
   VIDEO SECTION
========================================================= */

.video-section {
  padding: 110px 60px;
  background: #0a0a0a;
}

.video-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 50px;
  align-items: center;
}

.video-inner h2 {
  font-size: clamp(56px, 5.8vw, 82px);
  line-height: 0.92;
  letter-spacing: -0.06em;
  text-transform: uppercase;
}

.video-eyebrow {
  display: block;
  margin-bottom: 16px;
  color: #e10600;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.video-inner p {
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 18px;
  line-height: 1.85;
}

.video-box {
  position: relative;
  min-height: 480px;
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #111;
}

.video-box video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 480px;
  object-fit: cover;
  filter: contrast(1.08) saturate(1.1);
}

.video-box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.7));
  pointer-events: none;
}

.video-volume-control {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
}

.video-play-toggle,
.video-sound-toggle {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: rgba(8, 8, 8, 0.8);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.video-volume-slider-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  background: rgba(8, 8, 8, 0.8);
  color: #fff;
  backdrop-filter: blur(8px);
}

.video-volume-slider {
  width: 130px;
  accent-color: #e10600;
  cursor: pointer;
}

.video-volume-value {
  min-width: 42px;
  font-family: var(--font-1);
  font-size: 13px;
  text-align: right;
}

.video-play-toggle:hover,
.video-sound-toggle:hover {
  border-color: #e10600;
  background: #e10600;
  transform: translateY(-2px);
}

.playback-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.playback-icon-play {
  display: none;
  fill: currentColor;
  stroke: none;
}

.video-play-toggle.is-paused .playback-icon-play {
  display: block;
}

.video-play-toggle.is-paused .playback-icon-pause {
  display: none;
}

.sound-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sound-icon-on {
  display: none;
}

.video-sound-toggle.is-audible .sound-icon-on {
  display: block;
}

.video-sound-toggle.is-audible .sound-icon-off {
  display: none;
}

/* =========================================================
   LIGHTBOX
========================================================= */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.lightbox.active {
  display: flex;
}

html.lightbox-open,
body.lightbox-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.lightbox-open {
  position: fixed;
  inset-inline: 0;
  width: 100%;
}

.lightbox > img {
  max-width: 92vw;
  max-height: 84vh;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.75);
}

.lightbox-close {
  position: absolute;
  top: 28px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #e10600;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.lightbox-close img {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
  pointer-events: none;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-card.gallery-card--portrait-feature {
    grid-row: span 3;
  }
}

@media (max-width: 980px) {
  .gallery-hero {
    min-height: 90vh;
    padding: 140px 24px 130px;
  }

  .gallery-hero::before {
    background-position: center;
  }

  h1 {
    font-size: clamp(64px, 11vw, 82px);
  }

  .hero-content p,
  .video-inner p {
    font-size: 17px;
  }

  .gallery-section,
  .video-section {
    padding: 84px 24px;
  }

  .picture-section {
    margin-top: 70px;
  }

  .picture-section-title h2 {
    font-size: 40px;
  }

  .video-inner {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .video-inner h2 {
    font-size: 58px;
  }

  .video-box {
    margin-top: 0;
  }

  .video-volume-slider-wrap {
    display: none;
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 620px) {
  .gallery-hero {
    min-height: 100svh;
    padding: 128px 18px 108px;
  }

  h1 {
    font-size: 52px;
    line-height: 0.95;
  }

  .hero-content p {
    font-size: 16px;
    line-height: 1.7;
  }

  .gallery-section,
  .video-section {
    padding: 72px 18px;
  }

  .picture-section {
    margin-top: 62px;
  }

  .picture-section:first-of-type {
    margin-top: 24px;
  }

  .picture-section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
  }

  .picture-section-title h2 {
    font-size: 32px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 310px;
    gap: 16px;
  }

  .gallery-card,
  .gallery-card.wide {
    grid-column: span 1;
    border-radius: 22px;
  }

  .gallery-card.gallery-card--portrait-feature {
    grid-row: span 1;
  }

  .gallery-card:hover {
    transform: none;
  }

  .gallery-info {
    left: 18px;
    right: 18px;
    bottom: 18px;
  }

  .gallery-info h3 {
    font-size: 21px;
  }

  .video-inner h2 {
    font-size: 42px;
  }

  .video-box,
  .video-box video {
    min-height: 340px;
    border-radius: 24px;
  }

  .video-volume-control {
    right: 16px;
    bottom: 16px;
  }

  .video-play-toggle,
  .video-sound-toggle {
    width: 44px;
    height: 44px;
  }

  .lightbox {
    padding: 18px;
  }

  .lightbox > img {
    max-width: 94vw;
    max-height: 82vh;
    border-radius: 16px;
  }

  .lightbox-close {
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
  }
}
