:root {
  --bg: #050506;
  --bg-soft: #0d0e11;
  --text: #f5f5f0;
  --muted: #aaa9a2;
  --line: rgba(245, 245, 240, 0.14);
  --accent: #f5f5f0;
  --max-width: 1180px;
  --design-width: 2560;
  --design-height: 4600;
  --mountain-4-max-offset: clamp(160px, 22vw, 580px);
  --scene-height: calc((100vw * var(--design-height) / var(--design-width)) - var(--mountain-4-max-offset));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.075), transparent 26rem),
    linear-gradient(135deg, var(--bg), var(--bg-soft));
  overflow-x: hidden;
}

a {
  color: inherit;
}

.site-header {
  position: absolute;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0;
  pointer-events: auto;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(70px, 6vw, 120px);
  height: 1px;
  background: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: clamp(136px, 16vw, 188px);
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 34px);
}

.site-nav a {
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav a:hover {
  color: var(--text);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.menu-line {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 160ms ease, opacity 160ms ease;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.menu-toggle[aria-expanded="true"] .menu-line:nth-of-type(2) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-line:nth-of-type(3) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-line:nth-of-type(4) {
  transform: translateY(-7px) rotate(-45deg);
}

.page-scene {
  position: relative;
  min-height: max(100svh, var(--scene-height));
  overflow: hidden;
  background: var(--bg);
}

.scene-layers {
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
}

.scene-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.hero {
  position: relative;
  z-index: 10;
  display: grid;
  align-items: center;
  min-height: 100svh;
  padding: 128px max(20px, calc((100vw - var(--max-width)) / 2)) 170px;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

#hero-name {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0;
  text-shadow: 2px 2px 4px #050506;
}

#hero-title {
  margin: 14px 0 0;
  max-width: 820px;
  font-size: clamp(3.4rem, 9vw, 8.5rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: 0;
  text-shadow: 2px 2px 4px #050506;
}

.hero-copy {
  max-width: 620px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  line-height: 1.7;
  text-shadow: 2px 2px 4px #0505061d;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

#Cloud_Left {
  z-index: 20;
  transform: translate3d(var(--cloud-left-offset, 0px), 0, 0);
  will-change: transform;
}

#Cloud_Right {
  z-index: 5;
  transform: translate3d(var(--cloud-right-offset, 0px), 0, 0);
  will-change: transform;
}

.games {
  position: absolute;
  z-index: 10;
  inset: 0;
  --game-card-top: 90%;
  --game-card-offset-y: -10px;
  padding: 0 max(20px, calc((100vw - var(--max-width)) / 2));
  scroll-margin-top: clamp(-100px, -8vw, -130px);
  pointer-events: none;
  text-align: center;
}

.games-content {
  position: absolute;
  z-index: 10;
  top: 43%;
  left: 50%;
  width: min(820px, calc(100% - 40px));
  pointer-events: auto;
  transform: translateX(-50%);
}

#games-title {
  margin: 14px auto 0;
  max-width: 820px;
  scroll-margin-top: clamp(0px, 18vw, 150px);
  font-size: clamp(3.4rem, 9vw, 8.5rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: 0;
  text-shadow: 2px 2px 4px #050506;
}

.games-intro {
  max-width: 620px;
  margin: 28px auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.7;
}

.games-button {
  margin-top: 32px;
}

.mountain-layer {
  will-change: transform;
}

.window-layer {
  z-index: 8;
  transform: translate3d(0, var(--mountain-4-offset, 0px), 0);
  will-change: transform;
}

.game-window-video-frame {
  position: absolute;
  z-index: 7;
  top: calc((100vw * 3590 / var(--design-width)) + var(--mountain-4-offset, 0px));
  left: calc(100vw * 450 / var(--design-width));
  width: calc(100vw * 705 / var(--design-width));
  height: calc(100vw * 375 / var(--design-width));
  pointer-events: auto;
}

.game-window-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: auto;
}

.game-window-thumbnail {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  opacity: 1;
  transition: opacity 180ms ease;
}

.game-window-video-frame.is-playing .game-window-thumbnail {
  opacity: 0;
}

.game-window-hover-zone {
  position: absolute;
  z-index: 12;
  top: calc((100vw * 3560 / var(--design-width)) + var(--mountain-4-offset, 0px));
  left: calc(100vw * 400 / var(--design-width));
  width: calc(100vw * 750 / var(--design-width));
  height: calc(100vw * 400 / var(--design-width));
  pointer-events: auto;
}

.game-window-controls {
  position: absolute;
  z-index: 13;
  top: calc((100vw * 3777.5 / var(--design-width)) + var(--mountain-4-offset, 0px));
  left: calc(100vw * 802.5 / var(--design-width));
  align-items: center;
  flex-direction: column;
  display: flex;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, -50%, 0);
  transition: opacity 160ms ease;
}

