/* ============================================================
   VPS Leegstandbeheer — Promptpagina
   Mossel.ai Huisstijl: Berekend Humanisme
   ============================================================ */

/* === DESIGN TOKENS === */
:root {
  /* Canvas */
  --bg-primary: #f8f8f6;
  --bg-secondary: #eef2ee;
  --bg-dark: #09224e;
  --bg-warm: #FBFAF2;

  /* Text */
  --text-body: #0E2632;
  --text-heading: #0f3b89;
  --text-subtle: #09224e;
  --text-inverse: #F2F6FC;

  /* Contextual Whites */
  --white-warm: #FBFAF2;
  --white-cool: #F2F6FC;
  --white-base: #EFEFEF;

  /* Contextual Darks */
  --dark-base: #0E2632;
  --dark-elevated: #23262C;
  --dark-deep: #001219;

  /* AI-Layer: Vivid */
  --accent-cyan: #12d8e2;
  --accent-lime: #dfeb0b;

  /* AI-Layer: Soft */
  --accent-lavender: #c0bbe4;
  --accent-pink: #efb4c0;

  /* Semantic Pairs */
  --pair-positive-fg: #11434A;
  --pair-positive-bg: #B5CEA5;
  --pair-negative-fg: #543431;
  --pair-negative-bg: #F3B8B1;
  --pair-highlight-fg: #B5CEA5;
  --pair-highlight-bg: #11434A;

  /* Supporting */
  --support-teal-deep: #006666;
  --support-teal-mist: #AEEEEE;
  --support-steel: #6B9EBD;
  --support-space: #05334A;

  /* Borders */
  --border-light: #d3d7de;

  /* Segment Colors */
  --seg-corporaties: #11434A;
  --seg-corporaties-bg: #B5CEA5;
  --seg-commercieel: #0f3b89;
  --seg-commercieel-bg: #E2EAFC;
  --seg-zorg: #543431;
  --seg-zorg-bg: #F3B8B1;
  --seg-overheid: #05334A;
  --seg-overheid-bg: #AEEEEE;

  /* Typography */
  --font-display: 'Modica Ultra', 'Space Grotesk', sans-serif;
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-accent: 'Caveat', cursive;

  --fs-body: clamp(1rem, 0.9375rem + 0.25vw, 1.125rem);
  --fs-hero: clamp(2.2rem, 4vw + 1rem, 3.8rem);
  --fs-hero-sub: clamp(1rem, 0.9rem + 0.4vw, 1.2rem);
  --fs-h2: clamp(1.3rem, 1.1rem + 0.5vw, 1.6rem);
  --fs-card: clamp(0.875rem, 0.8125rem + 0.25vw, 1rem);
  --fs-mono: 12px;

  --fw-body: 420;
  --fw-heading: 700;
  --fw-card: 600;
  --fw-mono: 500;
  --fw-display: 900;

  --lh-body: 1.55;
  --lh-heading: 1.0;
  --lh-accent: 1.35;

  /* Spacing (8-point) */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;

  /* Layout */
  --max-width-content: 960px;
  --max-width-wide: 1200px;
  --max-width-narrow: 680px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  /* Logo path (swappable) */
  --logo-path: url('/img/vps-logo.webp');

  /* Audacity: Shadow System */
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.08);
  --shadow-md: 0 6px 28px rgba(0,0,0,0.12);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.18);
  --shadow-glow-cyan: 0 0 32px rgba(18,216,226,0.35);
}

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

/* === BASE === */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-weight: var(--fw-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-body);
  background: var(--bg-primary);
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: var(--lh-heading);
  color: var(--text-heading);
}

h3 {
  font-family: var(--font-heading);
  font-weight: var(--fw-heading);
  line-height: var(--lh-heading);
  color: var(--text-heading);
}

p { max-width: 72ch; }
.deep-research p,
.dr-steps,
.dr-availability,
.dr-disclaimer { max-width: none; }
a { color: var(--text-heading); text-decoration: underline; text-underline-offset: 2px; }

/* === LAYOUT === */
.container {
  width: 100%;
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container--wide { max-width: var(--max-width-wide); }

/* === HERO === */
.hero {
  background: var(--bg-dark);
  padding: var(--space-2xl) var(--space-md);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -150px; right: -150px;
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(18,216,226,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -120px; left: -120px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(223,235,11,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero__logo {
  height: 48px;
  margin-bottom: var(--space-md);
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.hero h1 {
  font-size: clamp(2.8rem, 5vw + 1rem, 4.6rem);
  color: var(--text-inverse);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-sm);
}

.hero__sub {
  font-size: var(--fs-hero-sub);
  color: var(--text-inverse);
  opacity: 0.85;
  max-width: 520px;
  margin: 0 auto;
}

/* === CATEGORY NAV === */
.cat-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white-warm);
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow 0.3s ease;
}

.cat-nav.scrolled {
  box-shadow: var(--shadow-md);
  border-bottom-color: transparent;
}

.cat-nav__inner {
  display: flex;
  gap: var(--space-xs);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: var(--space-sm) var(--space-md);
  max-width: var(--max-width-wide);
  margin: 0 auto;
}

.cat-nav__inner::-webkit-scrollbar { display: none; }

.cat-btn {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-subtle);
  background: none;
  border: none;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease, background 0.2s ease;
}

.cat-btn:hover { color: var(--text-heading); background: var(--bg-secondary); }

.cat-btn.active {
  color: var(--text-heading);
  background: var(--bg-secondary);
}

.cat-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 12px; right: 12px;
  height: 4px;
  background: var(--accent-cyan);
  border-radius: 4px 4px 0 0;
  box-shadow: 0 0 12px rgba(18,216,226,0.3);
}

