@font-face {
  font-family: "FS Heading";
  src: url("fonts/font-heading.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "FS Body";
  src: url("fonts/font-body.woff2") format("woff2");
  font-display: swap;
}

:root {
  --teal: #16313c;
  --band: #466e81;
  --night: #041314;
  --header: #081013;
  --blue: #4093b4;
  --white: #eff8fd;
  --text: #cdd3d5;
  --muted: #4c636c;
  --soft: #c2c2c2;
  --heading: "FS Heading", Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--teal);
  color: var(--text);
  font: 16px/1.6 "FS Body", Arial, Helvetica, sans-serif;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; font-weight: 400; }
a { color: inherit; }
a:focus-visible, button:focus-visible, .gallery-track:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}
.wrap { width: min(84%, 1295px); margin-inline: auto; }

/* Header */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 82px;
  padding-inline: 3.1vw;
  background: var(--header);
}
.main-nav {
  display: flex;
  gap: 7px;
  font: 16px/1.6 var(--heading);
}
.main-nav a {
  padding: 8px 10px;
  color: #fff;
  text-decoration: none;
}
.main-nav a:hover { color: var(--blue); }
.header-stores { display: flex; justify-content: flex-end; gap: 30px; }
.header-stores a { transition: opacity .15s; }
.header-stores a:hover { opacity: .7; }

/* Hero */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  aspect-ratio: 1424 / 687;
  max-height: 762px;
  width: 100%;
  padding: 40px 24px min(7.25vw, 116px);
  background: var(--teal) url("img/hero-bg.webp") center / cover no-repeat;
}
.hero .follow { margin-top: auto; }
.follow { text-align: center; }
.follow-title {
  margin-bottom: 14px;
  color: #fff;
  font: 20px/28px var(--heading);
}
.store-buttons { display: flex; justify-content: center; gap: 20px; }
.store-buttons a { display: block; transition: transform .15s; }
.store-buttons a:hover { transform: translateY(-4px); }

/* Trailer */
.trailer { padding: 4vw 0; background: var(--band); }
.trailer .wrap { width: min(92%, 1447px); }
.video { aspect-ratio: 1310 / 556; background: var(--header); }
.video iframe { display: block; width: 100%; height: 100%; border: 0; }

/* About */
.about {
  position: relative;
  padding: min(calc(12.5vw - 66px), 158px) 0 65px;
  background: var(--teal) url("img/about-bg.webp") center / cover no-repeat;
  text-align: center;
}
.mountains { width: 144px; margin-inline: auto; }
.about h2 { margin-top: 14px; }
.about .lead { width: 77.8%; margin: 35px auto 0; }
.about .intro { width: 93%; margin: 22px auto 0; }
h2 img { margin-inline: auto; }
.lead {
  color: #fff;
  font: 20px/28px var(--heading);
}
.divider { display: block; width: min(84%, 1295px); height: auto; margin-inline: auto; }
.about .divider { position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%); }

/* Features */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 2vw 0;
}
.feature-art {
  width: 100%;
  aspect-ratio: 598 / 467;
  object-fit: contain;
}
.feature-wide .feature-art { aspect-ratio: auto; height: 419px; }
.feature-flip .feature-art { order: 2; }
.feature h3 { margin-bottom: 20px; }

.world {
  padding-bottom: 8vw;
  background: var(--teal) url("img/world-bg.webp") center / cover no-repeat;
}
.world .feature { padding-bottom: 0; }

/* Roadmap */
.roadmap { padding: clamp(40px, calc(11.8vw - 45px), 165px) 0 8vw; background: var(--night); }
.roadmap h2 img { margin-inline: 0; }
.timeline {
  display: grid;
  grid-template-columns: 14.05% 14.05% 13.96% 14.05% 15.13% 14.46% 14.3%;
  margin: clamp(20px, calc(17.8vw - 157px), 135px) 0 0;
  padding: 0 0 28px;
  list-style: none;
  border-bottom: 2px solid var(--muted);
}
.timeline li {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.timeline li::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -29px;
  width: 10px;
  height: 10px;
  background: var(--muted);
}
.timeline strong {
  max-width: 130px;
  color: var(--white);
  font: 400 20px/24px var(--heading);
}
.timeline span { color: var(--blue); font-family: var(--heading); }
.note { margin-top: 33px; color: var(--muted); font-size: 14px; }

/* Screenshots */
.screenshots {
  padding: calc(9.86vw - 28px) 0 8vw;
  background: var(--blue) url("img/screenshots-bg.webp") center / cover no-repeat;
  text-align: center;
}
.screenshots .mountains { width: 140px; }
.screenshots h2 { margin-top: 12px; }
.gallery { position: relative; width: min(84%, 1295px); margin: 49px auto 0; }
.gallery-track {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, auto);
  grid-auto-columns: 36.9%;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track a { display: block; scroll-snap-align: start; }
