* {
  box-sizing: border-box;
}

:root {
  --red: #b8383b;
  --red-dark: #7d2628;
  --blu: #5885a2;
  --blu-dark: #3b5d73;
  --accent: var(--red);
  --accent-dark: var(--red-dark);
  --ink: #2b2118;
  --paper: #e9e0cd;
  --paper-2: #ddd2b8;
  --panel: #35302a;
  --gold: #d8a84b;
  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Roboto Condensed', 'Arial', sans-serif;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  background: var(--paper)
    repeating-linear-gradient(
      45deg,
      rgba(0, 0, 0, 0.03) 0 2px,
      transparent 2px 9px
    );
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.35;
  background-image: radial-gradient(rgba(43, 33, 24, 0.12) 1px, transparent 1px);
  background-size: 3px 3px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0;
}

/* ---------- шапка ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.6rem 1.25rem;
  background: var(--panel);
  border-bottom: 4px solid var(--accent);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: border-color 0.3s;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--paper);
}

.brand__badge {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--accent);
  color: #fff;
  padding: 0.15rem 0.5rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  transition: background 0.3s;
}

.brand__two { color: #ffe9a8; }

.brand__text {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.14em;
  font-size: 0.95rem;
}

.nav {
  display: flex;
  gap: 1.1rem;
  margin-left: auto;
}

.nav a {
  color: var(--paper);
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  padding: 0.25rem 0;
  border-bottom: 3px solid transparent;
}

.nav a:hover { color: #fff; border-bottom-color: var(--accent); }

.team-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--paper);
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  transition: transform 0.15s;
}

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

.team-switch__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid rgba(255, 255, 255, 0.5);
}

/* ---------- герой ---------- */
.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 4.5rem 1.5rem 4rem;
  background:
    radial-gradient(700px 380px at 12% 15%, rgba(216, 168, 75, 0.22), transparent 62%),
    radial-gradient(620px 460px at 88% 85%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 66%),
    linear-gradient(rgba(35, 28, 22, 0.86), rgba(22, 17, 13, 0.95)),
    repeating-linear-gradient(-45deg, var(--accent-dark) 0 26px, var(--panel) 26px 52px);
  background-size: auto, auto, auto, 147px 147px;
  color: var(--paper);
  border-bottom: 6px solid var(--accent);
  transition: border-color 0.3s;
  animation: heroStripes 14s linear infinite;
}

@keyframes heroStripes {
  to { background-position: 0 0, 0 0, 0 0, 147px 147px; }
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(125% 95% at 50% 45%, transparent 52%, rgba(0, 0, 0, 0.6));
}

.hero > * { position: relative; z-index: 1; }

.hero__inner { max-width: 42rem; }

.hero__kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.8rem;
  color: var(--gold);
}

.hero__title {
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 0.95;
  margin: 0.4rem 0 0.8rem;
  text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.45);
}

.hero__title-accent { color: var(--accent); transition: color 0.3s; }

.hero__lead {
  margin: 0;
  font-size: 1.1rem;
  max-width: 36rem;
  color: #efe7d6;
}

.hero__cta { display: flex; gap: 0.9rem; margin-top: 1.5rem; flex-wrap: wrap; }

.btn {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 0.06em;
  padding: 0.7rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s;
  display: inline-block;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: rgba(0, 0, 0, 0.35);
  box-shadow: 0 4px 0 var(--accent-dark);
}

.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--accent-dark); }
.btn--primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--accent-dark); }

.btn--ghost {
  color: var(--paper);
  border-color: rgba(233, 224, 205, 0.55);
}

.btn--ghost:hover { background: rgba(233, 224, 205, 0.12); }

.hero__stats {
  display: flex;
  gap: 1.8rem;
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  flex-wrap: wrap;
}

.hero__stats b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--gold);
}

.hero__stats span { font-size: 0.85rem; text-transform: uppercase; opacity: 0.75; }

.hero__mascot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.mascot {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 4vw, 2.6rem);
  padding: 1.4rem 1rem;
  border-radius: 6px;
  color: #fff;
  border: 3px solid rgba(0, 0, 0, 0.4);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.35);
  writing-mode: vertical-rl;
  letter-spacing: 0.15em;
}

.mascot--red { background: var(--red); animation: bob 3s ease-in-out infinite; }
.mascot--blu { background: var(--blu); animation: bob 3s ease-in-out infinite 0.6s; }
.mascot--vs {
  background: var(--gold);
  color: var(--ink);
  writing-mode: horizontal-tb;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  padding: 0.8rem 0.7rem;
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}

