/* ═══════════════════════════════════════════════════
   NOVA DEMOCRATIA — Design Tokens
   Light-first warm governance theme
   ═══════════════════════════════════════════════════ */

:root {
  /* Type Scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Fonts */
  --font-display: 'Cabinet Grotesk', 'Arial Black', sans-serif;
  --font-body: 'Satoshi', 'Helvetica Neue', sans-serif;
}

/* ═══════════════════════════════════════════════════
   LIGHT MODE (Default)
   ═══════════════════════════════════════════════════ */
:root, [data-theme="light"] {
  --color-bg:        #f7f9fc;
  --color-surface:   #ffffff;
  --color-surface-2: #eef2f7;
  --color-border:    #d4dce8;
  --color-text:      #1a2332;
  --color-text-muted:#5a6a7e;
  --color-accent:    #2574b8;
  --color-accent-hover: #1d5f96;
  --color-accent-subtle: rgba(37, 116, 184, 0.08);
  --color-white:     #ffffff;
  --color-card-bg:   rgba(255, 255, 255, 0.92);
  --color-card-dark: rgba(26, 35, 50, 0.88);
  --shadow-card: 0 2px 16px rgba(0,0,0,0.08);
  --shadow-elevated: 0 8px 32px rgba(0,0,0,0.12);
}

/* ═══════════════════════════════════════════════════
   DARK MODE
   ═══════════════════════════════════════════════════ */
[data-theme="dark"] {
  --color-bg:        #0f1218;
  --color-surface:   #1a1f2a;
  --color-surface-2: #222838;
  --color-border:    #2e3546;
  --color-text:      #e2e6ec;
  --color-text-muted:#8b95a5;
  --color-accent:    #4a9fd8;
  --color-accent-hover: #6bb3e4;
  --color-accent-subtle: rgba(74, 159, 216, 0.12);
  --color-card-bg:   rgba(26, 31, 42, 0.94);
  --color-card-dark: rgba(15, 18, 24, 0.92);
  --shadow-card: 0 2px 16px rgba(0,0,0,0.2);
  --shadow-elevated: 0 8px 32px rgba(0,0,0,0.3);
}

/* ═══════════════════════════════════════════════════
   BASE & BODY
   ═══════════════════════════════════════════════════ */
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* ═══════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: var(--space-3) var(--space-6);
  background: rgba(247, 249, 252, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

[data-theme="dark"] .nav {
  background: rgba(15, 18, 24, 0.85);
}

.nav-inner {
  display: contents;
}

.nav-logo {
  display: flex; align-items: center; gap: var(--space-2);
  text-decoration: none; flex-shrink: 0;
}

.nav-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.nav-links {
  display: flex; gap: var(--space-4);
}

.nav-link {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  padding: var(--space-1) 0;
  border-bottom: 2px solid transparent;
  transition: var(--transition-interactive);
}

.nav-link:hover, .nav-link.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.nav-actions {
  display: flex; align-items: center; gap: var(--space-3);
}

.nav-actions button {
  background: none; border: none; cursor: pointer;
  color: var(--color-text-muted);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  transition: var(--transition-interactive);
}

.nav-actions button:hover {
  color: var(--color-accent);
  background: var(--color-accent-subtle);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  z-index: 101;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition-interactive);
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 99;
  background: var(--color-bg);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-nav-link {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  transition: var(--transition-interactive);
}

.mobile-nav-link:hover {
  color: var(--color-accent);
}

/* ═══════════════════════════════════════════════════
   SLIDES CONTAINER
   ═══════════════════════════════════════════════════ */
.slides-container {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  overflow-y: auto;
  padding-top: 56px;
  padding-bottom: 0;
  -webkit-overflow-scrolling: touch;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}



/* ═══════════════════════════════════════════════════
   LAYOUT PATTERNS
   ═══════════════════════════════════════════════════ */

/* --- PATTERN 1: Hero / CTA — full-bleed image with text card --- */
.layout-hero {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 56px);
  min-height: calc(100dvh - 56px);
  padding-bottom: calc(180px + env(safe-area-inset-bottom, 0px));
}

.layout-hero__image {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.layout-hero__image img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.layout-hero__card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(100vh - 56px);
  min-height: calc(100dvh - 56px);
  padding: var(--space-16) var(--space-8);
  padding-left: 6%;
  max-width: 640px;
  box-sizing: border-box;
}

