/* ==========================================================================
   FC Raptors — «Табло манежа». Описание направления: docs/design.md
   Порядок: шрифты → токены → база → общие компоненты → разделы → страницы → движение
   ========================================================================== */

/* --- Шрифты (самохостинг, OFL) -------------------------------------------- */
@font-face {
    font-family: "Sofia Sans XC";
    font-style: italic;
    font-weight: 100 1000;
    font-display: swap;
    src: url("../fonts/sofia-sans-extra-condensed-cyrillic-wght-italic.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Sofia Sans XC";
    font-style: italic;
    font-weight: 100 1000;
    font-display: swap;
    src: url("../fonts/sofia-sans-extra-condensed-latin-wght-italic.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Sofia Sans XC";
    font-style: normal;
    font-weight: 100 1000;
    font-display: swap;
    src: url("../fonts/sofia-sans-extra-condensed-cyrillic-wght-normal.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Sofia Sans XC";
    font-style: normal;
    font-weight: 100 1000;
    font-display: swap;
    src: url("../fonts/sofia-sans-extra-condensed-latin-wght-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Golos Text";
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url("../fonts/golos-text-cyrillic-wght-normal.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Golos Text";
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url("../fonts/golos-text-latin-wght-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Токены ------------------------------------------------------------------ */
:root {
    --c-bg: #2a2a2d;
    --c-surface: #333336;
    --c-raised: #3e3e42;
    --c-line: #4a4a4f;
    --c-text: #f5f5f3;
    --c-muted: #a9a9ad;
    --c-red: #e50914;
    --c-red-deep: #b3060f;
    --c-red-text: #ff4d55; /* красный для крупного текста на графите (контраст ≥ 3:1) */

    --f-display: "Sofia Sans XC", "Arial Narrow", sans-serif;
    --f-text: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;

    --fs-d1: clamp(3.5rem, 2.2rem + 6.5vw, 7.5rem);
    --fs-d2: clamp(2.5rem, 1.9rem + 3vw, 4.5rem);
    --fs-d3: clamp(1.625rem, 1.4rem + 1vw, 2.25rem);
    --fs-lead: clamp(1.125rem, 1rem + .6vw, 1.5rem);
    --fs-body: 1rem;
    --fs-small: .875rem;

    --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
    --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 128px;
    --gutter: clamp(16px, 4vw, 40px);
    --section: clamp(56px, 9vw, 120px);
    --max: 1360px;
    --header-h: 72px;

    --skew: -12deg;
    --ease: cubic-bezier(.2, .7, .2, 1);
    --t-fast: 160ms;
    --t-mid: 280ms;
}

/* --- База ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + 16px);
    color-scheme: dark;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--c-bg);
    color: var(--c-text);
    font: 400 var(--fs-body)/1.55 var(--f-text);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

main { flex: 1; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
abbr[title] { text-decoration: none; }
button, select { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--c-text); outline-offset: 3px; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: var(--s-4);
    top: -100px;
    z-index: 100;
    padding: var(--s-2) var(--s-4);
    background: var(--c-text);
    color: var(--c-bg);
    font-weight: 600;
}
.skip-link:focus { top: var(--s-4); }

.container {
    width: 100%;
    max-width: calc(var(--max) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* --- Типографика ------------------------------------------------------------- */
.page-title,
.section-title,
.block-title,
.hero__title,
.feature__title,
.join__title,
.board__title {
    font-family: var(--f-display);
    font-style: italic;
    font-weight: 860;
    text-transform: uppercase;
    line-height: .9;
    letter-spacing: 0;
}

.page-title { font-size: var(--fs-d1); overflow-wrap: anywhere; }
.page-title--tournament,
.page-title--album { font-size: clamp(2.75rem, 1.6rem + 5vw, 6rem); }
.section-title { font-size: var(--fs-d2); }
.block-title { font-size: var(--fs-d3); }
.block-title__count { color: var(--c-muted); font-weight: 500; }

.page-head { padding-block: clamp(32px, 5vw, 72px) clamp(24px, 3vw, 40px); }
.page-lead { margin-top: var(--s-4); max-width: 60ch; color: var(--c-muted); font-size: var(--fs-lead); line-height: 1.4; }

.section { padding-top: var(--section); }
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s-4);
    margin-bottom: var(--s-5);
}

.link-more {
    flex-shrink: 0;
    font-weight: 600;
    font-size: .9375rem;
    text-decoration: underline;
    text-decoration-color: var(--c-red);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
    transition: color var(--t-fast);
}
.link-more:hover { color: var(--c-red-text); }

.back-link {
    display: inline-block;
    margin-bottom: var(--s-4);
    color: var(--c-muted);
    font-weight: 600;
    text-decoration: none;
}
.back-link:hover { color: var(--c-text); }

.meta-date { display: block; color: var(--c-muted); font-size: var(--fs-small); }

.empty {
    padding: var(--s-7) 0;
    color: var(--c-muted);
    font-size: var(--fs-lead);
    max-width: 40ch;
}
.empty a { color: var(--c-text); text-decoration-color: var(--c-red); text-underline-offset: 4px; }

/* --- Кнопки (скос) ---------------------------------------------------------- */
.btn {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 1.4em;
    border: 0;
    background: none;
    color: var(--c-text);
    font: 760 1.1875rem/1 var(--f-display);
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    transform: skewX(var(--skew));
    transition: background-color var(--t-fast), transform var(--t-mid) var(--ease);
}
.btn--red::before { background: var(--c-red); }
.btn--red:hover::before { background: var(--c-red-deep); }
.btn--light { color: var(--c-bg); }
.btn--light::before { background: var(--c-text); }
.btn--light:hover::before { background: #fff; transform: skewX(var(--skew)) scaleX(1.04); }
.btn--ghost::before { border: 2px solid currentColor; }
.btn--ghost:hover::before { background: rgb(255 255 255 / .08); }

/* --- Шапка -------------------------------------------------------------------- */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--c-bg); /* без backdrop-filter: он ломает position: fixed у мобильного меню */
    border-bottom: 1px solid var(--c-line);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    height: var(--header-h);
    max-width: calc(var(--max) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.header__social {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    color: var(--c-muted);
    font-size: var(--fs-small);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--t-fast);
}
.header__social:hover { color: var(--c-text); }

.header__logo { display: block; flex-shrink: 0; }
.header__logo img { width: 56px; height: 56px; transition: transform var(--t-mid) var(--ease); }
.header__logo:hover img { transform: rotate(-8deg) scale(1.05); }
.header__brand { display: none; }

.nav__link {
    position: relative;
    padding: var(--s-2) var(--s-1);
    font: 700 1.25rem/1 var(--f-display);
    text-transform: uppercase;
    text-decoration: none;
    color: var(--c-text);
    transition: color var(--t-fast);
}
.nav__link::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 3px;
    background: var(--c-red);
    transform: skewX(var(--skew)) scaleX(0);
    transform-origin: left;
    transition: transform var(--t-mid) var(--ease);
}
.nav__link:hover::after,
.nav__link.is-current::after { transform: skewX(var(--skew)) scaleX(1); }

.nav__mobile-extra { display: none; }

.burger {
    display: none;
    width: 48px; height: 48px;
    margin-right: -8px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}
.burger__lines,
.burger__lines::before,
.burger__lines::after {
    display: block;
    width: 26px; height: 2px;
    margin-inline: auto;
    background: var(--c-text);
    transition: transform var(--t-mid) var(--ease), opacity var(--t-fast);
}
.burger__lines { position: relative; }
.burger__lines::before, .burger__lines::after { content: ""; position: absolute; left: 0; }
.burger__lines::before { top: -8px; }
.burger__lines::after { top: 8px; width: 18px; }
.burger[aria-expanded="true"] .burger__lines { background: transparent; }
.burger[aria-expanded="true"] .burger__lines::before { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__lines::after { width: 26px; transform: translateY(-8px) rotate(-45deg); }

@media (min-width: 1000px) {
    .nav {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        gap: clamp(20px, 2.4vw, 40px);
    }
    .nav__group { display: flex; gap: clamp(16px, 2vw, 32px); }
    .header__inner { position: relative; }
}

@media (max-width: 999.98px) {
    .header__social, .header__cta { display: none; }
    .header__brand { display: block; }
    .header__brand img { width: 48px; height: 48px; }
    .burger { display: block; }
    .nav .header__logo { display: none; }

    .nav {
        position: fixed;
        inset: var(--header-h) 0 0 0;
        z-index: 49;
        display: flex;
        flex-direction: column;
        gap: var(--s-2);
        padding: var(--s-6) var(--gutter) var(--s-7);
        overflow-y: auto;
        background: var(--c-bg);
        visibility: hidden;
        opacity: 0;
        transform: translateY(-12px);
        transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease), visibility 0s linear var(--t-mid);
    }
    .nav.is-open {
        visibility: visible;
        opacity: 1;
        transform: none;
        transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease);
    }
    .nav__group { display: flex; flex-direction: column; }
    .nav__link {
        padding: var(--s-2) 0;
        font-size: clamp(2.5rem, 10vw, 3.5rem);
        font-style: italic;
        font-weight: 860;
        line-height: 1;
    }
    .nav__link::after { display: none; }
    .nav__link.is-current { color: var(--c-red-text); }
    .nav__mobile-extra {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: var(--s-5);
        margin-top: auto;
        padding-top: var(--s-6);
    }
    .nav__tg { color: var(--c-muted); font-weight: 600; }
    body.nav-open { overflow: hidden; }
}

/* --- Плашки результата и форма --------------------------------------------- */
.chip {
    display: inline-grid;
    place-items: center;
    width: 28px; height: 28px;
    border-radius: 2px;
    font: 800 1rem/1 var(--f-display);
    color: var(--c-text);
}
.chip--w { background: var(--c-red); }
.chip--d { background: var(--c-raised); }
.chip--l { box-shadow: inset 0 0 0 2px var(--c-muted); color: var(--c-muted); }
.chip--lg { width: 40px; height: 40px; font-size: 1.375rem; }

.form { display: flex; gap: 6px; }

/* --- Счёт и команды ---------------------------------------------------------- */
.score {
    display: inline-flex;
    align-items: baseline;
    gap: .12em;
    font: italic 860 2.75rem/.9 var(--f-display);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.score__sep { color: var(--c-muted); font-weight: 500; }
.score--tbd { color: var(--c-muted); }
.match-note { display: block; margin-top: var(--s-1); color: var(--c-muted); font-size: .75rem; text-align: center; }

.team { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.team__logo { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.team__name {
    min-width: 0;
    font-weight: 600;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

/* --- Плитки результатов (главная, плей-офф) -------------------------------- */
.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 1px;
    background: var(--c-line);
    border: 1px solid var(--c-line);
}
.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
    padding: var(--s-5) var(--s-5) var(--s-4);
    background: var(--c-surface);
    transition: background-color var(--t-fast);
}
.tile:hover { background: var(--c-raised); }
.tile--w { box-shadow: inset 0 3px 0 var(--c-red); }
.tile__head {
    display: flex;
    justify-content: space-between;
    gap: var(--s-3);
    color: var(--c-muted);
    font-size: .8125rem;
}
.tile__body {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: var(--s-3);
}
.tile .team { flex-direction: column; text-align: center; gap: var(--s-2); font-size: .875rem; }
.tile .team__logo { width: 56px; height: 56px; }
.tile__score { padding-top: 8px; text-align: center; }
.tile__foot {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    margin-top: auto;
    color: var(--c-muted);
    font-size: .8125rem;
}
.tile__foot .chip { width: 22px; height: 22px; font-size: .8125rem; }
.tiles--stage { max-width: 900px; }
.stage { margin-top: var(--s-7); }
.stage-title { margin-bottom: var(--s-4); }

/* На телефоне результаты на главной листаются вбок, а не уходят в длинный столбец */
@media (max-width: 699.98px) {
    .tiles--strip {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 78%;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        margin-inline: calc(-1 * var(--gutter));
        border-inline: 0;
    }
    .tiles--strip::-webkit-scrollbar { display: none; }
    .tiles--strip .tile { scroll-snap-align: start; }
    .tiles--strip .tile:first-child { margin-left: var(--gutter); }
}

/* --- Строки матчей ------------------------------------------------------------ */
.fixtures { border-top: 1px solid var(--c-line); }
.fixture {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "when result" "comp comp" "teams teams";
    gap: var(--s-2) var(--s-4);
    padding: var(--s-4) var(--s-2);
    border-bottom: 1px solid var(--c-line);
    transition: background-color var(--t-fast);
}
.fixture:hover { background: var(--c-surface); }
.fixture__when { grid-area: when; display: flex; gap: var(--s-2); align-items: baseline; flex-wrap: wrap; }
.fixture__date { font-weight: 700; }
.fixture__sub { color: var(--c-muted); font-size: var(--fs-small); }
.fixture__comp { grid-area: comp; display: flex; flex-direction: column; font-size: .9375rem; }
.fixture__comp a { text-decoration: none; }
.fixture__comp a:hover { color: var(--c-red-text); }
.fixture__teams {
    grid-area: teams;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--s-3);
    margin-top: var(--s-2);
}
.fixture .team--us { flex-direction: row-reverse; text-align: right; }
.fixture__score { text-align: center; }
.fixture__score .score { font-size: 2.25rem; }
.fixture__result { grid-area: result; align-self: center; }
.fixture--upcoming { box-shadow: inset 3px 0 0 var(--c-red); }

@media (min-width: 900px) {
    .fixture {
        grid-template-columns: 150px minmax(160px, 1fr) minmax(420px, 1.6fr) 40px;
        grid-template-areas: "when comp teams result";
        align-items: center;
        padding-inline: var(--s-4);
    }
    .fixture__when { flex-direction: column; gap: 0; }
    .fixture__teams { margin-top: 0; }
    .fixture__result { justify-self: end; }
}

.fixtures-block { margin-top: var(--s-7); }
.fixtures-block .block-title { margin-bottom: var(--s-4); }

/* --- Вкладки и фильтры -------------------------------------------------------- */
.tabs__row {
    display: flex;
    gap: var(--s-1);
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px 10px;
    margin-inline: -10px;
}
.tabs__row::-webkit-scrollbar { display: none; }

.tab {
    position: relative;
    isolation: isolate;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    padding: 10px 16px;
    border: 0;
    background: none;
    color: var(--c-muted);
    font: 700 1.1875rem/1 var(--f-display);
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color var(--t-fast);
}
.tab::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    transform: skewX(var(--skew));
    transition: background-color var(--t-fast);
}
.tab:hover { color: var(--c-text); }
.tab:hover::before { background: var(--c-surface); }
.tab.is-active { color: var(--c-text); }
.tab.is-active::before { background: var(--c-red); }
.tab__live {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 1.8s ease-in-out infinite;
}

.tabs--tournaments {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-3) var(--s-6);
    padding-top: var(--s-6);
}
.tabs__season { display: flex; align-items: center; gap: var(--s-3); min-width: 0; max-width: 100%; }
.tabs__label { flex-shrink: 0; color: var(--c-muted); font-size: var(--fs-small); font-weight: 600; }
.tabs__season .tabs__row { margin-left: 0; }
@media (max-width: 699.98px) {
    .tabs__season { flex-direction: column; align-items: stretch; gap: var(--s-1); width: 100%; }
    .tabs__season .tabs__row { margin-inline: -10px; }
}

.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    margin-bottom: var(--s-2);
}
.filters[hidden] { display: none; }
.filters .tabs__row { max-width: 100%; }

.select { position: relative; display: inline-block; }
.select::after {
    content: "";
    position: absolute;
    right: 16px; top: 50%;
    width: 8px; height: 8px;
    border-right: 2px solid var(--c-muted);
    border-bottom: 2px solid var(--c-muted);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}
.select select {
    appearance: none;
    min-width: min(320px, 100%);
    max-width: 100%;
    height: 44px;
    padding: 0 44px 0 16px;
    border: 1px solid var(--c-line);
    border-radius: 2px;
    background: var(--c-surface);
    font-size: .9375rem;
    cursor: pointer;
}
.select select:hover { border-color: var(--c-muted); }

/* --- Таблицы ---------------------------------------------------------------- */
.tables { display: grid; gap: var(--s-7); }
@media (min-width: 1200px) {
    .tables--groups { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

.standings__title { margin-bottom: var(--s-3); font: italic 820 1.75rem/1 var(--f-display); text-transform: uppercase; }

.league-table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}
.league-table th {
    position: sticky;
    top: var(--header-h);
    z-index: 1;
    padding: var(--s-3) var(--s-2);
    background: var(--c-bg);
    border-bottom: 2px solid var(--c-text);
    color: var(--c-muted);
    font-size: .8125rem;
    font-weight: 600;
    text-align: center;
}
.league-table td {
    height: 52px;
    padding: 0 var(--s-2);
    border-bottom: 1px solid var(--c-line);
    text-align: center;
}
.league-table .col-team { text-align: left; width: 100%; }
.league-table .col-place { width: 44px; color: var(--c-muted); font-weight: 600; }
.league-table .col-pts { font-weight: 800; font-size: 1.0625rem; }
.league-table .col-goals { white-space: nowrap; }
.goals-sep { color: var(--c-muted); }

.team-cell { display: flex; align-items: center; gap: var(--s-3); font-weight: 600; }
.team-cell__logo { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }

.standings-row { transition: background-color var(--t-fast); }
.standings-row:hover { background: var(--c-surface); }
.standings-row--top .col-place { box-shadow: inset 3px 0 0 var(--c-muted); }
.standings-row--us,
.standings-row--us:hover { background: var(--c-red); }
.standings-row--us td { border-bottom-color: var(--c-red); }
.standings-row--us .col-place,
.standings-row--us .goals-sep { color: var(--c-text); }

.standings--compact .col-wdl { display: none; }

@media (max-width: 599.98px) {
    .league-table .col-wdl { display: none; }
    .league-table td, .league-table th { padding-inline: 6px; }
    .team-cell { gap: var(--s-2); font-size: .9375rem; }
}

/* --- Главная: афиша ----------------------------------------------------------- */
.hero { padding-top: clamp(16px, 3vw, 40px); }
.hero__inner { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
/* Афиша показывается целиком, в своих пропорциях (width/height у img — настоящие размеры файла). */
.hero__media {
    grid-column: 1 / -1;
    grid-row: 1;
    overflow: hidden;
    background: var(--c-surface);
}
.hero__media img { width: 100%; height: auto; max-height: 80vh; object-fit: contain; }
/* Текст не накладывается на постер: на афишах клуба надписи вшиты в картинку. */
.hero__copy {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-top: var(--s-5);
    border-left: 4px solid var(--c-red);
    padding-left: var(--s-4);
}
.hero__date { display: block; margin-bottom: var(--s-3); color: var(--c-muted); font-size: var(--fs-small); }
.hero__title { font-size: clamp(3rem, 1.8rem + 4.6vw, 6.25rem); text-wrap: balance; }
.hero__text { margin-top: var(--s-4); max-width: 46ch; color: var(--c-muted); font-size: 1.0625rem; white-space: pre-line; }
.hero .link-more { display: inline-block; margin-top: var(--s-5); }

@media (min-width: 900px) {
    .hero__inner { column-gap: var(--s-7); }
    .hero__media { grid-column: 6 / -1; align-self: start; }
    .hero__media img { max-height: 72vh; }
    .hero__copy {
        grid-column: 1 / 6;
        grid-row: 1;
        align-self: end;
        padding: 0 0 var(--s-2) var(--s-5);
    }
}

/* --- Главная: табло ближайшего матча -------------------------------------- */
.board-section { padding-top: clamp(48px, 7vw, 96px); }
.board {
    position: relative;
    overflow: hidden;
    padding: var(--s-5) clamp(16px, 3vw, 48px) var(--s-6);
    background: var(--c-surface);
}
.board::before {
    /* красная наклонная полоса за датой — «свет табло» */
    content: "";
    position: absolute;
    top: 0; bottom: 0; left: 50%;
    width: clamp(120px, 22vw, 320px);
    background: linear-gradient(180deg, rgb(229 9 20 / .22), rgb(229 9 20 / .06));
    transform: translateX(-50%) skewX(var(--skew));
    pointer-events: none;
}
.board > * { position: relative; }
.board__top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--s-2) var(--s-4);
    padding-bottom: var(--s-4);
    border-bottom: 1px solid var(--c-line);
}
.board__title { font-size: var(--fs-d3); }
.board__comp { color: var(--c-muted); font-size: .9375rem; text-decoration: none; }
a.board__comp:hover { color: var(--c-text); }

.board__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "us them" "center center";
    gap: var(--s-6) var(--s-4);
    padding-top: var(--s-6);
    text-align: center;
}
.board__team:first-child { grid-area: us; }
.board__team:last-child { grid-area: them; }
.board__center { grid-area: center; }
.board__team { display: flex; flex-direction: column; align-items: center; gap: var(--s-3); }
.board__logo { width: clamp(88px, 12vw, 168px); height: clamp(88px, 12vw, 168px); object-fit: contain; }
.board__name { font: italic 860 clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem)/.95 var(--f-display); text-transform: uppercase; overflow-wrap: anywhere; }
.board__place { color: var(--c-muted); font-size: var(--fs-small); }

