/* site.css — ВКадре, дизайн по Figma «Итерация №3» / vkadre.pen.
   Экраны — артборд шириной 1080 (iPad landscape, CSS px @2x); высота --
   переменная --vh (база 810), подбирается под окно в app.js. Нижние
   и центрированные элементы привязаны к --vh, верхние — к верху. */

@font-face {
    font-family: 'Golos Text';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url(assets/fonts/golos-cyrillic-ext.woff2) format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
    font-family: 'Golos Text';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url(assets/fonts/golos-cyrillic.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: 100 900;
    font-display: swap;
    src: url(assets/fonts/golos-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Golos Text';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url(assets/fonts/golos-latin.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 {
    --bg: #fff8f2;
    --text: #1f2127;
    --purple: #7409ef;
    --purple-soft: rgba(116, 9, 239, .08);
    --purple-50: rgba(116, 9, 239, .5);
    --violet: #965eeb;
    --lavender: #dfcdf3;
    --btn-text: #e8f4fd;
    --x-sep: rgba(29, 23, 75, .7);
    --error: #ff5252;
    --modal-grad: linear-gradient(143.13deg, #7f30ff 0%, #5400b7 33%, #0098e3 79%, #01abff 100%);
    --shadow-modal: 0 20px 60px rgba(19, 0, 50, .3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
    background: var(--bg);
    font-family: 'Golos Text', system-ui, -apple-system, sans-serif;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    overscroll-behavior: none;
    touch-action: manipulation;
}

/* Portrait запрещён совсем: экран пуст, без заглушек. */
@media (orientation: portrait) {
    body { display: none !important; }
}

/* Масштабирование макета под окно (app.js): ширина 1080 — всегда в окно
   целиком, высота --vh — под фактическое окно (на iPad несъёмный статусбар
   делает пропорцию шире 4:3). Ниже 720 (десктоп-предпросмотр) — вписываем
   базовый макет 1080×810 целиком. */
#sizer { position: relative; margin: 0 auto; overflow: visible; }
body[data-fit="both"] { display: flex; align-items: center; justify-content: center; overflow: hidden; }
body[data-fit="width"] { display: block; overflow-y: auto; }
#stage { width: 1080px; --vh: 810px; position: absolute; left: 0; top: 0; transform-origin: 0 0; }

/* ── Экран ─────────────────────────────────────────────── */

.screen {
    position: relative;
    width: 1080px;
    height: var(--vh);
    background: var(--bg);
    overflow: hidden;
}

.bg-blobs {
    position: absolute;
    left: -72px; top: -216px;
    width: 1626px; height: 1140px;
    background: url(assets/bg-blobs.svg) no-repeat;
    background-size: 100% 100%;
    pointer-events: none;
}

/* Шапка «ВКадре × Авито Работа» */
.shapka {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 16px;
    left: 30px; top: 25px;
}
.shapka .x { font-size: 26px; font-weight: 500; color: var(--x-sep); }
.shapka img { display: block; }
.partner { display: flex; align-items: center; gap: 2px; }
.partner img { display: block; }

/* Шапка стартового экрана «ВКадре × Москва 2030» */
.shapka-start {
    left: 30px; top: 20px;
}
.shapka-start .x { font-size: 40px; }

/* ── Начальный экран ───────────────────────────────────── */

.s-start .photo {
    position: absolute;
    left: 290px; top: 55px;
    width: 877px; height: 877px;
    background: url(assets/photo-av04.png) center/cover no-repeat;
    transform: rotate(-15deg);
    opacity: .5;
}
.s-start .sticker {
    position: absolute;
    left: 640px; top: 5px;
    width: 569px; height: 594px;
    background: url(assets/sticker-logo2.png) center/contain no-repeat;
    transform: rotate(7deg);
}
.s-start h1 {
    position: absolute;
    left: 30px; top: 104px;
    width: 624px;
    font-size: 88px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0;
}
.s-start .grad-bar {
    position: absolute;
    left: 28px; top: 357px;
    width: 307px; height: 18.5px;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--violet), var(--lavender));
}
.btn-xl {
    position: absolute;
    left: 30px;
    top: calc(var(--vh) - 118px);
    width: 360px; height: 88px;
    border-radius: 14px;
    background: var(--purple);
    color: var(--btn-text);
    font-family: inherit;
    font-size: 40px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .19);
}

/* ── Карточка проекта ──────────────────────────────────── */

.s-card .sticker-icons {
    position: absolute;
    left: 796px; top: 33px;
    width: 203px; height: 203px;
    background: url(assets/sticker-icons30.png) center/contain no-repeat;
    opacity: .8;
    pointer-events: none;
}

.card-nav {
    position: absolute;
    width: 80px; height: 100px;
    top: calc((var(--vh) - 100px) / 2 - 10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}
.card-nav img { display: block; }
.card-nav.left { left: 10px; }
.card-nav.right { right: 10px; }

.card-content {
    position: absolute;
    left: 90px; top: 213px;
    width: 900px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.card-text { display: flex; flex-direction: column; gap: 10px; }
.card-author { font-size: 23px; font-weight: 700; line-height: 1.25; }
.card-project { font-size: 17px; font-weight: 600; line-height: 1.3; }
.card-desc-wrap { display: flex; flex-direction: column; gap: 20px; }
.card-desc { font-size: 14px; line-height: 1.42; white-space: pre-line; }

.btn-vote {
    width: fit-content;
    height: 46px;
    padding: 0 88px;
    border: 0;
    border-radius: 7px;
    background: var(--purple);
    color: var(--btn-text);
    font-family: inherit;
    font-size: 20px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.progress {
    position: absolute;
    left: 0;
    top: calc(var(--vh) - 67px);
    width: 1080px; height: 67px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 40px;
}
.progress i {
    flex: 1 0 0;
    height: 3px;
    border-radius: 2px;
    background: var(--lavender);
    opacity: .4;
}
.progress i.done { opacity: 1; background: var(--violet); }
.progress i.current { opacity: 1; background: var(--violet); }

/* ── Модалка подтверждения ─────────────────────────────── */

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: var(--modal-grad);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 20;
}
.modal-backdrop.open { display: flex; }

.modal {
    position: relative;
    width: 560px;
    background: #fff;
    border-radius: 24px;
    box-shadow: var(--shadow-modal);
    padding: 40px 40px 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.modal h2 { font-size: 28px; font-weight: 700; }

.modal-close {
    position: absolute;
    right: 20px; top: 20px;
    width: 36px; height: 36px;
    border: 0;
    background: url(assets/close.svg) center/contain no-repeat;
    cursor: pointer;
}

.your-vote {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    border-radius: 14px;
    background: var(--purple-soft);
}
.your-vote .label { font-size: 13px; color: var(--purple-50); }
.your-vote .org { font-size: 20px; font-weight: 500; }
.your-vote .meta { font-size: 14px; color: rgba(31, 33, 39, .6); }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 500; }
.field input[type="text"] {
    height: 56px;
    border: 1px solid rgba(116, 9, 239, .35);
    border-radius: 12px;
    padding: 0 17px;
    font-family: inherit;
    font-size: 16px;
    color: var(--text);
    background: #fff;
    -webkit-appearance: none;
    appearance: none;
}
.field input[type="text"]::placeholder { color: rgba(31, 33, 39, .35); }
.field.error input[type="text"] { border: 2px solid var(--error); }
.field .err-msg { display: none; font-size: 13px; color: var(--error); }
.field.error .err-msg { display: block; }

.consent-row { display: flex; align-items: center; gap: 10px; }
.checkbox {
    position: relative;
    flex: 0 0 auto;
    width: 22px; height: 22px;
    border: 2px solid var(--purple);
    border-radius: 6px;
    background: #fff;
}
.consent-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.consent-row label {
    font-size: 14px;
    color: rgba(31, 33, 39, .8);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.consent-row input:checked + label .checkbox {
    background: var(--purple);
    border-color: var(--purple);
}
.consent-row input:checked + label .checkbox::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.5 12.5l4.5 4.5L18.5 8' stroke='%23ffffff' stroke-width='3.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px 11px no-repeat;
}
.consent-row.error .checkbox { border-color: var(--error); }
.consent-row a { color: var(--purple); text-decoration: none; }

.btn-send {
    width: 100%;
    height: 54px;
    border: 0;
    border-radius: 28px;
    background: var(--purple);
    color: var(--btn-text);
    font-family: inherit;
    font-size: 18px;
    font-weight: 500;
}

/* ── Спасибо ────────────────────────────────────────────── */

/* «Спасибо» — блок отцентрован по вертикали экрана. */
.s-thanks .star {
    position: absolute;
    left: -191px;
    top: calc(var(--vh) / 2 - 171px);
    width: 1500px; height: 1500px;
    background: url(assets/star.svg) center/contain no-repeat;
    pointer-events: none;
}
.s-thanks .shapka-center {
    position: absolute;
    left: 0;
    top: calc(var(--vh) / 2 - 129px);
    width: 1080px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}
.s-thanks h1 {
    position: absolute;
    left: 116px;
    top: calc(var(--vh) / 2 - 78px);
    width: 848px;
    font-size: 104px;
    line-height: 1;
    font-weight: 700;
    text-align: center;
}
.btn-home-row {
    position: absolute;
    left: 0;
    top: calc(var(--vh) / 2 + 150px);
    width: 1080px;
    display: flex;
    justify-content: center;
}
.btn-home {
    height: 56px;
    padding: 0 88px;
    border-radius: 7px;
    background: var(--purple);
    color: var(--btn-text);
    font-family: inherit;
    font-size: 24px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

/* ── Согласие (отдельная страница) ──────────────────────── */

.s-consent { background: var(--modal-grad); }
.doc {
    position: absolute;
    left: 70px; top: 55px;
    width: 940px;
    height: calc(var(--vh) - 110px);
    background: #fff;
    border-radius: 24px;
    box-shadow: var(--shadow-modal);
    padding: 40px 44px 36px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
}
.doc .back {
    font-size: 16px;
    font-weight: 500;
    color: var(--purple);
    text-decoration: none;
    background: none;
    border: 0;
    font-family: inherit;
    cursor: pointer;
    width: fit-content;
}
.doc h1 { font-size: 24px; font-weight: 700; line-height: 32px; }
.doc .body {
    font-size: 13px;
    line-height: 19px;
    color: rgba(31, 33, 39, .85);
    white-space: pre-line;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    user-select: text;
    -webkit-user-select: text;
}

/* ── Результаты (список-рейтинг, скроллящаяся страница) ─── */

.s-results {
    position: relative;
    width: 1080px;
    min-height: var(--vh);
    background: var(--bg);
    padding-bottom: 60px;
    overflow: hidden;
}
.s-results .bg-blobs { position: absolute; }
.s-results h1 {
    position: absolute;
    left: 30px; top: 113px;
    font-size: 72px;
    line-height: 1;
    font-weight: 700;
}
.rate-list {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 44px;
    margin: 241px 0 0 30px;
    width: 980px;
}
.rate-row { display: flex; flex-direction: column; gap: 9px; }
.rate-name { font-size: 18px; font-weight: 700; line-height: 1.35; width: 650px; }
.rate-bar-row { display: flex; align-items: center; gap: 20px; }
.rate-bar { height: 30px; border-radius: 5px; background: var(--purple); }
.rate-count { font-size: 32px; line-height: 1; font-weight: 700; color: #965eeb66; }
.rate-count.zero { color: #965eeb3d; }

/* ── Ховеры и отклик нажатия ───────────────────────────── */

.btn-xl, .btn-vote, .btn-send, .btn-home, .modal-close, .card-nav img {
    transition: filter .15s ease, transform .12s ease, opacity .15s ease;
}

@media (hover: hover) and (pointer: fine) {
    .btn-xl:hover, .btn-vote:hover, .btn-send:hover, .btn-home:hover {
        filter: brightness(1.12);
    }
    .card-nav:hover img { transform: scale(1.15); }
    .modal-close:hover { opacity: .55; }
    .consent-row a:hover, .doc .back:hover { text-decoration: underline; }
}

.btn-xl:active, .btn-vote:active, .btn-send:active, .btn-home:active {
    transform: scale(.97);
    filter: brightness(.9);
}
.card-nav:active img { transform: scale(.88); }
