/* ===============================================================
   Studio Oddlay — site stylesheet
   =============================================================== */

/* ---------------------------------------------------------------
   Fonts — Nunito, self-hosted (SIL OFL 1.1, see assets/ofl.txt)
   Weights: 400 regular, 600 semibold. Latin only.
   --------------------------------------------------------------- */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("./nunito-v32-latin-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url("./nunito-v32-latin-600.woff2") format("woff2");
}

/* ---------------------------------------------------------------
   Design tokens
   --------------------------------------------------------------- */
:root {
  color-scheme: dark;

  --bg:          #0d0d0d;  /* near-black page */
  --ink:         #e9e6e1;  /* warm off-white — text + light fills (icon circles, buttons) */
  --on-fill:     #0d0d0d;  /* glyph colour sitting on an --ink fill */
  --hover:       #ffffff;  /* hover target for text + fills */
  --surface:     #2e2c28;  /* screenshot placeholder / empty media */
  --hairline:    rgba(233, 230, 225, 0.22);
  --accent:      #e8674c;  /* coral — reserved, currently unused */

  --font-body: "Nunito", -apple-system, "Segoe UI", Roboto, sans-serif;

  --transition: 0.15s ease;
}

/* ---------------------------------------------------------------
   Base
   --------------------------------------------------------------- */
html {
  scrollbar-gutter: stable;
}

/* freeze the page behind the open screenshot lightbox */
html.lightbox-open {
  overflow: hidden;
}

html, body {
  margin: 0;
}

body {
  box-sizing: border-box;
  min-height: 100vh;
  padding: 40px 16px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

[hidden] { display: none !important; }

a { color: inherit; }

/* ---------------------------------------------------------------
   Site header — wordmark + socials
   --------------------------------------------------------------- */
.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.header-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.header-rule {
  width: 400px;
  max-width: 80%;
  height: 2px;
  margin: 12px 0 0;
  border: 0;
  border-radius: 1px;
  background: var(--hairline);
}

.wordmark {
  display: inline-block;
  font-size: 68px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  transition: color var(--transition), transform var(--transition);
}
.wordmark:hover,
.wordmark:focus-visible {
  color: var(--hover);
  transform: scale(1.025);
}

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-fill);
  transition: transform var(--transition), background var(--transition);
}
.socials a:hover,
.socials a:focus-visible {
  background: var(--hover);
  transform: scale(1.08);
}

.socials svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.socials-divider {
  align-self: center;
  width: 8px;
  height: 8px;
  /* negative margin keeps the Discord -> itch distance close to a normal
     icon gap despite the dot sitting between them */
  margin: 0 -5px;
  border-radius: 50%;
  background: var(--ink);
}

@media (max-width: 480px) {
  .socials { gap: 22px; }
}

/* ---------------------------------------------------------------
   Game showcase — switcher, title, trailer, screenshots, blurb
   --------------------------------------------------------------- */
.showcase {
  width: 100%;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.game-title {
  margin: 0;
  font-size: 34px;
  font-weight: 600;
}

/* game switcher — one clickable bar per game, current one solid.
   Each bar is a link to that game's page (no JS carousel). */
.game-nav {
  margin-top: 14px;
}
.game-nav-segs {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.game-nav-segs a {
  position: relative;
  width: 110px;   /* 3 bars + 2 × 10px gap = 350px */
  height: 10px;
  border-radius: 3px;
  background: var(--hairline);
  transition: background var(--transition), transform var(--transition);
}
.game-nav-segs a::after {
  content: "";
  position: absolute;
  /* invisible hitbox: small reach above, larger below */
  top: -12px;
  bottom: -34px;
  left: 0;
  right: 0;
}
.game-nav-segs a:first-child::after { left: -40px; }   /* + reach off the left edge */
.game-nav-segs a:last-child::after  { right: -40px; }  /* + reach off the right edge */
@media (max-width: 480px) {
  .game-nav-segs a { width: 28vw; }   /* fit three across on a phone */
}
.game-nav-segs a:hover,
.game-nav-segs a:focus-visible {
  background: color-mix(in srgb, var(--ink) 68%, transparent);
  transform: scale(1.08);
}
.game-nav-segs a[aria-current="page"] {
  background: var(--ink);
  pointer-events: none;
}

.game-desc {
  max-width: 550px;
  margin: 4px 0 0;
  font-size: 18px;
  text-align: justify;
}

.game-features {
  width: 100%;
  max-width: 550px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 28px;
  font-size: 17px;
}
.game-features li {
  margin: 0;
  position: relative;
  overflow-wrap: break-word;
}
.game-features li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
}
/* left column: dot + text on the left */
.game-features li:nth-child(odd) {
  padding-left: 16px;
  text-align: left;
}
.game-features li:nth-child(odd)::before {
  left: 0;
}
/* right column: text + dot on the right (frames the block like a newspaper) */
.game-features li:nth-child(even) {
  padding-right: 16px;
  text-align: right;
}
.game-features li:nth-child(even)::before {
  right: 0;
}

@media (max-width: 400px) {
  .game-features { grid-template-columns: 1fr; }
  .game-features li:nth-child(even) {
    padding: 0 0 0 16px;
    text-align: left;
  }
  .game-features li:nth-child(even)::before {
    right: auto;
    left: 0;
  }
}

/* DLC row — reuses .game-features (2-column newspaper layout), just pulled
   up to sit close under the main feature list */
.dlc {
  margin-top: -6px;
}
.dlc li {
  white-space: nowrap;
}

.store {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.store-row {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.store-label {
  font-size: 28px;
  font-weight: 600;
}

.store-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--on-fill);
  transition: transform var(--transition), background var(--transition);
}
.store-btn:hover,
.store-btn:focus-visible {
  background: var(--hover);
  transform: scale(1.08);
}
.store-btn svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}

