/* Cosmic Walrus — сайт студии. Замысел и палитра — DESIGN.md.
   Главный элемент — приоткрытая дверь в космос на первом экране; всё остальное спокойное. */

@font-face { font-family: "Unbounded"; font-weight: 400 900; font-display: swap;
  src: url(fonts/unbounded-latin.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+2212; }
@font-face { font-family: "Unbounded"; font-weight: 400 900; font-display: swap;
  src: url(fonts/unbounded-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 100 900; font-display: swap;
  src: url(fonts/onest-latin.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+2212; }
@font-face { font-family: "Onest"; font-weight: 100 900; font-display: swap;
  src: url(fonts/onest-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --deep: #10243a;     /* морская ночь */
  --ice: #e9eff3;      /* фон страницы */
  --tusk: #f5ead0;     /* свет из двери */
  --walrus: #8a6a55;
  --light: #ffc45c;    /* единственный акцент */
  --ink: #10243a;
  --ink-2: #4d6274;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --text: "Onest", -apple-system, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 400 18px/1.6 var(--text); color: var(--ink); background: var(--ice); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--light); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; margin: 0; }

/* ---------- первый экран: стена и дверь ---------- */
.hero { background: var(--deep); color: var(--tusk); overflow: hidden; }
.top { display: flex; align-items: center; gap: 12px; padding-top: 22px; padding-bottom: 22px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none;
  font-family: var(--display); font-weight: 500; font-size: 17px; }
.brand img { width: 38px; height: 38px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 16px; }
.top nav a { text-decoration: none; opacity: .8; }
.top nav a:hover { opacity: 1; }
.lang { display: flex; gap: 10px; }
.lang [aria-current] { color: var(--light); }

.stage {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 48px; align-items: end;
  padding-top: 40px;
}
.pitch { padding-bottom: 96px; }
.pitch h1 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.08; max-width: 12em; }
.pitch p { color: #b9c6d3; font-size: 19px; max-width: 30em; margin: 24px 0 32px; }
.btn { display: inline-block; padding: 14px 26px; border-radius: 999px; background: var(--light);
  color: var(--deep); font-weight: 600; text-decoration: none; }
.btn:hover { background: #ffd27f; }

/* дверь: проём с космосом, полотно поворачивается на петлях слева, свет падает на пол */
.door { position: relative; width: min(100%, 300px); aspect-ratio: 3 / 5; margin: 0 auto; perspective: 900px; }
.frame { position: absolute; inset: 0; border: 12px solid #2a4562; border-bottom: 0; border-radius: 6px 6px 0 0; }
.opening {
  position: absolute; inset: 12px 12px 0; overflow: hidden;
  background:
    radial-gradient(1.6px 1.6px at 18% 20%, #fff 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 70% 12%, #fff 50%, transparent 52%),
    radial-gradient(2px 2px at 84% 38%, var(--light) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 30% 64%, #fff 50%, transparent 52%),
    radial-gradient(1.6px 1.6px at 62% 82%, #fff 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 12% 90%, #fff 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 48% 40%, #fff 50%, transparent 52%),
    radial-gradient(120% 70% at 50% 100%, #3b2f6b 0%, transparent 60%),
    #0b1830;
  box-shadow: 0 0 80px 10px rgba(255, 196, 92, .18);
}
.opening img { position: absolute; width: 74%; left: 13%; top: 24%; }
.leaf {
  position: absolute; inset: 12px 12px 0; transform-origin: left center;
  background: linear-gradient(90deg, #6e4a33, #85593d 60%, #6e4a33);
  border-radius: 2px 2px 0 0;
  box-shadow: inset 0 0 0 10px #7a523a, inset 0 0 0 12px #5d3e2b;
  transform: rotateY(-68deg);
  animation: open 1.6s cubic-bezier(.25, .8, .3, 1) .35s both;
}
.leaf::after { content: ""; position: absolute; right: 16px; top: 52%; width: 12px; height: 12px;
  border-radius: 50%; background: var(--light); }
.spill { position: relative; height: 70px; margin: 0 auto; width: min(100%, 300px);
  background: linear-gradient(rgba(255, 196, 92, .28), transparent);
  clip-path: polygon(4% 0, 96% 0, 130% 100%, -30% 100%);
  animation: glow 1.6s ease-out .35s both; }

@keyframes open { from { transform: rotateY(0); } to { transform: rotateY(-68deg); } }
@keyframes glow { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .leaf, .spill { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- игра ---------- */
.game { padding: 96px 0 88px; }
.game-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.game-name { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.game-name img { width: 76px; height: 76px; border-radius: 19px; }
.game h2 { font-size: clamp(28px, 4vw, 42px); line-height: 1.1; }
.kind { color: var(--ink-2); font-size: 16px; margin-top: 6px; }
.game p { margin: 0 0 18px; max-width: 34em; }
.facts { margin: 28px 0; padding: 0; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 8px 36px; }
.facts div { border-top: 2px solid var(--deep); padding-top: 10px; }
.facts dt { font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1.1; }
.facts dd { margin: 4px 0 0; color: var(--ink-2); font-size: 15px; }
.soon { color: var(--ink-2); }
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }
.stores a { padding: 10px 20px; border-radius: 999px; background: var(--deep); color: var(--tusk);
  font-weight: 600; text-decoration: none; }
.stores a:hover { background: #1d3a57; }

/* вторая и следующие игры: скриншоты слева, чтобы игры не шли одинаковыми блоками */
.game-alt { border-top: 1px solid #c9d6df; }
.game-alt .game-grid > :first-child { order: 2; }
.shots-flat img { object-position: 50% 35%; }
.game-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 8px; font-weight: 600; }

/* три экрана из игры, чуть веером, как фото на столе */
.shots { position: relative; height: 520px; }
.shots img {
  position: absolute; width: 46%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; object-position: 50% 80%;
  border: 6px solid var(--deep); border-radius: 26px; background: var(--deep);
}
.shots img:nth-child(1) { left: 0; top: 60px; transform: rotate(-6deg); }
.shots img:nth-child(2) { left: 27%; top: 0; z-index: 1; }
.shots img:nth-child(3) { right: 0; top: 70px; transform: rotate(6deg); }

/* ---------- контакт ---------- */
.contact { background: var(--deep); color: var(--tusk); padding: 72px 0; }
.contact h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 500; }
.contact p { color: #b9c6d3; margin: 10px 0 22px; }
.mail { font-family: var(--display); font-weight: 500; font-size: clamp(18px, 4.2vw, 40px); color: var(--light);
  text-decoration: none; word-break: break-word; }
.mail:hover { text-decoration: underline; }

footer { padding: 28px 0 40px; color: var(--ink-2); font-size: 14px; }
footer p { margin: 2px 0; }

/* ---------- узкие экраны ---------- */
@media (max-width: 880px) {
  .stage { grid-template-columns: 1fr; gap: 8px; padding-top: 8px; }
  .pitch { order: 2; padding-bottom: 72px; text-align: center; }
  .pitch h1, .pitch p { margin-left: auto; margin-right: auto; }
  .door { width: min(62vw, 230px); }
  .spill { width: min(62vw, 230px); height: 48px; }
  .game { padding: 64px 0; }
  .game-grid { grid-template-columns: 1fr; gap: 40px; }
  .game-alt .game-grid > :first-child { order: 0; }
  .shots { height: min(100vw, 460px); max-width: 420px; margin: 0 auto; width: 100%; }
}
@media (max-width: 480px) {
  body { font-size: 17px; }
  .top nav .hide-s { display: none; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; }
  .facts dt { font-size: 22px; }
  .shots img { border-width: 4px; border-radius: 18px; }
}