.layout-hero__card-inner {
  background: var(--color-card-bg);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-xl);
  padding: var(--space-10) var(--space-8);
  box-shadow: var(--shadow-elevated);
  border: 1px solid rgba(255,255,255,0.3);
}

[data-theme="dark"] .layout-hero__card-inner {
  background: var(--color-card-dark);
  border-color: rgba(255,255,255,0.08);
}

/* --- PATTERN 2: Split — image + text side by side --- */
.layout-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 56px);
  min-height: calc(100dvh - 56px);
  width: 100%;
  padding-bottom: calc(180px + env(safe-area-inset-bottom, 0px));
}

.layout-split--reverse {
  direction: rtl;
}

.layout-split--reverse > * {
  direction: ltr;
}

.layout-split__image {
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

.layout-split__image img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.layout-split__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-10) var(--space-8);
}

/* --- PATTERN 3: Banner top — image header, content below --- */
.layout-banner {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: calc(100vh - 56px);
  min-height: calc(100dvh - 56px);
  padding-bottom: calc(180px + env(safe-area-inset-bottom, 0px));
}

.layout-banner__image {
  position: relative;
  width: 100%;
  height: 260px;
  flex-shrink: 0;
  overflow: hidden;
}

.layout-banner__image img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.layout-banner__image::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to top, var(--color-bg), transparent);
  pointer-events: none;
}

.layout-banner__content {
  flex: 1;
  padding: var(--space-6) var(--space-8) var(--space-10);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* --- PATTERN 4: Full content (no image — dashboard, docs) --- */
.layout-full {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: var(--space-10) var(--space-8);
  min-height: calc(100vh - 56px);
  min-height: calc(100dvh - 56px);
  padding-bottom: calc(180px + env(safe-area-inset-bottom, 0px));
}

.layout-full__inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
}

/* ═══════════════════════════════════════════════════
   COMMON SLIDE ELEMENTS
   ═══════════════════════════════════════════════════ */
.overline {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
  display: block;
}

.slide-number {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-accent);
  background: var(--color-accent-subtle);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: var(--space-3);
}

.slide-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-xl);
  line-height: 1.15;
  margin-bottom: var(--space-3);
  color: var(--color-text);
}

.slide-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 600px;
  margin-bottom: var(--space-6);
}

.slide-header {
  margin-bottom: var(--space-6);
}

/* ═══════════════════════════════════════════════════
   HERO SLIDE
   ═══════════════════════════════════════════════════ */
.slide-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-2xl);
  line-height: 1.1;
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

.hero-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-6);
}

.hero-cta {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--color-accent);
  color: white;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  transition: var(--transition-interactive);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  transition: var(--transition-interactive);
}

.btn-secondary:hover {
  background: var(--color-accent-subtle);
}

.hero-scroll {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  opacity: 0.6;
}

/* ═══════════════════════════════════════════════════
   VISIE SLIDE (Split)
   ═══════════════════════════════════════════════════ */
.feature-list {
  list-style: none;
  padding: 0;
  margin-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.feature-list li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.feature-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-accent-subtle);
  border-radius: var(--radius-md);
  color: var(--color-accent);
}

.feature-icon svg { width: 20px; height: 20px; }

.feature-list strong {
  display: block;
  margin-bottom: var(--space-1);
  font-weight: 600;
}

.feature-list p, .feature-list br + span {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Comparison card */
.comparison-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
  margin-top: var(--space-6);
}

.comparison-card h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

.compare-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}

.compare-row:last-child { border-bottom: none; }

.compare-old {
  color: var(--color-text-muted);
  text-decoration: line-through;
  opacity: 0.7;
}

.compare-arrow {
  color: var(--color-accent);
  font-weight: 700;
}

.compare-new {
  color: var(--color-accent);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════
   PRINCIPES GRID
   ═══════════════════════════════════════════════════ */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.principle-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: var(--transition-interactive);
  box-shadow: var(--shadow-card);
}

.principle-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
  border-color: var(--color-accent);
}

.card-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-accent-subtle);
  border-radius: var(--radius-md);
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.card-icon svg { width: 22px; height: 22px; }

.principle-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
}

.principle-card p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════
   VMP GRID
   ═══════════════════════════════════════════════════ */
