/* Latin and Cyrillic subsets; the browser fetches only the ones a page actually uses. */
/* Jost — a geometric sans close to the lettering of the studio logo. One variable file per subset
   covers every weight. */
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/jost-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/jost-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --bg: #0a0f18;
  --card: rgba(15, 22, 35, 0.78);
  --line: #1f2b3c;
  --line-bright: #2c3b51;
  --fg: #eef3f8;
  --muted: #94a1b4;
  --ice: #b9cbdb;
  --radius: 14px;
  --wrap: 1240px;
  --font-head: "Jost", "Century Gothic", "Futura", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Accents: lime with violet. --rgb-1 / --rgb-2 are the two accents as "r, g, b" so glows can set
   their own alpha; --ring-* colour the hero water. */
:root {
  --accent: #c8ff3c;
  --accent-hover: #dcff7f;
  --on-accent: #0d1400;
  --accent-2: #8b6cff;
  --rgb-1: 200, 255, 60;
  --rgb-2: 139, 108, 255;
  --ring-1: 200, 255, 60;
  --ring-2: 185, 203, 219;
  --ring-3: 139, 108, 255;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* A faint grid over the dark base, with patches of accent light. */
body {
  margin: 0;
  background:
    radial-gradient(ellipse 50% 40% at 85% 35%, rgba(var(--rgb-2), 0.12), transparent 70%),
    radial-gradient(ellipse 45% 35% at 10% 70%, rgba(var(--rgb-1), 0.07), transparent 70%),
    linear-gradient(rgba(150, 180, 220, 0.035) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(150, 180, 220, 0.035) 1px, transparent 1px) 0 0 / 64px 64px,
    var(--bg);
  background-attachment: fixed;
  color: var(--fg);
  font: 400 1rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* Film grain over everything: kills the flat, empty look of large dark areas. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.07;
  mix-blend-mode: overlay;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); }
a:hover { color: var(--fg); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus { transform: none; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

h2 { font-size: clamp(2.2rem, 5vw, 4rem); }

/* The second half of a headline in sea colour. */
.hl { color: var(--accent); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

.section { position: relative; padding: clamp(72px, 10vw, 128px) 0; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--accent);
  font: 600 0.74rem/1 var(--font-head);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.eyebrow::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }

.section-head { margin-bottom: clamp(32px, 4vw, 48px); }

/* Studio logo artwork (assets/img/studio-*.png) is cut from the official channel avatar. */
.wordmark { display: block; flex: none; }
.wordmark img { width: auto; height: 30px; }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  background: rgba(17, 25, 39, 0.7);
  color: var(--fg);
  font: 600 0.86rem/1 var(--font-head);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.btn:hover { border-color: var(--accent); color: var(--fg); }

.btn-primary { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { border-color: var(--accent-hover); background: var(--accent-hover); color: var(--on-accent); }

.btn-small { min-height: 38px; padding: 0 16px; font-size: 0.76rem; }

.btn.is-pending,
.btn.is-pending:hover {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
  cursor: default;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 480px) { .actions .btn { flex: 1 1 100%; } }

/* Header */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s, border-color 0.25s;
}

.site-header.is-stuck {
  background: rgba(10, 15, 24, 0.88);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 72px;
}

.site-nav { display: flex; gap: 28px; }
.site-nav a {
  color: var(--fg);
  font: 600 0.8rem/1 var(--font-head);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.8;
}
.site-nav a:hover { opacity: 1; color: var(--accent); }

.header-end { display: flex; align-items: center; gap: 20px; margin-left: auto; }

.lang {
  color: var(--fg);
  font: 600 0.8rem/1 var(--font-head);
  letter-spacing: 0.16em;
  text-decoration: none;
  opacity: 0.8;
}
.lang:hover { opacity: 1; color: var(--accent); }

@media (max-width: 720px) {
  .site-nav { display: none; }
  .site-header .wrap { gap: 16px; }
}

@media (max-width: 400px) {
  .header-end .btn { display: none; }
}

section[id] { scroll-margin-top: 72px; }

/* Hero: dark water (canvas, assets/js/site.js) with the studio logo on it.
   Drops fall on their own; the pointer leaves ripples, a click drops one. */

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: min(100svh, 900px);
  padding: 112px 0 72px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(closest-side at 72% 42%, rgba(var(--rgb-1), 0.22), transparent 70%),
    radial-gradient(closest-side at 86% 70%, rgba(var(--rgb-2), 0.30), transparent 70%),
    radial-gradient(closest-side at 18% 30%, rgba(var(--rgb-2), 0.16), transparent 70%),
    radial-gradient(closest-side at 30% 90%, rgba(var(--rgb-1), 0.12), transparent 70%);
  filter: blur(20px);
  animation: aurora 26s ease-in-out infinite alternate;
}

@keyframes aurora {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to { transform: translate3d(3%, 3%, 0) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) { .hero::before { animation: none; } }

.water {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  pointer-events: none;
}

.hero-grid a { pointer-events: auto; }

.hero h1 { font-size: clamp(2.6rem, 6.2vw, 5.6rem); }
.hero h1 .hl { display: block; }

.hero .lead {
  max-width: 46ch;
  margin: 24px 0 32px;
  color: var(--muted);
  font-size: 1.12rem;
}

.hero-mark {
  justify-self: center;
  width: clamp(240px, 28vw, 420px);
  margin-top: -40px;
  filter: drop-shadow(0 0 40px rgba(var(--rgb-1), 0.28)) drop-shadow(0 10px 40px rgba(0, 0, 0, 0.6));
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-mark { display: none; }
}

/* Games section: a blurred, saturated frame of the game sits behind the card, so the section takes
   on the game's colours; it fades out at the top and bottom into the page. */
#games { isolation: isolate; overflow: hidden; }

#games::before,
#games::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
}

#games::before {
  inset: -60px;
  background: url("../img/hope/05-explosion.webp") center / cover;
  filter: blur(42px) saturate(1.6) brightness(0.55);
  opacity: 0.75;
}

