/* Единая витрина пяти классов поверх общих игровых данных. */
.page--heroes-showcase {
  --hero-blue: #8bd7ff;
  --hero-cyan: #4ca8cf;
  --hero-gold: #e6c36a;
  --hero-panel: rgba(5, 11, 18, 0.9);
  --hero-line: rgba(139, 215, 255, 0.22);
  background-attachment: fixed;
  overflow-x: clip;
  scroll-behavior: smooth;
}

.page--heroes-archer { --hero-background: url('../../assets/img/background-heroes-archer.jpg'); }
.page--heroes-warrior {
  --hero-background: url('../../assets/img/background-heroes-warrior.jpg');
  --hero-blue: #ffb06c; --hero-cyan: #bb5a35; --hero-line: rgba(231, 121, 65, 0.25);
}
.page--heroes-mage {
  --hero-background: url('../../assets/img/background-heroes-mage.jpg');
  --hero-blue: #f1c66d; --hero-cyan: #d98235; --hero-line: rgba(240, 174, 76, 0.25);
}
.page--heroes-rogue {
  --hero-background: url('../../assets/img/background-heroes-rogue.jpg');
  --hero-blue: #b19cff; --hero-cyan: #755ac5; --hero-line: rgba(163, 139, 241, 0.25);
}
.page--heroes-druid {
  --hero-background: url('../../assets/img/background-heroes-druid.jpg');
  --hero-blue: #b5db79; --hero-cyan: #668f3f; --hero-line: rgba(158, 202, 101, 0.25);
}

.hero-class-nav {
  position: sticky;
  top: var(--site-nav-sticky-height, var(--nav-height));
  z-index: 900;
  display: flex;
  justify-content: center;
  gap: 2px;
  width: 100%;
  margin: 0;
  padding: 8px 20px;
  border-block: 1px solid rgba(195, 151, 60, 0.36);
  background: linear-gradient(180deg, rgba(3, 8, 12, 0.97), rgba(5, 11, 15, 0.94));
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
}
.hero-class-nav::before { content: ''; position: absolute; inset: 50% 0 auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(205, 161, 63, 0.32) 18%, rgba(205, 161, 63, 0.32) 82%, transparent); pointer-events: none; }
.hero-class-nav__item { position: relative; z-index: 1; display: flex; flex: 0 1 190px; align-items: center; justify-content: center; gap: 10px; min-height: 58px; padding: 7px 18px; color: #c3c8c7; border-inline: 1px solid transparent; clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 10px 100%, 0 50%); font-family: var(--font-accent); transition: color 180ms ease, background 180ms ease, transform 180ms ease; }
.hero-class-nav__emblem { display: grid; flex: none; width: 38px; height: 38px; place-items: center; transform: rotate(45deg); border: 1px solid rgba(205, 161, 63, 0.5); background: #061019; }
.hero-class-nav__emblem img { width: 34px; height: 34px; object-fit: contain; transform: rotate(-45deg); filter: drop-shadow(0 0 8px rgba(117, 207, 237, 0.24)); }
.hero-class-nav__item:hover,
.hero-class-nav__item:focus-visible { color: #fff1c9; background: linear-gradient(90deg, transparent, rgba(103, 173, 194, 0.18), transparent); outline: none; transform: translateY(-1px); }
.hero-class-nav__item.is-active { color: #fff0bf; background: linear-gradient(115deg, rgba(125, 88, 18, 0.72), rgba(21, 77, 93, 0.74)); border-color: rgba(232, 190, 80, 0.5); box-shadow: inset 0 0 28px rgba(88, 197, 225, 0.12); }
.hero-class-nav__item.is-active .hero-class-nav__emblem { border-color: var(--hero-blue); box-shadow: 0 0 18px color-mix(in srgb, var(--hero-blue) 46%, transparent); }

.hero-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 390px);
  gap: clamp(28px, 5vw, 80px);
  min-height: 590px;
  margin: 34px auto 0;
  padding: clamp(48px, 7vw, 104px) clamp(24px, 6vw, 96px);
  width: min(1500px, calc(100% - 32px));
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(230, 195, 106, 0.34);
  border-radius: 8px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.54), inset 0 0 80px rgba(12, 36, 53, 0.25);
}

.hero-hero::before,
.hero-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.hero-hero::before {
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 8, 14, 0.97) 0%, rgba(3, 9, 15, 0.82) 43%, rgba(3, 9, 15, 0.2) 78%),
    linear-gradient(0deg, rgba(4, 9, 15, 0.9), transparent 54%);
}

.hero-hero::after {
  width: 460px;
  height: 460px;
  right: -110px;
  bottom: -190px;
  background: radial-gradient(circle, rgba(94, 190, 231, 0.24), transparent 68%);
  filter: blur(8px);
}

