/* ===== Base ===== */
:root {
  --accent: #1a3a8f;
  --accent-dark: #12296b;
  --accent-soft: #eef2fc;
  --ink: #16181d;
  --ink-soft: #5a6070;
  --bg: #ffffff;
  --bg-alt: #f7f8fa;
  --line: #e7e9ee;
  --radius: 14px;
  --container: 960px;
  --transition: 0.25s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-dark);
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

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

/* ===== Header ===== */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

.header.is-scrolled {
  border-bottom-color: var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.logo em {
  font-style: normal;
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 28px;
}

.nav__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color var(--transition);
}

.nav__link:hover {
  color: var(--ink);
}

/* ===== Hero ===== */
.hero {
  padding: 180px 0 120px;
  background:
    radial-gradient(600px 300px at 85% 10%, var(--accent-soft), transparent),
    radial-gradient(500px 260px at 5% 90%, var(--accent-soft), transparent);
}

.hero__inner {
  max-width: 720px;
}

.hero__eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero__title {
  font-size: clamp(44px, 8vw, 76px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero__subtitle {
  font-size: 18px;
  color: var(--ink-soft);
  margin-bottom: 40px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ===== Sections ===== */
.section {
  padding: 100px 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section__head {
  max-width: 640px;
  margin-bottom: 48px;
}

.section__label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section__title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section__text {
  font-size: 16px;
  color: var(--ink-soft);
}

/* ===== Game ===== */
.game__wrap {
  max-width: 680px;
}

.game__hud {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 600;
}

.game__hud span {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.game__lives {
  margin-left: auto;
  color: #d43c3c;
  font-size: 18px;
  letter-spacing: 2px;
}

.game__screen {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(20, 30, 60, 0.08);
}

#gameCanvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
}

.game__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  transition: opacity var(--transition), visibility var(--transition);
}

.game__overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.game__overlay h3 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.game__overlay p {
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

/* ===== Contact ===== */
.contact__card {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: 520px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.contact__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(20, 30, 60, 0.08);
}

.contact__avatar {
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #3f63c9);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.contact__name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.contact__role {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.contact__tg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
}

.contact__tg:hover {
  background: var(--accent);
  color: #fff;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--line);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 24px;
  padding-bottom: 24px;
  font-size: 13px;
  color: var(--ink-soft);
}

.footer__bottom a {
  transition: color var(--transition);
}

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

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== Responsive ===== */
@media (max-width: 720px) {
  .hero {
    padding: 150px 0 90px;
  }

  .section {
    padding: 72px 0;
  }

  .contact__card {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}
