:root {
  --bg: #11110f;
  --surface: #1b1c18;
  --surface-soft: #24271f;
  --text: #f4f7f2;
  --muted: #c8cec4;
  --line: #3d4236;
  --accent: #b51f2a;
  --accent-strong: #e33a46;
  --green: #5a8f53;
  --paper: #eef2ea;
  --ink: #161814;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.hero {
  position: relative;
  min-height: 88svh;
  overflow: hidden;
  background-image: var(--hero-image, url("assets/r99-hero.png"));
  background-position: center;
  background-size: cover;
  isolation: isolate;
}

.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(17, 17, 15, 0.94), rgba(17, 17, 15, 0.72) 46%, rgba(17, 17, 15, 0.28)),
    linear-gradient(0deg, rgba(17, 17, 15, 0.78), rgba(17, 17, 15, 0.08) 40%);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
}

.brand,
.topbar__link {
  text-decoration: none;
}

.brand {
  font-weight: 800;
  color: var(--text);
}

.topbar__links {
  display: flex;
  gap: 10px;
  align-items: center;
}

.topbar__link {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid rgba(244, 247, 242, 0.32);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(17, 17, 15, 0.44);
}

.hero__content {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0 96px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.04;
}

h1 {
  max-width: 820px;
  font-size: 4rem;
}

h2 {
  font-size: 2.25rem;
}

.hero__lead {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.15rem;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 34px 0 0;
}

.hero__facts span {
  padding: 10px 12px;
  border: 1px solid rgba(244, 247, 242, 0.22);
  border-radius: var(--radius);
  background: rgba(17, 17, 15, 0.58);
  color: var(--text);
  font-weight: 700;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 34px 0 0;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius);
  padding: 14px 20px;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
}

.button--primary,
.button--submit {
  color: #ffffff;
  background: var(--accent);
}

.button--primary:hover,
.button--submit:hover {
  background: var(--accent-strong);
}

.button--ghost {
  border: 1px solid rgba(244, 247, 242, 0.3);
  color: var(--text);
  background: rgba(17, 17, 15, 0.48);
}

.section-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.current-game,
.details,
.registration,
.history {
  background: var(--paper);
  color: var(--ink);
}

.current-game {
  padding: 72px 0;
}

.current-game .eyebrow {
  color: var(--accent);
}

.current-game__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 36px;
  align-items: start;
}

.current-game__layout p {
  max-width: 420px;
  color: #4d544a;
}

.game-preview {
  overflow: hidden;
  border: 1px solid #cfd8ca;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(22, 24, 20, 0.08);
}

.game-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  background: var(--surface);
}

.game-preview div {
  padding: 22px;
}

.game-preview span {
  display: block;
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

.game-preview h3 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1.12;
}

.game-preview p {
  max-width: 100%;
  margin: 12px 0 18px;
}

.details {
  padding: 72px 0;
}

.details .eyebrow,
.registration .eyebrow {
  color: var(--accent);
}

.details__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.detail {
  min-height: 150px;
  padding: 20px;
  border: 1px solid #cfd8ca;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(22, 24, 20, 0.08);
}

.detail__label {
  display: block;
  margin-bottom: 12px;
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

.detail strong,
.detail small {
  display: block;
}

.detail strong {
  font-size: 1.08rem;
}

.detail small {
  margin-top: 8px;
  color: #545b50;
}

.story {
  padding: 74px 0;
  background: var(--surface);
}

.story__layout,
.registration__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: start;
}

.steps {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.steps li {
  position: relative;
  min-height: 78px;
  padding: 18px 20px 18px 66px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  counter-increment: steps;
}

.steps li::before {
  position: absolute;
  top: 18px;
  left: 18px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: var(--radius);
  color: #ffffff;
  background: var(--green);
  content: counter(steps);
  font-weight: 800;
}

.registration {
  padding: 78px 0;
}

.registration__intro p {
  max-width: 380px;
  color: #4d544a;
}

.form {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid #cfd8ca;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.registration-state {
  align-self: start;
  padding: 24px;
  border: 1px solid #cfd8ca;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.registration-state strong {
  display: block;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.15;
}

.registration-state p {
  margin: 12px 0 0;
  color: #4d544a;
}

.registration-state__highlight {
  color: var(--accent);
  font-weight: 900;
}

.registration-state--wide {
  grid-column: 1 / -1;
  max-width: 680px;
}

.field {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

label,
legend {
  color: var(--ink);
  font-weight: 800;
}

.required-mark {
  color: var(--accent);
  font-weight: 900;
}

input[type="text"],
input[type="number"],
input[type="tel"],
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #bfc9b9;
  border-radius: var(--radius);
  padding: 12px 13px;
  color: var(--ink);
  background: #fbfcfa;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 3px solid rgba(181, 31, 42, 0.22);
  border-color: var(--accent);
}

.choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 500;
}

.choice input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--accent);
}

.field__hint,
.field__error,
.form__note,
.form__status {
  margin: 0;
}

.field__hint {
  color: #5a6256;
  font-size: 0.9rem;
}

.field__error {
  min-height: 1.25rem;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
}

.form__status {
  min-height: 1.5rem;
  color: #2f6b38;
  font-weight: 800;
}

.form__note {
  color: #5a6256;
  font-size: 0.92rem;
}

.form__status.is-error {
  color: var(--accent);
}

.button--submit {
  width: 100%;
}

.button[disabled] {
  cursor: wait;
  opacity: 0.68;
}

.footer {
  padding: 26px 0;
  background: var(--bg);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
}

.footer a {
  color: var(--text);
  font-weight: 800;
}

.history {
  padding: 72px 0 84px;
}

.history .eyebrow {
  color: var(--accent);
}

.history__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.history-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.history-card-link:focus-visible {
  outline: 3px solid rgba(181, 31, 42, 0.42);
  outline-offset: 4px;
}

.history-card {
  overflow: hidden;
  border: 1px solid #cfd8ca;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(22, 24, 20, 0.08);
}

.history-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--surface);
}

.history-card div {
  padding: 16px;
}

.history-card span {
  display: block;
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

.history-card h3 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1.15;
}

.history-card p,
.history__empty {
  color: #545b50;
}

.history-card p {
  margin: 8px 0 0;
}

.history__empty {
  margin: 0;
  padding: 18px;
  border: 1px solid #cfd8ca;
  border-radius: var(--radius);
  background: #ffffff;
}

@media (max-width: 900px) {
  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 1.9rem;
  }

  .current-game__layout,
  .details__grid,
  .history__grid,
  .story__layout,
  .registration__layout {
    grid-template-columns: 1fr;
  }

  .story__layout,
  .registration__layout {
    gap: 30px;
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: 86svh;
  }

  .topbar,
  .section-inner,
  .hero__content {
    width: min(100% - 24px, 1120px);
  }

  .hero__content {
    padding: 54px 0 72px;
  }

  h1 {
    font-size: 2.35rem;
  }

  h2 {
    font-size: 1.7rem;
  }

  .hero__lead {
    font-size: 1rem;
  }

  .button,
  .hero__actions {
    width: 100%;
  }

  .topbar {
    align-items: flex-start;
    gap: 14px;
  }

  .topbar__links {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .current-game,
  .details,
  .story,
  .registration,
  .history {
    padding: 54px 0;
  }

  .form {
    padding: 18px;
  }

  .footer__inner {
    flex-direction: column;
  }
}