#games::after {
  background:
    radial-gradient(ellipse 60% 70% at 15% 40%, rgba(var(--rgb-2), 0.22), transparent 70%),
    radial-gradient(ellipse 50% 60% at 90% 60%, rgba(var(--rgb-1), 0.14), transparent 70%),
    linear-gradient(rgba(10, 12, 20, 0.35), rgba(10, 12, 20, 0.35));
}

/* Game card: big media with a strip of shots on the left, the facts on the right. */

.game-card {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(14px, 2vw, 22px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

@media (max-width: 920px) { .game-card { grid-template-columns: minmax(0, 1fr); } }

.game-view {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}

.game-view video,
.game-view .game-still { width: 100%; height: 100%; object-fit: cover; }

.game-view [hidden] { display: none; }

.game-view::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 60% at 18% 88%, rgba(0, 0, 0, 0.78), transparent 70%),
    linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 45%);
  pointer-events: none;
}

.game-logo-over {
  position: absolute;
  z-index: 1;
  left: 4%;
  bottom: 6%;
  width: 34%;
  height: auto;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.8));
  pointer-events: none;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.thumbs button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s, border-color 0.15s;
}

.thumbs button:hover { opacity: 1; }
.thumbs button[aria-pressed="true"] { border-color: var(--accent); opacity: 1; }
.thumbs img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.thumbs .play-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(6, 18, 24, 0.35);
}

.thumbs .play-mark svg { width: 22px; height: 22px; fill: #fff; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.8)); }

.game-info { display: flex; flex-direction: column; padding: 8px 4px 4px; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }

.pills li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  color: var(--fg);
  font: 600 0.7rem/1 var(--font-head);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pills li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); }
.pills li:first-child::before { background: var(--accent); box-shadow: 0 0 10px var(--accent); }

.game-info h3 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
.game-info h3 .hl { color: var(--ice); font-weight: 400; }
.game-info > p { margin: 14px 0 0; color: var(--muted); }

.facts { margin: 22px 0 26px; }

.facts div {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.facts div:last-child { border-bottom: 1px solid var(--line); }

.facts dt {
  color: var(--muted);
  font: 600 0.7rem/1.8 var(--font-head);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.facts dd { margin: 0; font-size: 0.95rem; }

.game-info .actions { margin-top: auto; }

.game-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 18px; }

.game-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
  font: 600 0.8rem/1 var(--font-head);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

.game-links a::after { content: "→"; color: var(--accent); transition: transform 0.15s; }
.game-links a:hover { color: var(--accent); }
.game-links a:hover::after { transform: translateX(4px); }

/* Contact cards */

.contacts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1000px) { .contacts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .contacts { grid-template-columns: minmax(0, 1fr); } }

.contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.contact-label {
  margin: 0;
  color: var(--muted);
  font: 600 0.7rem/1 var(--font-head);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.contact-main {
  color: var(--fg);
  font: 600 1.3rem/1.2 var(--font-head);
  letter-spacing: 0.02em;
  text-decoration: none;
  overflow-wrap: anywhere;
}

a.contact-main:hover { color: var(--accent); }
a.contact-main:not(.is-pending)::after { content: " →"; color: var(--accent); }
.contact-main.is-pending { color: var(--muted); }

.contact p:last-child { margin: 0; color: var(--muted); font-size: 0.92rem; }

.follow { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }

.follow a {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--fg);
  font: 600 0.95rem/1.2 var(--font-head);
  text-decoration: none;
}

.follow a::after { content: "↗"; color: var(--accent); }
.follow a:hover { color: var(--accent); }
.follow a.is-pending { color: var(--muted); }
.follow a.is-pending::after { content: "soon"; color: var(--muted); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }
html[lang="ru"] .follow a.is-pending::after { content: "скоро"; }

/* Footer */

.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}

.site-footer .wordmark img { height: 22px; opacity: 0.8; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; margin-left: auto; }
.site-footer nav a { color: var(--fg); text-decoration: none; }
.site-footer nav a:hover { color: var(--accent); }
.site-footer a.is-pending { color: var(--muted); }