.vmp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.vmp-card {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  transition: var(--transition-interactive);
  box-shadow: var(--shadow-card);
}

.vmp-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-1px);
}

.vmp-num {
  flex-shrink: 0;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-accent);
  color: white;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: var(--text-xs);
}

.vmp-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xs);
  margin-bottom: var(--space-1);
}

.vmp-card p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* ═══════════════════════════════════════════════════
   VMP DETAIL — Process Steps
   ═══════════════════════════════════════════════════ */
.process-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.process-step {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-accent);
  color: white;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: var(--text-sm);
}

.process-step strong {
  display: block;
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.process-step p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Sunset card */
.sunset-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
  margin-top: var(--space-4);
}

.sunset-card h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

.sunset-diagram {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.sunset-bar {
  position: relative;
  background: var(--color-surface-2);
  border-radius: var(--radius-full);
  height: 36px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.sunset-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--color-accent);
  opacity: 0.15;
  border-radius: var(--radius-full);
  transition: width 0.8s ease;
}

.sunset-label {
  position: relative;
  z-index: 1;
  padding-left: var(--space-4);
  font-size: var(--text-xs);
  font-weight: 600;
}

.sunset-time {
  position: relative;
  z-index: 1;
  margin-left: auto;
  padding-right: var(--space-4);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-accent);
}

.sunset-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-3);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════
   REFERENDA — Ballot Demo
   ═══════════════════════════════════════════════════ */
.referenda-demo {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-4);
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
}

.ballot-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
}

.ballot-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  color: var(--color-accent);
}

.ballot-header h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
}

.ballot-header svg { width: 22px; height: 22px; }

.ballot-box > p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.ballot-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.ballot-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-interactive);
  font-size: var(--text-sm);
}

.ballot-option:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-subtle);
}

.ballot-option input[type="radio"] {
  accent-color: var(--color-accent);
}

.ballot-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding-top: var(--space-8);
}

.divider-line {
  width: 2px;
  height: 40px;
  background: var(--color-border);
}

.divider-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-accent);
}

.performance-slider input[type="range"] {
  width: 100%;
  accent-color: var(--color-accent);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

.perf-value {
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-accent);
}

.perf-explanation {
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: var(--color-accent-subtle);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  color: var(--color-text);
}

.referenda-result {
  margin-top: var(--space-4);
  text-align: center;
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* ═══════════════════════════════════════════════════
   DELIBERATIEF — Timeline
   ═══════════════════════════════════════════════════ */
.timeline {
  position: relative;
  padding-left: var(--space-8);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-5);
  padding-left: var(--space-4);
}

.timeline-marker {
  position: absolute;
  left: calc(-1 * var(--space-8) + 4px);
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-accent);
  color: white;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: var(--text-xs);
  z-index: 1;
}

.timeline-content h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  margin-bottom: var(--space-1);
}

.timeline-content p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════════════ */
.dashboard {
  width: 100%;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.kpi-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-card);
}

.kpi-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
  margin-bottom: var(--space-2);
}

.kpi-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-xl);
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.kpi-unit {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.kpi-delta {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  margin-top: var(--space-2);
}

.kpi-delta.positive { color: #22c55e; }
.kpi-delta.negative { color: #ef4444; }

.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.chart-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-card);
}

.chart-card h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xs);
  margin-bottom: var(--space-3);
  color: var(--color-text);
}

.chart-card--small {
  grid-column: 1;
}

.chart-card--wide {
  grid-column: 2;
}

.chart-card canvas {
  width: 100% !important;
  max-height: 200px;
}

/* Threshold bars */
.threshold-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.threshold-item {
  display: grid;
  grid-template-columns: 80px 1fr 50px;
  align-items: center;
  gap: var(--space-2);
}

.threshold-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
}

.threshold-bar-track {
  position: relative;
  height: 20px;
  background: var(--color-surface-2);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.threshold-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  transition: width 1s ease;
}

.threshold-line {
  position: absolute;
  left: 20%; top: 0; bottom: 0;
  width: 2px;
  background: #ef4444;
  z-index: 1;
}