/* ---------- промо мини-игры ---------- */
.promo {
  position: relative;
  max-width: 1100px;
  margin: 2.5rem auto -1rem;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.6rem;
  align-items: center;
  padding: 1.8rem;
  color: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 10px 10px 0 rgba(43, 33, 24, 0.3);
  background:
    radial-gradient(420px 260px at 85% 20%, rgba(88, 133, 162, 0.35), transparent 65%),
    radial-gradient(420px 260px at 15% 90%, rgba(184, 56, 59, 0.4), transparent 65%),
    linear-gradient(120deg, #241d17, #3a3026 55%, #1d2733);
}

.promo__tag {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.promo__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  text-transform: uppercase;
  margin: 0.35rem 0 0.5rem;
}

.promo__title span { color: #ff7a6a; }

.promo__lead { margin: 0; color: #ded3bd; }

.promo__list {
  margin: 0.8rem 0 1.1rem;
  padding-left: 1.2rem;
  color: #c9bda6;
  font-size: 0.95rem;
}

.promo__list li { margin-bottom: 0.25rem; }

.promo__art {
  position: relative;
  height: 190px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
  background:
    repeating-linear-gradient(-45deg, rgba(216, 168, 75, 0.12) 0 14px, transparent 14px 34px),
    linear-gradient(#514a3e, #332d25);
}

.promo__dot {
  position: absolute;
  top: 50%;
  font-size: 2.1rem;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 3px solid rgba(0, 0, 0, 0.45);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.3);
}

.promo__dot--red { left: 12%; background: var(--red); animation: bob 2.6s ease-in-out infinite; }
.promo__dot--blu { right: 12%; background: var(--blu); animation: bob 2.6s ease-in-out infinite 1.3s; }

.promo__reticle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%);
  border: 3px solid var(--gold);
  border-radius: 50%;
  animation: reticle 1.6s ease-in-out infinite;
}

.promo__reticle::after {
  content: '';
  position: absolute;
  inset: 18px;
  background: var(--gold);
  border-radius: 50%;
}

.promo__boom {
  position: absolute;
  left: 50%;
  top: 22%;
  width: 16px;
  height: 16px;
  transform: translateX(-50%);
  background: #ffb03a;
  border-radius: 50%;
  animation: boom 1.6s ease-out infinite;
}

@keyframes reticle {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1.25); opacity: 0.7; }
}

@keyframes boom {
  0% { opacity: 0; transform: translateX(-50%) scale(0.3); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) scale(3.2); }
}

@media (max-width: 860px) {
  .promo { grid-template-columns: 1fr; }
  .promo__art { height: 150px; }
}

/* ---------- секции ---------- */
.section { padding: 3.5rem 1.5rem; max-width: 1100px; margin: 0 auto; }
.section--alt { background: transparent; }

.section__head { text-align: center; margin-bottom: 2.2rem; }

.section__title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  position: relative;
  display: inline-block;
}

.section__title::after {
  content: '';
  display: block;
  width: 60%;
  height: 5px;
  margin: 0.5rem auto 0;
  background: var(--accent);
  transition: background 0.3s;
}

.section__sub { max-width: 40rem; margin: 0.8rem auto 0; color: #5c5145; }

/* ---------- классы ---------- */
.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.class-card {
  position: relative;
  background: var(--panel);
  color: var(--paper);
  border: 3px solid #1e1a16;
  border-radius: 6px;
  padding: 1rem 0.6rem 0.9rem;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.18s, border-color 0.18s;
}

.class-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: var(--card-color, var(--accent));
}

.class-card:hover { transform: translateY(-6px); border-color: var(--card-color, var(--accent)); }
.class-card.is-active { border-color: var(--card-color, var(--accent)); box-shadow: 0 0 0 3px rgba(216, 168, 75, 0.6); }

.class-card__emoji {
  font-size: 2.4rem;
  display: block;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.4));
}

.class-card__name {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 1rem;
  margin-top: 0.5rem;
}

.class-card__role { font-size: 0.75rem; text-transform: uppercase; opacity: 0.7; letter-spacing: 0.1em; }

.class-detail {
  position: relative;
  margin-top: 1.6rem;
  background: #fffdf6;
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: 8px 8px 0 rgba(43, 33, 24, 0.25);
  overflow: hidden;
}

.class-detail__head {
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  color: #fff;
  padding: 1rem 1.4rem;
  transition: background 0.3s;
}

.class-detail__role { font-size: 0.75rem; letter-spacing: 0.2em; opacity: 0.85; }
.class-detail__name { font-size: 2rem; }
.class-detail__tag { margin: 0.2rem 0 0; font-style: italic; opacity: 0.95; }

