/* Escape From The Past — сайт. Тёмная тема в цветах ночного ключевого арта. */

@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("/assets/fonts/rubik-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: "Rubik";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("/assets/fonts/rubik-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("/assets/fonts/rubik-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --bg: #0a0f1e;
  --bg-2: #111a30;
  --surface: #16213b;
  --line: rgba(160, 190, 255, 0.14);
  --text: #e9edf6;
  --muted: #a3aec6;
  --torch: #f4a340;
  --torch-2: #e2702a;
  --glow: #8fdcff;
  --radius: 16px;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1180px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(16px, 0.25vw + 15px, 18px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh; display: flex; flex-direction: column;
}
body > main { flex: 1 0 auto; width: 100%; }

img, svg { display: block; max-width: 100%; }
a { color: var(--glow); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--torch); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 5vw + 0.4rem, 3.6rem); font-weight: 800; }
h1, h2 { overflow-wrap: break-word; hyphens: auto; }
h2 { font-size: clamp(1.7rem, 2.2vw + 1rem, 2.6rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--torch); color: #1a0e00; padding: 8px 14px; border-radius: 8px; font-weight: 700;
}
.skip:focus { top: 12px; }
.icon { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }
.muted { color: var(--muted); }

/* ---------- шапка ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  background: rgba(10, 15, 30, 0.92);
  border-bottom: 1px solid var(--line);
  position: relative; z-index: 10;
}
.site-header--overlay {
  position: absolute; inset: 0 0 auto 0;
  background: linear-gradient(to bottom, rgba(6, 9, 20, 0.75), rgba(6, 9, 20, 0));
  border-bottom: 0;
}
.brand {
  color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; font-size: 0.92rem; white-space: nowrap;
}
.site-header--overlay .brand { visibility: hidden; } /* на главной логотип уже на арте */
.nav { display: flex; align-items: center; gap: clamp(12px, 2.5vw, 28px); font-size: 0.95rem; }
.nav a { color: var(--text); text-decoration: none; opacity: 0.85; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; color: #fff; }
.nav > a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--torch); }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-switch a { padding: 3px 10px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em; }
.lang-switch a[aria-current="true"] { background: rgba(255, 255, 255, 0.12); }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 1rem; text-decoration: none; white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.btn--primary {
  background: linear-gradient(180deg, var(--torch), var(--torch-2)); color: #1d0f00;
  box-shadow: 0 8px 30px rgba(244, 140, 50, 0.35);
}
.btn--primary:hover { color: #1d0f00; transform: translateY(-2px); box-shadow: 0 12px 36px rgba(244, 140, 50, 0.5); }
.btn--soon {
  background: rgba(10, 15, 30, 0.6); color: var(--text);
  border: 1px solid rgba(244, 163, 64, 0.65);
  backdrop-filter: blur(6px);
}
.btn--ghost {
  background: rgba(255, 255, 255, 0.08); color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.22); backdrop-filter: blur(6px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.16); color: #fff; transform: translateY(-2px); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: min(100svh, 62.5vw); max-height: 1100px;
  display: flex; align-items: flex-end; justify-content: center;
  overflow: hidden; isolation: isolate;
}
.hero__art {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 20%; z-index: -2;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, var(--bg) 0%, rgba(10, 15, 30, 0.82) 16%, rgba(10, 15, 30, 0) 46%);
}
.hero__content {
  text-align: center; padding: 0 var(--gutter) clamp(32px, 6vh, 72px); max-width: 860px;
}
.hero__tagline {
  font-size: clamp(1.7rem, 2.6vw + 0.8rem, 3rem); font-weight: 800; line-height: 1.1;
  margin-bottom: 0.4em; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}