.gallery-track img {
  width: 100%;
  aspect-ratio: 442 / 331;
  object-fit: cover;
  transition: filter .15s;
}
.gallery-track a:hover img { filter: brightness(1.12); }
.gallery-arrow {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border: 0;
  border-radius: 50%;
  background: rgba(239, 248, 253, .92);
  color: var(--teal);
  font-size: 28px;
  line-height: 40px;
  cursor: pointer;
}
.gallery-arrow[hidden] { display: none; }
.gallery-arrow.prev { left: 10px; }
.gallery-arrow.next { right: 28px; }

.press {
  margin-top: 40px;
  color: var(--white);
  font: 20px/31.2px var(--heading);
}
.press-kit { font-size: 24px; }
.press a:hover { color: var(--header); }
#press-kit { scroll-margin-top: 16px; }

/* Follow band */
.follow-band {
  min-height: min(23.15vw, 371px);
  background:
    url("img/footer-bg.webp") center / cover no-repeat,
    linear-gradient(var(--blue), var(--teal));
}

/* Contacts */
.contacts { padding-top: clamp(12px, calc(12.26vw - 112px), 91px); }
.contacts-row { display: flex; align-items: flex-start; }
.contact-mail { margin-left: 31px; color: var(--soft); font-size: 14px; line-height: 19px; }
.contact-mail a { font-family: var(--heading); font-weight: 700; }
.socials { display: flex; align-items: flex-start; gap: 22px; margin-left: auto; }
.socials a { transition: transform .15s; }
.socials a:hover { transform: translateY(-2px); }
.contacts .divider { margin-top: 60px; padding-bottom: 3px; }
.copyright { height: 75px; padding-top: 30px; color: var(--soft); font-size: 14px; line-height: 18px; text-align: center; }

/* Lightbox */
.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(4, 19, 20, .94);
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: transparent; }
.lightbox img { max-width: 100%; max-height: 100%; }
.lightbox button {
  position: absolute;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(239, 248, 253, .92);
  color: var(--teal);
  font-size: 30px;
  line-height: 44px;
  cursor: pointer;
}
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: calc(50% - 24px); }
.lb-next { right: 16px; top: calc(50% - 24px); }

@media (max-width: 1100px) {
  .feature-wide .feature-art { height: 430px; }
}

@media (min-width: 1700px) {
  .feature-art { aspect-ratio: 647 / 520; }
  .press { margin-top: 56px; }
}

@media (max-width: 750px) {
  .site-header { display: flex; justify-content: space-between; height: 70px; padding-inline: 15px; }
  .main-nav { display: none; }

  .hero { aspect-ratio: auto; max-height: none; height: 385px; padding: 40px 15px 20px; }
  .hero h1 img { width: 320px; }
  .store-buttons img { width: 71px; }

  .trailer { padding: 8px 0; }
  .trailer .wrap { width: calc(100% - 15px); }
  .video { aspect-ratio: 360 / 146; }

  .about { padding: 30px 0 69px; }
  .about .mountains, .screenshots .mountains { display: none; }
  .about h2, .screenshots h2 { margin-top: 0; }
  h2 img { height: 30px; width: auto; }
  h3 img { height: 20px; width: auto; }
  .about .lead { width: 100%; margin-top: 10px; }
  .about .intro { width: 100%; margin-top: 6px; }

  .feature { grid-template-columns: 1fr; padding: 30px 0 7px; }
  .feature-art { aspect-ratio: 315 / 269; }
  .feature-wide { padding-top: 8px; }
  .feature-wide .feature-art { aspect-ratio: 315 / 280; height: auto; }
  .feature-flip .feature-art { order: 0; }
  .world { padding-bottom: 30px; }

  .roadmap { padding: 30px 0; }
  .timeline {
    display: block;
    margin-top: 33px;
    padding: 0;
    border-bottom: 0;
  }
  .timeline li {
    flex-direction: row;
    align-items: center;
    height: 23px;
    margin-bottom: 26px;
    padding-left: 30px;
    justify-content: flex-start;
  }
  .timeline li:last-child { margin-bottom: 0; }
  .timeline li::after { top: 6px; bottom: auto; }
  .timeline strong { flex: 0 0 135px; max-width: none; font-size: 18px; line-height: 23px; white-space: nowrap; }
  .note { margin-top: 25px; }

  .screenshots { padding: 30px 0 33px; }
  .gallery { margin-top: 22px; }
  .gallery-track { grid-auto-columns: 35.2%; }
  .gallery-arrow { width: 49px; height: 49px; margin-top: -24px; }
  .gallery-arrow.next { right: 24px; }
  .press { margin-top: 20px; }

  .follow-band { min-height: 131px; }

  .contacts { padding-top: 45px; }
  .contacts-row { flex-direction: column; align-items: center; text-align: center; }
  .contacts h2 img { height: 40px; }
  .contact-mail { margin: 30px 0 0; }
  .socials { gap: 6px; margin: 11px 0 0; }
  .contacts .divider { margin-top: 21px; padding-bottom: 0; }
  .copyright { height: 50px; padding-top: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