.board__date { font: italic 900 var(--fs-d1)/.85 var(--f-display); text-transform: uppercase; }
.board__when { margin-top: var(--s-2); font-weight: 600; font-size: 1.0625rem; }
.board__venue { margin-top: var(--s-3); color: var(--c-muted); font-size: var(--fs-small); }
.board__score .score { font-size: var(--fs-d1); }

.countdown { display: flex; justify-content: center; gap: clamp(12px, 2vw, 24px); margin-top: var(--s-5); }
.countdown[hidden] { display: none; }
.countdown__cell { display: flex; flex-direction: column; align-items: center; min-width: 2.2em; }
.countdown__cell b {
    font: italic 820 clamp(2rem, 1.5rem + 2vw, 3.25rem)/1 var(--f-display);
    font-variant-numeric: tabular-nums;
}
.countdown__cell span { color: var(--c-muted); font-size: .75rem; }

.board__facts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--s-4) var(--s-8);
    margin-top: var(--s-6);
    padding-top: var(--s-5);
    border-top: 1px solid var(--c-line);
}
.board__fact { display: flex; flex-direction: column; align-items: center; gap: var(--s-2); }
.board__fact-label { color: var(--c-muted); font-size: .8125rem; }
.board__prev { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 600; }
.board__prev .chip { width: 24px; height: 24px; font-size: .875rem; }

