:root {
  --bg: #0e1217;
  --bg-elevated: #1a1e25;
  --text: #dae3f6;
  --text-muted: #606571;
  --accent: #93b9ff;
  --line: #262b33;
  --header-h: 60px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Source Sans 3', sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-h);
}

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

.desktop-only {
  display: inline;
}

#page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 999;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#page-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.caps-link {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.caps-text {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
}

.caps-link:hover { color: var(--accent); }

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  z-index: 100;
}

.header-row {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
}

nav { display: flex; gap: 32px; }

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs a {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .crumb-sep { color: var(--line); }
.breadcrumbs .crumb-current { color: var(--text); }
.breadcrumbs .crumb-current:hover { color: var(--accent); }

.cover {
  position: relative;
  width: 100%;
  height: 48vh;
  min-height: 320px;
  max-height: 480px;
  overflow: hidden;
  background: var(--bg-elevated);
}

.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 10%, var(--bg) 100%);
  pointer-events: none;
}

.cover-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.cover-slide.active { opacity: 1; }

.cover-slide img,
.cover-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.intro {
  margin-top: -200px;
  position: relative;
  z-index: 2;
}

/* Game subpage */
.intro.no-overlap {
  margin-top: -200px;
  padding-top: 48px;
}

.intro h1 {
  color: var(--accent);
  font-family: 'EB Garamond', serif;
  font-weight: 600;
  font-size: 40px;
  font-style: normal;
  letter-spacing: 0.015em;
  margin-bottom: 16px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.intro .handle {
  color: var(--accent);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.intro .role {
  color: var(--text);
  font-size: 18px;
}

/* Sections */
section { padding: 140px 24px; }
section { scroll-margin-top: calc(var(--header-h) + 24px); }

h2 {
  font-family: 'EB Garamond', serif;
  font-weight: 700;
  font-size: 32px;
  letter-spacing: 0.015em;
  color: var(--accent);
  margin-top: 32px;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px 24px;
}

.game-card { display: block; text-decoration: none; color: var(--text); }

.game-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2px;
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;

  filter: brightness(1);
  transition: filter 0.35s ease;
}

.game-card:hover .game-thumb img {
  filter: brightness(1.2);
}

.game-thumb span {
  font-family: 'EB Garamond', serif;
  font-weight: 600;
  font-size: 24px;
  color: var(--text-muted);
}

.game-card h3 {
  font-family: 'EB Garamond', serif;
  font-weight: 600;
  letter-spacing: 0.015em;
  font-size: 24px;
  margin-top: 14px;
  transition: color 0.2s ease;
}

.game-card:hover h3 {
  color: var(--accent);
}

.game-card.neyasnoe:hover h3 {
  color: #93b9ff;
}

.game-card.its-winter:hover h3 {
  color: #ffdfa0;
}

.game-card.routine-feat:hover h3 {
  color: #d5a9ff;
}

.game-card.other-experiments:hover h3 {
  color: #b2ffc2;
}

.game-card p {
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Press and Interviews */
.press-text p {
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--text);
}

.press-text a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.press-text a:hover {
  color: var(--accent);
}

.press-source {
  color: var(--text-muted);
  font-size: 16px;
}

.press-subheading {
  font-family: 'EB Garamond', serif;
  font-weight: 600;
  letter-spacing: 0.015em;
  font-size: 24px;
  margin: 36px 0 18px;
  transition: color 0.2s ease;
}

/* About text (also reused for game description sections) */
.about-text p {
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--text);
}

.about-text p:last-child, .press-text p:last-child { margin-bottom: 0; }

/* Contacts */
.contacts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
  margin-top: 8px;
}

.contacts-row a {
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  padding: 0;
  transition: color 0.2s ease;
}

.contacts-row a:hover {
  color: var(--accent);
}

.contacts-row a:not(:last-child)::after {
  content: "|";
  margin-left: 18px;
  color: var(--line);
}

.email-line { color: var(--text-muted); }
.email-line a { color: var(--text); text-decoration: none; }
.email-line a:hover { color: var(--accent); }

section:last-of-type { padding-bottom: 64px; }

/* Footer */
footer {
  height: var(--header-h);
  border-top: 1px solid var(--line);
}

.footer-row {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
}

.footer-right { display: flex; align-items: center; gap: 48px; }

/* Game subpage components*/

/* Full-bleed static hero image (game subpages) */
.game-hero {
  position: relative;
  width: 100%;
  height: 92vh;
  min-height: 480px;
  max-height: 900px;
  overflow: hidden;
  background: var(--bg-elevated);
}

.game-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 80%, var(--bg) 100%);
  pointer-events: none;
}

/* Wider container — used for the trailer embed */
.wrap-wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px;
}

/* Plain text link — matches the rest of the site's inline links */
.plain-link {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.plain-link:hover {
  color: var(--accent);
}

/* Responsive 16:9 embed wrapper — trailer, OST, etc. */
.media-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 3px;
  overflow: hidden;
  background: var(--bg-elevated);
}

.media-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.steam-widget-wrap iframe {
  width: 100%;
  display: block;
}

.steam-cta {
  margin-top: 16px;
}

/* For Mobile */
@media (max-width: 768px) {
  :root { --header-h: 104px; }

  .cover {
    height: 16vh;
    min-height: 240px;
    max-height: 320px;
  }

  .header-row {
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
  }

  .intro h1 {
    font-size: 32px;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px;
  }

  section { padding: 90px 18px; }
  section:last-of-type { padding-bottom: 100px; }
  .intro { padding: 40px 18px 16px; }

  footer { height: auto; }

  .footer-row {
    flex-direction: column;
    gap: 10px;
    padding: 18px;
  }

  .footer-right { flex-direction: column; gap: 8px; }

  .desktop-only {
    display: none;
  }

  .wip-grid {
    gap: 24px;
  }

  .game-hero {
    height: 60vh;
    min-height: 320px;
    max-height: 520px;
  }

  .intro.no-overlap {
    padding-top: 32px;
  }
}
