/* --- Fonts --- */

@font-face {
    font-family: 'Proxima Nova';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/ProximaNova-Regular.woff') format('woff');
}

@font-face {
    font-family: 'Proxima Nova';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/ProximaNova-Semibold.woff') format('woff');
}

@font-face {
    font-family: 'Proxima Nova';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/ProximaNova-Bold.woff') format('woff');
}

/* --- Root Elements --- */

:root {
    --bg: #08090d;
    --bg-2: #11131a;
    --ink: #f2eee3;
    --ink-2: #61605e;
    --muted: #aaa18f;
    /* --gold: #d7aa54; */
    --gold: #cfb071;
    --gold-2: #ffe0a0;
    --blue: #5fb8d8;
    --red: #a1362d;
    --line: rgba(215, 170, 84, .38);
    --glass: rgba(8, 11, 16, .74);
    --max: 1180px;
    --shadow: 0 18px 60px rgba(0, 0, 0, .52);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    /* font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif; */
    /* font-family: 'Google Sans Flex', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; */
    font-family: 'Proxima Nova', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(var(--max), calc(100% - 40px));
    margin-inline: auto;
}

.kicker {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: .24em;
    color: var(--gold-2);
    font-size: 12px;
    font-weight: 700;
    /* text-shadow: 0 2px 20px #000; */
    filter: drop-shadow(0 2px 28px rgba(0, 0, 0, .5));
}

.section {
    position: relative;
    padding: 105px 0 115px 0;
}

.section-head {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 46px;
}

.section-head h2 {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 400;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.1;
    margin: 0 0 16px;
}

.section-head p:not(.kicker) {
    color: var(--muted);
    font-size: 17px;
}

.ornate h2:before,
.ornate h2:after {
    content: "";
    display: inline-block;
    width: 56px;
    height: 1px;
    background: url("../img/ui/border-gold-1px.png") left center / auto 1px repeat-x;
    filter: saturate(.72);
    opacity: .96;
    image-rendering: auto;
    vertical-align: middle;
    margin: 0 18px;
}

.page-bg {
    position: fixed;
    inset: 0;
    z-index: -3;
    background: radial-gradient(circle at 50% 0%, rgba(69, 127, 150, .18), transparent 34%), #05060a;
}

.page-bg:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px), linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 120px 120px;
    mask-image: linear-gradient(to bottom, transparent, black 15%, black 80%, transparent);
    opacity: .3;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

/* --- Buttons --- */

.btn {
    --btn-texture-strength: .79;
    --btn-texture-blend: multiply;
    --btn-texture-contrast: 1.4;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 1px 28px 0 28px;
    text-transform: uppercase;
    letter-spacing: .09em;
    font-weight: 700;
    font-size: 13px;
    transition: .2s;
    line-height: 1;
}

.btn::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    /* background: url(../img/ui/button-mask1.png) center / auto no-repeat; */
    background: url(../img/ui/button-mask.png) center / cover;
    mix-blend-mode: var(--btn-texture-blend);
    opacity: var(--btn-texture-strength);
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.btn-gold {
    background: #e2c07e;
    color: #1b1008;
    text-shadow: 0 1px 0 rgba(250, 250, 250, .35);
    transition: filter .2s ease, transform .2s ease;
}

.btn-gold:hover {
    filter: brightness(1.15);
}

.btn-blue {
    background: #154fbb;
    color: #fff;
    box-shadow: 0 10px 28px rgba(95, 184, 255, .22);
    text-shadow: 0 1px 0 rgba(20, 78, 186, .85);
}

.btn-blue:hover {
    filter: brightness(1.25);
}

.btn-red {
    background: #a13936;
    color: #e7e0d4;
    transition: filter .2s ease, transform .2s ease;
}

.btn-red:hover {
    filter: brightness(1.25);
}

.btn-dark {
    background: #5e5550;
    color: #e7e0d4;
    transition: filter .2s ease, transform .2s ease;
}

.btn-dark:hover {
    filter: brightness(1.27);
}

.btn-ghost {
    background: #252930;
    color: #e7e0d4;
}

.btn-small {
    min-height: 38px;
    padding: 1px 18px 0 18px;
    font-size: 12px;
    filter: brightness(.98);
}

.btn-small:hover {
    transform: none;
}

/* --- Header --- */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #0a0a0a;
    box-shadow: var(--shadow);
}

.header-inner {
    height: 78px;
    display: flex;
    align-items: center;
    gap: 22px;
    width: min(1320px, calc(100% - 34px));
    margin: auto;
}

.brand-logo {
    width: 118px;
    height: auto;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-left: 8px;
    flex: 1;
    min-width: 0;
}

.main-nav>a,
.nav-drop>button {
    position: relative;
    flex: 0 0 auto;
    height: 78px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    background: transparent;
    border: 0;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 13px;
    color: #e7e0d4;
    cursor: pointer;
    white-space: nowrap;
}

.main-nav>a::before,
.nav-drop>button::before {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 24px;
    height: 1px;
    background: var(--gold-2);
    opacity: 0;
    transform: scaleX(.5);
    transition: transform .2s ease-out, opacity .2s ease-out;
}

.nav-drop>button::before {
    right: 30px;
}

.nav-drop > button::after {
    content: "";
    width: 6px;
    height: 6px;
    opacity: .75;
    margin-left: 6px;
    margin-top: -3px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s ease;
}

.nav-drop.is-open > button::after {
    transform: translateY(3px) rotate(225deg);
}

.main-nav>a:hover,
.main-nav>a.active,
.nav-drop:hover>button,
.nav-drop:focus-within>button,
.nav-drop.active > button {
    color: var(--gold-2);
}

.main-nav>a:hover::before,
.main-nav>a:focus::before,
.main-nav>a.active::before,
.nav-drop:hover>button::before,
.nav-drop:focus-within>button::before,
.nav-drop.active>button::before {
    opacity: 1;
    transform: scaleX(1);
}

.nav-drop {
    position: relative;
    flex: 0 0 auto;
}

.drop-panel {
    position: absolute;
    top: 64px;
    left: 0;
    width: 220px;
    padding: 18px 0 0 0;
    background: #0a0a0a;
    /* border: 1px solid var(--line); */
    border: 0;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(8px);
    visibility: hidden;
    transition: .2s;
    z-index: 20;
    --frame-h: url("../img/ui/border-gold-1px.png");
    box-shadow: var(--shadow);
}

.drop-panel::after  {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    padding: 0 1px;
    pointer-events: none;
    background: var(--frame-h) bottom / auto 1px repeat-x;
    filter: saturate(.72);
    opacity: .96;
    image-rendering: auto;
}

.nav-drop.is-open .drop-panel {
    opacity: 1;
    transform: none;
    visibility: visible;
}

.drop-panel a {
    display: block;
    padding: 0 22px 22px 22px;
    color: #dcd4c5;
    font-size: 13px;
    text-transform: uppercase;
}

.drop-panel a:hover {
    color: var(--gold-2);
}

.lang-drop {
    margin-left: 14px;
    position: relative;
    flex: 0 0 auto;
    height: 78px;
    display: flex;
    align-items: center;
}

.lang-current {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    height: 38px;
    padding: 0 8px;
    background: transparent;
    border: 0;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 13px;
    color: #e7e0d4;
    cursor: pointer;
}

.lang-current::before {
    content: "";
    position: absolute;
    left: 37px;
    right: 24px;
    bottom: 5px;
    height: 1px;
    background: var(--gold-2);
    opacity: 0;
    transform: scaleX(.5);
    transition: transform .2s ease-out, opacity .2s ease-out;
}