@media (min-width: 900px) {
    .board__grid {
        grid-template-columns: 1fr minmax(320px, 1.2fr) 1fr;
        grid-template-areas: "us center them";
        align-items: center;
    }
}

/* --- Главная: сезон -------------------------------------------------------- */
.season__inner {
    display: grid;
    gap: var(--s-6);
    align-items: end;
}
.season__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 2px solid var(--c-text);
}
.stat { padding: var(--s-4) var(--s-4) var(--s-2) 0; border-bottom: 1px solid var(--c-line); }
.stat dt { color: var(--c-muted); font-size: var(--fs-small); }
.stat dd {
    font: italic 880 clamp(3.25rem, 2.4rem + 3.4vw, 6rem)/.95 var(--f-display);
    font-variant-numeric: tabular-nums;
}
.stat--goals { grid-column: 1 / -1; }
.stat--goals dd { white-space: nowrap; }
.season__form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); }
.season__form-label { color: var(--c-muted); font-size: var(--fs-small); }

@media (min-width: 700px) {
    .season__stats { grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.7fr); }
    .stat { border-bottom: 0; border-left: 1px solid var(--c-line); padding-left: var(--s-4); }
    .stat:first-child { border-left: 0; padding-left: 0; }
    .stat--goals { grid-column: auto; }
}
@media (min-width: 1200px) {
    .season__inner { grid-template-columns: auto 1fr; column-gap: var(--s-8); }
    .season__inner .section-title { grid-row: 1 / 3; align-self: start; max-width: 4.2em; }
}

