/* Motivation Awards — стили сайта. Цвета и шрифты меняются в блоке :root. */

:root {
    --bg: #0b0a08;
    --surface: #14120e;
    --surface-2: #1b1813;
    --line: rgba(214, 178, 110, 0.2);
    --text: #f4efe4;
    --text-soft: #d9d3c5;
    --muted: #a8a08f;
    --gold: #d6b26e;
    --gold-hi: #f1dba6;
    --on-gold: #1a1408;
    --ok: #a9d3a2;
    --err: #e8907f;
    --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
    --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font: 400 16px/1.65 var(--sans);
}

main { flex: 1; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hi); }
p { margin: 0 0 1em; }

h1, h2, h3 {
    margin: 0 0 0.5em;
    font-family: var(--serif);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: 0.01em;
}
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }

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

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.wrap--narrow { max-width: 760px; }

/* ── Шапка ── */

.header { border-bottom: 1px solid var(--line); }
.header__in {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    padding-top: 16px;
    padding-bottom: 14px;
}
.logo {
    font-family: var(--serif);
    font-size: 0.95rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--text);
}
.logo span { color: var(--gold); }
.logo:hover { color: var(--text); }

.nav { display: flex; justify-content: center; gap: 24px; order: 3; width: 100%; }
.nav a {
    padding: 6px 0;
    border-bottom: 1px solid transparent;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.nav a:hover, .nav a.is-active { color: var(--text); border-color: var(--gold); }

.langs { display: flex; gap: 2px; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.1em; }
.langs a { padding: 4px 10px; border-radius: 999px; color: var(--muted); }
.langs a:hover { color: var(--text); }
.langs a.is-active { background: var(--gold); color: var(--on-gold); }

@media (min-width: 720px) {
    .header__in { column-gap: 28px; }
    .logo { font-size: 1.2rem; letter-spacing: 0.22em; }
    .nav { order: 0; width: auto; margin-left: auto; }
}

/* ── Кнопки ── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 28px;
    border: 1px solid var(--gold);
    border-radius: 999px;
    background: transparent;
    color: var(--gold-hi);
    font: 700 0.8rem/1.2 var(--sans);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, filter 0.2s;
}
.btn:hover { background: var(--gold); color: var(--on-gold); }
.btn--primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--gold-hi), var(--gold));
    color: var(--on-gold);
}
.btn--primary:hover { background: linear-gradient(135deg, var(--gold-hi), var(--gold)); filter: brightness(1.1); }

/* ── Первый экран главной ── */

.hero {
    padding: clamp(72px, 16vw, 160px) 0 clamp(64px, 12vw, 130px);
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(60% 55% at 50% 0%, rgba(214, 178, 110, 0.22), transparent 70%),
        radial-gradient(40% 40% at 50% 100%, rgba(214, 178, 110, 0.08), transparent 70%);
    text-align: center;
}
.hero__title {
    margin: 0;
    padding-left: 0.14em; /* уравновешивает межбуквенный интервал после последней буквы */
    font-size: clamp(1.9rem, 9.5vw, 6.5rem);
    line-height: 1;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.hero__title span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8em;
    margin-top: 0.6em;
    color: var(--gold);
    font-size: 0.42em;
    letter-spacing: 0.6em;
}
.hero__title span::before, .hero__title span::after {
    content: "";
    width: min(12vw, 120px);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold));
}
.hero__title span::before { margin-right: 0.6em; }
.hero__title span::after { transform: scaleX(-1); }
.hero__lead {
    max-width: 620px;
    margin: 30px auto 36px;
    color: var(--muted);
    font-size: clamp(1rem, 2.4vw, 1.2rem);
}
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ── Секции и текст ── */

