/* ==========================================================================
   Autobattler landing. One stylesheet, one theme.
   Tokens below are the game client's own values (client/ui/MenuStyle.cs and
   assets/fonts), so the page and the game read as one product.
   ========================================================================== */

/* ---------- fonts ---------- */
@font-face {
  font-family: "Rajdhani";
  src: url("../fonts/rajdhani-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rajdhani";
  src: url("../fonts/rajdhani-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Press Start 2P";
  src: url("../fonts/pressstart2p.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  /* surfaces */
  --void: #05091a;
  --deep: #070f26;
  --panel: #0b1733;
  --panel-2: #0f1f42;
  --panel-glass: rgba(9, 21, 48, 0.72);

  /* lines */
  --line: rgba(111, 167, 255, 0.16);
  --line-strong: rgba(126, 180, 255, 0.34);
  --line-bright: rgba(150, 199, 255, 0.62);

  /* action */
  --blue: #1f6dff;
  --blue-bright: #3f97ff;
  --blue-deep: #0f47bb;
  --blue-cta: #1a5cd8;
  --blue-cta-hover: #2a70f0;
  --blue-cta-active: #1348b3;
  --cyan: #6fc0ff;
  --cyan-bright: #a3d6ff;

  /* brand red, from the logo. Display sizes only. */
  --red: #ff2d20;
  --red-soft: #ff8f84;

  /* rarity frames, as in the character screen */
  --frame-green: #35d07f;
  --frame-red: #ff5a4a;
  --frame-violet: #a86aff;

  /* ink */
  --ink: #eaf2ff;
  --ink-2: #c9dbf7;
  --dim: #9fb6d6;
  --muted: #7f99bd;

  /* type */
  --display: "Rajdhani", "Segoe UI Semibold", system-ui, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pixel: "Press Start 2P", "Courier New", monospace;

  /* space */
  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(80px, 11vw, 152px);
  --stack: clamp(28px, 4vw, 48px);

  /* geometry */
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 24px;

  /* motion */
  --fast: 140ms;
  --base: 260ms;
  --slow: 620ms;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);

  /* depth */
  --lift: 0 18px 46px rgba(2, 6, 20, 0.6);
  --glow: 0 0 0 1px rgba(63, 151, 255, 0.28), 0 12px 40px rgba(31, 109, 255, 0.24);
  --ring: 0 0 0 2px var(--void), 0 0 0 4px var(--blue-bright);
}

/* ---------- reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--void);
  color: var(--ink-2);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}
h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  line-height: 1.04;
  letter-spacing: -0.01em;
}
p {
  margin: 0;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
a {
  color: var(--cyan);
  text-decoration-color: rgba(111, 192, 255, 0.4);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--cyan-bright);
  text-decoration-color: currentColor;
}
:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--r-sm);
}

/* ---------- page frame ---------- */
.wrap {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--blue-cta);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top var(--fast) var(--ease);
}
.skip:focus-visible {
  top: 16px;
  color: #fff;
}

/* grid backdrop, the arena floor pattern of the game */
.grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(111, 167, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 167, 255, 0.055) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 20%, transparent 78%);
}

/* ---------- wordmark ---------- */
.wordmark {
  font-family: var(--pixel);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
  text-transform: none;
}
.wordmark b {
  font-weight: 400;
  color: var(--red);
}

/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(5, 9, 26, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--base) var(--ease), background var(--base) var(--ease);
}
.site-head[data-stuck="true"] {
  border-bottom-color: var(--line);
  background: rgba(5, 9, 26, 0.92);
}
.site-head__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}
.site-head .wordmark {
  font-size: 15px;
  text-decoration: none;
  padding: 6px 2px;
}
.site-head .wordmark:hover {
  color: #fff;
}
.site-nav {
  display: flex;
  gap: 4px;
  margin-inline-start: auto;
}
.site-nav a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.site-nav a:hover {
  color: var(--ink);
  background: #0a1a3f;
}
.site-nav a:active {
  background: #0d224f;
}

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--blue-cta);
  --btn-fg: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: var(--r);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--fast) var(--ease), transform var(--fast) var(--ease),
    box-shadow var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}
