* { box-sizing: border-box; }

:root {
  --bg: #fe3700;
  --panel: #bc92c3;
  --panel-2: #c2d3ff;
  --line: #2a3145;
  --text: #e9ecf4;
  --muted: #ffffff;
  --accent: #e0a53c;
  --red: #c23a2b;
  --green: #4fb477;
  --blue: #4a90d9;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'SN Pro', system-ui, sans-serif;
  overflow-x: hidden;
}

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

/* искры-угольки */
.embers { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.ember {
  position: absolute; bottom: -10px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); opacity: 0; animation: rise linear infinite;
}
@keyframes rise {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  15% { opacity: .8; }
  100% { transform: translateY(-105vh) scale(.3); opacity: 0; }
}

/* шапка */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem clamp(1rem, 4vw, 3rem);
  background: rgba(11, 13, 18, .85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 1.25rem;
  color: var(--text); text-decoration: none; letter-spacing: .12em;
}
.brand__mark { color: var(--red); }
.brand__accent { color: var(--accent); }
.nav { display: flex; gap: 1.4rem; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: .95rem;
  transition: color .2s;
}
.nav a:hover { color: var(--accent); }
.burger { display: none; background: none; border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; font-size: 1.2rem; padding: .25rem .6rem; cursor: pointer; }

/* герой-баннер */
.hero {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; align-items: center;
  padding: clamp(2.5rem, 7vw, 5.5rem) clamp(1rem, 4vw, 3rem);
  background:
    radial-gradient(1000px 400px at 15% 0%, rgba(194, 58, 43, .28), transparent 60%),
    radial-gradient(700px 500px at 90% 60%, rgba(224, 165, 60, .16), transparent 60%),
    linear-gradient(180deg, #10131c, var(--bg));
}
.hero__eyebrow {
  font-family: 'JetBrains Mono', monospace; font-size: .8rem; letter-spacing: .25em;
  text-transform: uppercase; color: var(--red); margin: 0 0 .8rem;
}
.hero__title {
  margin: 0; font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.02;
  letter-spacing: .02em; text-transform: uppercase;
  color: rgba(95, 169, 105, 0.949);
}
.hero__lead { max-width: 34rem; color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.btn {
  display: inline-block; padding: .8rem 1.5rem; border-radius: 10px;
  text-decoration: none; font-weight: 700; font-size: .95rem; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s, box-shadow .2s;
}
.btn:hover { transform: translateY(-3px); }
.btn--primary { background: linear-gradient(135deg, var(--red), #8f2a1f); color: #fff;
  box-shadow: 0 8px 24px rgba(194, 58, 43, .35); }
.btn--ghost { border-color: var(--line); color: var(--text); background: rgba(255,255,255,.03); }

.hero__stats { display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 2.4rem; }
.stat b { display: block; font-size: 2rem; color: var(--accent); font-family: 'JetBrains Mono', monospace; }
.stat span { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

.hero__art { position: relative; min-height: 300px; display: grid; place-items: center; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); }
.orb--1 { width: 240px; height: 240px; background: rgba(79, 180, 119, .5); top: 8%; left: 5%;
  animation: float 6s ease-in-out infinite; }
.orb--2 { width: 260px; height: 260px; background: rgba(194, 58, 43, .55); bottom: 5%; right: 8%;
  animation: float 7s ease-in-out infinite reverse; }
@keyframes float { 50% { transform: translateY(-24px); } }

.vs { position: relative; display: flex; align-items: center; gap: 1rem;
  font-family: 'JetBrains Mono', monospace; font-weight: 600; z-index: 2; }
.vs__side { padding: 1rem 1.4rem; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(11,13,18,.75); font-size: 1.1rem; letter-spacing: .2em; text-transform: uppercase; }
.vs__side--radiant { color: var(--green); border-color: rgba(79,180,119,.5); }
.vs__side--dire { color: var(--red); border-color: rgba(194,58,43,.5); }
.vs__badge { font-size: 2rem; color: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.18); text-shadow: 0 0 22px var(--accent); } }

/* секции */
.section { position: relative; z-index: 1; padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 3rem); }
.section__title { margin: 0 0 .5rem; font-size: clamp(1.7rem, 3.5vw, 2.6rem); text-transform: uppercase; }
.section__sub { margin: 0 0 2rem; color: var(--muted); max-width: 46rem; }
#roles, #items, #tips { background: linear-gradient(180deg, #0e111a, transparent 90%); }
#heroes { background: #0e111a; }

/* роли */
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.role {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.3rem; transition: transform .2s, border-color .2s;
}
.role:hover { transform: translateY(-6px); border-color: var(--role, var(--accent)); }
.role__icon { font-size: 1.9rem; }
.role__name { margin: .6rem 0 .3rem; font-size: 1.05rem; }
.role__desc { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.role__lane { display: inline-block; margin-top: .8rem; font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--role, var(--accent)); }