.lang-drop:hover .lang-current::before,
.lang-drop:focus-within .lang-current::before {
    opacity: 1;
    transform: scaleX(1);
}

.lang-current .lang-flag {
    margin-right: 8px;
}

.lang-current::after {
    content: "";
    width: 6px;
    height: 6px;
    opacity: .75;
    margin-left: 6px;
    margin-top: -3px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s ease;
}

.lang-drop.is-open .lang-current::after {
    transform: translateY(3px) rotate(225deg);
}

.lang-drop:hover .lang-current,
.lang-drop:focus-within .lang-current {
    color: var(--gold-2);
}

.lang-flag {
    flex: 0 0 21px;
    display: block;
    width: 21px;
    height: 14px;
    object-fit: cover;
    border: 1px solid var(--gold);
    position: relative;
    top: -1px;
}

.lang-panel {
    position: absolute;
    top: 64px;
    left: 0;
    min-width: 100px;
    padding: 18px 0 0 0;
    background: #0a0a0a;
    /* border: 1px solid var(--line); */
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(8px);
    visibility: hidden;
    transition: .2s;
    z-index: 20;
    --frame-h: url("../img/ui/border-gold-1px.png");
    box-shadow: var(--shadow);
}

.lang-panel::after  {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    padding: 0 1px;
    pointer-events: none;
    background:
        var(--frame-h) bottom / auto 1px repeat-x;
    filter: saturate(.72);
    opacity: .96;
    image-rendering: auto;
}

.lang-drop.is-open .lang-panel {
    opacity: 1;
    transform: none;
    visibility: visible;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 0 22px 22px 22px;
    background: transparent;
    border: 0;
    font-size: 13px;
    color: #dcd4c5;
    cursor: pointer;
    text-transform: uppercase;
}

.lang-option:hover {
    color: var(--gold-2);
}

.header-actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 10px;
}

.header-actions .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    gap: 5px;
    flex-direction: column;
}

.menu-toggle span {
    width: 28px;
    height: 2px;
    background: var(--gold-2);
}

/* --- Hero Section --- */

.hero {
    position: relative;
    min-height: 100svh;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: url('../video/hero.jpg') center -20% /cover no-repeat;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center -20%;
    z-index: 0;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .5); /* затемнение видео */
    z-index: 0;
}

.hero:before {
    content: "";
    position: absolute;
    inset: 0;}

.hero:after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 220px;
    background: linear-gradient(to top, rgba(0, 0, 0, .22), transparent); /* тень под видео */
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding-top: 204px;
}

.hero-content .btn {
    min-width: 180px;
}

.hero h1 {
    max-width: 940px;
    margin: 12px auto 16px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(36px, 5.6vw, 74px);
    line-height: 1.05;
    font-weight: 400;
    /* filter: drop-shadow(0 2px 28px rgba(0, 0, 0, .5)); */
}

.hero-text {
    max-width: 820px;
    margin: 0 auto 30px;
    color: #d8d0bf;
    font-size: 18px;
    /* filter: drop-shadow(0 2px 28px rgba(0, 0, 0, .5)); */
}

.hero-actions {
    margin: 44px auto 0;
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    /* filter: drop-shadow(0 2px 28px rgba(0, 0, 0, .5)); */
}

.server-status {
    margin: 162px auto 0;
    max-width: 560px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.server-status div {
    padding: 18px;
}

.server-status div:last-child {
    border-right: 0;
}

.server-status span {
    position: relative;
    display: block;
    width: fit-content;
    margin-inline: auto;
    color: var(--muted);
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: .18em;
    padding-bottom: 4px;
    opacity: 0.85;
}

.server-status span::after {
    content: "";
    position: absolute;
    left: 0;
    right: .18em;
    bottom: 0;
    height: 1px;
    background: url("../img/ui/border-gold-1px.png") center / auto 1px no-repeat;
    filter: saturate(.72);
    opacity: .96;
}

.server-status strong {
    display: block;
    margin-top: 5px;
    font-size: 25px;
    font-weight: normal;
    letter-spacing: .05em;
    color: #f2eee3;
    opacity: 0.95;
}

.scroll-cue {
    position: absolute;
    bottom: 26px;
    left: 50%;
    z-index: 2;
    width: 28px;
    height: 48px;
    /* border: 1px solid rgba(255, 255, 255, .45); */
    /* border-radius: 30px; */
    transform: translateX(-50%);
}

.scroll-cue:after {
    content: "";
    position: absolute;
    top: 9px;
    left: 50%;
    width: 4px;
    height: 8px;
    background: var(--gold-2);
    border-radius: 4px;
    transform: translateX(-50%);
    animation: wheel 1.4s infinite;
}

/* --- Server Section --- */

.server-section {
    background:
        radial-gradient(circle at 50% 40%, rgba(215, 215, 215, .04), transparent 64%),
        url('../img/bg/bg-section.webp') center top/cover no-repeat;
}

.server-showcase {
    display: grid;
    margin-top: -10px;
    grid-template-columns: minmax(0, 746px) 390px; /* ширина карточек и картинки */
    gap: 24px; /* зазор между столбцами */
    /* gap: clamp(21.33px, 4.27vw, 64px); */
    /* gap: clamp(16px, 3.2vw, 48px); */
    align-items: center;
    justify-content: center;
}

.feature-grid {
    display: grid;
    margin-top: -50px;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.server-section .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 58px 32px; /* зазоры между ячейками */
    align-items: start;
    justify-self: end;
    width: min(100%, 746px);
}

.server-section .feature-card {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 9px; /* зазор до иконки */
    align-items: start;
    align-content: start;
}

.feature-icon {
    display: block;
    width: 64px;
    height: 64px;
    margin: 10px 0;
    /* color: rgba(215, 170, 84, .38); */
    color: var(--gold);
    background: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    pointer-events: none;
}

.server-section .feature-icon {
    grid-row: 1 / span 2;
    grid-column: 1;
    justify-self: start;
    margin: -22px 0 0;
}

.server-section .feature-card h3 {
    grid-column: 2;
    margin: 0 0 18px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 17px;
}

.server-section .feature-card p {
    grid-column: 2;
    /* color: var(--muted); */
    margin: 0;
}

.server-character {
    position: relative;
    align-self: end;
    display: flex;
    justify-content: flex-start;
    width: 390px; /* ширина картинки */
    min-height: 520px;
    pointer-events: none;
}

.server-character img {
    width: 390px; /* ширина картинки */
    max-height: 560px;
    object-fit: contain;
    object-position: center bottom;
    /* затемнение низе персонажа */
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 45%, rgba(0, 0, 0, .27) 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 45%, rgba(0, 0, 0, .27) 100%);
    filter: drop-shadow(0 34px 36px rgba(0, 0, 0, .68));
}

.server-panel {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 38px;
    margin-top: 66px;
    padding: 34px;
    background: linear-gradient(90deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, .36)), url('../img/bg/dark.webp') 20% center/cover;
    /* border: 1px solid var(--line); */
    box-shadow: var(--shadow);
}

.server-panel h3 {
    font-family: Georgia, serif;
    font-size: 34px;
    font-weight: 400;
    margin: 0 0 12px;
}

.server-panel p {
    color: #d0c6b6;
}

/* .panel-list {
    list-style: none;
    margin: 0;
    padding: 0;
    align-self: center;
}

.panel-list li {
    padding: 14px 0 14px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    position: relative;
}

.panel-list li:before {
    content: "✦";
    position: absolute;
    left: 0;
    color: var(--gold-2);
} */