/* --- Главная: таблица + новости ------------------------------------------- */
.split { display: grid; gap: var(--section) var(--s-8); }
@media (min-width: 1100px) {
    .split { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
}

.news-list { border-top: 1px solid var(--c-line); }
.news-line {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: var(--s-4);
    align-items: center;
    padding: var(--s-4) 0;
    border-bottom: 1px solid var(--c-line);
    text-decoration: none;
}
.news-line img { width: 112px; aspect-ratio: 4 / 3; object-fit: cover; transition: filter var(--t-fast); }
.news-line span { display: flex; flex-direction: column; gap: var(--s-1); }
.news-line time { color: var(--c-muted); font-size: .8125rem; }
.news-line strong { font-weight: 600; line-height: 1.35; }
.news-line:hover strong { text-decoration: underline; text-decoration-color: var(--c-red); text-underline-offset: 4px; }

/* --- Главная: мозаика альбома ---------------------------------------------- */
.mosaic {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    text-decoration: none;
}
.mosaic img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: filter var(--t-mid); }
.mosaic img:first-child { grid-column: 1 / -1; }
.mosaic img:nth-child(n + 4) { display: none; }
.mosaic:hover img { filter: brightness(.8); }
.mosaic__caption {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--s-2) var(--s-4);
    padding-top: var(--s-3);
}
.mosaic__title { font: italic 840 var(--fs-d3)/1 var(--f-display); text-transform: uppercase; }
.mosaic__meta { color: var(--c-muted); font-size: var(--fs-small); }
@media (min-width: 800px) {
    .mosaic { grid-template-columns: repeat(4, 1fr); }
    .mosaic img:nth-child(n + 4) { display: block; }
    .mosaic img:first-child { grid-column: span 2; grid-row: span 2; }
}