/* герои */
.toolbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-bottom: 1.6rem; }
.search {
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  padding: .7rem 1rem; border-radius: 10px; font-size: .95rem; min-width: 230px; outline: none;
}
.search:focus { border-color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: .45rem 1rem; font-size: .85rem; cursor: pointer; transition: .2s;
}
.chip:hover { color: var(--text); }
.chip--active { background: var(--accent); border-color: var(--accent); color: #141824; font-weight: 700; }

.heroes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }
.card {
  position: relative; overflow: hidden; border-radius: 14px; border: 1px solid var(--line);
  background: var(--panel-2); cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-6px) scale(1.02); border-color: var(--accent);
  box-shadow: 0 14px 30px rgba(0,0,0,.5); }
.card__img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block;
  background: linear-gradient(160deg, #26304a, #141824);
}
.card__fallback { display: grid; place-items: center; font-size: 2.6rem; width: 100%;
  aspect-ratio: 4/3; background: linear-gradient(160deg, #26304a, #141824); }
.card__body { padding: .75rem .85rem 1rem; }
.card__name { margin: 0; font-size: 1rem; }
.card__role { font-size: .75rem; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.card__desc { margin: .5rem 0 0; font-size: .82rem; color: var(--muted); line-height: 1.45; }
.empty { color: var(--muted); text-align: center; padding: 2rem 0; }

/* предметы */
.items { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.item {
  display: flex; gap: .9rem; align-items: center; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: .9rem; transition: .2s;
}
.item:hover { border-color: var(--accent); transform: translateY(-4px); }
.item img, .item__ico { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex: none;
  background: linear-gradient(160deg, #33405e, #1b2130); display: grid; place-items: center;
  font-size: 1.5rem; }
.item__name { margin: 0; font-size: .98rem; }
.item__cost { margin: .2rem 0 0; font-size: .8rem; color: var(--accent); font-family: 'JetBrains Mono', monospace; }
.item__desc { margin: .25rem 0 0; font-size: .8rem; color: var(--muted); line-height: 1.4; }

/* квиз */
.quiz {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: clamp(1.2rem, 3vw, 2rem); max-width: 720px;
}
.quiz__head { display: flex; align-items: center; gap: 1rem; font-size: .82rem; color: var(--muted);
  font-family: 'JetBrains Mono', monospace; }
.quiz__bar { flex: 1; height: 8px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.quiz__bar i { display: block; height: 100%; width: 25%; border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--accent)); transition: width .4s; }
.quiz__q { margin: 1.3rem 0 1rem; font-size: 1.35rem; }
.quiz__answers { display: grid; gap: .7rem; }
.quiz__btn {
  text-align: left; background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: .85rem 1rem; font-size: .95rem; cursor: pointer; transition: .15s;
}
.quiz__btn:hover { border-color: var(--accent); background: #232a3d; transform: translateX(6px); }
.quiz__label { margin: 0; color: var(--muted); text-transform: uppercase; letter-spacing: .2em;
  font-size: .8rem; text-align: center; }
.quiz__hero { text-align: center; padding: 1rem 0 1.4rem; }
.quiz__hero h3 { margin: .6rem 0 .4rem; font-size: 1.9rem; color: var(--accent); }
.quiz__hero p { color: var(--muted); max-width: 30rem; margin: 0 auto 1.2rem; line-height: 1.6; }
.quiz__hero img, .quiz__hero .card__fallback { width: 190px; height: 143px; margin: 0 auto;
  border-radius: 12px; object-fit: cover; display: block;
  background: linear-gradient(160deg, #26304a, #141824); }
.quiz--result { text-align: center; }

/* советы */
.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.tip { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 12px; padding: 1.1rem 1.2rem; }
.tip h3 { margin: 0 0 .45rem; font-size: 1.02rem; }
.tip p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }

/* подвал */
.footer {
  border-top: 1px solid var(--line); padding: 2rem clamp(1rem, 4vw, 3rem); text-align: center;
  color: var(--muted); font-size: .85rem; background: #0a0c11;
}
.footer__motto { color: var(--accent); font-family: 'JetBrains Mono', monospace; margin-top: .4rem; }

/* появление при скролле */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s, transform .6s; }
.reveal--in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero__art { min-height: 180px; order: -1; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: #10131c; border-bottom: 1px solid var(--line); display: none; }
  .nav a { padding: .9rem clamp(1rem, 4vw, 3rem); border-top: 1px solid var(--line); }
  .nav--open { display: flex; }
  .burger { display: block; }
}