.section { padding: clamp(48px, 9vw, 96px) 0; }
.section--alt { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.section--center { text-align: center; }

.prose { color: var(--text-soft); font-size: 1.05rem; }
.prose p:last-child { margin-bottom: 0; }

.more {
    display: inline-block;
    margin-top: 24px;
    padding-bottom: 3px;
    border-bottom: 1px solid var(--line);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.actions { margin: 36px 0 0; }

.page-head { max-width: 720px; margin: 0 auto clamp(28px, 5vw, 48px); text-align: center; }
.page-head__lead { margin: 0; color: var(--muted); }

.steps { display: grid; gap: 16px; margin: 32px 0 40px; padding: 0; list-style: none; }
.steps li { padding: 26px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.steps__num { display: block; margin-bottom: 14px; color: var(--gold); font-family: var(--serif); font-size: 2.4rem; line-height: 1; }
.steps h3 { margin-bottom: 0.35em; font-size: 1.45rem; }
.steps p { margin: 0; color: var(--muted); font-size: 0.95rem; }

@media (min-width: 760px) {
    .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

/* ── Сообщения ── */

.flash { padding: 14px 0; text-align: center; font-size: 0.95rem; font-weight: 600; }
.flash--ok { border-bottom: 1px solid rgba(169, 211, 162, 0.3); background: rgba(169, 211, 162, 0.14); color: var(--ok); }
.flash--err { border-bottom: 1px solid rgba(232, 144, 127, 0.3); background: rgba(232, 144, 127, 0.12); color: var(--err); }

.notice {
    max-width: 720px;
    margin: 0 auto 28px;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    text-align: center;
}
.note { margin: 32px 0 0; color: var(--muted); font-size: 0.8rem; text-align: center; }

/* ── Список номинантов ── */

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

@media (min-width: 680px) {
    .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}
@media (min-width: 1080px) {
    .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--gold); transform: translateY(-2px); }
.card--mine { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.card__photo { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-2); }
.card__photo img { width: 100%; height: 100%; object-fit: cover; }
.card__body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 14px 14px 16px; text-align: center; }
.card__name { margin: 0; font-size: 1.3rem; overflow-wrap: anywhere; }
.card__name a { color: var(--text); }
.card__name a:hover { color: var(--gold-hi); }
.card__title { margin: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.4; }
.card form, .card .voted { margin-top: auto; padding-top: 8px; }
.card .btn { width: 100%; padding: 11px 10px; font-size: 0.72rem; }

.count { margin: 4px 0 0; color: var(--muted); font-size: 0.85rem; }
.count b { margin-right: 3px; color: var(--gold-hi); font-family: var(--serif); font-size: 1.5rem; font-weight: 600; }

.voted { margin: 0; color: var(--gold-hi); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }

/* ── Страница номинанта ── */

.back {
    display: inline-block;
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.nominee { display: grid; gap: 28px; }
.nominee__photo {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-2);
}
.nominee__photo img { width: 100%; height: 100%; object-fit: cover; }
.nominee__title { margin: -6px 0 22px; color: var(--gold); letter-spacing: 0.04em; }
.nominee__instagram { margin: -6px 0 22px; color: var(--muted); font-size: 0.95rem; }
.nominee__title + .nominee__instagram { margin-top: -14px; }
.nominee__vote {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 28px;
    margin-bottom: 26px;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.nominee__vote .count { margin: 0; }
.nominee__vote .count b { font-size: 2.2rem; }

@media (min-width: 860px) {
    .nominee { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 56px; align-items: start; }
    .nominee__photo { position: sticky; top: 24px; }
}

.share { margin-top: 36px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.share h2 { margin-bottom: 4px; font-size: 1.4rem; }
.share__hint { margin-bottom: 14px; color: var(--muted); font-size: 0.9rem; }
.share__row { display: flex; flex-wrap: wrap; gap: 10px; }
.share__row input, .admin__login input {
    flex: 1 1 220px;
    min-width: 0;
    padding: 11px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
}

/* ── Подвал, 404 ── */

.footer { padding: 26px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; text-align: center; }
.e404 { margin: 0 0 10px; color: var(--gold); font-family: var(--serif); font-size: clamp(5rem, 20vw, 9rem); line-height: 1; }

/* ── Панель организатора ── */

.admin { padding: 40px 0 72px; }
.admin__login { display: grid; gap: 14px; max-width: 360px; margin: 12vh auto 0; text-align: center; }
.admin__error { margin: 0; color: var(--err); }
.admin__top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.admin__hint { max-width: 760px; color: var(--muted); font-size: 0.9rem; }
.admin h2 { margin-top: 48px; }
.table-scroll { overflow-x: auto; }
.admin table { width: 100%; margin: 14px 0 0; border-collapse: collapse; font-size: 0.92rem; }
.admin th, .admin td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.admin th { color: var(--muted); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.admin .num { text-align: right; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
