/* ================================================================
   PACITO DESIGN TOKENS — 1:1 met lib/shared/tokens.dart
   ================================================================ */
:root {
  --background: #FBF8F3;
  --surface: #F2EDE3;
  --surface-elevated: #FFFFFF;
  --accent: #ED9B7C;
  --accent-dark: #5C2E18;
  --text-primary: #2A1F1A;
  --text-secondary: #6B5D54;
  --text-tertiary: #A89A8E;
  --border: #E5DDD0;
  --success: #7D9471;
  --error: #C26B5C;

  --xxs: 4px;
  --xs: 8px;
  --sm: 12px;
  --md: 16px;
  --lg: 24px;
  --xl: 32px;
  --xxl: 48px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-brand: 'Fraunces', Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #1C1815;
    --surface: #2A2520;
    --surface-elevated: #35302A;
    --accent: #ED9B7C;
    --accent-dark: #5C2E18;
    --text-primary: #F2EDE5;
    --text-secondary: #B5AB9F;
    --text-tertiary: #7A7167;
    --border: #3A342D;
    --success: #8FA582;
    --error: #D18374;
  }
}

/* Handmatige thema-override (wint van de media query) */
html[data-theme="light"] {
  --background: #FBF8F3;
  --surface: #F2EDE3;
  --surface-elevated: #FFFFFF;
  --accent: #ED9B7C;
  --accent-dark: #5C2E18;
  --text-primary: #2A1F1A;
  --text-secondary: #6B5D54;
  --text-tertiary: #A89A8E;
  --border: #E5DDD0;
  --success: #7D9471;
  --error: #C26B5C;
}

html[data-theme="dark"] {
  --background: #1C1815;
  --surface: #2A2520;
  --surface-elevated: #35302A;
  --accent: #ED9B7C;
  --accent-dark: #5C2E18;
  --text-primary: #F2EDE5;
  --text-secondary: #B5AB9F;
  --text-tertiary: #7A7167;
  --border: #3A342D;
  --success: #8FA582;
  --error: #D18374;
}

/* ================================================================
   RESET & BASE
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--background);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { opacity: 0.85; }

/* ================================================================
   LAYOUT
   ================================================================ */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--lg);
}

/* ================================================================
   NAV
   ================================================================ */
nav {
  padding: var(--md) var(--lg);
  display: flex;
  align-items: center;
  gap: var(--sm);
  max-width: 720px;
  margin: 0 auto;
}

nav .brand {
  display: flex;
  align-items: center;
  gap: var(--xs);
  text-decoration: none;
  color: var(--text-primary);
  margin-right: auto;
}

nav .brand-icon { font-size: 24px; line-height: 1; }

nav .brand-name {
  font-family: var(--font-brand);
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
}

nav .nav-links {
  display: flex;
  gap: var(--md);
  list-style: none;
}

nav .nav-links a {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
}

nav .nav-links a:hover,
nav .nav-links a.active { color: var(--accent); }

/* Thema-toggle (altijd zichtbaar) */
nav .theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

nav .theme-toggle:hover {
  color: var(--accent);
}

nav .theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Hamburger-knop (standaard verborgen; zichtbaar op mobiel) */
nav .nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

nav .nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.15s ease;
}

nav .nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
nav .nav-toggle.open span:nth-child(2) { opacity: 0; }
nav .nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
    padding: var(--sm) var(--md);
  }
  nav .nav-toggle { display: flex; }

  nav .nav-links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    padding: var(--xs) 0 var(--sm);
    margin-top: var(--xs);
    border-top: 1px solid var(--border);
  }
  nav .nav-links.open { display: flex; }

  nav .nav-links li {
    width: 100%;
  }

  nav .nav-links a {
    display: block;
    padding: var(--sm) var(--xs);
    font-size: 16px;
    border-bottom: 1px solid var(--border);
  }
  nav .nav-links li:last-child a {
    border-bottom: none;
  }
}

/* ================================================================
   HERO
   ================================================================ */
.hero {
  text-align: center;
  padding: var(--xxl) var(--lg) var(--xl);
}

.hero-icon {
  font-size: 64px;
  line-height: 1;
  margin-bottom: var(--md);
  color: var(--accent);
}

.hero h1 {
  font-family: var(--font-brand);
  font-size: 42px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--xs);
  letter-spacing: -0.5px;
}

.hero .tagline {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
}

/* ================================================================
   SECTION
   ================================================================ */
section {
  padding: var(--xl) 0;
}

section h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--lg);
}

/* ================================================================
   FEATURE GRID
   ================================================================ */
.features {
  display: grid;
  gap: var(--md);
}

@media (min-width: 640px) {
  .features { grid-template-columns: 1fr 1fr; }
}

.feature {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--lg);
}

.feature .feature-icon {
  font-size: 28px;
  margin-bottom: var(--sm);
}

.feature h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: var(--xxs);
}

.feature p {
  font-size: 15px;
  color: var(--text-secondary);
}

/* ================================================================
   DISCLAIMER — medisch / juridisch
   ================================================================ */
.disclaimer {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: var(--md) var(--lg);
  margin: var(--lg) 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.disclaimer strong {
  color: var(--text-primary);
}

.disclaimer p + p {
  margin-top: var(--xs);
}

/* ================================================================
   QUOTE / CALLOUT
   ================================================================ */
.callout {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--lg);
  text-align: center;
  margin: var(--xl) 0;
}

.callout p {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  font-style: italic;
  margin-bottom: var(--xs);
}

.callout .attr {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--xs);
  padding: var(--sm) var(--lg);
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s ease;
}

.btn:hover { opacity: 0.85; }

.btn-primary {
  background: var(--accent);
  color: var(--accent-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  font-weight: 500;
}

/* ================================================================
   SCHEMA CARDS (schemas page)
   ================================================================ */
.schema-grid {
  display: grid;
  gap: var(--lg);
}

@media (min-width: 640px) {
  .schema-grid { grid-template-columns: 1fr 1fr; }
}

.schema-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--md);
  display: flex;
  flex-direction: column;
}

.schema-card h2 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--xxs);
}

.schema-card .description {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: var(--sm);
}

.schema-card .meta {
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2px;
  margin-bottom: var(--md);
}

.schema-card .qr-wrapper {
  text-align: center;
  margin-top: auto;
  padding-top: var(--md);
}

/* Witte rand met padding om de QR zodat hij in dark mode scanbaar blijft. */
.schema-card .qr-wrapper > div {
  display: inline-block;
  background: #FFFFFF;
  padding: var(--xs);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.schema-card .qr-hint {
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 500;
  margin-top: var(--xs);
}

/* ================================================================
   FOOTER
   ================================================================ */
footer {
  text-align: center;
  padding: var(--xxl) var(--lg) var(--xl);
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 500;
}

footer a { color: var(--text-tertiary); }
footer a:hover { color: var(--accent); }
