/* stem-dommer.nl — matches the old React/Tailwind aesthetic */

:root {
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --orange-100: #ffedd5;
  --red-500:    #ef4444;
  --rose-600:   #e11d48;
  --blue-500:   #3b82f6;
  --sky-500:    #0ea5e9;
  --yellow-100: #fef9c3;
  --yellow-500: #eab308;
  --yellow-700: #a16207;
  --slate-500:  #64748b;
  --slate-600:  #475569;
  --slate-700:  #334155;
  --slate-800:  #1e293b;
  --gray-100:   #f3f4f6;
  --gray-200:   #e5e7eb;
  --bg:         #f3f4f6;
}

*, *:before, *:after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--slate-800);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  font-size: 16px;
}
::selection { background: var(--orange-500); color: white; }

/* ── Layout ──────────────────────────────────────────────── */

main { max-width: 56rem; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

/* ── Site title (replaces topbar) ────────────────────────── */

.site-title {
  text-align: center;
  margin: 1.75rem 0 0.5rem;
  padding: 0 1rem;
}
.site-title h1 {
  /* Fluid scale: 1.8rem on iPhone SE (320px) → 2.5rem at ~430px+, then bumped further by media queries */
  font-size: clamp(1.8rem, 8.5vw, 2.5rem);
  font-weight: 800;
  color: var(--red-500);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
  line-height: 1.05;
}
.site-title .tagline {
  color: var(--slate-700);
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
}
.site-title .tagline strong { color: var(--orange-600); font-weight: 700; }

@media (min-width: 640px) { .site-title h1 { font-size: 3.5rem; } }
@media (min-width: 768px) { .site-title h1 { font-size: 4.5rem; } .site-title .tagline { font-size: 1.15rem; } }

.site-nav-bar {
  text-align: center;
  margin: 0.85rem 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.site-nav-bar a {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #b03a2e;
  background: rgba(249, 115, 22, 0.10);
  text-decoration: none;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}
.site-nav-bar a:hover {
  background: rgba(249, 115, 22, 0.18);
  color: #8b1f15;
  transform: translateY(-1px);
  border-color: rgba(249, 115, 22, 0.25);
}

/* ── AI disclaimer banner ────────────────────────────────── */

.disclaimer {
  background: var(--yellow-100);
  border-left: 4px solid var(--yellow-500);
  border-radius: 0.5rem;
  padding: 0.875rem 1.25rem;
  /* Match the inner width of <main>: 56rem max-width - 2 × 1.5rem horizontal padding */
  margin: 1.25rem auto;
  max-width: calc(56rem - 3rem);
  margin-left: 1.5rem;
  margin-right: 1.5rem;
  /* Center on wider screens via auto margins (override the per-side margin above) */
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--yellow-700);
}
.disclaimer .icon {
  font-size: 1.25rem;
  line-height: 1;
}
.disclaimer .body strong { display: block; margin-bottom: 0.15rem; }
@media (min-width: 56rem) { .disclaimer { margin-left: auto; margin-right: auto; } }
.disclaimer a { color: var(--yellow-700); text-decoration: underline; font-weight: 600; }

/* ── Hero card ───────────────────────────────────────────── */

.hero {
  background: white;
  border-radius: 1rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.10),
              0 4px 6px -4px rgba(0,0,0,0.10);
  margin-bottom: 1.5rem;
}
.hero h2 {
  font-size: 1.75rem;
  margin: 0 0 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(to right, var(--orange-500), var(--red-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lead {
  font-size: 1rem;
  color: var(--slate-600);
  margin: 0 auto 1.75rem;
  max-width: 30rem;
  line-height: 1.55;
}
@media (min-width: 640px) {
  .hero { padding: 3rem 2.5rem; }
  .hero h2 { font-size: 2.25rem; }
  .hero .lead { font-size: 1.1rem; }
}
@media (min-width: 768px) {
  .hero h2 { font-size: 2.75rem; }
}

.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  background: linear-gradient(to right, var(--orange-500), var(--red-500));
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(249,115,22,0.30),
              0 2px 4px -2px rgba(249,115,22,0.20);
}
.btn:hover {
  background: linear-gradient(to right, var(--orange-600), #dc2626);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 15px -3px rgba(249,115,22,0.40);
}
.btn:active { transform: translateY(0) scale(1); }
.btn-big { font-size: 1.2rem; padding: 1.1rem 2.5rem; }

.btn-blue {
  background: linear-gradient(to right, var(--blue-500), var(--sky-500));
  box-shadow: 0 4px 6px -1px rgba(59,130,246,0.30);
}
.btn-blue:hover {
  background: linear-gradient(to right, #2563eb, #0284c7);
  box-shadow: 0 10px 15px -3px rgba(59,130,246,0.40);
}

.btn-secondary {
  background: white;
  color: var(--slate-700);
  border: 2px solid var(--gray-200);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.btn-secondary:hover {
  background: var(--gray-100);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

/* ── Section cards ───────────────────────────────────────── */

.section {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07),
              0 2px 4px -2px rgba(0,0,0,0.05);
}
@media (min-width: 640px) {
  .section { padding: 2rem 2.5rem; }
}
.section h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-align: center;
  background: linear-gradient(to right, var(--orange-500), var(--red-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section.serious h2 {
  background: linear-gradient(to right, var(--blue-500), var(--sky-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section p { color: var(--slate-700); line-height: 1.65; }

/* ── Party detail header (hero card with party name) ─────── */

.party-hero {
  background: white;
  border-radius: 1rem;
  padding: 2rem 1.75rem;
  text-align: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.08);
  position: relative;
  overflow: hidden;
}
.party-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--party-color, var(--orange-500));
  opacity: 0.08;
  z-index: 0;
}
.party-hero > * { position: relative; z-index: 1; }
.party-hero h2 {
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--slate-800);
}
@media (min-width: 640px) {
  .party-hero { padding: 2.5rem 2rem; }
  .party-hero h2 { font-size: 2.25rem; }
}
.party-hero .leader {
  color: var(--slate-600);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.party-hero .ideology {
  display: inline-block;
  font-size: 0.78rem;
  padding: 0.25rem 0.75rem;
  background: var(--orange-100);
  color: var(--orange-600);
  border-radius: 9999px;
  font-weight: 600;
  margin-top: 0.5rem;
}

.party-actions {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* ── Video ───────────────────────────────────────────────── */

.video-wrap {
  background: black;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.10),
              0 8px 10px -6px rgba(0,0,0,0.10);
  margin: 1.5rem 0;
}
.video-wrap video { width: 100%; display: block; }

/* ── Day-in-life timeline ────────────────────────────────── */

.timeline { margin-top: 0.5rem; }
.tl-item {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--gray-200);
}
.tl-item:last-child { border-bottom: none; }
.tl-time {
  font-weight: 700;
  color: var(--orange-600);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  background: var(--orange-100);
  padding: 0.25rem 0.5rem;
  border-radius: 0.4rem;
  text-align: center;
  height: fit-content;
}
.tl-body .tl-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 0.25rem;
  color: var(--slate-800);
}
.tl-body .tl-note {
  color: var(--slate-600);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ── Vote bar ────────────────────────────────────────────── */

.vote-bar {
  background: linear-gradient(135deg, var(--yellow-100), var(--orange-100));
  border-radius: 1rem;
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
  text-align: center;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.08);
}
.vote-bar .your-vote {
  background: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  display: inline-block;
  font-size: 0.9rem;
  margin-bottom: 0.875rem;
  color: var(--slate-700);
  border: 1px solid var(--gray-200);
}
.vote-bar form { display: inline; }
.vote-bar small {
  display: block;
  margin-top: 0.625rem;
  color: var(--slate-500);
  font-size: 0.82rem;
}

/* ── Party tile grid (only used on /partijen if we ever add it) ── */

.party-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1rem 0;
}
@media (min-width: 480px) { .party-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .party-grid { grid-template-columns: repeat(5, 1fr); gap: 1rem; } }

.party-tile {
  background: white;
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--slate-800);
  border: 2px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.party-tile:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.10);
}
.party-tile .swatch {
  width: 100%;
  height: 0.5rem;
  border-radius: 0.25rem;
  margin-bottom: 0.75rem;
}
.party-tile .name { font-weight: 800; font-size: 1.1rem; }
.party-tile .full { color: var(--slate-500); font-size: 0.72rem; margin-top: 0.25rem; line-height: 1.3; }

/* ── Peiling rows ────────────────────────────────────────── */

.peiling-row {
  display: grid;
  grid-template-columns: 6rem 1fr 4rem 4rem;
  align-items: center;
  gap: 0.75rem;
  margin: 0.4rem 0;
  font-size: 0.95rem;
}
.peiling-row .name { font-weight: 700; }
.peiling-row .bar {
  height: 1.5rem;
  border-radius: 0.375rem;
  background: var(--gray-100);
  position: relative;
  overflow: hidden;
}
.peiling-row .bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 0.375rem;
  transition: width 0.3s ease-out;
}
.peiling-row .seats { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.peiling-row .pct { color: var(--slate-500); text-align: right; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
@media (max-width: 580px) {
  .peiling-row { grid-template-columns: 4.5rem 1fr 3rem 3rem; gap: 0.5rem; font-size: 0.88rem; }
}

/* ── Coalitions ──────────────────────────────────────────── */

.coalition {
  background: white;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin: 0.75rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  flex-wrap: wrap;
}
.coalition .stripe-row {
  display: flex; height: 1.75rem; border-radius: 0.375rem;
  overflow: hidden; flex-grow: 1; min-width: 12rem;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}
.coalition .stripe { height: 100%; }
.coalition .meta { font-size: 0.92rem; color: var(--slate-600); }
.coalition .meta strong { color: var(--slate-800); }
.coalition .total { font-weight: 800; color: var(--slate-800); margin-left: 0.4rem; }
.coalition .margin { color: var(--slate-500); margin-left: 0.4rem; }

/* ── Footer ──────────────────────────────────────────────── */

footer {
  text-align: center;
  color: var(--slate-500);
  font-size: 0.82rem;
  padding: 2rem 1.5rem 1rem;
  line-height: 1.6;
}

/* ── Mobile tweaks ──────────────────────────────────────── */

@media (max-width: 580px) {
  main { padding: 1.5rem 1rem 4rem; }
  .hero { padding: 2rem 1.25rem; }
  .section { padding: 1.25rem 1.25rem; }
  .tl-item { grid-template-columns: 3.5rem 1fr; gap: 0.75rem; }
}

/* ─── Share — small floating pill in bottom-right corner ──────────── */
.share-fab {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.15s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.share-fab:hover {
  background: #fff;
  color: #16a34a;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}
.share-fab.copied {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
  pointer-events: none;
}
@media (max-width: 480px) {
  .share-fab { bottom: 14px; right: 14px; padding: 7px 12px; font-size: 0.76rem; }
}

/* ─── Vote privacy expander ────────────────────────────────────── */
.vote-privacy {
  margin-top: 1rem;
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.vote-privacy summary {
  cursor: pointer;
  color: #6b7280;
  font-size: 0.82rem;
  list-style: none;
  user-select: none;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.15s;
}
.vote-privacy summary:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #374151;
}
.vote-privacy summary::-webkit-details-marker { display: none; }
.vote-privacy[open] summary { color: #374151; font-weight: 600; }
.vote-privacy-body {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 6px;
  font-size: 0.86rem;
  color: #475569;
  text-align: left;
  line-height: 1.5;
}
.vote-privacy-body p { margin: 0.4em 0; }
.vote-privacy-body ul { margin: 0.4em 0 0.6em 1.2em; padding: 0; }
.vote-privacy-body li { margin: 0.25em 0; }
.vote-privacy-body code {
  background: #e2e8f0;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.92em;
  color: #1e293b;
}

/* ─── Video audio handling (added 2026-05-03) ───────────────── */
.video-wrap { position: relative; }
.video-wrap[data-has-audio="1"] .unmute-overlay {
  position: absolute;
  top: 14px; right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 5;
  backdrop-filter: blur(4px);
  transition: opacity 0.25s ease;
}
.video-wrap[data-has-audio="1"] .unmute-overlay:hover { background: rgba(0, 0, 0, 0.85); }
.video-wrap[data-has-audio="1"].unmuted .unmute-overlay { opacity: 0; pointer-events: none; }
.video-audio-caption {
  text-align: center;
  font-size: 0.82rem;
  color: #6b7280;
  margin-top: 0.45rem;
  font-style: italic;
}
@media (max-width: 480px) {
  .video-wrap[data-has-audio="1"] .unmute-overlay {
    top: 8px; right: 8px; padding: 6px 10px; font-size: 0.78rem;
  }
}