.hero__sub { color: #cfd7ea; margin-bottom: 1.4em; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6); }
.hero__cta, .dev__cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* телефон: арт целиком (логотип не обрезается), текст под ним */
@media (max-width: 720px) {
  .hero { display: block; min-height: 0; max-height: none; }
  .hero__art { position: static; height: auto; aspect-ratio: 2752 / 1536; }
  .hero::after { display: none; }
  .hero__content { padding-top: 24px; margin: 0 auto; }
  .site-header--overlay { position: relative; background: var(--bg); }
  .site-header--overlay .brand { visibility: visible; }
  .btn { width: 100%; }
}
/* узкий экран: «Об игре» дублирует бренд — прячем, бренд мельче */
@media (max-width: 520px) {
  .site-header { padding-top: 12px; padding-bottom: 12px; gap: 10px; }
  .brand { font-size: 0.78rem; letter-spacing: 0.04em; }
  .nav { gap: 12px; }
  .nav > a:first-child { display: none; }
}

/* ---------- секции ---------- */
.section { padding: clamp(56px, 9vw, 120px) var(--gutter); max-width: var(--maxw); margin: 0 auto; }
.intro { max-width: 760px; text-align: center; padding-top: clamp(40px, 6vw, 80px); font-size: 1.12em; color: #d3dbec; }
.intro h2 { color: var(--text); }
.intro::before {
  content: ""; display: block; width: 56px; height: 3px; margin: 0 auto 28px;
  background: linear-gradient(90deg, var(--torch), var(--glow)); border-radius: 3px;
}

.kicker {
  color: var(--glow); text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.8rem;
  font-weight: 700; margin-bottom: 0.7em;
}

.features { display: grid; gap: clamp(64px, 10vw, 140px); padding: 0 var(--gutter); max-width: var(--maxw); margin: 0 auto; }
.feature { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.feature--flip { grid-template-columns: 1fr 1.15fr; }
.feature--flip .feature__art { order: 2; }
.feature__art {
  margin: 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.feature__art img { width: 100%; height: auto; transition: transform 0.6s ease; }
.feature:hover .feature__art img { transform: scale(1.03); }
.feature__text p { color: #c9d2e6; }
@media (max-width: 860px) {
  .feature, .feature--flip { grid-template-columns: 1fr; }
  .feature--flip .feature__art { order: 0; }
}

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 28px; color: #c9d2e6; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.6em; width: 12px; height: 12px;
  border-radius: 3px; transform: rotate(45deg);
  background: linear-gradient(135deg, var(--torch), var(--torch-2));
}
.ticks b { color: var(--text); }

.survive { margin-top: clamp(40px, 6vw, 80px); }
.survive__head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.survive__head p { color: #c9d2e6; }
.cards {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px;
}
.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-top: 2px solid var(--torch);
  border-radius: var(--radius); padding: 24px;
}
.card p { color: var(--muted); margin: 0; }

.trailer__frame { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.trailer__frame iframe { width: 100%; height: 100%; border: 0; }

.dev {
  text-align: center; max-width: 900px;
  margin: clamp(24px, 4vw, 48px) auto clamp(56px, 8vw, 100px);
  padding: clamp(40px, 6vw, 72px) var(--gutter);
  border-radius: 24px; border: 1px solid var(--line);
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(143, 220, 255, 0.14), transparent 60%),
    linear-gradient(180deg, var(--surface), var(--bg-2));
}
.dev p { color: #c9d2e6; max-width: 620px; margin: 0 auto 1.6em; }
@media (max-width: 720px) { .dev { margin-left: 16px; margin-right: 16px; } }

/* ---------- внутренние страницы ---------- */
.page-inner { background: radial-gradient(90% 60% at 50% -10%, rgba(143, 220, 255, 0.10), transparent 70%) var(--bg) no-repeat; }
.inner { max-width: 760px; margin: 0 auto; padding: clamp(48px, 8vw, 96px) var(--gutter); min-height: 60vh; }
.inner h2 { font-size: 1.4rem; margin-top: 2em; }
.lead { font-size: 1.15em; color: #c9d2e6; }
.prose p { color: #c9d2e6; }

.contact { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 32px 0 8px; }
.contact__card {
  display: flex; flex-direction: column; gap: 6px; padding: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.contact__card:hover { border-color: rgba(244, 163, 64, 0.7); color: var(--text); transform: translateY(-2px); }
.contact__card--main { border-color: rgba(244, 163, 64, 0.45); }
.contact__label { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--glow); font-weight: 700; }
.contact__value { font-size: clamp(0.95rem, 1.2vw + 0.6rem, 1.3rem); font-weight: 700; overflow-wrap: anywhere; }
.contact__hint { color: var(--muted); font-size: 0.95rem; }

.notfound { text-align: center; }
.notfound__code {
  font-size: clamp(4rem, 12vw, 8rem); font-weight: 900; line-height: 1; margin: 0 0 0.1em;
  background: linear-gradient(90deg, var(--torch), var(--glow)); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- футер ---------- */
.site-footer { border-top: 1px solid var(--line); background: #070b16; }
.site-footer__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 28px var(--gutter);
  display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between;
  font-size: 0.92rem; color: var(--muted);
}
.site-footer__copy { margin: 0; }
.site-footer__links { display: flex; gap: 20px; align-items: center; }
.site-footer__links a { color: var(--muted); text-decoration: none; }
.site-footer__links a:hover { color: #fff; }

/* ---------- появление при прокрутке (класс ставит main.js только тем, кто ниже экрана) ---------- */
.reveal.is-pending { opacity: 0; transform: translateY(28px); }
.reveal { transition: opacity 0.7s ease, transform 0.7s ease; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-pending { opacity: 1; transform: none; transition: none; }
  .btn, .feature__art img, .contact__card { transition: none; }
}
