:root {
  --u: min(0.0520833333vw, 0.0925925926vh);
  --white: #fff;
  --red: #f51924;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
  color: var(--white);
  font-family: Arial, Helvetica, sans-serif;
}

button { font: inherit; }

.viewport {
  width: min(100vw, 177.7777778vh);
  height: min(100vh, 56.25vw);
  margin: auto;
  position: relative;
  overflow: hidden;
}

.page {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 500ms ease, transform 650ms ease;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.page.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.topbar {
  position: absolute;
  top: calc(92 * var(--u));
  right: calc(220 * var(--u));
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: calc(29 * var(--u));
  z-index: 2;
  max-width: calc(900 * var(--u));
}

.nav-link {
  border: 0;
  padding: 0;
  color: var(--white);
  background: transparent;
  cursor: pointer;
  font-size: calc(21 * var(--u));
  font-style: italic;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  transition: color 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link:focus-visible { color: #ff2835; transform: translateY(-2px); }

.nav-link[aria-current="page"] { color: #ff2835; }

.studio-logo {
  position: absolute;
  top: calc(26 * var(--u));
  right: calc(57 * var(--u));
  width: calc(153 * var(--u));
  height: auto;
  pointer-events: none;
  z-index: 3;
}

.game-copy {
  position: absolute;
  left: calc(139 * var(--u));
  top: calc(494 * var(--u));
  z-index: 1;
}

.development {
  display: block;
  width: max-content;
  padding: calc(8 * var(--u)) calc(21 * var(--u)) calc(7 * var(--u));
  color: var(--white);
  background: var(--red);
  font-size: calc(18 * var(--u));
  font-style: italic;
  font-weight: 800;
  line-height: 1;
}

.game-title {
  margin: calc(7 * var(--u)) 0 0;
  font-size: calc(61 * var(--u));
  font-style: italic;
  font-weight: 900;
  letter-spacing: calc(-3 * var(--u));
  line-height: .84;
  white-space: nowrap;
}

.game-title .accent { color: var(--red); }

.subtitle {
  margin: calc(9 * var(--u)) 0 0;
  padding-left: calc(13 * var(--u));
  font-size: calc(21 * var(--u));
  font-style: italic;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.platforms {
  display: flex;
  align-items: center;
  gap: calc(17 * var(--u));
  margin-top: calc(18 * var(--u));
  height: calc(45 * var(--u));
}

.platforms a { display: block; transition: transform 180ms ease; }
.platforms .platform-icon { display: block; }
.platforms a:hover,
.platforms a:focus-visible { transform: translateY(-3px); }
.platforms img { display: block; width: auto; height: calc(45 * var(--u)); }
.platforms .steam { width: calc(114 * var(--u)); object-fit: contain; }
.platforms .switch { width: calc(62 * var(--u)); object-fit: contain; }
.platforms .store { width: calc(127 * var(--u)); object-fit: contain; }

.hero-logo {
  position: absolute;
  top: calc(186 * var(--u));
  left: calc(660 * var(--u));
  width: calc(600 * var(--u));
  height: calc(715 * var(--u));
  object-fit: contain;
  z-index: 1;
  pointer-events: none;
}

.game-copy.with-hero .subtitle { padding-left: calc(21 * var(--u)); }
.game-copy.with-hero .platforms {
  margin-top: calc(20 * var(--u));
  padding-left: calc(44 * var(--u));
}

@media (orientation: portrait) {
  .viewport {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    margin: 0;
  }

  .page { background-size: cover; }

  .topbar {
    top: 30px;
    right: 110px;
    left: 16px;
    gap: 14px;
    max-width: none;
    justify-content: flex-start;
  }

  .nav-link { font-size: 12px; }

  .studio-logo {
    top: 14px;
    right: 16px;
    width: 86px;
  }

  .game-copy {
    left: 24px;
    top: 53%;
    right: 24px;
  }

  .development {
    padding: 7px 12px 6px;
    font-size: 13px;
  }

  .game-title {
    margin-top: 7px;
    font-size: clamp(38px, 10vw, 61px);
    letter-spacing: -2px;
    white-space: normal;
  }

  .subtitle {
    margin-top: 8px;
    padding-left: 8px;
    font-size: clamp(14px, 3.7vw, 21px);
    white-space: normal;
  }

  .platforms {
    gap: 8px;
    margin-top: 15px;
    height: 34px;
    flex-wrap: wrap;
  }

  .platforms img { height: 34px; }
  .platforms .steam { width: clamp(74px, 20vw, 114px); }
  .platforms .switch { width: clamp(44px, 12vw, 62px); }
  .platforms .store { width: clamp(84px, 23vw, 127px); }

  .hero-logo {
    top: 9vh;
    left: 50%;
    width: min(76vw, 420px);
    height: auto;
    transform: translateX(-50%);
  }

  .game-copy.with-hero { top: 62%; }
  .game-copy.with-hero .subtitle { padding-left: 8px; }
  .game-copy.with-hero .platforms {
    margin-top: 16px;
    padding-left: 0;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page, .nav-link, .platforms a { transition: none; }
}

/* Site footer */
.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.72) 45%);
  pointer-events: none;
}
.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
  pointer-events: auto;
}
.site-footer-copy {
  margin: 0;
  color: rgba(255,255,255,0.78);
  font-size: 12px;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.site-footer-links a {
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  font-size: 12px;
  font-style: italic;
  font-weight: 800;
}
.site-footer-links a:hover,
.site-footer-links a:focus-visible { color: #ff2835; }
.site-footer-sep { color: rgba(255,255,255,0.4); }
.site-footer.is-compact {
  position: static;
  background: transparent;
  padding: 24px 0 8px;
}

/* Legal pages — must scroll (homepage keeps overflow:hidden) */
html.legal-html,
html.legal-html body.legal-body {
  width: 100%;
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #0a0a0a;
}

.legal-body {
  overflow: visible;
  background: #0a0a0a;
  min-height: 100%;
  height: auto;
}
.legal-page {
  min-height: 100vh;
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 48px;
  color: #fff;
}
.legal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
}
.legal-back {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-style: italic;
  font-weight: 800;
  font-size: 14px;
}
.legal-back:hover { color: #ff2835; }
.legal-logo {
  width: 96px;
  height: auto;
}
.legal-content h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.legal-body-text {
  color: rgba(255,255,255,0.82);
  font-size: 1rem;
  line-height: 1.65;
  padding-bottom: 2rem;
}
.legal-body-text p { margin: 0 0 1rem; }

@media (orientation: portrait) {
  .site-footer-inner { justify-content: center; text-align: center; }
  .site-footer-copy,
  .site-footer-links { width: 100%; justify-content: center; }
}


