/* style.css — projecttooling.nl design tokens + components */

/* ===== DESIGN TOKENS ===== */
: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;
  --space-32: 8rem;

  /* Fonts */
  --font-display: 'Cabinet Grotesk', 'Satoshi', sans-serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;

  /* 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);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;
}

/* ===== LIGHT MODE (default) ===== */
:root,
[data-theme='light'] {
  /* Surfaces — cool gray with slight blue undertone */
  --color-bg: #f5f7fa;
  --color-surface: #ffffff;
  --color-surface-2: #f0f3f8;
  --color-surface-offset: #e8ecf2;
  --color-divider: #d1d8e3;
  --color-border: #c5cdd9;

  /* Text */
  --color-text: #1a2332;
  --color-text-muted: #5a6778;
  --color-text-faint: #94a0b2;
  --color-text-inverse: #ffffff;

  /* Primary — Steel Blue (The PMO Company) */
  --color-primary: #2D5FA0;
  --color-primary-hover: #234b82;
  --color-primary-active: #1a3a66;
  --color-primary-light: #e8f0fb;

  /* Accent — Warm amber for CTAs and highlights */
  --color-accent: #E87722;
  --color-accent-hover: #d06619;
  --color-accent-light: #fef3e8;

  /* Semantic */
  --color-success: #2d8a4e;
  --color-warning: #c27a1a;
  --color-error: #c43d3d;

  /* Score colors */
  --color-score-high: #2d8a4e;
  --color-score-mid: #c27a1a;
  --color-score-low: #c43d3d;

  /* Shadows */
  --shadow-sm: 0 1px 3px oklch(0.3 0.02 250 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.3 0.02 250 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.3 0.02 250 / 0.12);
}

/* ===== DARK MODE ===== */
[data-theme='dark'] {
  --color-bg: #0f1419;
  --color-surface: #1a2028;
  --color-surface-2: #212833;
  --color-surface-offset: #171d25;
  --color-divider: #2a3240;
  --color-border: #344054;

  --color-text: #d4dae4;
  --color-text-muted: #8a95a8;
  --color-text-faint: #5a6778;
  --color-text-inverse: #1a2332;

  --color-primary: #6ba3e0;
  --color-primary-hover: #88b8ea;
  --color-primary-active: #4e8fd4;
  --color-primary-light: #1e2a3a;

  --color-accent: #f09848;
  --color-accent-hover: #f5b06e;
  --color-accent-light: #2a2018;

  --color-success: #4caf6e;
  --color-warning: #e0a040;
  --color-error: #e05858;

  --color-score-high: #4caf6e;
  --color-score-mid: #e0a040;
  --color-score-low: #e05858;

  --shadow-sm: 0 1px 3px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0f1419;
    --color-surface: #1a2028;
    --color-surface-2: #212833;
    --color-surface-offset: #171d25;
    --color-divider: #2a3240;
    --color-border: #344054;
    --color-text: #d4dae4;
    --color-text-muted: #8a95a8;
    --color-text-faint: #5a6778;
    --color-text-inverse: #1a2332;
    --color-primary: #6ba3e0;
    --color-primary-hover: #88b8ea;
    --color-primary-active: #4e8fd4;
    --color-primary-light: #1e2a3a;
    --color-accent: #f09848;
    --color-accent-hover: #f5b06e;
    --color-accent-light: #2a2018;
    --color-success: #4caf6e;
    --color-warning: #e0a040;
    --color-error: #e05858;
    --color-score-high: #4caf6e;
    --color-score-mid: #e0a040;
    --color-score-low: #e05858;
    --shadow-sm: 0 1px 3px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
  }
}

/* ===== GLOBAL COMPONENTS ===== */

/* Container */
.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
@media (min-width: 768px) {
  .container { padding-inline: var(--space-8); }
}

/* Section spacing */
.section {
  padding-block: clamp(var(--space-12), 6vw, var(--space-24));
}

/* ===== HEADER / NAV ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid oklch(from var(--color-border) l c h / 0.5);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
}
.logo svg {
  width: 32px;
  height: 32px;
}
.logo-accent {
  color: var(--color-primary);
}

/* Nav */
.nav { display: flex; align-items: center; gap: var(--space-6); }
.nav a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-2) 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  padding: var(--space-2);
  color: var(--color-text);
}
@media (max-width: 767px) {
  .nav { 
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: var(--space-4);
    gap: var(--space-1);
    box-shadow: var(--shadow-lg);
  }
  .nav.open { display: flex; }
  .nav a { 
    padding: var(--space-3) var(--space-4);
    border-bottom: none;
    border-radius: var(--radius-md);
  }
  .nav a:hover { background: var(--color-surface-2); }
  .nav-toggle { display: block; }
}

