:root {
    --bg: #2a0709;
    --gold: #f1cf73;
    --gold-deep: #b98a2c;
    --plate-bg: rgba(74, 13, 16, 0.86);
    --plate-bg-hover: rgba(110, 20, 24, 0.94);
    --text: #fff8e6;
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

/* iOS/Android не увеличивают шрифт сами при повороте телефона */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: "PT Serif", Georgia, "Times New Roman", "Liberation Serif", "DejaVu Serif", serif;
    overflow-x: hidden;
}

/* Баннер на всю ширину окна, без полей по бокам. Кнопки, надписи и полоса спонсоров заданы в долях ширины баннера (cqw):
   (для старых браузеров без cqw перед каждым значением стоит запасное в vw — баннер во всю ширину окна, так что это почти то же)
   при любом размере окна и масштабе браузера композиция масштабируется целиком */
.stage { min-height: 100vh; min-height: 100svh; background: #3a080b; }

.banner {
    position: relative;
    width: 100%;
    container-type: inline-size;
}

.banner-pic { position: relative; }

.banner-img {
    display: block;
    width: 100%;
    height: auto;
}

.plates { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; }

.plate {
    pointer-events: auto;
    position: absolute;
    top: 78%;
    width: 22%;
    height: 11%;
    padding: 0.7vw 1.4vw;
    padding: 0.7cqw 1.4cqw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2vw;
    gap: 0.2cqw;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    background: var(--plate-bg);
    border: max(2px, 0.18vw) solid var(--gold);
    border: max(2px, 0.18cqw) solid var(--gold);
    border-radius: 999px;
    box-shadow:
        0 0 0 max(1px, 0.1vw) var(--gold-deep) inset,
        0 0.6vw 1.8vw rgba(0, 0, 0, 0.5);
    box-shadow:
        0 0 0 max(1px, 0.1cqw) var(--gold-deep) inset,
        0 0.6cqw 1.8cqw rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}

/* Кнопки на равном расстоянии от центральной оси герба, одного размера и вида.
   Ось герба (центр щита) — 49,4% ширины картинки (замер по полному скриншоту 1827 px):
   центр левой — 33%, центр правой — 65,8%, обе по 16,4% от оси */
.plate-left  { left: 22%; }
.plate-right { left: 54.8%; }

.plate-title {
    font-size: 1.3vw;
    font-size: 1.3cqw;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

a.plate:hover,
a.plate:focus-visible {
    background: var(--plate-bg-hover);
    transform: translateY(-3px);
    box-shadow:
        0 0 0 max(1px, 0.1vw) var(--gold-deep) inset,
        0 0 1.6vw rgba(241, 207, 115, 0.55),
        0 0.8vw 2vw rgba(0, 0, 0, 0.55);
    box-shadow:
        0 0 0 max(1px, 0.1cqw) var(--gold-deep) inset,
        0 0 1.6cqw rgba(241, 207, 115, 0.55),
        0 0.8cqw 2cqw rgba(0, 0, 0, 0.55);
}

a.plate:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

/* Раздел ещё не работает: выглядит так же, как левая кнопка, но не нажимается */
.plate-disabled { cursor: default; }

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Нижняя часть баннера: места для спонсоров, в цветах верхней полосы баннера */
.sponsors {
    height: 15.625vw;
    height: 15.625cqw; /* 300 из 1920 */
    padding: 1.1vw 2.5vw 1.6vw;
    padding: 1.1cqw 2.5cqw 1.6cqw;
    display: flex;
    flex-direction: column;
    gap: 0.9vw;
    gap: 0.9cqw;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.25), transparent 30%),
        linear-gradient(180deg, #5c1015, #3a080b);
    border-top: max(2px, 0.2vw) solid var(--gold);
    border-top: max(2px, 0.2cqw) solid var(--gold);
    box-shadow: 0 max(1px, 0.12vw) 0 var(--gold-deep) inset;
    box-shadow: 0 max(1px, 0.12cqw) 0 var(--gold-deep) inset;
}

.sponsors-title {
    margin: 0;
    text-align: center;
    font-size: 1.25vw;
    font-size: 1.25cqw;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.sponsors-list {
    flex: 1;
    min-height: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 1.4vw;
    gap: 1.4cqw;
}

.sponsor {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8vw;
    padding: 0.8cqw;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    background: rgba(255, 248, 230, 0.06);
    border: max(1px, 0.12vw) solid rgba(241, 207, 115, 0.75);
    border: max(1px, 0.12cqw) solid rgba(241, 207, 115, 0.75);
    border-radius: 0.8vw;
    border-radius: 0.8cqw;
    transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.sponsor img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sponsor-name {
    font-size: 1.1vw;
    font-size: 1.1cqw;
    font-weight: 700;
    line-height: 1.2;
}

.sponsor-empty {
    border-style: dashed;
    border-color: rgba(241, 207, 115, 0.45);
    background: transparent;
}

.sponsor-empty .sponsor-name {
    font-weight: 400;
    color: rgba(255, 248, 230, 0.55);
}

a.sponsor:hover,
a.sponsor:focus-visible {
    background: rgba(241, 207, 115, 0.16);
    transform: translateY(-2px);
    box-shadow: 0 0 1.2vw rgba(241, 207, 115, 0.4);
    box-shadow: 0 0 1.2cqw rgba(241, 207, 115, 0.4);
}

a.sponsor:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* Телефон в вертикальном положении: баннер слишком мелкий — кнопки встают под ним.
   Увеличение масштаба браузера на компьютере (экран горизонтальный) раскладку не меняет: всё масштабируется вместе с баннером */
@media (max-width: 700px) and (orientation: portrait) {
    .plates {
        position: static;
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    .plate {
        position: static;
        width: 100%;
        height: auto;
        min-height: 64px;
        padding: 12px 20px;
        gap: 2px;
        border-width: 2px;
        box-shadow: 0 0 0 1px var(--gold-deep) inset, 0 6px 18px rgba(0, 0, 0, 0.5);
    }
    .plate-title { font-size: 17px; }
    .sponsors { height: auto; padding: 16px; gap: 12px; border-top-width: 2px; }
    .sponsors-title { font-size: 13px; }
    .sponsors-list { grid-auto-flow: row; grid-template-columns: 1fr 1fr; gap: 10px; }
    .sponsor { height: 72px; padding: 8px; border-radius: 10px; }
    .sponsor-name { font-size: 14px; }
}