.threshold-pct {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-accent);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.threshold-legend {
  margin-top: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.threshold-legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.legend-line {
  display: inline-block;
  width: 16px;
  height: 2px;
  background: #ef4444;
}

/* ═══════════════════════════════════════════════════
   ARCHITECTUUR DIAGRAM
   ═══════════════════════════════════════════════════ */
.architecture-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  max-width: 800px;
  margin: 0 auto;
}

.arch-layer {
  display: flex;
  gap: var(--space-3);
  width: 100%;
  justify-content: center;
}

.arch-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: center;
  box-shadow: var(--shadow-card);
  position: relative;
}

.arch-box h3, .arch-box h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
}

.arch-box p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.arch-box svg { width: 24px; height: 24px; color: var(--color-accent); margin-bottom: var(--space-1); }

.arch-box--gold {
  border-color: #d4a843;
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.08), transparent);
}

.arch-box--accent {
  border-color: var(--color-accent);
  background: var(--color-accent-subtle);
}

.arch-badge {
  position: absolute;
  top: -8px; right: -8px;
  background: var(--color-accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.arch-box--wide {
  flex: 1;
  max-width: 100%;
}

.arch-top { justify-content: center; }
.arch-top .arch-box { min-width: 280px; }

.arch-powers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  width: 100%;
}

.arch-connector {
  height: 24px;
  width: 100%;
}

.arch-bottom {
  width: 100%;
}

/* ═══════════════════════════════════════════════════
   DOCUMENTS
   ═══════════════════════════════════════════════════ */
.docs-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.docs-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  transition: var(--transition-interactive);
}

.docs-tab.active, .docs-tab:hover {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
}

.docs-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: rgba(255,255,255,0.2);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
}

.docs-tab:not(.active) .docs-tab-count {
  background: var(--color-border);
  color: var(--color-text-muted);
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-3);
}

.doc-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-decoration: none;
  color: var(--color-text);
  transition: var(--transition-interactive);
  box-shadow: var(--shadow-card);
}

.doc-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-1px);
}

.doc-card-top {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  flex: 1;
}

.doc-card .doc-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: #dc2626;
  border-radius: var(--radius-sm);
  color: white;
}

.doc-card .doc-icon svg {
  width: 22px; height: 22px;
}

.doc-card .doc-info {
  flex: 1; min-width: 0;
}

.doc-card .doc-title {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.3;
}

.doc-card .doc-description {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.doc-card .doc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-2);
}

.doc-meta-pages {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.doc-meta-pages svg {
  width: 14px; height: 14px;
}

.doc-meta-download {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-accent);
  font-weight: 600;
}

.doc-meta-download svg {
  width: 14px; height: 14px;
}

.docs-empty {
  text-align: center;
  padding: var(--space-10);
  color: var(--color-text-muted);
}

.docs-empty-icon { opacity: 0.3; margin-bottom: var(--space-4); }

/* ═══════════════════════════════════════════════════
   PDF VIEWER OVERLAY
   ═══════════════════════════════════════════════════ */
.pdf-viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pdf-viewer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.pdf-viewer-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
  z-index: 1;
}

.pdf-back-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: var(--transition-interactive);
  flex-shrink: 0;
}

.pdf-back-btn:hover {
  background: var(--color-accent-hover);
}

.pdf-back-btn svg {
  width: 18px;
  height: 18px;
}

.pdf-viewer-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.pdf-download-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-xs);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-interactive);
  flex-shrink: 0;
}

.pdf-download-btn:hover {
  background: var(--color-accent-subtle);
}

.pdf-download-btn svg {
  width: 16px;
  height: 16px;
}

.pdf-viewer-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: var(--color-surface-2);
}

.pdf-viewer-fallback {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-8);
  text-align: center;
}

.pdf-viewer-fallback p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 400px;
}

.pdf-viewer-fallback .btn-primary,
.pdf-viewer-fallback .pdf-open-external {
  margin-top: var(--space-2);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-base);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-interactive);
}

.pdf-viewer-fallback .pdf-open-external:hover {
  background: var(--color-accent-hover);
}

/* ═══════════════════════════════════════════════════
   CTA SLIDE
   ═══════════════════════════════════════════════════ */
.cta-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-xl);
  line-height: 1.15;
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

.cta-text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-8);
  max-width: 540px;
}

.cta-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.cta-stat {
  text-align: center;
  padding: var(--space-4);
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.2);
}

