/* Styles specific to the home page (index.html) */

/* HERO */
.hero { padding: 80px 0 60px; }

/* Mobile-only kicker stat — appears right under H1 so the «hook»
   is visible above the fold on phones. */
.hero-kicker { display: none; }
@media (max-width: 720px) {
  .hero-kicker {
    display: block;
    margin: 0 0 28px;
    padding: 18px 20px;
    background: var(--ink);
    color: var(--bg);
    border-radius: 14px;
  }
  .hero-kicker-num {
    font-family: 'Unbounded', sans-serif;
    font-weight: 900;
    font-size: 56px;
    line-height: 1;
    letter-spacing: -0.04em;
    color: #FCA5A5;
  }
  .hero-kicker-num small {
    font-size: 0.4em;
    color: rgba(255,255,255,0.55);
    font-weight: 400;
  }
  .hero-kicker-text {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255,255,255,0.85);
    margin-top: 8px;
  }
  .hero-stats { margin-top: 32px; }
}
.hero-meta {
  display: flex;
  gap: 24px;
  align-items: center;
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.hero-meta-item { display: flex; align-items: center; gap: 8px; }
.hero-meta-item::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.hero h1 {
  font-size: clamp(40px, 9vw, 120px);
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 32px;
  font-weight: 900;
  word-break: break-word;
  hyphens: auto;
}
.hero h1 .accent { color: var(--accent); }
.hero h1 em {
  font-family: 'Lora', serif;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.hero-deck {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 760px;
  margin-bottom: 48px;
  font-weight: 400;
}
.hero-deck strong {
  font-weight: 600;
  color: var(--ink);
  background: linear-gradient(transparent 65%, rgba(185, 28, 28, 0.18) 65%);
  padding: 0 2px;
}

/* Big stats strip */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin-top: 60px;
}
.stat { padding: 32px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat-num {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 12px;
  color: var(--ink);
}
.stat-num.alert { color: var(--accent); }
.stat-num small { font-size: 0.5em; color: var(--ink-muted); font-weight: 400; }
.stat-label {
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  line-height: 1.5;
  text-transform: uppercase;
}

/* Cross-page CTA — sends home → vybory */
.cross-cta {
  display: grid;
  grid-template-columns: 60px 1fr 32px;
  gap: 24px;
  align-items: center;
  margin-top: 48px;
  padding: 26px 28px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
  transition: all 0.22s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.cross-cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: var(--accent);
  transition: width 0.22s var(--ease-out);
}
.cross-cta:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 6px 6px 0 var(--ink);
}
.cross-cta:hover::before { width: 8px; }
.cross-cta-num {
  font-family: 'Unbounded', sans-serif;
  font-weight: 900;
  font-size: 36px;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1;
}
.cross-cta-eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
  margin-bottom: 6px;
}
.cross-cta-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  line-height: 1.15;
}
.cross-cta-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.cross-cta-arrow {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: var(--accent);
  transition: transform 0.22s var(--ease-out);
}
.cross-cta:hover .cross-cta-arrow { transform: translateX(6px); }
@media (max-width: 600px) {
  .cross-cta { grid-template-columns: 1fr 32px; gap: 16px; padding: 20px; }
  .cross-cta-num { display: none; }
  .cross-cta-title { font-size: 20px; }
}

/* PARADOX (dark inverted block) */
.paradox-container {
  background: var(--bg-dark);
  color: var(--bg);
  padding: 100px 0;
  margin: 0;
}
.paradox-container .section-label {
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7);
}
.paradox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 60px;
}
@media (max-width: 800px) { .paradox-grid { grid-template-columns: 1fr; gap: 40px; } }