/* Theme toggle */
.theme-toggle {
  padding: var(--space-2);
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
}
.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background var(--transition-interactive),
    color var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover { background: var(--color-accent-hover); }

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(var(--space-16), 8vw, var(--space-32));
  background: linear-gradient(135deg, var(--color-primary) 0%, #1a3f6f 60%, #0f2240 100%);
  color: #fff;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 60% 50% at 80% 30%, oklch(0.5 0.1 250 / 0.3), transparent),
    radial-gradient(ellipse 40% 60% at 20% 70%, oklch(0.3 0.08 30 / 0.15), transparent);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-4);
  color: #fff;
}
.hero-sub {
  font-size: var(--text-lg);
  color: oklch(0.9 0.02 250);
  margin-bottom: var(--space-8);
  max-width: 56ch;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6) var(--space-8);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid oklch(1 0 0 / 0.15);
}
@media (max-width: 640px) {
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4) var(--space-6);
  }
}
.hero-stat {
  text-align: left;
}
.hero-stat-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-accent);
}
.hero-stat-label {
  font-size: var(--text-xs);
  color: oklch(0.8 0.02 250);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hero-ctas {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.hero .btn-secondary {
  background: oklch(1 0 0 / 0.1);
  color: #fff;
  border-color: oklch(1 0 0 / 0.25);
}
.hero .btn-secondary:hover {
  background: oklch(1 0 0 / 0.2);
  border-color: oklch(1 0 0 / 0.4);
}

/* ===== USP SECTION ===== */
.usp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: var(--space-6);
}
.usp-card {
  padding: var(--space-6);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid oklch(from var(--color-border) l c h / 0.5);
}
.usp-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  color: var(--color-primary);
}
.usp-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}
.usp-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ===== TOOL CARDS ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: var(--space-5);
}
.tool-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-5);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid oklch(from var(--color-border) l c h / 0.5);
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow var(--transition-interactive), 
    transform var(--transition-interactive),
    border-color var(--transition-interactive);
}
.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}
.tool-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}
.tool-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
}
.tool-badge {
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
  font-weight: 600;
}
.tool-badge-nl {
  background: var(--color-primary-light);
  color: var(--color-primary);
}
.tool-badge-int {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
}
.tool-score {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.score-bar {
  flex: 1;
  height: 6px;
  background: var(--color-surface-2);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.8s var(--ease-out);
}
.score-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lg);
  font-variant-numeric: tabular-nums;
  min-width: 3ch;
  text-align: right;
}
.tool-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
  flex: 1;
}
.tool-meta {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-divider);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ===== SECTION HEADERS ===== */
.section-header {
  margin-bottom: var(--space-10);
}
.section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}
.section-header p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 60ch;
}

/* ===== CTA BANNER ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--color-primary), #1a3f6f);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: var(--space-12) var(--space-8);
  text-align: center;
}
.cta-banner h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  margin-bottom: var(--space-3);
}
.cta-banner p {
  color: oklch(0.85 0.02 250);
  margin-bottom: var(--space-6);
  max-width: 50ch;
  margin-inline: auto;
}

/* ===== COMPARISON TABLE (preview) ===== */
.comparison-preview {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}
.comparison-table {
  font-size: var(--text-sm);
}
.comparison-table th {
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-weight: 600;
  position: sticky;
  top: 0;
}
.comparison-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-divider);
}
.comparison-table tbody tr:hover {
  background: var(--color-primary-light);
}
.comparison-table tbody tr:nth-child(even) {
  background: var(--color-surface-2);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
  padding-block: var(--space-12);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-8);
}
@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }
}
.footer-brand p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-top: var(--space-3);
  max-width: 30ch;
}
.footer-col h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
  color: var(--color-text);
}
.footer-col a {
  display: block;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
  padding: var(--space-1) 0;
}
.footer-col a:hover { color: var(--color-primary); }

.footer-bottom {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in { opacity: 1; }
@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
  }
}
@keyframes reveal-fade {
  to { opacity: 1; }
}

/* ===== KEUZEHULP PREVIEW ===== */
.wizard-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}
@media (max-width: 767px) {
  .wizard-preview { grid-template-columns: 1fr; }
}
.wizard-visual {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  padding: var(--space-8);
}
.wizard-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.wizard-step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}
.wizard-step-num {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
}
.wizard-step h4 {
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: var(--space-1);
}
.wizard-step p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ===== NL TOOLS HIGHLIGHT ===== */
.nl-highlight {
  background: var(--color-primary-light);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-8);
  align-items: center;
}
@media (max-width: 767px) {
  .nl-highlight { grid-template-columns: 1fr; padding: var(--space-6); }
}
.nl-tools-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.nl-tool-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: var(--text-sm);
}
.nl-flag {
  width: 20px;
  height: 15px;
  border-radius: 2px;
  background: linear-gradient(180deg, #AE1C28 33%, #fff 33% 66%, #21468B 66%);
  flex-shrink: 0;
}