/* --- Игроки ------------------------------------------------------------------ */
.squad { margin-top: var(--s-7); }
.squad[hidden] { display: none; }
.squad > .block-title { margin-bottom: var(--s-5); padding-bottom: var(--s-3); border-bottom: 1px solid var(--c-line); }
.squad--staff { margin-top: var(--section); }

.people {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr));
    gap: var(--s-6) var(--s-4);
}
@media (min-width: 700px) {
    .people { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: var(--s-7) var(--s-5); }
}

.person__visual { position: relative; aspect-ratio: 1 / .92; }
.person__plate {
    position: absolute;
    left: 7%; right: 7%; bottom: 0;
    height: 64%;
    background: var(--c-surface);
    transform: skewX(var(--skew));
    transition: background-color var(--t-mid) var(--ease);
}
.person__photo {
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    object-position: center bottom;
    transition: transform var(--t-mid) var(--ease);
}
.person:hover .person__plate { background: var(--c-red); }
.person:hover .person__photo { transform: translateY(-6px); }
.person__initials {
    position: absolute;
    left: 0; right: 0; bottom: 6%;
    text-align: center;
    font: italic 900 clamp(4.5rem, 3rem + 4vw, 7rem)/1 var(--f-display);
    color: transparent;
    -webkit-text-stroke: 1.5px var(--c-muted);
    transition: -webkit-text-stroke-color var(--t-mid);
}
.person:hover .person__initials { -webkit-text-stroke-color: var(--c-text); }