/* --- News Section --- */

.news-section {
    background: linear-gradient(rgba(5, 5, 5, 0.86), rgba(5, 5, 5, 0.86)), url('../img/bg/durion.webp') center/cover fixed no-repeat;
}

.news-section .section-head {
    max-width: none;
}

.left-head {
    text-align: left;
    margin-left: 0;
}

.left-head .link-more {
    float: right;
    margin-top: -54px;
}

.link-more {
    color: var(--gold-2);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .16em;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.news-card {
    /* background: #11131a; */
    /* background: #160c0b; */
    background: linear-gradient(180deg, rgb(20, 12, 11), rgb(58, 28, 25));
    border: 1px solid rgba(215, 170, 84, .23);
    overflow: hidden;
    box-shadow: var(--shadow);
    min-height: 380px;
}

.news-card img {
    height: 172px;
    width: 100%;
    object-fit: cover;
    filter: saturate(.85) contrast(1.05);
    transition: .35s;
}

.news-card:hover img {
    transform: scale(1.05);
    filter: saturate(1.1);
}

.news-body {
    padding: 22px;
}

.news-body time {
    color: var(--gold-2);
    font-size: 12px;
    letter-spacing: .2em;
}

.news-body h3 {
    margin: 12px 0 8px;
    font-family: Georgia, serif;
    font-size: 23px;
    font-weight: 400;
}

.news-body p {
    color: var(--muted);
    margin: 0;
}

.news-body a:hover {
    color: var(--gold);
}

/* --- Game Section --- */

.game-section {
    background:
        radial-gradient(circle at 50% 40%, rgba(215, 215, 215, .04), transparent 64%),
        url('../img/bg/bg-section.webp') center top/cover no-repeat;
}

/* Плавное затемнение у краёв ограничено viewport карусели: оно перекрывает
   только боковые слайды и не затрагивает заголовок и описание секции. */
.carousel-viewport::before,
.carousel-viewport::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: clamp(60px, 12vw, 240px);
    z-index: 150;
    pointer-events: none;
}

.carousel-viewport::before {
    left: 0;
    background: linear-gradient(to right, rgba(5, 5, 5, 0.5), transparent);
}

.carousel-viewport::after {
    right: 0;
    background: linear-gradient(to left, rgba(5, 5, 5, 0.5), transparent);
}

.split-layout {
    display: grid;
    grid-template-columns: .82fr 1.18fr;
    gap: 80px;
    align-items: start;
}

/* Карусель "GAME": coverflow — активный слайд в центре крупно, соседние
   уменьшены и уходят за края экрана. Раскладка слайдов и drag-n-drop
   считаются в JS (initGameCarousel), здесь только внешний вид и переходы. */
.game-carousel {
    position: relative;
    /* Ширина центрального слайда — на неё завязаны позиции стрелок.
       Высота жёстко 16:9 (как исходные изображения). */
    --slide-w: clamp(300px, 46vw, 640px);
    --slide-h: calc(var(--slide-w) * 9 / 16);
    --view-pad: 30px;
}

/* Полотно слайдов растянуто на всю ширину окна, чтобы боковые слайды
   доходили до краёв экрана и уходили за них (выход из .container). */
.carousel-viewport {
    position: relative;
    width: 100vw;
    left: 50%;
    padding: 20px 0;
    margin-left: -50vw;
    overflow: hidden;
    touch-action: pan-y;
}

.carousel-track {
    position: relative;
    height: var(--slide-h);
    margin: 0 auto;
    /* cursor: grab; */
}

.carousel-track.is-dragging {
    cursor: grabbing;
}

.game-slide {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--slide-w);
    height: var(--slide-h);
    margin: 0;
    overflow: hidden;
    /* Тёмная подложка: если при субпиксельном масштабе на краю появляется зазор,
       он читается тёмным, а не светлой полоской. */
    background: #05060a;
    transform: translate(-50%, -50%);
    /* Позиция (transform) считается покадрово в JS (rAF), поэтому её здесь НЕ
       анимируем — иначе CSS-переход конфликтует с ручной анимацией и появляется
       рассинхрон "логика/картинка". Плавность даёт сам rAF.
       border-color НЕ анимируем: при переходе к активному слайду бордер гаснул
       до прозрачного постепенно, и по нижней грани сквозь градиент мелькала
       1px-линия. Теперь он переключается мгновенно. */
    transition: opacity .42s, box-shadow .42s;
    /* Лёгкий бордер (для неактивных; у активного заменяется золотой рамкой ::before). */
    border: 1px solid rgba(215, 170, 84, .1);
    box-shadow:
        3px 4px 6px rgba(0, 0, 0, .28),
        6px 7px 10px rgba(0, 0, 0, .16),
        0 0 0 1px rgba(41, 26, 10, .5),
        0 0 6px rgba(215, 170, 84, .01),
        inset 0 -18px 34px rgba(0, 0, 0, .28);
    will-change: transform, opacity;
    /* --frame-h: url("../img/ui/border-gold-1px.png"); */
}

/* Плавная анимация transform только в покое — для увеличения слайда при наведении.
   Во время drag и rAF-анимации класс снимается из JS, иначе покадровый transform
   "смазывается" переходом. */
.carousel-track.hover-anim .game-slide {
    transition: opacity .42s, box-shadow .42s, transform .22s ease;
}

.game-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Затемнение для неактивных слайдов. */
.game-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(5, 6, 10, .55);
    transition: opacity .42s;
}

.game-slide.is-active {
    border: 0;
}

.game-slide.is-active::after {
    opacity: 0;
}

/* Рамка активного слайда (как у блоков через --frame-h): только верхняя и
   нижняя золотые грани, по бокам вместо вертикальных линий — тень (box-shadow). */
.game-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    /* Выше подписи (.slide-caption, z-index 5), иначе её нижний градиент
       перекрывал нижнюю золотую грань рамки. Это лишь 1px линии по краям. */
    z-index: 6;
    pointer-events: none;
    /* background:
        var(--frame-h) left top / auto 1px repeat-x;
        var(--frame-h) left bottom / auto 1px repeat-x; */
    /* Тёмный ореол, чтобы золотая линия читалась поверх светлых участков фото. */
    filter: drop-shadow(0 0 1.5px rgba(0, 0, 0, .8));
    /* filter: saturate(.72); */
    opacity: 0;
    transition: opacity .42s;
    image-rendering: auto;
}

.game-slide.is-active::before {
    opacity: 1;
}

/* У активного слайда бордер убираем — его роль играет золотая рамка ::before
   (верх/низ) плюс общая тень блока. */
.game-slide.is-active {
    border-color: transparent;
}

/* Стрелки-иконки (ui/arrow-*.png). Натуральный размер 91×110 — на странице
   показываем в половину (45.5×55). */
.carousel-arrow {
    position: absolute;
    /* Чуть выше центра слайда. */
    top: calc(var(--view-pad) + var(--slide-h) / 2 - 8px);
    transform: translateY(-50%);
    width: 45.5px;
    height: 55px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    /* Выше любого слайда: активный слайд получает z-index 100, боковые 80–90
       (из JS), поэтому стрелки должны быть заведомо выше. */
    z-index: 200;
    color: var(--muted);
    transition: filter .2s ease, opacity .28s ease;
}

/* Пока карусель движется (drag или анимация перехода) — стрелки плавно скрыты. */
.game-carousel.is-moving .carousel-arrow {
    opacity: 0;
    pointer-events: none;
}