.paradox-card {
  border: 1px solid rgba(255,255,255,0.15);
  padding: 32px;
  border-radius: 8px;
  position: relative;
}
.paradox-card-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
}
.paradox-card h3 { font-size: 28px; margin-bottom: 24px; line-height: 1.2; }
.paradox-card.dim h3 { color: rgba(255,255,255,0.6); }
.paradox-card.bright {
  background: rgba(220,38,38,0.08);
  border-color: rgba(220,38,38,0.4);
}
.paradox-card.bright h3 { color: #FCA5A5; }
.paradox-stat-mini {
  font-family: 'Unbounded', sans-serif;
  font-size: 80px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  margin: 30px 0 20px;
}
.paradox-card.bright .paradox-stat-mini { color: #FCA5A5; }
.paradox-card.dim .paradox-stat-mini { color: rgba(255,255,255,0.4); }
.paradox-card-text { font-size: 15px; line-height: 1.6; color: rgba(255,255,255,0.75); }

/* MATRIX */
.matrix-container {
  background: var(--bg-paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
  overflow-x: auto;
  margin-top: 32px;
}
.matrix-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  align-items: center;
}
.filter-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-right: 8px;
}
.matrix-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 4px;
}
.matrix-table th {
  padding: 16px 8px;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 13px;
  text-align: center;
  background: transparent;
  vertical-align: bottom;
  position: sticky;
  top: 0;
}
.matrix-table th.law-head { text-align: left; padding-left: 0; }
.matrix-table th.party-head {
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
}
.matrix-table th.party-head:hover { background: var(--bg); }
.matrix-table td { padding: 0; vertical-align: middle; text-align: center; }
.matrix-table td:first-child { text-align: left; }
/* The .vote-cell is inline-flex, which becomes inline-block in a td flow,
   so text-align: center on the td actually centres it horizontally. */
.matrix-table td .vote-cell { display: inline-flex; }
.matrix-table tr.law-row { cursor: pointer; transition: background 0.15s; }
.matrix-table tr.law-row:hover { background: var(--bg); }

.law-cell { padding: 14px 16px 14px 0; border-radius: 8px 0 0 8px; }
.law-cell-year {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-faded);
  margin-bottom: 4px;
}
.law-cell-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 4px;
}
.law-cell-meta {
  font-size: 11px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.matrix-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-muted);
}
.legend-item { display: flex; align-items: center; gap: 8px; }
.legend-swatch { width: 22px; height: 14px; border-radius: 3px; }

/* PARTY CARDS */
.party-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 40px;
}
@media (max-width: 1100px) { .party-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .party-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (max-width: 480px) { .party-grid { grid-template-columns: 1fr; } }

.party-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.party-card-name {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  margin-top: 8px;
}
.party-card-leader { font-size: 12px; color: var(--ink-muted); margin-bottom: 18px; line-height: 1.4; }
.party-card-num {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.03em;
}
.party-card-num-label { font-size: 11px; color: var(--ink-muted); letter-spacing: 0.02em; line-height: 1.3; }
.party-card-text { font-size: 12px; line-height: 1.55; color: var(--ink-soft); }
.party-card:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.party-card-accent { position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.party-card-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.party-card-bar {
  height: 5px;
  background: var(--bg);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 14px;
}
.party-card-bar-fill { height: 100%; border-radius: 100px; }
.party-card-link {
  margin-top: 14px;
  font-size: 11px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* COMPARISON BARS (paradox section) */
.comparison-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 50px;
}
@media (max-width: 800px) { .comparison-bars { grid-template-columns: 1fr; gap: 40px; } }
.comp-block h3 { font-size: 20px; margin-bottom: 6px; line-height: 1.2; }
.comp-block-sub { font-size: 13px; color: var(--ink-muted); margin-bottom: 28px; }
.comp-bar-row {
  display: grid;
  grid-template-columns: 100px 1fr 50px;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.comp-party-label { font-size: 13px; font-weight: 600; }
.comp-bar-track {
  height: 24px;
  background: var(--line-soft);
  border-radius: 4px;
  overflow: hidden;
}
.comp-bar-fill {
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  color: white;
  font-size: 11px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  transition: width 0.6s var(--ease-out);
}
.comp-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  text-align: right;
}

/* TIMELINE */
.timeline-wrap {
  position: relative;
  margin-top: 48px;
  padding-left: 60px;
}
.timeline-wrap::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 22px;
  width: 1px;
  background: var(--line);
}
.timeline-event { position: relative; margin-bottom: 36px; cursor: pointer; }
.timeline-event::before {
  content: '';
  position: absolute;
  left: -42px; top: 8px;
  width: 12px; height: 12px;
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: 50%;
  transition: all 0.2s;
}
.timeline-event.opposed::before { border-color: var(--vote-against); background: var(--vote-against); }
.timeline-event.partial::before { border-color: var(--vote-abstain); background: var(--vote-abstain); }
.timeline-event:hover::before { transform: scale(1.4); }
.timeline-year {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 4px;
}
.timeline-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.timeline-event:hover .timeline-title { color: var(--accent); }
.timeline-summary {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 600px;
}
.timeline-mini-vote { display: flex; gap: 4px; margin-top: 10px; }
.tv-cell {
  width: 22px; height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
}

/* PARTY MODAL extensions */
.party-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.party-stat-num {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.party-stat-label { font-size: 12px; color: var(--ink-muted); letter-spacing: 0.04em; line-height: 1.4; }
.rhetoric-vs-reality {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 600px) { .rhetoric-vs-reality { grid-template-columns: 1fr; } }
.rvr-block { padding: 18px; border-radius: 8px; background: var(--bg); }
.rvr-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 10px;
  font-weight: 600;
}
.rvr-text { font-size: 14px; line-height: 1.55; color: var(--ink-soft); }

/* CONCLUSION */
.conclusion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 50px;
}
@media (max-width: 800px) { .conclusion-grid { grid-template-columns: 1fr; gap: 40px; } }
.conclusion-block h3 { font-size: 22px; margin-bottom: 16px; }
.conclusion-block p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.conclusion-block strong {
  background: linear-gradient(transparent 65%, rgba(185, 28, 28, 0.18) 65%);
  font-weight: 600;
}