.person__caption {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: var(--s-3);
    align-items: end;
    padding-top: var(--s-3);
    border-top: 1px solid var(--c-line);
}
.person__number {
    grid-row: 1 / 3;
    align-self: center;
    min-width: .9em;
    font: italic 880 3.25rem/.85 var(--f-display);
    color: var(--c-red-text);
    font-variant-numeric: tabular-nums;
}
.person__name { display: flex; flex-direction: column; min-width: 0; grid-column: 2; }
.person__first { color: var(--c-muted); font-size: .8125rem; font-weight: 600; }
.person__last {
    font: italic 860 1.75rem/.95 var(--f-display);
    text-transform: uppercase;
    overflow-wrap: anywhere;
}
.person__role { grid-column: 2; margin-top: var(--s-1); color: var(--c-muted); font-size: .8125rem; }
/* две карточки в ряд на телефоне: мельче номер и фамилия, чтобы длинные фамилии не переносились */
@media (max-width: 699.98px) {
    .person__caption { column-gap: var(--s-2); }
    .person__number { font-size: 2.25rem; }
    .person__last { font-size: 1.375rem; }
}

/* --- Новости ---------------------------------------------------------------- */
.feature { display: grid; gap: var(--s-5); margin-bottom: var(--s-8); }
/* афиши показываем целиком: на них вшиты надписи */
.feature__media { background: var(--c-surface); }
.feature__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.feature__copy { display: flex; flex-direction: column; justify-content: end; gap: var(--s-4); max-width: 46ch; }
.feature__title { font-size: var(--fs-d2); text-wrap: balance; }
.feature__copy p { color: var(--c-muted); font-size: 1.0625rem; white-space: pre-line; }
@media (min-width: 900px) {
    .feature { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-7); align-items: end; }
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: var(--s-7) var(--s-5);
    padding-top: var(--s-7);
    border-top: 2px solid var(--c-text);
}
.news-card { display: flex; flex-direction: column; gap: var(--s-4); }
.news-card__media { display: block; overflow: hidden; background: var(--c-surface); }
.news-card__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; transition: transform 500ms var(--ease); }
.news-card__media:hover img { transform: scale(1.03); }
.news-card__body { display: flex; flex-direction: column; gap: var(--s-2); }
.news-card__title { font-size: 1.3125rem; font-weight: 700; line-height: 1.25; }
.news-card__text { color: var(--c-muted); white-space: pre-line; }

