:root {
  --bg: #0d1324;
  --panel: #151d31;
  --panel-soft: #1d263c;
  --text: #f6f8ff;
  --muted: #9aa7bd;
  --green: #21d07a;
  --red: #e24f4d;
  --amber: #eda937;
  --line: rgba(255, 255, 255, 0.08);
  --radius: 18px;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header,
.intro,
.signal-row,
.modes,
.stats,
.play {
  width: min(100% - clamp(28px, 6vw, 96px), 1120px);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: 16px 0;
  background: rgba(13, 19, 36, 0.78);
  backdrop-filter: blur(16px);
}

.brand-group {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--green);
  box-shadow: inset 0 0 0 1px var(--line);
}

.language-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(21, 29, 49, 0.88);
}

.language-switch button {
  min-width: 40px;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 900;
}

.language-switch button:hover,
.language-switch button:focus-visible,
.language-switch button.is-active {
  color: #07110c;
  background: var(--green);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(240px, 0.82fr);
  gap: clamp(14px, 3vw, 30px);
  align-items: start;
  padding: clamp(28px, 5vw, 54px) 0 clamp(16px, 3vw, 28px);
}

.intro-copy,
.rank-card,
.modes,
.stats,
.play {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.intro-copy {
  padding: clamp(20px, 3vw, 32px);
}

.rank-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: auto;
  padding: clamp(20px, 3vw, 30px);
}

.rank-card span,
.eyebrow {
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rank-card strong {
  display: block;
  margin-block: 24px 14px;
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 0.92;
  letter-spacing: -0.07em;
}

.rank-card p,
.hero-text,
.stats p,
.play li {
  color: var(--muted);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  line-height: 0.98;
  letter-spacing: -0.07em;
}

h1 {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: clamp(2.65rem, 5.7vw, 5.4rem);
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.8rem, 3.5vw, 3.25rem);
}

h3 {
  margin-bottom: 8px;
  font-size: clamp(1.15rem, 1.9vw, 1.45rem);
}

.hero-text {
  max-width: 700px;
  font-size: clamp(1rem, 1.5vw, 1.1rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 900;
  text-align: center;
  transition: transform 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  color: #07110c;
  background: var(--green);
}

.button-ghost {
  color: var(--text);
  background: var(--panel-soft);
}

.signal-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-block: clamp(14px, 3vw, 28px);
}

.signal-row article {
  min-height: 96px;
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.signal-row span {
  display: block;
  margin-bottom: 8px;
  color: #ffffff;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.signal-row p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.75);
}

.signal-wait {
  background: var(--red);
}

.signal-start {
  background: var(--green);
}

.signal-early {
  background: var(--amber);
}

.modes,
.stats,
.play {
  margin-block: clamp(18px, 4vw, 42px);
  padding: clamp(18px, 3vw, 30px);
}

.section-head,
.stats {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(16px, 3vw, 30px);
  align-items: center;
}

.section-head {
  display: block;
  max-width: 720px;
  margin-bottom: 18px;
}

.mode-list,
.stats-grid {
  display: grid;
  gap: 10px;
}

.mode-list {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.mode-list article {
  display: grid;
  align-content: space-between;
  gap: 18px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
}

.mode-list span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(33, 208, 122, 0.1);
  color: var(--green);
  font-weight: 900;
}

.mode-list strong {
  color: var(--text);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.1;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.stats-grid article {
  display: flex;
  flex-direction: column;
  min-height: 178px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
}

.stats-grid strong {
  display: block;
  min-height: 44px;
  margin-bottom: 12px;
  color: var(--text);
  line-height: 1.25;
}

.stats-grid p {
  max-width: 26ch;
  line-height: 1.55;
}

.play {
  display: grid;
  grid-template-columns: minmax(0, 0.28fr) minmax(0, 0.72fr);
  gap: clamp(16px, 3vw, 30px);
  align-items: start;
}

.play-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.play-steps li {
  counter-increment: step;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
}

.play-steps li::before {
  content: counter(step, decimal-leading-zero);
  margin-right: 12px;
  color: var(--green);
  font-weight: 900;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 500ms ease, transform 500ms ease;
}

[data-reveal].is-visible,
html:not(.js-ready) [data-reveal] {
  opacity: 1;
  transform: none;
}

:focus-visible {
  outline: 3px solid rgba(33, 208, 122, 0.55);
  outline-offset: 4px;
}

@media (max-width: 980px) {
  .intro,
  .stats,
  .play {
    grid-template-columns: 1fr;
  }

  .mode-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid article {
    min-height: 160px;
  }
}

@media (max-width: 760px) {
  .signal-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-header,
  .intro,
  .signal-row,
  .modes,
  .stats,
  .play {
    width: min(100% - 28px, 1120px);
  }

  h1 {
    font-size: clamp(2.35rem, 11vw, 3.8rem);
  }

  h2 {
    font-size: clamp(1.7rem, 8.8vw, 2.8rem);
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .stats-grid,
  .mode-list {
    grid-template-columns: 1fr;
  }

  .stats-grid article {
    min-height: auto;
  }

  .mode-list article {
    min-height: auto;
  }
}

@media (max-width: 390px) {
  .site-header,
  .intro,
  .signal-row,
  .modes,
  .stats,
  .play {
    width: min(100% - 24px, 1120px);
  }

  .logo span:last-child {
    max-width: 150px;
  }

  .brand-group {
    gap: 6px;
  }

  .language-switch {
    padding: 3px;
  }

  .language-switch button {
    min-width: 34px;
    min-height: 32px;
    font-size: 0.76rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