.btn--primary {
  box-shadow: 0 10px 30px rgba(26, 92, 216, 0.34);
}
.btn--primary:hover {
  background: var(--blue-cta-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 38px rgba(42, 112, 240, 0.42);
}
.btn--primary:active {
  background: var(--blue-cta-active);
  transform: translateY(0);
  box-shadow: 0 6px 18px rgba(19, 72, 179, 0.4);
}
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover {
  --btn-bg: #0b1c45;
  color: var(--ink);
  border-color: var(--line-bright);
  transform: translateY(-1px);
}
.btn--ghost:active {
  --btn-bg: #0e2454;
  transform: translateY(0);
}
.btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

/* ---------- shared section furniture ---------- */
section {
  position: relative;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}
.h2 + .lede,
h2 + .lede {
  margin-top: 22px;
}
.lede {
  max-width: 62ch;
  color: var(--dim);
  font-size: 18px;
}
.h2 {
  font-size: clamp(34px, 5vw, 62px);
  max-width: 20ch;
}
.h3 {
  font-size: clamp(21px, 2vw, 25px);
  letter-spacing: 0.01em;
}

/* ==========================================================================
   1. Hero, full bleed
   ========================================================================== */
.hero {
  position: relative;
  padding-block: clamp(48px, 7vw, 92px) clamp(56px, 8vw, 104px);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: -30% 10% auto 10%;
  height: 620px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(31, 109, 255, 0.3), transparent 70%);
  pointer-events: none;
  filter: blur(10px);
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(31, 109, 255, 0.1);
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--frame-green);
  box-shadow: 0 0 0 4px rgba(53, 208, 127, 0.18);
}
.hero h1 {
  margin-top: 24px;
  font-size: clamp(52px, 8.4vw, 112px);
  line-height: 0.92;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero h1 em {
  font-style: normal;
  color: var(--cyan);
}
.hero__lede {
  margin-top: 26px;
  max-width: 46ch;
  font-size: clamp(17px, 1.35vw, 19px);
  color: var(--dim);
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}
.hero__note {
  margin-top: 18px;
  font-size: 15px;
  color: var(--muted);
}

/* Сцена дуэли. Повторяет боевой экран игры: поле — КВАДРАТ (в ядре арена 25x25,
   src/BattleCore/Simulation/Arena.cs), бойцы висят внутри поля и обрезаны по бёдра —
   так они и нарисованы в игре, прижимать их к низу не надо.
   Рост — доля высоты поля (--fig), в отношении 64:88, как DisplayFramePixels у бабушки
   и Зевса в assets/visuals/*.tres. Полоска HP встаёт над макушкой: --head — доля высоты
   картинки от верха до макушки, замерена по альфе (у Зевса сверху рука с молнией). */
.arena {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, #14224a 0%, #0a1330 55%, #070d22 100%);
  padding: 20px;
  box-shadow: var(--lift);
  overflow: hidden;
}
.arena__label {
  position: relative;
  z-index: 2;
  font-family: var(--pixel);
  font-size: clamp(11px, 1.5vw, 16px);
  color: var(--ink);
  text-align: center;
  line-height: 1.6;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55);
}
.arena__stage {
  position: relative;
  z-index: 1;
  margin: 16px auto 0;
  aspect-ratio: 1 / 1;
  width: 100%;
  border: 3px solid rgba(159, 199, 255, 0.5);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(63, 151, 255, 0.06), rgba(5, 9, 26, 0.45));
  box-shadow: inset 0 0 60px rgba(5, 9, 26, 0.7), 0 0 26px rgba(31, 109, 255, 0.18);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(4px, 2.5vw, 34px);
  padding-bottom: 15%;
  overflow: hidden;
}
.arena__stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(111, 167, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 167, 255, 0.07) 1px, transparent 1px);
  background-size: 11.111% 11.111%;
}
.fighter {
  position: relative;
  margin: 0;
  height: 100%;
  display: flex;
  align-items: flex-end;
  animation: bob 5.5s ease-in-out infinite;
}
.fighter--b {
  animation-delay: -2.7s;
}
@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2.5%);
  }
}
.fighter img {
  height: var(--fig);
  width: auto;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.5));
}
.fighter--a {
  --fig: 52%;
  --head: 0.02;
}
.fighter--b {
  --fig: 72%;
  --head: 0.215;
}
/* Зевс развёрнут лицом к сопернице; заодно рука с молнией уходит на внешний край */
.fighter--b img {
  transform: scaleX(-1);
}
.hpbar {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: calc(100% - var(--fig) + var(--fig) * var(--head));
  transform: translate(-50%, -100%);
  margin-top: -8px;
  min-width: 76px;
  border: 2px solid rgba(6, 12, 30, 0.9);
  border-radius: 3px;
  background: var(--frame-green);
  font-family: var(--pixel);
  font-size: 11px;
  color: #04210f;
  text-align: center;
  padding: 3px 8px;
}
.hpbar--enemy {
  background: var(--frame-red);
  color: #2c0600;
}