/* Перекраска иконки-стрелки через маску (как у значков классов/фич): цвет даёт
   currentColor, а PNG-стрелка работает альфа-маской. */
.carousel-arrow__icon {
    display: block;
    width: 100%;
    height: 100%;
    background: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    transition: transform .2s ease;
}

.carousel-arrow--prev .carousel-arrow__icon {
    -webkit-mask-image: url(../img/ui/arrow-prev.png);
    mask-image: url(../img/ui/arrow-prev.png);
}

.carousel-arrow--next .carousel-arrow__icon {
    -webkit-mask-image: url(../img/ui/arrow-next.png);
    mask-image: url(../img/ui/arrow-next.png);
}

.carousel-arrow:hover {
    filter: brightness(1.15) drop-shadow(0 4px 10px rgba(0, 0, 0, .5));
}

/* При наведении внутрь смещается только картинка — сама кнопка (хит-область)
   остаётся на месте, иначе курсор соскакивает с её края и hover дёргается. */
.carousel-arrow--prev:hover .carousel-arrow__icon {
    transform: translateX(4px);
}

.carousel-arrow--next:hover .carousel-arrow__icon {
    transform: translateX(-4px);
}

/* Стрелки вынесены за пределы активного слайда — по его сторонам. */
.carousel-arrow--prev {
    left: calc(50% - var(--slide-w) / 2 - 40px);
}

.carousel-arrow--next {
    right: calc(50% - var(--slide-w) / 2 - 40px);
}

/* Название/описание прямо на слайде. По умолчанию виден только заголовок;
   описание раскрывается по наведению (десктоп) или тапу (класс .is-open из JS).
   Блок прижат к низу и растёт вверх, поэтому заголовок при раскрытии уезжает выше. */
.slide-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    padding: 46px 22px 18px;
    text-align: center;
    pointer-events: none;
    /* Прозрачностью подписи (градиент + текст) управляет JS в layout(): она зависит
       от близости слайда к центру, поэтому градиент приезжает вместе со слайдом —
       без запаздывания и "светлой полоски". Здесь — значение по умолчанию. */
    opacity: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .96) 0%, rgba(0, 0, 0, .79) 52%, rgba(0, 0, 0, 0) 100%);
}

.slide-caption__title {
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 400;
    font-size: clamp(17px, 1.9vw, 23px);
    line-height: 1.15;
    color: var(--ink);
}

/* Плавное раскрытие через grid-template-rows 0fr→1fr — высота анимируется до
   реального размера текста, без "пинка" от max-height. */
/* Обёртка анимирует только высоту (0fr→1fr) — заголовок плавно уезжает вверх.
   Сам текст при этом скрыт, чтобы не было видно горизонтальной границы "выезда". */
.slide-caption__descwrap {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .34s ease;
}

.slide-caption__desc {
    min-height: 0;   /* обязательно для схлопывания grid-строки */
    overflow: hidden;
    margin: 0;
    padding-top: 10px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    /* Текст не выезжает, а проявляется. При сворачивании гаснет сразу (без delay). */
    opacity: 0;
    transition: opacity .22s ease;
}

/* Описание раскрываем только в покое (не во время движения карусели):
   на десктопе по :hover активного слайда, на тач-устройствах — по тапу (.is-open).
   Гейтим только по .is-moving (реальное движение), НЕ по .is-dragging — иначе
   обычный клик (pointerdown вешает is-dragging) сворачивал бы и заново
   проигрывал уже показанное описание. */
.game-carousel:not(.is-moving) .game-slide.is-active:hover .slide-caption__descwrap,
.game-slide.is-open .slide-caption__descwrap {
    grid-template-rows: 1fr;
}

/* Текст появляется уже после того, как блок полностью раскрылся (задержка ≈ высоте). */
.game-carousel:not(.is-moving) .game-slide.is-active:hover .slide-caption__desc,
.game-slide.is-open .slide-caption__desc {
    opacity: 1;
    transition-delay: .3s;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.carousel-dots button {
    width: 34px;
    height: 18px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.carousel-dots button:before {
    content: "";
    display: block;
    width: 100%;
    height: 3px;
    background: rgba(215, 206, 189, .38);
    transition: .25s;
}

.carousel-dots button.active:before,
.carousel-dots button:hover:before {
    background: var(--gold-2);
}

/* --- Races Section --- */

.races-section {
    background: linear-gradient(rgba(5, 5, 5, 0.86), rgba(5, 5, 5, 0.86)), url('../img/bg/durion.webp') center/cover fixed no-repeat;
}

.race-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.race-card {
    position: relative;
    min-height: 340px;
    overflow: hidden;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* фоновой градиент #201B16 */
    background:
        linear-gradient(180deg, rgba(27, 26, 23, 0.5), rgba(5, 5, 5, .6)),
        url("../img/bg/bg-paper.webp") 20% 30%/827px no-repeat;
    box-shadow: var(--shadow);
}

/* засветка на фоне + затемнение поверх картинки */
.race-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, transparent 22%, rgba(5, 5, 5, .65) 78%),
        radial-gradient(circle at 72% 22%, rgba(170, 161, 143, 0.16), transparent 35%);
    pointer-events: none;
}

.race-card img {
    position: absolute;
    z-index: 0;
    width: 420px;
    bottom: 8px;
    max-width: none;
    transition: transform .28s ease, filter .28s ease;
    filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .68)) saturate(.92);
}

.race-card div {
    position: relative;
    z-index: 2;
}

.race-card h3 {
    font-family: Georgia, serif;
    letter-spacing: .09em;
    font-size: 25px;
    font-weight: 400;
    margin: 0 0 10px;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .65);
}

.race-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.race-icon {
    position: absolute;
    z-index: 2;
    top: 16px;
    left: 16px;
    width: 70px;
    height: 70px;
    color: #cec2ab;
    background: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    pointer-events: none;
    opacity: 0.82;
}

.race-card--human {
    grid-column: span 2;
}

.race-card--human img {
    right: 20px;
    bottom: -20px;
    width: 540px;
}

.race-card--castanic img {
    right: -77px;
    bottom: -6px;
    width: 400px;
}

.race-card--helf img {
    right: -80px;
    bottom: -6px;
    width: 420px;
}

.race-card--aman img {
    right: -85px;
    bottom: -7px;
    width: 420px;
}

.race-card--elin img {
    right: -62px;
    width: 360px;
}

.race-card--baraka img {
    right: -60px;
    bottom: -2px;
    width: 390px;
}

.race-card--popori img {
    right: -52px;
    width: 365px;
}

/* --- Classes Section --- */

.classes-section {
    background:
        /* radial-gradient(circle at 18% 18%, rgba(215, 215, 215, .03), transparent 64%), */
        url('../img/bg/bg-section.webp') center top/cover no-repeat;
}

.classes-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 84px;
    align-items: end;
    margin-bottom: 44px;
}

.classes-top .section-head {
    margin-bottom: 0;
}

.classes-top .section-head h2:before,
.classes-top .section-head h2:after {
    display: none;
}

.role-filter {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    flex-wrap: wrap;
    margin: 0 0 -36px;
    z-index: 2;
}

.role-filter button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 42px;
    border: 0;
    background: none;
    color: #cec2ab;
    padding: 0 6px;
    cursor: pointer;
    /* text-transform: uppercase; */
    letter-spacing: .12em;
    font-size: 14px;
    transition: .2s;
    line-height: 1;
}