.hero-hero__veil {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--hero-background) center 24% / cover no-repeat;
  transform: scale(1.015);
}

.hero-hero__content { max-width: 760px; }
.hero-hero__identity { display: flex; align-items: center; gap: 18px; }

.hero-hero__emblem {
  width: clamp(72px, 8vw, 112px);
  height: clamp(72px, 8vw, 112px);
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(107, 200, 241, 0.42));
}

.hero-hero__eyebrow {
  color: var(--hero-blue);
  font-family: var(--font-accent);
  font-size: 0.92rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-hero__title {
  margin-top: 4px;
  color: #fff2cf;
  font-family: var(--font-accent);
  font-size: var(--display-title-size);
  line-height: 0.98;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.85);
}

.hero-hero__lead {
  max-width: 680px;
  margin-top: 24px;
  color: #e8edf0;
  font-size: clamp(1.05rem, 1.5vw, 1.34rem);
  line-height: 1.62;
}

.hero-hero__tags,
.hero-hero__actions,
.hero-hero__metrics { display: flex; flex-wrap: wrap; }

.hero-hero__tags { gap: 8px; margin-top: 22px; list-style: none; }
.hero-hero__tags li { padding: 7px 13px; color: #d7eff8; background: rgba(29, 75, 96, 0.46); border: 1px solid var(--hero-line); border-radius: 999px; }
.hero-hero__actions { gap: 12px; margin-top: 30px; }

.hero-button {
  min-width: 190px;
  padding: 13px 22px;
  font-family: var(--font-accent);
  font-size: 1.04rem;
  text-align: center;
  border: 1px solid var(--hero-gold);
  border-radius: 3px;
  transition: transform var(--speed-fast) var(--ease), box-shadow var(--speed-fast) var(--ease), background var(--speed-fast) var(--ease);
}

.hero-button:hover,
.hero-button:focus-visible { transform: translateY(-2px); outline: 2px solid #fff3bc; outline-offset: 3px; }
.hero-button--primary { color: #17120a; background: linear-gradient(#ffdc7e, #c99934); box-shadow: 0 0 24px rgba(230, 195, 106, 0.26); }
.hero-button--secondary { color: #f4e5bd; background: rgba(4, 10, 16, 0.72); }

.hero-hero__metrics { gap: 10px; margin-top: 34px; }
.hero-hero__metrics div { min-width: 124px; padding: 12px 16px; background: rgba(2, 8, 13, 0.65); border-left: 2px solid var(--hero-cyan); }
.hero-hero__metrics dt { color: #9baab3; font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; }
.hero-hero__metrics dd { margin-top: 2px; color: #fff2cf; font-family: var(--font-accent); font-size: 1.32rem; }
.hero-hero__metrics dd span { font-size: 0.8em; }

.hero-hero__signature { display: grid; gap: 14px; align-self: end; margin-bottom: 18px; }
.hero-hero__signature a { display: flex; align-items: center; gap: 13px; padding: 12px; color: #f3e7c8; background: rgba(3, 10, 16, 0.76); border: 1px solid var(--hero-line); border-radius: 4px; backdrop-filter: blur(8px); transition: transform var(--speed-fast) var(--ease), border-color var(--speed-fast) var(--ease); }
.hero-hero__signature a:hover,
.hero-hero__signature a:focus-visible { transform: translateX(-5px); border-color: var(--hero-gold); outline: none; }
.hero-hero__signature img { width: 58px; height: 58px; border: 1px solid #9a7934; border-radius: 5px; box-shadow: 0 0 20px rgba(91, 188, 229, 0.16); }
.hero-hero__signature span { font-family: var(--font-accent); font-size: 1.08rem; }

.hero-subnav {
  position: sticky;
  top: calc(var(--site-nav-sticky-height, var(--nav-height)) + var(--hero-class-nav-height, 76px));
  z-index: 850;
  display: flex;
  justify-content: center;
  gap: 4px;
  width: min(1040px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 6px;
  background: rgba(3, 8, 13, 0.92);
  border: 1px solid var(--hero-line);
  border-radius: 4px;
  backdrop-filter: blur(12px);
}

.hero-subnav a { padding: 10px 22px; color: #afbdc5; font-family: var(--font-accent); border-radius: 3px; }
.hero-subnav a:hover,
.hero-subnav a:focus-visible,
.hero-subnav a.is-active { color: #fff1c9; background: rgba(60, 139, 174, 0.18); outline: none; }

.hero-layout { display: grid; grid-template-columns: minmax(300px, 430px) minmax(0, 1fr); align-items: start; gap: 24px; max-width: 1500px; }
.hero-layout > .heroes__column { width: auto; }
.hero-layout .info-card { width: 100%; margin-top: 24px; overflow: hidden; scroll-margin-top: calc(var(--site-nav-sticky-height, var(--nav-height)) + var(--hero-class-nav-height, 76px) + 90px); background: var(--hero-panel); border-color: var(--hero-line); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28); }
.hero-layout .info-card__head { background: linear-gradient(135deg, rgba(13, 31, 43, 0.95), rgba(5, 10, 16, 0.94)); }
.hero-layout .info-card__kicker { color: var(--hero-blue); }

.hero-overview { overflow: hidden; }
.hero-overview__portrait { position: relative; height: 260px; overflow: hidden; border-bottom: 1px solid var(--hero-line); }
.hero-overview__portrait::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5, 11, 18, 0.98), transparent 58%); }
.hero-overview__portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 23%; transition: transform 600ms var(--ease); }
.page--heroes-mage .hero-overview__portrait img,
.page--heroes-warrior .hero-overview__portrait img,
.page--heroes-druid .hero-overview__portrait img { object-position: center top; }
.hero-overview:hover .hero-overview__portrait img { transform: scale(1.025); }
.hero-overview__portrait span { position: absolute; z-index: 1; left: 22px; bottom: 14px; color: #b9e8fb; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; }
.hero-overview__features { margin: 0 20px 20px; padding-top: 18px; border-top: 1px solid var(--hero-line); }
.hero-overview__features h3 { margin-bottom: 13px; color: #fff0c7; font-family: var(--font-accent); font-size: 1.15rem; }
.hero-overview__features article { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 11px; align-items: start; padding: 10px 0; }
.hero-overview__features article + article { border-top: 1px solid rgba(139, 215, 255, 0.1); }
.hero-overview__features img { width: 44px; height: 44px; border: 1px solid #8b743b; border-radius: 4px; }
.hero-overview__features strong { color: #e8eef0; font-family: var(--font-accent); }
.hero-overview__features p { margin-top: 2px; color: #91a3ad; font-size: 0.8rem; line-height: 1.42; }

.hero-tools { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.2fr) auto; gap: 16px; align-items: end; padding: 18px 20px; background: rgba(4, 11, 17, 0.82); border-bottom: 1px solid var(--hero-line); }
.hero-tools label { color: #b9c6cc; font-size: 0.8rem; }
.hero-tools__search span,
.hero-tools__level-head { display: block; margin-bottom: 7px; }
.hero-tools__search input { width: 100%; min-height: 42px; padding: 0 12px; color: #f1f3f4; background: rgba(0, 0, 0, 0.42); border: 1px solid #365568; border-radius: 3px; }
.hero-tools__search input:focus { outline: 2px solid var(--hero-cyan); outline-offset: 2px; }
.hero-tools__level-head { display: flex; justify-content: space-between; }
.hero-tools__level output { color: #fff1c8; font-family: var(--font-accent); font-size: 1.05rem; }
.hero-tools__level input { width: 100%; accent-color: var(--hero-cyan); }
.hero-tools__presets { display: flex; gap: 5px; margin-top: 5px; }
.hero-tools__presets button { flex: 1; min-height: 28px; color: #b9c6cc; background: rgba(15, 36, 48, 0.76); border: 1px solid #284c60; border-radius: 2px; }
.hero-tools__presets button:hover,
.hero-tools__presets button.is-active { color: #fff1c8; border-color: var(--hero-gold); }
.hero-tools__available { display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 10px; border: 1px solid #29495b; border-radius: 3px; }
.hero-tools__available input { accent-color: var(--hero-cyan); }
.hero-tools__result { grid-column: 1 / -1; margin: -5px 0 0; color: #8fb8ca; font-size: 0.82rem; }

.hero-layout .ability-list__items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--hero-line); }
.hero-layout .ability-list__item { min-height: 172px; padding: 18px; background: rgba(6, 13, 20, 0.97); border: 0; }
.hero-layout .ability-list__item:hover { background: rgba(15, 35, 47, 0.97); }
.hero-layout .ability-list__item[hidden] { display: none; }
.hero-layout .ability-list__item.is-locked { filter: saturate(0.35); opacity: 0.55; }
.hero-layout .ability-list__item.is-locked::after { content: attr(data-lock-label); margin-left: auto; color: #c9b785; font-size: 0.72rem; white-space: nowrap; }
.hero-layout .ability-list__icon { width: 62px; height: 62px; }
.hero-layout .ability-list__name { color: #fff0c7; }

.skill-list__item { position: relative; }
.skill-list__scale { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 8px; color: #7793a2; font-size: 0.7rem; border-top: 2px solid transparent; border-image: linear-gradient(90deg, #315c70, #9bdcff) 1; }
.skill-list__label { margin-right: 5px; color: #9dcfe4; font-weight: 700; }

.hero-back-top { position: fixed; right: 22px; bottom: 22px; z-index: 9; display: grid; place-items: center; width: 48px; height: 48px; color: #fff0c7; background: rgba(4, 12, 18, 0.9); border: 1px solid var(--hero-gold); border-radius: 50%; box-shadow: 0 0 22px rgba(100, 196, 235, 0.18); }
.hero-back-top:hover,
.hero-back-top:focus-visible { background: #17384a; outline: 2px solid #fff0c7; outline-offset: 2px; }

.hero-discovery { width: min(1380px, calc(100% - 32px)); margin: 12px auto 80px; padding: 30px; text-align: center; background: rgba(4, 10, 16, 0.9); border: 1px solid var(--hero-line); border-radius: 5px; }
.hero-discovery__eyebrow { color: var(--hero-blue); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; }
.hero-discovery h2 { margin-top: 4px; color: #fff1ca; font-family: var(--font-accent); font-size: var(--section-title-size); }
.hero-discovery__grid { margin-top: 24px; text-align: left; }
.hero-discovery .home-class { min-height: 360px; }
.hero-discovery .home-class.is-current { border-color: var(--hero-blue); box-shadow: 0 0 0 2px rgba(139, 215, 255, 0.28), 0 18px 44px rgba(0, 0, 0, 0.48); }
.hero-discovery .home-class.is-current::before { opacity: 0.55; transform: none; }
.hero-discovery .home-class.is-current::after { background: linear-gradient(to top, rgba(3, 13, 20, 0.99) 5%, rgba(4, 29, 41, 0.34) 70%, transparent); }

@media (max-width: 1100px) {
  .hero-hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-hero__signature { grid-template-columns: repeat(3, 1fr); margin: 0; }
  .hero-hero__signature a { flex-direction: column; text-align: center; }
  .hero-layout { grid-template-columns: 1fr; }
  .hero-layout .heroes__column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}

@media (max-width: 720px) {
  .hero-class-nav { justify-content: flex-start; overflow-x: auto; padding-inline: 12px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .hero-class-nav::-webkit-scrollbar { display: none; }
  .hero-class-nav__item { flex: 0 0 146px; min-height: 54px; padding-inline: 12px; scroll-snap-align: center; font-size: 0.86rem; }
  .hero-class-nav__emblem { width: 34px; height: 34px; }
  .hero-class-nav__emblem img { width: 30px; height: 30px; }
  .hero-hero { width: calc(100% - 20px); margin-top: 12px; padding: 36px 22px; }
  .hero-hero__identity { align-items: flex-start; }
  .hero-hero__title { font-size: clamp(1.75rem, 9vw, 2.4rem); }
  .hero-hero__signature { grid-template-columns: 1fr; }
  .hero-hero__signature a { flex-direction: row; text-align: left; }
  .hero-button { width: 100%; }
  .hero-subnav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; overflow: hidden; }
  .hero-subnav a { min-width: 0; padding: 9px 4px; font-size: 0.78rem; text-align: center; overflow-wrap: anywhere; }
  .hero-layout,
  .hero-layout .heroes__column,
  .hero-layout .info-card { min-width: 0; width: 100%; }
  .hero-layout .heroes__column { display: block; }
  .hero-tools { grid-template-columns: 1fr; }
  .hero-tools__result { grid-column: auto; }
  .hero-layout .ability-list__items { grid-template-columns: 1fr; }
  .hero-discovery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-discovery .home-class { min-height: 300px; }
}

@media (max-width: 400px) {
  .hero-hero__emblem { width: 64px; height: 64px; }
  .hero-hero__identity { flex-wrap: wrap; }
  .hero-hero__title { font-size: clamp(1.6rem, 9vw, 2.2rem); line-height: 1.06; }
  .hero-hero__metrics div { flex: 1; min-width: 92px; }
  .hero-layout .ability-list__item { min-height: auto; padding: 14px; }
  .hero-layout .ability-list__icon { width: 50px; height: 50px; }
  .hero-back-top { right: 12px; bottom: 12px; width: 42px; height: 42px; }
  .hero-discovery { padding: 18px 10px; }
  .hero-discovery__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .page--heroes-showcase { scroll-behavior: auto; }
  .hero-button,
  .hero-overview__portrait img { transition: none; }
}
@view-transition { navigation: auto; }
.page--heroes-showcase .site-nav__logo-image { view-transition-name: malum-site-logo; }
::view-transition-group(malum-site-logo) {
  animation-duration: 420ms;
  animation-timing-function: cubic-bezier(.2, .8, .2, 1);
}
