/* «Передышка»: a calm light room with the game already running in it. */

@font-face { font-family: "Golos Text"; font-weight: 400; font-display: swap; src: url("/fonts/golos-text-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-weight: 500; font-display: swap; src: url("/fonts/golos-text-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-weight: 700; font-display: swap; src: url("/fonts/golos-text-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-weight: 800; font-display: swap; src: url("/fonts/golos-text-cyrillic-800-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-weight: 400; font-display: swap; src: url("/fonts/golos-text-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Golos Text"; font-weight: 500; font-display: swap; src: url("/fonts/golos-text-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Golos Text"; font-weight: 700; font-display: swap; src: url("/fonts/golos-text-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Golos Text"; font-weight: 800; font-display: swap; src: url("/fonts/golos-text-latin-800-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ground: #f6f4fb;
  --ink: #1c1a33;
  --ink-soft: #57546f;
  --violet: #6d4cf5;
  --violet-deep: #4b2fd1;
  --violet-wash: #efeafe;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --screen: #17142e;
  --tint-1: #c9b8ff;
  --tint-2: #ffc8b4;
  --tint-3: #b2ecd8;
  --tint-4: #b9d6ff;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-soft: 0 20px 50px -30px rgba(0, 0, 0, 0.3);
  --shadow-lift: 0 30px 60px -30px rgba(0, 0, 0, 0.38);
  --radius-l: 30px;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--ground); scrollbar-color: #c9bff2 transparent; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--ground);
  line-height: 1.5;
  overflow-x: hidden;
  caret-color: var(--violet);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}
main { flex: 1; }
::selection { background: #d9ccff; color: var(--ink); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p a, .prose a { color: var(--violet-deep); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 12px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: #fff; transition: top .3s var(--ease); }
.skip:focus { top: 12px; }

/* Aurora: slow pastel light behind everything */
.aurora { position: fixed; inset: -20vmax; z-index: 0; filter: blur(70px) saturate(120%); pointer-events: none; contain: strict; }
.blob { position: absolute; border-radius: 50%; opacity: 0.72; will-change: transform; }
.b1 { width: 52vmax; height: 52vmax; left: 4%; top: 0; background: var(--tint-1); animation: f1 26s ease-in-out infinite alternate; }
.b2 { width: 44vmax; height: 44vmax; right: 0; top: 10%; background: var(--tint-2); animation: f2 31s ease-in-out infinite alternate; }
.b3 { width: 40vmax; height: 40vmax; left: 30%; bottom: -6%; background: var(--tint-3); animation: f3 23s ease-in-out infinite alternate; }
.b4 { width: 30vmax; height: 30vmax; right: 20%; bottom: 10%; background: var(--tint-4); animation: f4 29s ease-in-out infinite alternate; }
@keyframes f1 { to { transform: translate(14vmax, 10vmax) scale(1.1); } }
@keyframes f2 { to { transform: translate(-12vmax, 14vmax) scale(0.9); } }
@keyframes f3 { to { transform: translate(10vmax, -12vmax) scale(1.15); } }
@keyframes f4 { to { transform: translate(-14vmax, -8vmax); } }

.wrap { position: relative; z-index: 1; width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0; view-transition-name: site-header; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 21px; letter-spacing: -0.02em; }
.logo img { width: 34px; height: 34px; border-radius: 10px; }
.nav { display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.6); }
.nav a { padding: 9px 16px; border-radius: 999px; font-weight: 500; color: var(--ink-soft); transition: background .4s var(--ease), color .4s var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface-solid); color: var(--ink); }

/* Type */
h1, h2, h3 { letter-spacing: -0.03em; line-height: 1.05; font-weight: 800; text-wrap: balance; }
.display { font-size: clamp(40px, 5.8vw, 84px); letter-spacing: -0.04em; line-height: 1.02; }
.display em { font-style: normal; color: var(--violet); }
.title { font-size: clamp(28px, 4.6vw, 64px); letter-spacing: -0.04em; hyphens: auto; overflow-wrap: break-word; }
h2 { font-size: clamp(28px, 3vw, 42px); }
h3 { font-size: clamp(22px, 2vw, 26px); letter-spacing: -0.02em; line-height: 1.15; }
.lead { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: var(--ink-soft); max-width: 36ch; text-wrap: pretty; }
.prose { max-width: 62ch; color: var(--ink-soft); font-size: 17px; line-height: 1.65; }
.prose p + p { margin-top: 14px; }
.prose h2 { color: var(--ink); margin: 44px 0 14px; font-size: clamp(24px, 2.4vw, 32px); }
.prose ul { margin: 12px 0 0 1.2em; }
.prose li + li { margin-top: 6px; }
.prose .tags { margin-left: 0; }
.prose .tags li + li { margin-top: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 60px; padding: 0 30px; border: 0; border-radius: 18px;
  background: var(--violet); color: #fff; font: inherit; font-weight: 700; font-size: 18px; cursor: pointer;
  box-shadow: 0 14px 28px -14px rgba(0, 0, 0, 0.4);
  transition: transform .6s var(--ease), background .4s var(--ease), box-shadow .6s var(--ease);
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:hover { background: var(--violet-deep); transform: translateY(-3px); box-shadow: 0 22px 36px -16px rgba(0, 0, 0, 0.45); }
.btn:active { transform: translateY(0) scale(0.97); transition-duration: .15s; }
.btn-quiet { background: var(--surface-solid); color: var(--ink); box-shadow: var(--shadow-soft); }
.btn-quiet:hover { background: var(--surface-solid); color: var(--violet-deep); }
.note { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 15px; }
.note svg { width: 18px; height: 18px; color: var(--violet); flex: none; }

/* Home hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(28px, 6vw, 96px); align-items: center; min-height: calc(100svh - 100px); padding: 8px 0 72px; }
.hero .lead { margin-top: 24px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 36px; }

.device {
  position: relative; width: min(360px, 32vw); aspect-ratio: 9 / 18.5; border-radius: 48px; padding: 12px;
  background: var(--screen); box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.5);
  view-transition-name: game-stage;
}
.device.floating { animation: float 7s ease-in-out infinite alternate; }
@keyframes float { to { translate: 0 -14px; } }
.device iframe, .device .poster { width: 100%; height: 100%; border: 0; border-radius: 37px; display: block; background: #1b1546; }
.device .poster { position: relative; overflow: hidden; }
.device .poster img { width: 100%; height: 100%; object-fit: contain; object-position: top; transition: transform 1.2s var(--ease); }
.device .poster:hover img { transform: scale(1.03); }
.pill {
  position: absolute; top: -16px; left: 50%; translate: -50% 0; z-index: 2;
  display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  width: max-content; background: var(--surface-solid); color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.35);
}
.pill img { width: 18px; height: 18px; border-radius: 5px; }
.pill-narrow { display: none; }
.poster::after, .stage-poster::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 46%; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(23, 20, 46, 0) 0%, rgba(23, 20, 46, 0.92) 70%);
}
.poster-play {
  position: absolute; left: 50%; bottom: 26px; translate: -50% 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 8px; color: #fff; font-weight: 700; font-size: 17px;
}
.play-circle {
  width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center;
  background: var(--violet); box-shadow: 0 16px 30px -12px rgba(0, 0, 0, 0.6);
  transition: transform .6s var(--ease), background .4s var(--ease);
}
.play-circle svg { width: 30px; height: 30px; margin-left: 4px; }
.poster:hover .play-circle, .stage-poster:hover .play-circle { transform: scale(1.06); background: var(--violet-deep); }

/* Sections */
.section { padding: 24px 0 96px; }
.section > h2 { margin-bottom: 26px; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.game-card {
  display: grid; grid-template-columns: 1fr; grid-template-rows: auto 1fr; overflow: hidden; border-radius: var(--radius-l);
  background: var(--surface); box-shadow: var(--shadow-soft);
  transition: transform .8s var(--ease), box-shadow .8s var(--ease);
}
.game-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.game-card img { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: contain; background: #4c3fcf; transition: transform 1.4s var(--ease); }
.game-card:hover img { transform: scale(1.04); }
.game-card-body { padding: 24px 26px 26px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.game-card-body p { color: var(--ink-soft); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { list-style: none; padding: 6px 12px; border-radius: 999px; background: var(--violet-wash); color: var(--violet-deep); font-size: 14px; font-weight: 500; }
.soon {
  border-radius: var(--radius-l); background: var(--surface); box-shadow: var(--shadow-soft);
  display: grid; place-items: center; text-align: center; padding: 30px; color: var(--ink-soft); line-height: 1.5;
}
.soon-wide { max-width: 640px; padding: 34px 30px; }
.soon a { color: var(--violet-deep); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.soon a:hover { color: var(--violet); }

.calm { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.facts { display: flex; flex-direction: column; gap: 22px; padding-top: 6px; }
.facts li { list-style: none; display: grid; grid-template-columns: 28px 1fr; gap: 14px; font-size: 18px; color: var(--ink-soft); }
.facts strong { display: block; color: var(--ink); font-weight: 700; }
.facts svg { width: 28px; height: 28px; color: var(--violet); }

/* Game page */
.game-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px; padding: 12px 0 28px; }
.game-head .lead { margin-top: 14px; max-width: 46ch; }
.game-head-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.stage {
  position: relative; border-radius: 36px; padding: 12px; background: var(--screen);
  box-shadow: 0 50px 90px -45px rgba(0, 0, 0, 0.55); view-transition-name: game-stage;
}
.stage iframe { display: block; width: 100%; height: min(78svh, 760px); border: 0; border-radius: 26px; background: #1b1546; }
.stage:fullscreen { padding: 0; border-radius: 0; }
.stage:fullscreen iframe { height: 100%; border-radius: 0; }
.stage-poster { display: none; }
.details { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); padding: 72px 0 24px; }
.details h2 { font-size: clamp(24px, 2.4vw, 32px); margin-bottom: 14px; }
.details .tags { margin-top: 22px; }
.shots { display: flex; gap: 16px; overflow-x: auto; padding: 8px 2px 18px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.shots figure { flex: none; scroll-snap-align: start; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-soft); background: var(--screen); }
.shots img { height: clamp(220px, 34vw, 360px); width: auto; }
@media (min-width: 901px) {
  .shots { overflow: visible; scroll-snap-type: none; padding: 8px 0 18px; }
  .shots figure { flex: var(--ar) 1 0; min-width: 0; }
  .shots img { width: 100%; height: auto; }
}

/* Plain pages */
.page { padding-block: 20px 100px; }
.page .title { margin-bottom: 26px; }

/* Footer */
.site-footer { position: relative; z-index: 1; padding: 30px 0 40px; color: var(--ink-soft); font-size: 15px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; border-top: 1px solid rgba(28, 26, 51, 0.1); padding-top: 26px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a:hover { color: var(--ink); }

/* Motion: one eased reveal on load */
.reveal { animation: rise 1.1s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-group(game-stage) { animation-duration: .7s; animation-timing-function: var(--ease); }
  ::view-transition-old(root) { animation: .35s ease-out both vt-out; }
  ::view-transition-new(root) { animation: .6s var(--ease) both vt-in; }
}
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 4px; }
  .hero .device { justify-self: center; width: min(330px, 84vw); margin-top: 8px; }
  .calm, .details { grid-template-columns: 1fr; }
  .stage { display: none; }
  .stage-poster { display: block; position: relative; border-radius: 30px; padding: 10px; background: var(--screen); view-transition-name: game-stage; }
  .stage-poster img { width: 100%; border-radius: 22px; }
  .stage-poster::after { inset: auto 10px 10px 10px; border-radius: 0 0 22px 22px; }
  .game-head { align-items: flex-start; }
  .nav a.nav-extra { display: none; }
  .pill-wide { display: none; }
  .pill-narrow { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  .blob, .device.floating { animation: none; }
  .reveal { animation: none; }
}

/* The hero device both rises in and then floats; both animations on one element. */
.device.floating.reveal {
  animation: rise 1.1s var(--ease) both, float 7s ease-in-out infinite alternate;
  animation-delay: calc(var(--i, 0) * 90ms), 1.3s;
}
@media (prefers-reduced-motion: reduce) {
  .device.floating.reveal { animation: none; }
}