.shots {
  width: 100%;
  max-width: 550px;
  margin-top: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.shot {
  aspect-ratio: 16 / 9;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--hairline);
  cursor: pointer;
  transition: transform var(--transition);
}
.shot:hover,
.shot:focus-visible {
  transform: scale(1.02);
}
.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 400px) {
  .shots { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------
   Lightbox (screenshot viewer)
   --------------------------------------------------------------- */
.lightbox {
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  max-width: 96vw;
  max-height: 96vh;
  overflow: visible;
}
.lightbox::backdrop {
  background: var(--bg);
}

.lightbox-main {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 96vw;
}
.lightbox-stage {
  position: relative;
  min-width: 0;          /* let the image shrink instead of pushing the arrows off-screen */
  display: flex;
  justify-content: center;
}

/* close + download: pinned to the screen's top corners */
.lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
}
.lightbox > .lightbox-btn {
  position: fixed;
  top: 16px;
  left: 16px;
}
.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  background: var(--bg);
}
.lightbox-placeholder {
  width: min(100%, 860px);
  aspect-ratio: 16 / 9;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--ink);
}

.lightbox-close,
.lightbox-nav {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-fill);
  line-height: 1;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition);
}
.lightbox-close {
  width: 50px;
  height: 50px;
  font-size: 26px;
}
.lightbox-nav {
  width: 50px;
  height: 50px;
  font-size: 28px;
}

.lightbox-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-fill);
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition);
}
.lightbox-btn svg {
  width: 24px;
  height: 24px;
}
.lightbox-close:hover,
.lightbox-close:focus-visible,
.lightbox-nav:hover,
.lightbox-nav:focus-visible,
.lightbox-btn:hover,
.lightbox-btn:focus-visible {
  background: var(--hover);
  transform: scale(1.06);
}

.video {
  position: relative;
  width: 100%;
  max-width: 550px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: #000 center / cover no-repeat;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(43, 39, 35, 0.15);
}

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

.video-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 66px;
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
}
.video:hover .video-play,
.video:focus-within .video-play {
  background: #000;   /* always sits on a photo — stays dark in both themes */
  transform: scale(1.08);
}
.video-play::before {
  content: "";
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
  margin-left: 3px;
}

.video.is-playing {
  cursor: default;
}

/* ---------------------------------------------------------------
   Legal page (privacy.html)
   --------------------------------------------------------------- */
.legal {
  width: 100%;
  max-width: 640px;
  margin-top: 32px;
  font-size: 18px;
}
.legal h1 {
  margin: 0 0 4px;
  font-size: 30px;
  font-weight: 600;
}
.legal h2 {
  margin: 28px 0 8px;
  font-size: 21px;
  font-weight: 600;
}
.legal p {
  margin: 0 0 14px;
  text-align: justify;
}
.legal .muted {
  margin-bottom: 24px;
  font-size: 15px;
  text-align: left;
}

/* ---------------------------------------------------------------
   Site footer — copyright + policy + email
   --------------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  padding-top: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.footer-rule {
  width: 400px;
  max-width: 80%;
  height: 2px;
  margin: 0 0 6px;
  border: 0;
  border-radius: 1px;
  background: var(--hairline);
}

.copyright {
  margin: 0;
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 34px;
}

.copyright,
.footer-links a {
  display: inline-block;
  color: inherit;
  text-decoration: none;
  transition: color var(--transition), transform var(--transition);
}
.copyright:hover,
.copyright:focus-visible,
.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--hover);
  transform: scale(1.06);
}