.class-detail__body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.5rem;
  padding: 1.4rem;
}

.class-detail__stats { display: grid; gap: 0.7rem; align-content: start; }

.stat__label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.stat__bar {
  height: 16px;
  background: var(--paper-2);
  border: 2px solid var(--ink);
  border-radius: 3px;
  overflow: hidden;
}

.stat__fill {
  height: 100%;
  width: 0;
  background: repeating-linear-gradient(
    -45deg,
    var(--accent) 0 8px,
    var(--accent-dark) 8px 16px
  );
  transition: width 0.6s ease;
}

.class-detail__gear h4 { font-size: 1rem; margin-bottom: 0.5rem; color: var(--accent); }

.class-detail__gear ul { margin: 0; padding-left: 1.1rem; }
.class-detail__gear li { margin-bottom: 0.3rem; }
.class-detail__desc { font-size: 0.95rem; color: #5c5145; border-top: 2px dashed var(--paper-2); padding-top: 0.7rem; }

.class-detail__close {
  position: absolute;
  top: 0.6rem;
  right: 0.7rem;
  width: 2.2rem;
  height: 2.2rem;
  font-size: 1.4rem;
  line-height: 1;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.class-detail__close:hover { background: rgba(0, 0, 0, 0.5); }

/* ---------- режимы ---------- */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}

.mode-card {
  background: #fffdf6;
  border: 3px solid var(--ink);
  border-radius: 6px;
  padding: 1.1rem;
  box-shadow: 5px 5px 0 rgba(43, 33, 24, 0.2);
  transition: transform 0.18s, box-shadow 0.18s;
}

.mode-card:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--accent); }
.mode-card__icon { font-size: 1.9rem; display: block; }
.mode-card h3 { font-size: 1.1rem; margin: 0.5rem 0 0.4rem; }
.mode-card p { margin: 0; font-size: 0.95rem; color: #5c5145; }

/* ---------- meet the team ---------- */
.meet { display: grid; gap: 1.2rem; justify-items: center; }

.meet__screen {
  width: min(640px, 100%);
  min-height: 210px;
  background: #17130f;
  border: 4px solid var(--ink);
  border-radius: 8px;
  color: var(--paper);
  padding: 1.6rem 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.8);
}

.meet__play {
  position: absolute;
  top: 0.9rem;
  right: 1.1rem;
  color: var(--gold);
  font-size: 1.2rem;
}

.meet__quote {
  margin: 0;
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  font-style: italic;
  min-height: 3em;
}

.meet__who { margin-top: 0.9rem; color: var(--gold); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.85rem; }

/* ---------- война ---------- */
.section--war {
  max-width: none;
  background: linear-gradient(90deg, var(--red-dark), #241d17 45%, #1c2833 55%, var(--blu-dark));
  color: var(--paper);
  border-top: 6px solid var(--gold);
  border-bottom: 6px solid var(--gold);
}

.section--war .section__head { max-width: 1100px; margin-left: auto; margin-right: auto; }
.section--war .section__sub { color: #d8cdb8; }

.war {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.2rem;
  align-items: stretch;
  max-width: 1100px;
  margin: 0 auto;
}

.war__side {
  background: rgba(0, 0, 0, 0.35);
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 1.4rem;
}

.war__side h3 { font-size: 2rem; }
.war__side--red h3 { color: #ff8f8f; }
.war__side--blu h3 { color: #a8d4ff; }
.war__side ul { list-style: none; padding: 0; margin: 0.9rem 0 0; font-size: 0.9rem; }
.war__side li { padding: 0.25rem 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.2); }

.war__mid {
  align-self: center;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.55);
  border: 3px solid var(--gold);
  border-radius: 50%;
  width: 4.5rem;
  height: 4.5rem;
  display: grid;
  place-items: center;
  animation: bob 2.4s ease-in-out infinite;
}

/* ---------- подвал ---------- */
.footer {
  background: var(--panel);
  color: #b7ac99;
  text-align: center;
  padding: 1.6rem 1rem;
  font-size: 0.9rem;
  border-top: 4px solid var(--accent);
}

.footer__motto { color: var(--gold); font-style: italic; }

/* ---------- анимация появления ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.5s, transform 0.5s; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- адаптив ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 2.5rem; }
  .hero__mascot { justify-content: flex-start; }
  .nav { display: none; }
  .class-detail__body { grid-template-columns: 1fr; }
  .war { grid-template-columns: 1fr; }
  .war__mid { margin: 0 auto; }
}