/* facts strip under the hero */
.facts {
  position: relative;
  z-index: 1;
  margin-top: clamp(36px, 5vw, 64px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.facts div {
  background: var(--deep);
  padding: 20px 22px;
}
.facts dt {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1;
  color: var(--ink);
}
.facts dd {
  margin: 8px 0 0;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--display);
  font-weight: 600;
}

/* ==========================================================================
   6. Media, offset gallery
   ========================================================================== */
.media {
  padding-block: clamp(48px, 6vw, 88px) clamp(56px, 7vw, 104px);
  background: linear-gradient(180deg, transparent, rgba(10, 20, 48, 0.7), transparent);
}
.shot {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--deep);
  box-shadow: var(--lift);
}
.shot img {
  width: 100%;
  height: auto;
}
.shot figcaption {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--display);
  font-weight: 600;
  color: var(--muted);
}
.gallery {
  margin-top: clamp(34px, 4vw, 56px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 26px);
}

/* ==========================================================================
   7. Beta band
   ========================================================================== */
.beta {
  padding-block: clamp(56px, 7vw, 104px) clamp(64px, 8vw, 120px);
  position: relative;
  overflow: hidden;
}
.beta__panel {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: radial-gradient(90% 140% at 50% 0%, rgba(31, 109, 255, 0.24), transparent 62%),
    linear-gradient(180deg, #0d1a3c, #070f26);
  padding: clamp(40px, 6vw, 78px) clamp(24px, 5vw, 72px);
  text-align: center;
  overflow: hidden;
}
.beta .wordmark {
  font-size: clamp(20px, 3.6vw, 44px);
  position: relative;
  z-index: 1;
}
.beta h2 {
  position: relative;
  z-index: 1;
  margin-top: 26px;
  font-size: clamp(30px, 4vw, 50px);
}
.beta p {
  position: relative;
  z-index: 1;
  margin: 18px auto 0;
  max-width: 56ch;
  color: var(--dim);
}
.beta__cta {
  position: relative;
  z-index: 1;
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* ==========================================================================
   footer
   ========================================================================== */
.site-foot {
  border-top: 1px solid var(--line);
  padding-block: 40px 56px;
}
.site-foot__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 40px;
  align-items: center;
  justify-content: space-between;
}
.site-foot .wordmark {
  font-size: 13px;
}
.site-foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 4px;
}
.site-foot a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.site-foot a:hover {
  color: var(--ink);
  background: #0a1a3f;
}
.site-foot a:active {
  background: #0d224f;
}
.site-foot a svg {
  width: 17px;
  height: 17px;
}
.site-foot small {
  font-size: 14px;
  color: var(--muted);
}

/* ==========================================================================
   reveal on scroll
   ========================================================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .arena {
    order: -1;
    max-width: 500px;
    margin-inline: auto;
  }
  .gallery {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }
  .site-nav {
    display: none;
  }
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .arena {
    padding: 16px 14px 0;
  }
}

@media (max-width: 420px) {
  .btn {
    width: 100%;
  }
  .facts {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
   reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
  .fighter {
    animation: none;
  }
}