/* --- О клубе ---------------------------------------------------------------- */
.about__lead { margin-top: var(--s-5); max-width: 28ch; font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem); font-weight: 600; line-height: 1.2; }

.facts { display: grid; border-top: 2px solid var(--c-text); }
.fact { padding: var(--s-4) 0; border-bottom: 1px solid var(--c-line); }
.fact dt { color: var(--c-muted); font-size: var(--fs-small); }
.fact dd { margin-top: var(--s-1); font: italic 840 clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem)/1 var(--f-display); text-transform: uppercase; }
.fact a { text-decoration-color: var(--c-red); text-decoration-thickness: 2px; text-underline-offset: 6px; }
@media (min-width: 800px) {
    .facts { grid-template-columns: repeat(3, 1fr); }
    .fact { padding-right: var(--s-5); border-bottom: 0; }
    .fact + .fact { padding-left: var(--s-5); border-left: 1px solid var(--c-line); }
}

.about__section {
    display: grid;
    gap: var(--s-4);
    margin-top: var(--s-8);
    max-width: 68ch;
}
.about__section > p { color: var(--c-muted); font-size: 1.0625rem; }
@media (min-width: 900px) {
    .about__section {
        grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
        column-gap: var(--s-7);
        max-width: none;
        padding-top: var(--s-6);
        border-top: 1px solid var(--c-line);
    }
    .about__section > .block-title { grid-row: 1 / span 3; }
    .about__section > :not(.block-title) { grid-column: 2; max-width: 68ch; }
}

.schedule { display: grid; gap: 1px; margin-top: var(--s-2); background: var(--c-line); border: 1px solid var(--c-line); }
@media (min-width: 640px) { .schedule { grid-template-columns: 1fr 1fr; } }
.schedule__item { padding: var(--s-5); background: var(--c-surface); }
.schedule__item h3 { font: italic 860 1.75rem/1 var(--f-display); text-transform: uppercase; }
.schedule__place { margin-top: var(--s-2); color: var(--c-muted); font-size: var(--fs-small); }
.schedule__time { display: flex; flex-direction: column; margin-top: var(--s-4); }
.schedule__time b { font: italic 840 2.25rem/1 var(--f-display); font-variant-numeric: tabular-nums; }

.trophies { display: grid; gap: var(--s-3); }
.trophy {
    display: flex;
    align-items: center;
    gap: var(--s-4);
    font: italic 820 clamp(1.5rem, 1.2rem + 1vw, 2rem)/1.05 var(--f-display);
    text-transform: uppercase;
}
.trophy__mark { flex-shrink: 0; width: 14px; height: 28px; background: var(--c-red); transform: skewX(var(--skew)); }

.join {
    margin-top: var(--section);
    padding: clamp(32px, 6vw, 72px) clamp(20px, 5vw, 72px);
    background: var(--c-red);
}
.join__title { font-size: var(--fs-d1); }
.join p { margin-top: var(--s-4); max-width: 52ch; font-size: 1.0625rem; }
.join__actions { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-5); margin-top: var(--s-6); padding-left: 6px; }