[data-theme="dark"] .cta-stat {
  background: rgba(0,0,0,0.2);
  border-color: rgba(255,255,255,0.1);
}

.cta-stat-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-xl);
  color: var(--color-accent);
  display: block;
}

.cta-stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
  display: block;
}

/* ═══════════════════════════════════════════════════
   SLIDE NAVIGATION
   ═══════════════════════════════════════════════════ */
.slide-nav {
  position: fixed;
  bottom: calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  box-shadow: var(--shadow-elevated);
}

.slide-nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-full);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-interactive);
}

.slide-nav-btn:hover {
  background: var(--color-accent-subtle);
  color: var(--color-accent);
}

.slide-nav-btn svg {
  width: 20px; height: 20px;
}

.slide-counter {
  font-size: var(--text-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
  min-width: 50px;
  text-align: center;
}

.slide-dots {
  position: fixed;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.slide-dot {
  width: 8px; height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: var(--transition-interactive);
}

.slide-dot.active {
  background: var(--color-accent);
  height: 24px;
}

/* ═══════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════ */
.footer {
  display: none;
}

.slide:last-child .footer-inline {
  margin-top: auto;
  padding: var(--space-4) 0;
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  opacity: 0.6;
}

footer.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: none;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { display: flex; }

  /* Layouts */
  .layout-split {
    grid-template-columns: 1fr;
  }

  .layout-split--reverse {
    direction: ltr;
  }

  .layout-split__image {
    min-height: 220px;
    max-height: 280px;
  }

  .layout-split__content {
    padding: var(--space-6) var(--space-5);
    max-height: none;
  }

  .layout-hero__card {
    padding: var(--space-8) var(--space-5);
    max-width: 100%;
  }

  .layout-banner__image {
    height: 200px;
  }

  .layout-banner__content {
    padding: var(--space-4) var(--space-5);
  }

  .layout-full {
    padding: var(--space-6) var(--space-5);
    padding-bottom: calc(180px + env(safe-area-inset-bottom, 0px));
  }

  /* Grids */
  .principles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }

  .vmp-grid {
    grid-template-columns: 1fr;
  }

  .referenda-demo {
    grid-template-columns: 1fr;
  }

  .ballot-divider {
    flex-direction: row;
    padding-top: 0;
  }

  .divider-line {
    width: 40px; height: 2px;
  }

  .kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .charts-row {
    grid-template-columns: 1fr;
  }

  .chart-card--small,
  .chart-card--wide {
    grid-column: 1;
  }

  .arch-powers {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .slide-dots { display: none; }
}

@media (max-width: 600px) {
  .principles-grid {
    grid-template-columns: 1fr;
  }

  .kpi-row {
    grid-template-columns: 1fr;
  }

  .cta-stats {
    grid-template-columns: 1fr 1fr;
  }

  .layout-hero__card-inner {
    padding: var(--space-6) var(--space-5);
  }
}

/* ═══════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════ */
@media (prefers-reduced-motion: no-preference) {
  .slide.active .layout-hero__card-inner,
  .slide.active .layout-split__content > *,
  .slide.active .layout-banner__content > * {
    animation: fadeUp 0.5s ease both;
  }

  .slide.active .principle-card,
  .slide.active .vmp-card,
  .slide.active .timeline-item {
    animation: fadeUp 0.4s ease both;
  }

  .slide.active .principle-card:nth-child(2),
  .slide.active .vmp-card:nth-child(2) { animation-delay: 50ms; }
  .slide.active .principle-card:nth-child(3),
  .slide.active .vmp-card:nth-child(3) { animation-delay: 100ms; }
  .slide.active .principle-card:nth-child(4),
  .slide.active .vmp-card:nth-child(4) { animation-delay: 150ms; }
  .slide.active .principle-card:nth-child(5),
  .slide.active .vmp-card:nth-child(5) { animation-delay: 200ms; }
  .slide.active .principle-card:nth-child(6),
  .slide.active .vmp-card:nth-child(6) { animation-delay: 250ms; }

  .slide.active .timeline-item:nth-child(2) { animation-delay: 80ms; }
  .slide.active .timeline-item:nth-child(3) { animation-delay: 160ms; }
  .slide.active .timeline-item:nth-child(4) { animation-delay: 240ms; }
  .slide.active .timeline-item:nth-child(5) { animation-delay: 320ms; }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