.role-filter button[data-role="tank"]::before,
.role-filter button[data-role="dps"]::before,
.role-filter button[data-role="heal"]::before {
    content: "";
    width: 1.7em;
    height: 1.7em;
    flex: none;
    background: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.role-filter button[data-role="tank"]::before {
    -webkit-mask-image: url(../img/roles/tank.webp);
    mask-image: url(../img/roles/tank.webp);
}

.role-filter button[data-role="dps"]::before {
    -webkit-mask-image: url(../img/roles/dps.webp);
    mask-image: url(../img/roles/dps.webp);
}

.role-filter button[data-role="heal"]::before {
    -webkit-mask-image: url(../img/roles/support.webp);
    mask-image: url(../img/roles/support.webp);
}

.role-filter button:hover {
    color: #f7f2e9;
}

.role-filter button.active {
    color: var(--gold);
}

.role-filter button.active .rf-label {
    position: relative;
}

.role-filter button.active .rf-label::after {
    content: "";
    position: absolute;
    left: 1px;
    right: .12em;
    bottom: -6px;
    height: 1px;
    background: var(--gold);
    opacity: .77;
}

.classes-layout {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 50px;
    min-height: 650px;
    margin-bottom: 44px;
}

.class-list {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(2, auto);
    column-gap: 6px;
    row-gap: 6px;
    align-content: start;
}

.class-button {
    position: relative;
    min-width: 88px;
    padding: 12px 4px;
    border: 0;
    background: none;
    color: #cec2ab;
    cursor: pointer;
    text-align: center;
    transition: .2s;
}

.class-button .class-icon {
    display: block;
    height: 48px;
    margin: 0 auto -2px;
    background: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    transition: .2s;
}

.class-button span:not(.class-icon) {
    position: relative;
    display: inline-block;
    transform: scaleX(.9);
    font-size: 13px;
    font-family: Georgia, 'Times New Roman', serif;
    letter-spacing: .08em;
    transition: .2s;
}

.class-button:hover {
    color: #f7f2e9;
}

.class-button.active {
    color: var(--gold);
}

.class-button.is-hidden {
    display: none;
}

.class-stage {
    position: relative;
    z-index: 1;
    min-height: 666px;
    overflow: visible;
}

.class-hero-wrap {
    position: absolute;
    left: -73%; /* позиция перса от левого края */
    right: 4%;
    top: 0;
    bottom: -34px;
    z-index: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
}

.class-hero {
    width: auto;
    max-width: none;
    height: 110%;
    transform: translateX(var(--hero-shift-x, 0%));
    filter: drop-shadow(0 40px 42px rgba(0, 0, 0, .7)) saturate(.95);
    transition: .25s ease;
    -webkit-mask-image:
        linear-gradient(to right, transparent 16%, rgba(0, 0, 0, .4) 38%, #000 54%, #000 74%, rgba(0, 0, 0, .45) 88%, transparent 100%),
        linear-gradient(to top, transparent 0%, rgba(0, 0, 0, .5) 9%, #000 25%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(to right, transparent 16%, rgba(0, 0, 0, .4) 38%, #000 54%, #000 74%, rgba(0, 0, 0, .45) 88%, transparent 100%),
        linear-gradient(to top, transparent 0%, rgba(0, 0, 0, .5) 9%, #000 25%);
    mask-composite: intersect;
}

.class-hero--icon {
    width: 230px;
    max-width: 42%;
    height: auto;
    margin-bottom: 180px;
    filter: drop-shadow(0 0 26px rgba(215, 170, 84, .35)) drop-shadow(0 26px 28px rgba(0, 0, 0, .72));
}

/* Появление персонажа при переключении класса: fade-in + лёгкий выезд справа налево. */
@keyframes classHeroEnter {
    from {
        opacity: 0;
        transform: translateX(calc(var(--hero-shift-x, 0%) + 56px));
    }
    to {
        opacity: 1;
        transform: translateX(var(--hero-shift-x, 0%));
    }
}

.class-hero--enter {
    animation: classHeroEnter .55s cubic-bezier(.22, .61, .36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
    .class-hero--enter {
        animation: none;
    }
}

.class-info {
    position: absolute;
    right: 0;
    top: 12px;
    width: 30%; /* ширина инфо о классе */
    z-index: 2;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.class-info__role {
    color: var(--gold-2);
    font-size: 12px;
    letter-spacing: .26em;
    text-transform: uppercase;
}

.class-info__name {
    font-family: Georgia, serif;
    font-weight: 400;
    margin: 14px 0 16px;
    font-size: 48px;
    line-height: 1;
    text-shadow: 0 0 24px rgba(215, 170, 84, .16);
}

.class-info__desc {
    margin: 0 0 28px;
    color: #d0c6b6;
    font-size: 16px;
    line-height: 1.7;
}

.class-bars {
    display: grid;
    gap: 12px;
    margin-bottom: 30px;
}

.class-stat {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 14px;
    align-items: center;
}

.class-stat span {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.class-stat i {
    display: block;
    height: 8px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(215, 170, 84, .18);
    position: relative;
    overflow: hidden;
}

.class-stat i:after {
    content: "";
    display: block;
    height: 100%;
    width: var(--value);
    background: linear-gradient(90deg, var(--blue), var(--blue));
    box-shadow: 0 0 14px rgba(215, 170, 84, .42);
}

.class-skills h4 {
    margin: 0 0 14px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--muted);
}

.class-skills__list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.class-skill {
    width: 56px;
    height: 56px;
    border: 0;
    padding: 0;
    background: none;
    color: inherit;
    cursor: help;
}

.class-skill img {
    display: block;
    width: 56px;
    height: 56px;
    border: 1px solid rgba(215, 170, 84, .4);
    background: rgba(0, 0, 0, .72);
    padding: 4px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.class-skill:hover img,
.class-skill:focus-visible img,
.class-skill[aria-expanded="true"] img {
    border-color: rgba(205, 175, 112, .95);
    /* box-shadow: 0 0 18px rgba(215, 170, 84, .28); */
}

.skill-tooltip {
    position: fixed;
    z-index: 900;
    width: min(320px, calc(100vw - 28px));
    padding: 14px 16px 15px;
    border: 1px solid rgba(215, 170, 84, .4);
    background: rgb(7, 8, 12);
    box-shadow: 0 18px 46px rgba(0, 0, 0, .5), 0 0 24px rgba(215, 170, 84, .12);
    color: #f4ead8;
    opacity: 0;
    pointer-events: auto;
    transform: translateY(8px) scale(.97);
    transform-origin: center bottom;
    transition: opacity .26s ease, transform .26s cubic-bezier(.2, .78, .22, 1);
    will-change: opacity, transform;
}

.skill-tooltip[hidden] {
    display: none;
}

.skill-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.skill-tooltip.is-below {
    transform-origin: center top;
}

.skill-tooltip.is-below:not(.is-visible) {
    transform: translateY(-8px) scale(.97);
}

.skill-tooltip:after {
    content: "";
    position: absolute;
    left: var(--arrow-left, 50%);
    bottom: -6px;
    width: 11px;
    height: 11px;
    border-right: 1px solid rgba(215, 170, 84, .4);
    border-bottom: 1px solid rgba(215, 170, 84, .4);
    background: rgb(7, 8, 12);
    transform: translateX(-50%) rotate(45deg);
}

.skill-tooltip.is-below:after {
    top: -6px;
    bottom: auto;
    border: 0;
    border-left: 1px solid rgba(215, 170, 84, .4);
    border-top: 1px solid rgba(215, 170, 84, .4);
}

.skill-tooltip__title {
    display: block;
    margin-bottom: 7px;
    color: var(--gold-2);
    font-family: Georgia, serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.2;
}

.skill-tooltip__desc {
    display: block;
    color: #d8cfc0;
    font-size: 14px;
    line-height: 1.55;
}

/* --- Start Section --- */

.start-section {
    /* background: linear-gradient(rgba(8, 9, 13, .56), rgba(8, 9, 13, .96)), url('../img/bg/footer.webp') center top 90%/cover no-repeat; */
    /* background: */
        /* radial-gradient(circle at 50% 40%, rgba(209, 177, 117, .12), transparent 64%), */
        /* linear-gradient(180deg, rgba(10, 12, 18, 0.3), rgba(8, 9, 13, .2)), */
        /* url('../img/bg/bg-stone.webp') center top/cover no-repeat; */

    background: linear-gradient(rgba(5, 5, 5, 0.86), rgba(5, 5, 5, 0.86)), url('../img/bg/durion.webp') center/cover fixed no-repeat;

    /* #e2c07e */
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 280px));
    justify-content: center;
    gap: 18px;
}

.steps article {
    padding: 30px 24px;
    min-height: 250px;
    background: linear-gradient(180deg, rgb(17, 19, 26), rgb(6, 7, 10));
    box-shadow: var(--shadow);
}

.steps span {
    font-family: Georgia, serif;
    font-size: 54px;
    color: rgba(215, 170, 84, .45);
}

.steps h3 {
    font-family: Georgia, serif;
    font-weight: 400;
    font-size: 25px;
    margin: 18px 0 8px;
}

.steps p {
    color: var(--muted);
    margin: 0;
}

.start-section .actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 50px;
}

/* --- Community Section --- */

.community-section {
    background: linear-gradient(rgba(7, 8, 11, .74), rgba(7, 8, 11, .9)), url('../img/bg/footer.webp') center/cover fixed no-repeat;
}

.community-panel {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 40px;
    align-items: center;
    padding: 42px;
    /* border: 1px solid var(--line); */
    background: rgba(0, 0, 0, .58);
    box-shadow: var(--shadow);
}

.community-panel h2 {
    font-family: Georgia, serif;
    font-weight: 400;
    font-size: 44px;
    line-height: 1.1;
    margin: 0 0 14px;
}

.community-panel p {
    color: var(--muted);
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.social-card {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 24px;
    background: linear-gradient(180deg, rgba(22, 25, 33, .88), rgba(8, 9, 13, .88));
    border: 1px solid rgba(215, 170, 84, .24);
}

.social-card .social-icon {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
}

.social-card .social-text {
    display: block;
}

.social-card:hover {
    /* border-color: var(--gold-2); */
    transform: translateY(-2px);
}

.social-card strong {
    display: block;
    font-family: Georgia, serif;
    font-size: 25px;
    color: #fff;
}

.social-card span {
    color: var(--muted);
}

/* --- Footer --- */

.site-footer {
    position: relative;
    background: #030407;
    padding: 56px 0;
    text-align: center;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-inner > div:first-child {
    display: contents;
}

.footer-brand {
    order: 1;
    justify-content: center;
    margin-bottom: 22px;
    opacity: 0.95;
}

.footer-brand img {
    width: 100px;
}

.footer-brand span {
    font-size: 14px;
}

.footer-links {
    order: 2;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}

.footer-links a {
    position: relative;
    padding: 0 18px;
    color: var(--muted);
    font-size: 13px;
}

.footer-links a::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    width: 1px;
    height: 10px;
    background: rgba(255, 255, 255, .18);
    transform: translateY(-50%);
}

.footer-links a:last-child::after {
    display: none;
}

.footer-links a:hover {
    color: var(--muted);
}

.footer-brand + p {
    order: 3;
    margin: 18px 0 0;
    color: var(--ink-2);
    font-size: 13px;
}

.disclaimer {
    order: 4;
    max-width: 760px;
    margin: 14px auto 0;
    color: var(--ink-2);
    font-size: 12px;
    line-height: 1.5;
}

/* --- Pages --- */

.page-hero {
    min-height: 420px;
    display: grid;
    place-items: end start;
    padding: 130px 0 70px;
    background: linear-gradient(rgba(0, 0, 0, .44), rgba(0, 0, 0, .82)), url('../img/bg/dark.webp') center/cover no-repeat;
}

.page-hero h1 {
    font-family: Georgia, serif;
    font-size: clamp(42px, 6vw, 72px);
    font-weight: 400;
    margin: 0;
}

/* --- Placeholders --- */

.placeholder-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.placeholder-card {
    padding: 28px;
    background: linear-gradient(180deg, rgba(17, 19, 26, .94), rgba(7, 8, 11, .96));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.placeholder-card h3 {
    font-family: Georgia, serif;
    font-size: 26px;
    font-weight: 400;
    margin: 0 0 10px;
}

.placeholder-card p {
    color: var(--muted);
}

/* --- Borders --- */

.server-panel,
.news-card,
.race-card,
.steps article,
.community-panel,
.placeholder-card {
    position: relative;
    border: 0;
    --frame-h: url("../img/ui/border-gold-1px.png");
    box-shadow:
        3px 4px 6px rgba(0, 0, 0, .28),
        6px 7px 10px rgba(0, 0, 0, .16),
        0 0 0 1px rgba(41, 26, 10, .5),
        0 0 6px rgba(215, 170, 84, .01),
        inset 0 -18px 34px rgba(0, 0, 0, .28);
}

.server-panel::after,
.news-card::after,
.race-card::after,
.steps article::after,
.community-panel::after,
.placeholder-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    padding: 0 1px;
    pointer-events: none;
    background:
        var(--frame-h) top / auto 1px repeat-x,
        var(--frame-h) bottom / auto 1px repeat-x;
    filter: saturate(.72);
    opacity: .96;
    image-rendering: auto;
}

/* --- Override --- */

/* Инфо-блок класса позиционируется абсолютно поверх крупного персонажа,
   при этом использует общую золотую рамку (../frame выше). */
.class-info {
    position: absolute;
    z-index: 2;
}

.site-header::after,
.site-footer::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    z-index: 3;
    pointer-events: none;
    background: url("../img/ui/border-gold-1px.png") left center / auto 1px repeat-x;
    filter: saturate(.72);
    opacity: .56;
    image-rendering: auto;
}

.site-header::after {
    bottom: 0;
}

.site-footer::before {
    top: 0;
}

.animate-fade {
    animation: fadeUp .9s ease both;
}

/* --- Adaptation --- */

@keyframes wheel {
    to {
        top: 25px;
        opacity: 0;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media(max-width:1280px) and (min-width:1121px) {
    .header-inner {
        gap: 16px;
        width: min(1320px, calc(100% - 24px));
    }

    .brand-logo {
        width: 112px;
    }

    .main-nav {
        gap: 0;
        margin-left: 0;
    }

    .main-nav>a,
    .nav-drop>button {
        padding-inline: 10px;
        font-size: 12px;
        letter-spacing: .07em;
    }

    .main-nav>a::before,
    .nav-drop>button::before {
        left: 10px;
        right: 10px;
    }

    .nav-drop>button::before {
        right: 26px;
    }

    .header-actions {
        gap: 8px;
    }

    .header-actions .btn-small {
        padding-inline: 14px;
    }

    .lang-drop {
        margin-left: 6px;
    }
}

@media(max-width:1120px) {
    .main-nav {
        position: fixed;
        top: 78px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        background: rgba(3, 4, 7, .98);
        padding: 14px 22px;
        border-bottom: 1px solid var(--line);
    }

    .main-nav.open,
    .main-nav.open-static {
        display: flex;
    }

    .main-nav>a,
    .nav-drop>button {
        height: auto;
        padding: 13px 8px;
    }

    .main-nav>a::before,
    .nav-drop>button::before,
    .lang-current::before {
        display: none;
    }

    .drop-panel {
        position: static;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }

    .nav-drop.is-open .drop-panel {
        display: block;
    }

    .menu-toggle {
        display: flex;
        margin-left: auto;
    }

    .header-inner {
        gap: 12px;
    }

    .header-actions {
        margin-left: 0;
    }

    .btn-small {
        padding: 0 12px;
    }

    .feature-grid,
    .news-grid,
    .steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .classes-layout,
    .split-layout,
    .community-panel,
    .server-panel {
        grid-template-columns: 1fr;
    }

    .placeholder-grid {
        grid-template-columns: 1fr 1fr;
    }

    .server-showcase {
        margin-top: 0;
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .server-section .feature-grid {
        margin-top: 0;
        justify-self: center;
        width: min(100%, 900px);
    }

    .server-character {
        display: none;
    }
}

@media(max-width:720px) {
    .container {
        width: min(100% - 26px, var(--max));
    }

    .header-inner {
        width: min(1320px, calc(100% - 24px));
        gap: 10px;
    }

    .header-actions .btn-ghost {
        display: none;
    }

    .header-actions {
        flex: 0 0 auto;
        gap: 8px;
        min-width: 0;
    }

    .header-actions .btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .header-actions .btn-gold {
        min-width: 58px;
        padding-inline: 12px;
    }

    .header-actions .btn-red {
        min-width: 80px;
        padding-inline: 10px;
    }

    /* на смартфоне селектор языка сворачивается до одного флага */
    .lang-drop {
        flex: 0 0 auto;
        margin-left: 0;
    }

    .lang-current {
        flex: 0 0 auto;
        padding: 0 4px;
    }

    .lang-current .lang-code,
    .lang-current::after {
        display: none;
    }

    .lang-current .lang-flag {
        flex: 0 0 21px;
        margin-right: 0;
    }

    /* панель открывается от правого края, чтобы не выходить за экран */
    .lang-panel {
        left: auto;
        right: 0;
    }

    .brand-logo {
        width: 96px;
    }

    .brand-life {
        font-size: 13px;
        padding-left: 8px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero-text {
        font-size: 16px;
    }

    .hero-content {
        padding-top: 100px;
    }

    .hero-actions {
        margin-top: 32px;
    }

    .server-status {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        margin-top: 110px;
        max-width: 100%;
    }

    .server-status div {
        padding: 12px 4px;
        border-right: 0;
        /* border-bottom: 1px solid rgba(215, 170, 84, .2); */
    }

    .server-status span {
        font-size: 12px;
        letter-spacing: .1em;
    }

    .server-status strong {
        font-size: 20px;
        white-space: nowrap;
    }

    .section {
        padding: 74px 0;
    }

    .ornate h2:before,
    .ornate h2:after {
        display: none;
    }

    .feature-grid,
    .news-grid,
    .steps,
    .social-grid,
    .placeholder-grid {
        grid-template-columns: 1fr;
    }

    .server-showcase {
        margin-top: 0;
        grid-template-columns: 1fr;
        gap: 38px;
    }

    .server-section .feature-grid {
        margin-top: 0;
        grid-template-columns: 1fr;
        justify-self: stretch;
        width: 100%;
    }

    .server-section .feature-card {
        grid-template-columns: 58px minmax(0, 1fr);
        column-gap: 6px;
    }

    .server-section .feature-icon {
        width: 50px;
        height: 50px;
        margin-top: -16px;
    }

    .server-character {
        display: flex;
        min-height: 0;
        justify-content: center;
        width: 100%;
    }

    .server-character img {
        width: min(82vw, 360px);
        max-height: 440px;
    }

    .race-row {
        grid-template-columns: 1fr;
        min-height: unset;
    }

    .race-row img {
        height: 260px;
    }

    .race-row div {
        padding: 22px;
    }

    .class-icons {
        grid-template-columns: repeat(3, 1fr);
    }

    .stat {
        grid-template-columns: 1fr;
    }

    .life-mark {
        font-size: 30px;
    }

    .game-carousel {
        /* Чуть больше высоты для развёрнутых описаний на узких экранах. */
        --slide-w: clamp(240px, 82vw, 460px);
        --slide-h: calc(var(--slide-w) * .7);
        --view-pad: 20px;
    }

    .slide-caption {
        padding: 38px 16px 14px;
    }

    .slide-caption__title {
        font-size: clamp(15px, 5vw, 19px);
    }

    .slide-caption__desc {
        padding-top: 7px;
        font-size: clamp(11px, 3.25vw, 13px);
        line-height: 1.35;
    }

    /* На мобильных стрелки не показываем — листаем свайпом/тапом по слайду. */
    .carousel-arrow {
        display: none;
    }

    .carousel-dots {
        margin-top: 14px;
    }

    .carousel-dots button {
        width: 28px;
    }
}

@media(max-width:1120px) {
    .race-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .race-card--human {
        grid-column: span 2;
    }

    .classes-layout {
        grid-template-columns: max-content 1fr;
    }

    .class-list {
        grid-template-columns: repeat(2, auto)
    }

    .class-info {
        width: 52%;
        padding: 52px 34px;
    }

    .class-info__name {
        font-size: 42px;
    }
}

@media(max-width:900px) {
    .classes-top {
        grid-template-columns: 1fr;
        row-gap: 12px;
        align-items: start;
        margin-bottom: 24px;
    }

    .role-filter {
        width: 100%;
        justify-content: center;
        gap: 12px;
        flex-wrap: nowrap;
        margin: 0;
    }

    .classes-layout {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .class-list {
        grid-template-columns: repeat(4, 1fr);
    }

}

@media(max-width:1120px) {
    .class-stage {
        --class-hero-height: min(404px, calc(93.1vw - 24px));
        min-height: 0;
        padding-top: calc(var(--class-hero-height) + 20px);
        overflow: hidden;
    }

    .class-hero-wrap {
        left: 0;
        right: 0;
        top: 20px;
        bottom: auto;
        width: 100%;
        height: var(--class-hero-height);
    }

    .class-hero {
        --hero-shift-x: var(--hero-content-shift, 0%);
        width: 650px;
        max-width: 150%;
        height: auto;
        -webkit-mask-image: linear-gradient(to top, transparent 0%, rgba(0, 0, 0, .5) 9%, #000 25%);
        mask-image: linear-gradient(to top, transparent 0%, rgba(0, 0, 0, .5) 9%, #000 25%);
    }

    .class-hero--icon {
        width: 190px;
        max-width: 45%;
        margin-bottom: 70px;
    }

    .class-info {
        position: relative;
        width: auto;
        padding: 30px 22px;
        background: linear-gradient(180deg, rgba(8, 9, 13, .06), rgba(8, 9, 13, .98) 14%, rgba(8, 9, 13, .99));
    }

    .class-info__name {
        font-size: 36px;
    }

    .class-stat {
        grid-template-columns: 96px 1fr;
    }
}

@media(max-width:720px) {
    .race-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .race-card,
    .race-card--human {
        grid-column: span 1;
    }

    .race-card img,
    .race-card--human img {
        right: -92px;
        bottom: 62px;
        width: 360px;
    }

    .class-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media(max-width:520px) {
    .race-grid {
        grid-template-columns: 1fr;
    }

    .race-card {
        min-height: 320px;
    }

    .race-card img,
    .race-card--human img {
        right: -70px;
        width: 330px;
    }

    .class-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .role-filter {
        gap: clamp(8px, 2.5vw, 14px);
    }

    .role-filter button {
        gap: 2px;
        padding: 0 1px;
        font-size: clamp(12px, 3.6vw, 14px);
        letter-spacing: .08em;
    }

    .role-filter button[data-role="tank"]::before,
    .role-filter button[data-role="dps"]::before,
    .role-filter button[data-role="heal"]::before {
        width: 1.5em;
        height: 1.5em;
    }
}

/* --- Races cards: equal portrait row with an expanding caption --- */
.race-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: clamp(4px, .84vw, 12px);
    width: 100%;
    overflow: visible;
}

.race-card,
.race-card--human {
    position: relative;
    grid-column: auto;
    display: block;
    height: auto;
    aspect-ratio: 158 / 430;
    min-width: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    isolation: isolate;
    outline: none;
    scroll-snap-align: none;
    background:
        radial-gradient(circle at 50% 22%, rgba(170, 161, 143, .16), transparent 38%),
        linear-gradient(180deg, rgba(27, 26, 23, .5), rgba(5, 5, 5, .72)),
        url("../img/bg/bg-paper.webp") 20% 30%/827px no-repeat;
    /* border: 1px solid rgba(207, 176, 113, .2); */
    box-shadow: 0 16px 38px rgba(0, 0, 0, .44);
    transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease;
}

.race-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, .08), transparent 46%, rgba(0, 0, 0, .28)),
        linear-gradient(90deg, rgba(0, 0, 0, .18), transparent 36%, transparent 64%, rgba(0, 0, 0, .18));
}

.race-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    box-shadow: inset 0 0 34px rgba(0, 0, 0, .32);
}

.race-card img,
.race-card--human img {
    position: absolute;
    z-index: 0;
    right: -55px;
    bottom: 0;
    width: auto;
    height: 100%;
    max-width: none;
    transition: transform .28s ease, filter .28s ease;
    filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .68)) saturate(.92);
}

.race-card:hover {
    border-color: rgba(255, 224, 160, .56);
    box-shadow: 0 22px 48px rgba(0, 0, 0, .56), 0 0 22px rgba(207, 176, 113, .08);
    transform: translateY(-4px);
}

.race-card:hover img {
    transform: scale(1.025);
    filter: drop-shadow(0 22px 34px rgba(0, 0, 0, .72)) saturate(1.04);
}

.race-card .race-caption {
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    bottom: 0;
    padding: clamp(36px, 5.14vw, 74px) clamp(5px, .84vw, 12px) clamp(8px, 1.25vw, 18px);
    text-align: center;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0, 0, 0, .97) 0%, rgba(0, 0, 0, .84) 54%, rgba(0, 0, 0, 0) 100%);
}

.race-caption h3 {
    margin: clamp(3px, .48vw, 7px) 0 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(10px, 1.4vw, 20px);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: .045em;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .65);
}

.race-card .race-caption__descwrap {
    position: relative;
    z-index: auto;
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .34s ease;
}

.race-caption p {
    min-height: 0;
    overflow: hidden;
    margin: 0;
    padding-top: clamp(4px, .7vw, 10px);
    color: var(--muted);
    font-size: clamp(7px, .87vw, 12.5px);
    line-height: 1.42;
    opacity: 0;
    transition: opacity .2s ease;
}

.race-card:hover .race-caption__descwrap {
    grid-template-rows: 1fr;
}

.race-card:hover .race-caption p {
    opacity: 1;
    transition-delay: .27s;
}

.race-card .race-icon {
    position: static;
    display: block;
    width: clamp(28px, 3.61vw, 52px);
    height: clamp(28px, 3.61vw, 52px);
    margin: 0 auto;
    color: transparent;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    opacity: .9;
    filter: drop-shadow(0 3px 12px rgba(0, 0, 0, .7));
}

.race-card--human img {
    right: -104.5%;
}

.race-card--castanic img {
    right: -119%;
}

.race-card--helf img,
.race-card--aman img {
    right: -112.7%;
}

.race-card--elin img,
.race-card--popori img {
    right: -115.2%;
}

.race-card--baraka img {
    right: -107.6%;
}

@media(hover: none) and (pointer: coarse) {
    .race-card:focus {
        border-color: rgba(255, 224, 160, .56);
        box-shadow: 0 22px 48px rgba(0, 0, 0, .56), 0 0 22px rgba(207, 176, 113, .08);
        transform: translateY(-4px);
    }

    .race-card:focus img {
        transform: scale(1.025);
        filter: drop-shadow(0 22px 34px rgba(0, 0, 0, .72)) saturate(1.04);
    }

    .race-card:focus .race-caption__descwrap {
        grid-template-rows: 1fr;
    }

    .race-card:focus .race-caption p {
        opacity: 1;
        transition-delay: .27s;
    }
}

@media(max-width:720px) {
    .race-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0;
        overflow: visible;
    }

    .race-card,
    .race-card--human {
        width: 100%;
        height: clamp(165px, 28vw, 210px);
        aspect-ratio: auto;
    }

    .race-card img,
    .race-card--human img,
    .race-card--castanic img,
    .race-card--helf img,
    .race-card--aman img,
    .race-card--elin img,
    .race-card--popori img,
    .race-card--baraka img {
        right: -3%;
        bottom: -8%;
        height: 135%;
    }

    .race-card::before {
        background:
            linear-gradient(90deg, rgba(0, 0, 0, .08), transparent 48%, rgba(0, 0, 0, .24)),
            linear-gradient(180deg, rgba(0, 0, 0, .08), transparent 58%, rgba(0, 0, 0, .22));
    }

    .race-card .race-caption {
        top: 0;
        right: auto;
        bottom: 0;
        display: grid;
        grid-template-columns: clamp(76px, 24vw, 108px) minmax(0, 1fr);
        grid-template-rows: 1fr;
        align-content: center;
        width: clamp(225px, 60%, 420px);
        padding: 16px 8px 14px 14px;
        text-align: center;
        background: linear-gradient(90deg, rgba(0, 0, 0, .97) 0%, rgba(0, 0, 0, .88) 58%, rgba(0, 0, 0, 0) 100%);
    }

    .race-card .race-caption__identity {
        grid-column: 1;
        grid-row: 1;
        align-self: center;
    }

    .race-card .race-icon {
        width: 46px;
        height: 46px;
    }

    .race-caption h3 {
        margin: 7px 0 0;
        font-size: 18px;
    }

    .race-card .race-caption__descwrap {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
        grid-template-columns: 0fr;
        grid-template-rows: none;
        transition: grid-template-columns .34s ease;
    }

    .race-caption p {
        min-width: 0;
        padding: 0 6px;
        text-align: center;
        font-size: clamp(12px, 2vw, 14px);
        line-height: 1.4;
    }

    .race-card:hover .race-caption__descwrap {
        grid-template-columns: 1fr;
        grid-template-rows: none;
    }
}

@media(max-width:720px) and (hover: none) and (pointer: coarse) {
    .race-card:focus .race-caption__descwrap {
        grid-template-columns: 1fr;
        grid-template-rows: none;
    }
}

@media(prefers-reduced-motion: reduce) {
    .race-card,
    .race-card img,
    .race-caption__descwrap,
    .race-caption p {
        transition: none;
    }
}