/* --- Медиа ------------------------------------------------------------------ */
.album-description { margin-top: var(--s-4); max-width: 68ch; font-size: 1.0625rem; white-space: pre-line; }
.albums { display: grid; gap: var(--s-4); }
@media (min-width: 700px) { .albums { grid-template-columns: repeat(2, 1fr); } .album--lead { grid-column: 1 / -1; } }
@media (min-width: 1100px) {
    .albums { grid-template-columns: repeat(3, 1fr); }
    .album--lead { grid-column: span 2; grid-row: span 2; }
}

.album {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--c-surface);
    text-decoration: none;
}
.album img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 600ms var(--ease); }
.album:hover img { transform: scale(1.04); }
.album__caption {
    position: absolute;
    inset: auto 0 0 0;
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
    padding: var(--s-8) var(--s-5) var(--s-5);
    background: linear-gradient(transparent, rgb(20 20 22 / .88));
}
.album__title { font: italic 860 var(--fs-d3)/.95 var(--f-display); text-transform: uppercase; }
.album--lead .album__title { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.5rem); }
.album__meta { color: #d0d0d3; font-size: var(--fs-small); }

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 4px;
}
.gallery__item { display: block; overflow: hidden; background: var(--c-surface); }
.gallery__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 500ms var(--ease), filter var(--t-mid); }
.gallery__item:hover img { transform: scale(1.04); filter: brightness(1.08); }

/* Лайтбокс */
.lightbox {
    width: 100vw; height: 100dvh;
    max-width: none; max-height: none;
    margin: 0; padding: 0;
    border: 0;
    background: #1e1e20;
    color: var(--c-text);
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; padding: var(--s-3) var(--gutter); }
.lightbox__count { color: var(--c-muted); font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.lightbox__stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 var(--gutter) var(--s-5); touch-action: pan-y; }
.lightbox__img { max-width: 100%; max-height: calc(100dvh - 100px); object-fit: contain; animation: fade-in var(--t-mid) var(--ease); }
.lightbox__btn {
    display: grid;
    place-items: center;
    width: 48px; height: 48px;
    border: 0;
    border-radius: 2px;
    background: rgb(255 255 255 / .08);
    color: var(--c-text);
    cursor: pointer;
    transition: background-color var(--t-fast);
}
.lightbox__btn:hover { background: var(--c-red); }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: var(--gutter); }
.lightbox__nav--next { right: var(--gutter); }
@media (max-width: 699.98px) { .lightbox__nav { display: none; } }

/* --- 404 -------------------------------------------------------------------- */
.not-found { padding-block: clamp(48px, 10vw, 140px); }
.not-found__code {
    font: italic 900 clamp(8rem, 5rem + 18vw, 20rem)/.8 var(--f-display);
    color: transparent;
    -webkit-text-stroke: 2px var(--c-red);
}
.not-found .page-title { margin-top: var(--s-5); }
.not-found .join__actions { padding-left: 6px; }

/* --- Подвал ------------------------------------------------------------------ */
.footer { margin-top: var(--section); border-top: 1px solid var(--c-line); background: #262629; }
.footer__inner {
    display: grid;
    gap: var(--s-6);
    padding-block: var(--s-7);
}
@media (min-width: 900px) { .footer__inner { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer__brand { display: flex; align-items: center; gap: var(--s-4); }
.footer__brand img { width: 72px; height: 72px; }
.footer__name { font: italic 860 2rem/1 var(--f-display); text-transform: uppercase; }
.footer__tagline { margin-top: var(--s-1); color: var(--c-muted); font-size: var(--fs-small); }
.footer__nav { display: grid; grid-template-columns: repeat(2, max-content); gap: var(--s-2) var(--s-7); align-content: start; }
.footer__nav a, .footer__contacts a { text-decoration: none; transition: color var(--t-fast); }
.footer__nav a:hover, .footer__contacts a:hover { color: var(--c-red-text); }
.footer__contacts { display: grid; gap: var(--s-2); align-content: start; color: var(--c-muted); font-size: .9375rem; }
.footer__contacts a { color: var(--c-text); }
.footer__bottom { padding-block: var(--s-4); border-top: 1px solid var(--c-line); color: var(--c-muted); font-size: .8125rem; }

/* --- Движение ---------------------------------------------------------------- */
@keyframes pulse { 50% { opacity: .35; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes wipe { from { clip-path: inset(0 0 0 100%); } }

/* Единственный «постановочный» момент — загрузка афиши на главной. */
.hero__media img { animation: wipe 900ms var(--ease) both; }
.hero__title { animation: rise 700ms var(--ease) 200ms both; }
.hero__date, .hero__text, .hero .link-more { animation: fade-in 600ms var(--ease) 500ms both; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 1ms !important;
        animation-delay: 0ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
        scroll-behavior: auto !important;
    }
}