@media (max-width: 600px) {
  .hero-meta { gap: 14px; font-size: 11px; }
  .stat-num { font-size: 36px; }

  /* Home matrix → card-per-law layout.
     Each <tr> becomes a card with the law metadata on top, then a
     horizontal strip of 5 vote cells with party labels above them.
     This is more compact AND legible than the desktop horizontal-scroll. */
  .matrix-container { padding: 18px 14px; overflow: visible; }
  .matrix-table {
    min-width: 0;
    width: 100%;
    display: block;
    border-spacing: 0;
  }
  .matrix-table thead { display: none; }
  .matrix-table tbody { display: block; }
  .matrix-table tr.law-row {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-card);
    padding: 16px 14px;
    margin-bottom: 12px;
  }
  .matrix-table tr.law-row:hover { background: var(--bg-card); }
  .matrix-table td { padding: 0; }
  .matrix-table td:first-child {
    flex: 0 0 100%;
    text-align: left;
    margin-bottom: 16px;
  }
  .matrix-table .law-cell { padding: 0; border-radius: 0; }
  .matrix-table td:not(:first-child) {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding-top: 18px;
    position: relative;
  }
  .matrix-table td:not(:first-child) + td { margin-left: 4px; }
  .matrix-table td:not(:first-child)::before {
    position: absolute;
    top: 0; left: 0; right: 0;
    text-align: center;
    font-size: 10px;
    color: var(--ink-muted);
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1;
  }
  .matrix-table td:nth-child(2)::before { content: 'ЕР'; }
  .matrix-table td:nth-child(3)::before { content: 'КПРФ'; }
  .matrix-table td:nth-child(4)::before { content: 'ЛДПР'; }
  .matrix-table td:nth-child(5)::before { content: 'СРЗП'; }
  .matrix-table td:nth-child(6)::before { content: 'НЛ'; }
  .matrix-table td .vote-cell {
    width: 100%;
    max-width: 100%;
    height: 38px;
    font-size: 11px;
  }
}

.stat-src { font-size: 11px; color: var(--ink-muted); margin-top: 8px; }
.stat-src a { color: var(--accent); text-decoration: none; }
.stat-src a:hover { text-decoration: underline; }

/* Hero-stats v2: prose labels — suppress uppercase inherited from .stat-label */
#heroStats .stat-label { text-transform: none; }
