/* Новые компоненты сайта (docs/site-redesign-plan.md §4–7): главная, лендинг ЗБТ, внутренние страницы.
   Цвета и размеры — только через токены из tokens.css. */

/* ---- общее ---- */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--gold); color: #1c1408; border-radius: var(--r-field); font-weight: 700; transition: top .15s; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.gap-lg { gap: 24px; }
.card-h2 { font-size: 2.2rem; margin: 14px 0 22px; }
.center-row { justify-content: center; margin-top: 36px; }
.ui-icon { flex: none; }
.ph { background: radial-gradient(120% 90% at 30% 20%, #3a2a18 0%, var(--panel-2) 45%, var(--bg) 100%); }
.ph::after { content: ''; display: block; width: 100%; height: 100%; opacity: .35; background: repeating-linear-gradient(45deg, transparent 0 14px, rgba(226, 179, 87, .08) 14px 15px); }
.section, .web-section { padding-block: var(--section-y); }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }

/* ---- плашка набора ---- */
.recruit-banner { position: relative; z-index: 60; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 9px 44px 9px 16px; background: linear-gradient(90deg, var(--crimson), #7a2415); font-size: .88rem; text-align: center; }
.recruit-banner a { color: #fff3e0; }
.recruit-banner b { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.recruit-banner-x { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; display: grid; place-items: center; background: transparent; border: 0; color: #fff3e0; cursor: pointer; border-radius: 50%; }
.recruit-banner-x:hover { background: rgba(0, 0, 0, .25); }
.recruit-banner.hidden { display: none; }

/* ---- hero ---- */
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; margin: 30px 0 0; padding: 0; color: var(--ink-2); font-size: .92rem; }
.hero-facts li { display: flex; align-items: center; gap: 22px; max-width: 100%; }
.hero-facts li + li::before { content: ''; width: 5px; height: 5px; transform: rotate(45deg); background: var(--gold-d); }
.has-hero .hero::before { background: linear-gradient(90deg, #0c090ef0 0%, #0c090ec4 32%, #0c090e40 64%, #0c090e22 100%), linear-gradient(180deg, #0c090e99 0%, transparent 22%, transparent 66%, var(--bg) 100%); }

/* ---- заголовок раздела ---- */
.section-title { text-align: center; margin-bottom: 44px; }
.section-title h2 { font-size: clamp(2rem, 4vw, 3.2rem); }

/* ---- три опоры ---- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pillar { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line-2); border-radius: var(--r-card); background: var(--panel); transition: transform .3s, border-color .3s; }
.pillar:hover { transform: translateY(-4px); border-color: rgba(226, 179, 87, .4); }
.pillar-art { aspect-ratio: 3 / 2; overflow: hidden; background: var(--panel-2); }
.pillar-art img, .pillar-art .ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.pillar-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pillar-body h3 { font-size: 1.6rem; margin: 4px 0 0; }
.pillar-body p { color: var(--ink-2); margin: 0; }
.pillar-link { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 6px; color: var(--gold-l); font-weight: 700; font-size: .92rem; }

/* ---- сражения ---- */
.battle-split { display: grid; grid-template-columns: 5fr 7fr; gap: 36px; align-items: center; margin-bottom: 36px; }
.theses { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.theses li { display: flex; gap: 16px; align-items: flex-start; color: var(--gold); }
.theses b { display: block; color: var(--ink); font-size: 1.1rem; margin-bottom: 2px; }
.theses span { color: var(--ink-2); }
.battle-media, .battle-video { border: 1px solid var(--line-2); border-radius: var(--r-card); overflow: hidden; background: var(--panel); box-shadow: 0 20px 60px -20px #000; }
.battle-media img, .battle-media video, .battle-video video { display: block; width: 100%; height: auto; }
.battle-video { margin-bottom: 20px; }
.slides { position: relative; aspect-ratio: 16 / 9; }
.slides .slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s; }
.slides .slide.on { opacity: 1; }
.slide-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 8px; }
.slide-dots button { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--gold-l); background: transparent; padding: 0; cursor: pointer; }
.slide-dots button.on { background: var(--gold); }
.troops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.troop { padding: 22px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--panel); color: var(--gold); }
.troop h3 { font-size: 1.4rem; margin: 12px 0 6px; }
.troop p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.facts-row { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 28px; border: 1px solid var(--line-2); border-radius: var(--r-card); background: var(--panel); overflow: hidden; }
.facts-row > div { padding: 20px 24px; text-align: center; }
.facts-row > div + div { border-left: 1px solid var(--line); }
.facts-row b { display: block; font: 600 1.7rem/1.2 var(--f-head); color: var(--gold-l); }
.facts-row span { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.gallery-item { margin: 0; border: 1px solid var(--line-2); border-radius: var(--r-card); overflow: hidden; }
.gallery-item img { display: block; width: 100%; height: auto; }

/* ---- что проверяем ---- */
.tabset { display: block; }
.focus-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.focus-item { padding: 18px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--panel); color: var(--gold); display: flex; flex-direction: column; gap: 6px; }
.focus-item b { color: var(--ink); font-size: 1.05rem; }
.focus-item span { color: var(--muted); font-size: .88rem; }

/* ---- шаги ---- */
.steps-line { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; counter-reset: none; }
.steps-line.steps-4 { grid-template-columns: repeat(4, 1fr); }
.steps-line::before { content: ''; position: absolute; left: 6%; right: 6%; top: 27px; height: 1px; background: linear-gradient(90deg, var(--gold-d), var(--gold), var(--gold-d)); opacity: .45; }
.steps-line li { position: relative; text-align: center; padding: 0 8px; }
.steps-line .seal { position: relative; display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--gold-d); color: var(--gold-l); font: 700 1.4rem/1 var(--f-head); box-shadow: 0 0 0 6px var(--bg-2); }
.steps-line li.done .seal { background: var(--gold); color: #1c1408; border-color: var(--gold); }
.steps-line li.now .seal { border-color: var(--gold); box-shadow: 0 0 0 6px var(--bg-2), 0 0 22px -2px rgba(226, 179, 87, .6); }
.steps-line h3 { font-size: 1.35rem; margin: 0 0 6px; }
.steps-line p { margin: 0; color: var(--muted); font-size: .94rem; }
#start .steps-line .seal { box-shadow: 0 0 0 6px var(--bg); }
#start .steps-line li.now .seal { box-shadow: 0 0 0 6px var(--bg), 0 0 22px -2px rgba(226, 179, 87, .6); }

/* ---- цепочки производства ---- */
.chains { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin-top: 36px; }
.chain { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--panel); font-size: .92rem; color: var(--ink-2); }
.chain i { width: 22px; height: 1px; background: var(--gold); position: relative; }
.chain i::after { content: ''; position: absolute; right: 0; top: -3px; width: 6px; height: 6px; border-top: 1px solid var(--gold); border-right: 1px solid var(--gold); transform: rotate(45deg); }

/* ---- герои: вкладки ---- */
.tab-list { display: flex; justify-content: center; gap: 8px; margin-bottom: 28px; }
.tab-list button { padding: 10px 26px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); font: 700 .92rem/1 var(--f-body); cursor: pointer; }
.tab-list button.on { background: var(--gold); border-color: var(--gold); color: #1c1408; }
.tab-panel[hidden] { display: none; }
.race-portrait { aspect-ratio: 3 / 4; margin: -4px -4px 14px; border-radius: 10px; overflow: hidden; background: radial-gradient(70% 60% at 50% 35%, #3a2a18, var(--panel-2)); display: grid; place-items: center; }
.race-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.monogram { font: 600 4.5rem/1 var(--f-head); color: var(--gold-d); }
.class-emblem { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(226, 179, 87, .3); border-radius: 12px; background: rgba(226, 179, 87, .08); color: var(--gold); }

/* ---- атлас ---- */
.atlas { display: grid; grid-template-columns: 4fr 8fr; gap: 40px; align-items: center; }
.atlas-text h2 { font-size: clamp(2rem, 3.6vw, 2.8rem); margin: 14px 0; }
.atlas-map { margin: 0; padding: 10px; border-radius: var(--r-card); background: linear-gradient(135deg, var(--parch), var(--parch-2)); box-shadow: 0 24px 60px -24px #000; }
.atlas-map img { display: block; width: 100%; height: auto; border-radius: 6px; filter: sepia(.2); }

/* ---- летопись ---- */
.news-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.news-card { overflow: hidden; border: 1px solid var(--line-2); border-radius: var(--r-card); background: var(--panel); }
.news-cover { aspect-ratio: 16 / 9; overflow: hidden; background: var(--panel-2); }
.news-cover img, .news-cover .ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-body { padding: 18px 20px 22px; }
.news-body .date { color: var(--muted); font-size: .82rem; letter-spacing: .06em; }
.news-body h3 { font-size: 1.35rem; margin: 6px 0 8px; }
.news-body p { color: var(--ink-2); font-size: .95rem; }
.empty-state { max-width: 520px; margin: 0 auto; text-align: center; }
.empty-art { aspect-ratio: 4 / 3; max-width: 320px; margin: 0 auto 18px; border-radius: var(--r-card); overflow: hidden; }
.empty-art img, .empty-art .ph { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- финальный призыв ---- */
.final-cta { padding: calc(var(--section-y) - 10px) 0; text-align: center; background: radial-gradient(60% 120% at 50% 0%, rgba(168, 51, 31, .22), transparent 70%), var(--bg); border-top: 1px solid var(--line); }
.final-cta h2 { font-size: clamp(2rem, 4vw, 3rem); max-width: 720px; margin: 14px auto 0; }
.final-crest { width: 54px; height: 54px; fill: none; stroke: var(--gold); stroke-width: 3; }

/* ---- лендинг ЗБТ ---- */
.success-card { text-align: center; }
.success-lead { max-width: 520px; margin: 0 auto 24px; }
.next-steps { text-align: left; max-width: 460px; margin: 0 auto; padding-left: 20px; color: var(--ink-2); display: grid; gap: 8px; }
.sticky-cta { display: none; }

/* ---- пошаговая анкета ---- */
.step-bar { display: none; margin-bottom: 26px; }
.js-steps .step-bar { display: block; }
.step-bar-track { height: 4px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.step-bar-fill { height: 100%; width: 33.3%; background: linear-gradient(90deg, var(--gold-d), var(--gold)); transition: width .3s; }
.step-bar-label { display: flex; justify-content: space-between; margin-top: 8px; font-size: .82rem; color: var(--muted); }
.step-nav { display: none; gap: 12px; margin-top: 20px; }
.js-steps .step-nav { display: flex; }
.step-nav .btn { flex: 1; }
.js-steps [data-step][hidden] { display: none; }
.field-hint-why { font-size: .82rem; color: var(--muted); margin-top: 4px; }

/* ---- внутренние страницы ---- */
.auth-split > * { min-width: 0; }
.auth-split { display: grid; grid-template-columns: minmax(0, 480px) 1fr; gap: 48px; align-items: stretch; padding-block: 30px 80px; }
.auth-art { position: relative; border-radius: var(--r-card); overflow: hidden; min-height: 420px; background: radial-gradient(90% 70% at 50% 25%, #4a3318, var(--panel-2) 55%, var(--bg)); border: 1px solid var(--line-2); }
.auth-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, #0c090ecc 100%); }
.auth-art p { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 22px; margin: 0; font: 600 1.6rem/1.2 var(--f-head); color: var(--ink); }
.journey { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; counter-reset: j; }
.journey li { position: relative; text-align: center; font-size: .82rem; color: var(--muted); padding-top: 34px; }
.journey li::before { counter-increment: j; content: counter(j); position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel-2); font-weight: 700; z-index: 1; }
.journey li::after { content: ''; position: absolute; top: 12px; left: calc(50% + 16px); width: calc(100% - 32px + 8px); height: 1px; background: var(--line-2); }
.journey li:last-child::after { display: none; }
.journey li.done { color: var(--gold-l); }
.journey li.done::before { background: var(--gold); color: #1c1408; border-color: var(--gold); }
.journey li.done::after { background: var(--gold-d); }
.journey li.now { color: var(--ink); }
.journey li.now::before { border-color: var(--gold); color: var(--gold-l); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(226, 179, 87, .18); } }
.account-banner { height: clamp(90px, 14vw, 170px); border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line-2); background: linear-gradient(120deg, var(--panel-2), var(--bg-2)); margin-bottom: 22px; }
.account-banner img { width: 100%; height: 100%; object-fit: cover; opacity: .75; display: block; }
.error-page { text-align: center; padding: 70px 0 110px; }
.error-art { max-width: 420px; aspect-ratio: 3 / 2; margin: 0 auto 26px; border-radius: var(--r-card); overflow: hidden; }
.error-art img, .error-art .ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.error-code { font: 600 clamp(4rem, 12vw, 7rem)/1 var(--f-head); color: var(--gold-d); }
.dl-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.dl-art { border-radius: var(--r-card); overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid var(--line-2); }
.dl-art img, .dl-art .ph { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- адаптив ---- */
@media (max-width: 960px) {
    .pillars, .news-cards, .troops { grid-template-columns: 1fr; }
    .battle-split, .atlas, .auth-split, .dl-hero { grid-template-columns: minmax(0, 1fr); }
    .focus-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps-line.steps-4 { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
    .steps-line.steps-4::before { display: none; }
    .auth-art { min-height: 240px; order: -1; }
}
@media (max-width: 640px) {
    .facts-row { grid-template-columns: 1fr; }
    .focus-grid { grid-template-columns: 1fr; }
    .focus-item b { overflow-wrap: anywhere; }
    .facts-row > div + div { border-left: 0; border-top: 1px solid var(--line); }
    .steps-line { grid-template-columns: 1fr; text-align: left; }
    .steps-line::before { display: none; }
    .steps-line li { display: grid; grid-template-columns: 54px minmax(0, 1fr); column-gap: 14px; text-align: left; }
    .steps-line .seal { grid-row: span 2; margin: 0; }
    .journey { grid-template-columns: repeat(5, minmax(56px, 1fr)); overflow-x: auto; }
    .recruit-banner { font-size: .8rem; }
    .sticky-cta { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 70; display: flex; justify-content: center; align-items: center; gap: 8px; padding: 14px; border-radius: var(--r-field); background: linear-gradient(135deg, var(--ember), var(--crimson)); color: #fff; font-weight: 700; box-shadow: 0 10px 30px -6px #000; transition: opacity .2s, transform .2s; }
    .sticky-cta.off { opacity: 0; pointer-events: none; transform: translateY(20px); }
    .page-zbt .footer { padding-bottom: 80px; }
}
@media (prefers-reduced-motion: reduce) {
    .pillar, .journey li.now::before, .slides .slide { transition: none; animation: none; }
}

.auth-card { min-width: 0; max-width: 100%; }
.auth-card .check { overflow-wrap: anywhere; }
.auth-card .input { max-width: 100%; }