.game-window-controls.is-visible,
.game-window-controls:focus-within {
  opacity: 1;
  pointer-events: auto;
}

.video-button-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.video-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(245, 245, 240, 0.26);
  border-radius: 4px;
  color: var(--text);
  background: rgba(0, 0, 5, 0.74);
  font: inherit;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.video-control img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.video-control:hover {
  background: rgba(245, 245, 240, 0.14);
}

.video-progress {
  -webkit-appearance: none;
  appearance: none;
  width: 160px;
  height: 14px;
  margin: 0;
  accent-color: var(--text);
  background: transparent;
  cursor: pointer;
}

.video-progress::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--text) 0%,
    var(--text) var(--video-progress, 0%),
    rgba(245, 245, 240, 0.22) var(--video-progress, 0%),
    rgba(245, 245, 240, 0.22) 100%
  );
}

.video-progress::-webkit-slider-thumb {
  width: 10px;
  height: 10px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
  -webkit-appearance: none;
}

.video-progress::-moz-range-track {
  height: 3px;
  border-radius: 999px;
  background: rgba(245, 245, 240, 0.22);
}

.video-progress::-moz-range-progress {
  height: 3px;
  border-radius: 999px;
  background: var(--text);
}

.video-progress::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
}

#Mountain_1 {
  z-index: 1;
  transform: translate3d(0, var(--mountain-1-offset, 0px), 0);
}

#Mountain_2 {
  z-index: 2;
  transform: translate3d(0, var(--mountain-2-offset, 0px), 0);
}

#Mountain_3 {
  z-index: 3;
  transform: translate3d(0, var(--mountain-3-offset, 0px), 0);
}

#Mountain_4 {
  z-index: 4;
  transform: translate3d(0, var(--mountain-4-offset, 0px), 0);
}

.featured-game {
  position: absolute;
  z-index: 12;
  left: 50%;
  top: var(--game-card-top);
  width: min(var(--max-width), calc(100% - 40px));
  scroll-margin-top: clamp(400px, 16vw, 260px);
  pointer-events: auto;
  transform: translate3d(-50%, calc(var(--mountain-4-offset, 0px) + var(--game-card-offset-y)), 0);
  text-align: left;
}

.game-card {
  width: min(52%, 620px);
  margin-left: auto;
  max-width: 620px;
}

.game-card h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2.6rem, 4.3vw, 4.1rem);
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow: 2px 2px 4px #050506;
}

.game-card p {
  margin: 22px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.game-platform-label {
  font-size: 0.86rem;
}

.game-platform-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  color: var(--text);
  text-decoration: none;
}

.game-platform-link img {
  display: block;
  width: 34px;
  height: auto;
  filter: invert(1);
  transition: opacity 160ms ease, transform 160ms ease;
}

.game-platform-link:hover img {
  opacity: 0.8;
  transform: translateY(-1px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.button-primary {
  color: #050506;
  background: var(--accent);
}

.button-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

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

footer {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  bottom: 0px;
  padding: 40px 20px 40px;
  color: var(--muted);
  background: #000005;
  text-align: center;
}

footer p {
  margin: 0;
}

.footer-top-link {
  min-height: 38px;
  margin-bottom: 18px;
  padding: 0 16px;
  font-size: 0.78rem;
}

.footer-tagline {
  margin-top: 8px;
  font-size: 0.78rem;
}

@media (max-width: 760px) {
  .site-header {
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 0 4px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 14px 0;
    border-top: 1px solid var(--line);
  }

  .hero {
    padding-top: 176px;
  }

  #hero-title {
    font-size: clamp(3rem, 16vw, 5rem);
  }

  .featured-game {
    position: absolute;
    top: var(--game-card-top);
    left: auto;
    right: 20px;
    width: calc(100% - 40px);
    margin: 0;
    transform: translate3d(0, calc(var(--mountain-4-offset, 0px) + var(--game-card-offset-y)), 0);
    text-align: center;
  }

  .game-card {
    width: auto;
    margin-left: 0;
    max-width: none;
  }
}
