/* ===========================
   BalpenWiki — Hoofdstijlen
   Modern / Interactief thema
   =========================== */

:root {
  --bg-0: #0a0a0f;
  --bg-1: #111118;
  --bg-2: #1a1a26;
  --bg-3: #232334;
  --accent: #7c6ff7;
  --accent-light: #a89ffa;
  --accent-glow: rgba(124, 111, 247, 0.18);
  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --text-primary: #f0efe8;
  --text-secondary: #9997b0;
  --text-muted: #55546a;
  --border: rgba(124, 111, 247, 0.15);
  --border-strong: rgba(124, 111, 247, 0.35);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --radius: 12px;
  --radius-sm: 6px;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-0);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Noise texture overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.4;
}

/* ── Typography ── */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); }
p { font-size: 1.05rem; color: var(--text-secondary); }
a { color: inherit; text-decoration: none; }
strong { font-weight: 500; color: var(--text-primary); }

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 900;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.navbar.scrolled { background: rgba(10, 10, 15, 0.97); }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}
.nav-logo-icon { font-size: 1.4rem; }
.nav-logo-text { background: linear-gradient(90deg, var(--text-primary), var(--accent-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}
.nav-link {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--text-secondary);
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--accent-glow);
}

.nav-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text-secondary); border-radius: 2px; transition: all 0.3s; }

/* ── Layout helpers ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 6rem 0; }
.section-sm { padding: 3rem 0; }

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-h);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(124, 111, 247, 0.12) 0%, transparent 70%),
              radial-gradient(ellipse 40% 40% at 80% 20%, rgba(201, 168, 76, 0.06) 0%, transparent 60%);
}
.hero-content { position: relative; z-index: 2; }
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-light);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 5px 16px;
  margin-bottom: 1.5rem;
}
.hero h1 { margin-bottom: 1.25rem; }
.hero h1 em { font-style: italic; color: var(--accent-light); }
.hero-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 2.5rem;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 13px 28px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 30px rgba(124, 111, 247, 0.3);
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 40px rgba(124, 111, 247, 0.45); }

/* ── Pen animation ── */
.pen-anim {
  margin: 0 auto 3rem;
  width: 80px;
  height: 80px;
  position: relative;
}
.pen-anim svg { width: 100%; height: 100%; }
@keyframes penWrite {
  0%, 100% { transform: rotate(-15deg) translateY(0); }
  50% { transform: rotate(-10deg) translateY(-6px); }
}
.pen-anim svg { animation: penWrite 3s ease-in-out infinite; }

/* ── Stat cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin: 3rem 0;
}
.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
  transition: border-color 0.3s, transform 0.2s;
}
.stat-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.stat-number {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent-light);
  display: block;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat-label { font-size: 0.88rem; color: var(--text-secondary); }

/* ── Section titles ── */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 0.75rem;
  display: block;
}
.section-title { margin-bottom: 1rem; }
.section-intro { color: var(--text-secondary); max-width: 620px; margin-bottom: 3rem; font-size: 1.05rem; }

/* ── Cards ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.3s, transform 0.2s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.4); }
.card:hover::before { opacity: 1; }
.card-icon { font-size: 2rem; margin-bottom: 1rem; display: block; }
.card h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.card p { font-size: 0.92rem; }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 1.25rem;
  font-size: 0.88rem;
  color: var(--accent-light);
  font-weight: 500;
  transition: gap 0.2s;
}
.card-link:hover { gap: 10px; }

/* ── Timeline ── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--accent), var(--gold), transparent);
}
.timeline-item {
  position: relative;
  padding: 0 0 3rem 2.5rem;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s, transform 0.6s;
}
.timeline-item.visible { opacity: 1; transform: translateX(0); }
.timeline-dot {
  position: absolute;
  left: -2.15rem;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-0);
  box-shadow: 0 0 12px var(--accent);
}
.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-light);
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}
.timeline-item h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.timeline-item p { font-size: 0.95rem; }

/* ── Interactive anatomy SVG ── */
.anatomy-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.anatomy-svg-container { position: relative; }
.anatomy-svg-container svg { width: 100%; max-width: 320px; display: block; margin: 0 auto; cursor: pointer; }
.anatomy-part { transition: opacity 0.2s; }
.anatomy-part:hover { opacity: 0.75; }
.anatomy-info {
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 2rem;
  min-height: 180px;
}
.anatomy-info h3 { margin-bottom: 0.75rem; color: var(--accent-light); }

/* ── Pen types filter ── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.filter-btn {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent-light);
}

/* ── Comparison table ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
thead tr { background: var(--bg-2); border-bottom: 1px solid var(--border); }
th { padding: 14px 18px; text-align: left; font-weight: 500; color: var(--text-primary); font-size: 0.85rem; white-space: nowrap; cursor: pointer; user-select: none; }
th:hover { color: var(--accent-light); }
td { padding: 13px 18px; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
tbody tr:hover { background: var(--bg-2); }
tbody tr:last-child td { border-bottom: none; }
.dot-rating { display: flex; gap: 3px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bg-3); }
.dot.filled { background: var(--accent); }

/* ── Pro/con ── */
.pro-con-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.pro-list, .con-list { list-style: none; }
.pro-list li, .con-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text-secondary);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.pro-list li::before { content: '+'; color: #5abf80; font-weight: 700; flex-shrink: 0; }
.con-list li::before { content: '−'; color: #e07070; font-weight: 700; flex-shrink: 0; }

/* ── Fact cards (curiosa) ── */
.fact-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.fact-card-num {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 700;
  color: var(--bg-3);
  position: absolute;
  top: -1rem;
  right: 1rem;
  line-height: 1;
  user-select: none;
}

/* ── Page hero (inner pages) ── */
.page-hero {
  padding: calc(var(--nav-h) + 4rem) 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(124, 111, 247, 0.1) 0%, transparent 70%);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { margin-bottom: 1rem; }
.page-hero p { font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* ── Quote block ── */
.quote-block {
  border-left: 3px solid var(--accent);
  padding: 1.5rem 2rem;
  margin: 3rem 0;
  background: var(--bg-2);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.quote-block p { font-family: var(--font-display); font-style: italic; font-size: 1.2rem; color: var(--text-primary); }
.quote-block cite { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.75rem; display: block; }

/* ── Divider ── */
.divider-line { border: none; border-top: 1px solid var(--border); margin: 4rem 0; }

/* ── Fade-in on scroll ── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible { opacity: 1; transform: none; }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  text-align: center;
  background: var(--bg-1);
}
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.footer-brand { display: flex; align-items: center; gap: 8px; justify-content: center; font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 0.75rem; }
.footer-tagline { font-size: 0.92rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; justify-content: center; margin-bottom: 2rem; }
.footer-links a { font-size: 0.88rem; color: var(--text-secondary); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent-light); }
.footer-copy { font-size: 0.8rem; color: var(--text-muted); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links { display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; background: var(--bg-0); flex-direction: column; padding: 1.5rem; border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .anatomy-wrap { grid-template-columns: 1fr; }
  .pro-con-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
}
