/* ===== Базовые переменные: цвета ЛДПР, легко перекрасить ===== */
:root {
  --c-primary: #0e3a8c;      /* синий ЛДПР */
  --c-primary-dark: #082558;
  --c-accent: #ffcc00;       /* золотой ЛДПР */
  --c-accent-text: #1a1a1a;
  --c-text: #1c2430;
  --c-muted: #5a6575;
  --c-bg: #ffffff;
  --c-bg-alt: #f2f5fa;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(8, 37, 88, .10);
  --container: 1140px;
}

@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/Montserrat-800-cyrillic.woff2") format("woff2");
  font-weight: 800; font-display: swap; unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-400-cyrillic.woff2") format("woff2");
  font-weight: 400; font-display: swap; unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-600-cyrillic.woff2") format("woff2");
  font-weight: 600; font-display: swap; unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font: 400 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); }
h1, h2, h3 { font-family: "Montserrat", "Inter", system-ui, sans-serif; font-weight: 800; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.15rem; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section-alt { background: var(--c-bg-alt); }
.section-dark { background: var(--c-primary-dark); color: #fff; }
.section-dark a { color: var(--c-accent); }
.section-lead { color: var(--c-muted); max-width: 560px; }
.section-dark .section-lead { color: #c6d2e8; }

/* ===== Кнопки ===== */
.btn {
  display: inline-block; padding: 14px 28px; border: 0; border-radius: 999px;
  font: 600 1rem "Inter", sans-serif; text-decoration: none; cursor: pointer;
  background: var(--c-primary); color: #fff; transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-accent { background: var(--c-accent); color: var(--c-accent-text); }
.btn-ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.btn-small { padding: 9px 20px; font-size: .9rem; }

/* ===== Шапка ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid #e4e9f1;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--c-text); }
.brand-name { font: 800 1.05rem "Montserrat", sans-serif; }
.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav a:not(.btn) { text-decoration: none; color: var(--c-text); font-weight: 600; font-size: .95rem; }
.site-nav a:not(.btn):hover { color: var(--c-primary); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--c-text); margin: 5px 0; }

/* ===== Герой ===== */
.hero { background: linear-gradient(160deg, var(--c-primary) 0%, var(--c-primary-dark) 100%); color: #fff; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: end; padding-top: 56px; }
.hero-kicker { font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--c-accent); font-size: .85rem; }
.hero-sub { font-size: 1.15rem; color: #d7e0f2; max-width: 480px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 28px 0 56px; }
.hero-photo { margin: 0; align-self: end; }
.hero-photo img { border-radius: var(--radius) var(--radius) 0 0; }

/* ===== Галерея дел ===== */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.gallery figure { margin: 0; }
.gallery img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.gallery figcaption { font-size: .9rem; color: var(--c-muted); margin-top: 10px; }

/* ===== Герой команды (групповое фото шире портрета) ===== */
.hero-team { grid-template-columns: 1fr 1.05fr; align-items: center; padding-bottom: 56px; }
.hero-photo-team { align-self: center; }
.hero-photo-team img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 16/11; object-fit: cover; width: 100%; }

/* ===== Карточки кандидатов ===== */
.candidates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; }
.candidate-card {
  display: flex; flex-direction: column;
  background: var(--c-bg); border: 1px solid #e4e9f1; border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: var(--c-text);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.candidate-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--c-primary); }
.candidate-card img { aspect-ratio: 7/8; object-fit: cover; width: 100%; }
.candidate-body { padding: 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.candidate-city {
  margin: 0; font-weight: 600; font-size: .78rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--c-primary);
}
.candidate-card h3 { margin: 0; font-size: 1.1rem; }
.candidate-tag { margin: 0; font-size: .9rem; color: var(--c-muted); flex: 1; }
.candidate-more { font-weight: 600; color: var(--c-primary); font-size: .92rem; margin-top: 8px; }
.candidate-badge {
  margin: 0; padding: 8px 12px; border-radius: 10px;
  background: #fff6d6; border: 1px solid var(--c-accent);
  font-size: .82rem; line-height: 1.4; color: #6b5200;
}

/* ===== Карточки тем ===== */
.topics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 32px; }
.topic-card {
  background: var(--c-bg); border-radius: var(--radius); padding: 22px;
  text-decoration: none; color: var(--c-text);
  border: 1px solid #e4e9f1; transition: transform .15s, box-shadow .15s, border-color .15s;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--c-primary); }
.topic-card h3 { color: var(--c-primary); margin-bottom: 6px; }
.topic-card p { margin: 0; font-size: .9rem; color: var(--c-muted); }

/* ===== Карта округа ===== */
.map-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; margin-top: 32px; }
.map-svg {
  width: 100%; height: auto; max-height: 620px;
  background: #f7f9fc; border: 1px solid #e4e9f1; border-radius: var(--radius);
}
.map-area {
  fill: var(--c-primary); fill-opacity: .18;
  stroke: var(--c-primary); stroke-width: 2.5; stroke-linejoin: round;
  transition: fill-opacity .15s;
  cursor: pointer;
}
.map-area[data-area="aramil"]  { fill: #e0a800; stroke: #b98600; }
.map-area[data-area="chkalov"] { fill: #0e8a8a; stroke: #0b6d6d; }
.map-area:hover, .map-area.is-active { fill-opacity: .55; }
.map-ref {
  fill: #9aa7bb; fill-opacity: .10;
  stroke: #9aa7bb; stroke-width: 2; stroke-dasharray: 7 6;
}

.map-legend { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 10px; }
.map-legend li { margin: 0; }
.map-legend button, .legend-ref {
  display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: start;
  width: 100%; text-align: left; padding: 14px 16px;
  background: var(--c-bg); border: 1px solid #e4e9f1; border-radius: 12px;
  font: 600 .95rem "Inter", sans-serif; color: var(--c-text); cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.legend-ref { cursor: default; color: var(--c-muted); font-weight: 400; }
.map-legend button:hover, .map-legend button.is-active { border-color: var(--c-primary); box-shadow: var(--shadow); }
.map-legend small { grid-column: 2; display: block; font-weight: 400; color: var(--c-muted); margin-top: 3px; }
.map-dot { width: 18px; height: 18px; border-radius: 5px; margin-top: 2px; }
.dot-sysert  { background: rgba(14, 58, 140, .35); border: 2px solid var(--c-primary); }
.dot-aramil  { background: rgba(224, 168, 0, .35); border: 2px solid #b98600; }
.dot-chkalov { background: rgba(14, 138, 138, .35); border: 2px solid #0b6d6d; }
.dot-ref     { background: rgba(154, 167, 187, .15); border: 2px dashed #9aa7bb; }
.map-note { font-size: .85rem; line-height: 1.5; color: var(--c-muted); margin: 0; }

/* ===== Формы ===== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.form-card {
  background: var(--c-bg); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); display: grid; gap: 14px;
}
.form-dark { background: #fff; color: var(--c-text); }
.form-card label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
.form-card input:not([type="checkbox"]), .form-card select, .form-card textarea {
  padding: 12px 14px; border: 1px solid #cdd6e4; border-radius: 10px;
  font: 400 1rem "Inter", sans-serif; background: #fff; color: var(--c-text); width: 100%;
}
.form-card input:focus, .form-card select:focus, .form-card textarea:focus {
  outline: 2px solid var(--c-primary); outline-offset: 1px; border-color: var(--c-primary);
}
.form-card .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.form-card .check input { margin-top: 4px; }
.form-step { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; }
.form-status { margin: 0; font-size: .9rem; min-height: 1.2em; }
.form-status.ok { color: #1a7f37; }
.form-status.err { color: #c0392b; }
.hp { position: absolute !important; left: -9999px !important; height: 0; width: 0; opacity: 0; }

/* ===== Пресса ===== */
.press { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.press-card {
  background: var(--c-bg); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: var(--c-text); border: 1px solid #e4e9f1;
  transition: transform .15s, box-shadow .15s;
}
.press-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.press-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.press-card h3 { font-size: 1rem; margin: 16px 16px 6px; }
.press-card p { margin: 0 16px 16px; font-size: .85rem; color: var(--c-muted); }

/* ===== Футер ===== */
.site-footer { background: var(--c-primary-dark); color: #d7e0f2; padding: 56px 0 24px; }
.site-footer h2 { color: #fff; }
.site-footer a { color: var(--c-accent); }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; }
.footer-links { display: grid; gap: 10px; align-content: start; }
.footer-links a { text-decoration: none; font-weight: 600; }
.footer-legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.15); font-size: .8rem; color: #93a5c4; }

/* ===== Адаптив ===== */
@media (max-width: 960px) {
  .topics { grid-template-columns: repeat(2, 1fr); }
  .candidates { grid-template-columns: 1fr; max-width: 420px; }
  .map-wrap { grid-template-columns: 1fr; }
  .map-svg { max-height: 520px; justify-self: center; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-team { padding-bottom: 40px; }
  .hero-photo { max-width: 420px; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .section { padding: 48px 0; }
  .gallery, .press { grid-template-columns: 1fr; }
  .site-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; flex-direction: column; padding: 20px; gap: 16px;
    border-bottom: 1px solid #e4e9f1;
  }
  .site-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .topics { grid-template-columns: 1fr; }
}