/* === INTRO SECTION === */
.intro {
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--border-light);
}

.intro h2 { font-size: var(--fs-h2); margin-bottom: var(--space-sm); }
.intro p { color: var(--text-subtle); margin-bottom: var(--space-sm); }

/* === DEEP RESEARCH SECTION === */
.deep-research {
  padding: var(--space-lg) 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
}

.dr-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  background: var(--white-warm);
  border: 1px solid var(--border-light);
  border-left: 5px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.dr-toggle:hover {
  box-shadow: var(--shadow-md);
  border-left-color: var(--text-heading);
}

.dr-toggle.open {
  border-left-color: var(--text-heading);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border-bottom-color: transparent;
}

.dr-toggle h2 { font-size: var(--fs-h2); margin: 0; }

.dr-toggle__chevron {
  width: 28px;
  height: 28px;
  color: var(--accent-cyan);
  transition: transform 0.3s ease, color 0.2s ease;
  flex-shrink: 0;
}

.dr-toggle:hover .dr-toggle__chevron { color: var(--text-heading); }

.dr-toggle.open .dr-toggle__chevron {
  transform: rotate(180deg);
  color: var(--text-heading);
}

.dr-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--white-warm);
  border: 1px solid var(--border-light);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 0 var(--space-md);
}

.dr-body.open {
  max-height: 2000px;
  padding: var(--space-sm) var(--space-md) var(--space-md);
}

.dr-body > .cat-section__desc {
  margin-top: var(--space-sm);
}

.dr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.dr-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dr-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.dr-card h3 {
  font-size: var(--fs-card);
  margin-bottom: var(--space-sm);
}

.dr-steps {
  padding-left: 20px;
  margin: 0 0 var(--space-sm);
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text-body);
}

.dr-steps li { margin-bottom: 4px; }

.dr-availability {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-subtle);
  opacity: 0.6;
  padding-top: var(--space-xs);
  border-top: 1px solid var(--border-light);
  max-width: none;
}

.dr-disclaimer {
  font-size: 0.8rem;
  color: var(--text-subtle);
  opacity: 0.5;
  margin-top: var(--space-md);
  text-align: center;
  max-width: none;
}

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

/* === CATEGORY SECTION === */
.cat-section {
  display: none;
  padding: var(--space-xl) 0 var(--space-2xl);
}

.cat-section.active { display: block; }

.cat-section__header {
  margin-bottom: var(--space-lg);
}

.cat-section__header h2 {
  font-size: var(--fs-h2);
  margin-bottom: var(--space-xs);
}

.cat-section__desc {
  color: var(--text-subtle);
  font-size: 0.95rem;
}

/* === PROMPT ROW (card + hint side-by-side) === */
.prompt-row {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: var(--space-sm);
  align-items: start;
  margin-bottom: var(--space-md);
}

.prompt-hint {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 420;
  line-height: 1.45;
  color: var(--text-subtle);
  opacity: 0.55;
  padding-top: var(--space-sm);
}

@media (max-width: 1024px) {
  .prompt-row { grid-template-columns: 1fr; }
  .prompt-hint { display: none; }
}

/* === PROMPT CARD === */
.prompt-card {
  background: var(--white-warm);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.prompt-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.prompt-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  user-select: none;
}

.prompt-card__title {
  font-family: var(--font-heading);
  font-size: var(--fs-card);
  font-weight: var(--fw-card);
  color: var(--text-heading);
}

.prompt-card__chevron {
  width: 20px;
  height: 20px;
  color: var(--text-subtle);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.prompt-card.open .prompt-card__chevron {
  transform: rotate(180deg);
}

.prompt-card__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.prompt-card.open .prompt-card__body {
  max-height: 5000px;
}

/* === PROMPT BLOCK (the actual prompt text) === */
.prompt-block {
  position: relative;
  background: var(--bg-dark);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: var(--space-lg) var(--space-md) var(--space-md);
  box-shadow: inset 0 2px 12px rgba(0,0,0,0.2), 0 0 60px rgba(18,216,226,0.06);
}

.prompt-block__text {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(242,246,252,0.88);
  white-space: pre-wrap;
  word-break: break-word;
}

.prompt-block__text strong {
  color: var(--text-inverse);
  font-weight: 600;
}

.prompt-fill {
  color: var(--accent-cyan);
  opacity: 0.9;
}

.copy-btn {
  position: absolute;
  top: var(--space-xs);
  right: var(--space-xs);
  background: var(--accent-cyan);
  border: none;
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  color: var(--bg-dark);
  transition: background 0.2s ease, transform 0.1s ease;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-btn:hover { transform: scale(1.05); box-shadow: 0 0 36px rgba(18,216,226,0.35); }
.copy-btn:active { transform: scale(0.98); }
.copy-btn.copied { background: var(--accent-lime); }

/* === WORKFLOW DIAGRAM === */
.workflow {
  display: flex;
  gap: var(--space-xs);
  overflow-x: auto;
  padding: var(--space-md) 0;
  margin-bottom: var(--space-lg);
}

.workflow__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  min-width: 100px;
  position: relative;
}

.workflow__num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-dark);
  color: var(--accent-lime);
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-xs);
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}

.workflow__label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.3;
}

.workflow__step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 24px;
  left: calc(50% + 28px);
  width: calc(100% - 56px);
  height: 4px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--border-light));
  border-radius: 2px;
}

/* === DOELGROEP TABS === */
.segment-tabs {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.seg-btn {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-subtle);
}

.seg-btn:hover { border-color: var(--text-heading); color: var(--text-heading); }

.seg-btn.active[data-seg="kern"] { background: var(--bg-dark); color: var(--accent-lime); border-color: var(--bg-dark); }
.seg-btn.active[data-seg="corporaties"] { background: var(--seg-corporaties); color: var(--seg-corporaties-bg); border-color: var(--seg-corporaties); }
.seg-btn.active[data-seg="commercieel"] { background: var(--seg-commercieel); color: var(--white-cool); border-color: var(--seg-commercieel); }
.seg-btn.active[data-seg="zorg"] { background: var(--seg-zorg); color: var(--seg-zorg-bg); border-color: var(--seg-zorg); }
.seg-btn.active[data-seg="overheid"] { background: var(--seg-overheid); color: var(--seg-overheid-bg); border-color: var(--seg-overheid); }

.seg-content { display: none; }
.seg-content.active { display: block; }

/* === TIPS SECTION === */
.tips {
  background: var(--bg-secondary);
  padding: var(--space-xl) 0;
  margin-top: var(--space-xl);
}

.tips h2 {
  font-size: var(--fs-h2);
  margin-bottom: var(--space-md);
}

.tips__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.tip-card {
  background: var(--white-warm);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border-left: 5px solid var(--accent-cyan);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tip-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tip-card h3 {
  font-size: var(--fs-card);
  margin-bottom: var(--space-xs);
}

.tip-card p {
  font-size: 0.9rem;
  color: var(--text-subtle);
}

/* === FOOTER === */
.footer {
  background: var(--dark-deep);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
}

.footer p {
  color: rgba(242,246,252,0.6);
  font-size: 0.85rem;
  max-width: none;
}

.footer a { color: var(--accent-cyan); }

/* === RESPONSIVE === */

/* Scroll fade hint on category nav */
.cat-nav { position: relative; }
.cat-nav::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 48px;
  background: linear-gradient(90deg, transparent, var(--white-warm));
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.2s;
}
.cat-nav.can-scroll::after { opacity: 1; }

@media (max-width: 768px) {
  .hero { padding: var(--space-xl) var(--space-sm); }
  .hero h1 { font-size: clamp(1.6rem, 3vw + 0.8rem, 2.4rem); }

  .workflow {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm) var(--space-xs);
    overflow: visible;
  }
  .workflow__step { min-width: 0; }
  .workflow__step::after { display: none; }
  .workflow__num { width: 36px; height: 36px; font-size: 14px; box-shadow: none; }
  .workflow__label { font-size: 9px; word-break: break-word; hyphens: auto; max-width: 72px; }

  .segment-tabs { flex-direction: column; }
  .seg-btn { width: 100%; text-align: left; }

  .prompt-card__header { padding: var(--space-sm); }
  .prompt-level { padding: var(--space-sm); }
  .prompt-block { padding: var(--space-md) var(--space-sm) var(--space-sm); }

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

@media (max-width: 480px) {
  .container { padding: 0 var(--space-sm); }
  .cat-btn { font-size: 12px; padding: 8px 12px; }
}

/* === PRINT === */
@media print {
  .cat-nav, .copy-btn, .segment-tabs, .workflow { display: none; }
  .cat-section { display: block !important; page-break-inside: avoid; }
  .prompt-card__body { max-height: none !important; overflow: visible !important; }
  .prompt-block { background: var(--bg-secondary); color: var(--text-body); }
  .hero { background: none; color: var(--text-body); padding: var(--space-lg) 0; }
  .hero h1 { color: var(--text-heading); }
  .hero__sub { color: var(--text-subtle); }
  body { font-size: 11pt; }

  /* Reduce motion */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      transition-duration: 0.01ms !important;
    }
  }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* === NO-JS FALLBACK === */
.no-js .cat-section { display: block; }
.no-js .prompt-card__body { max-height: none; overflow: visible; }
