/* =============================================================================
   Forthought — main.css
   Design system: engineered, calm, technically mature.
   Palette : ink / slate (dark blocks) · paper · hairlines · azure + teal accent
   Type    : Space Grotesk (display) · Inter (body) · JetBrains Mono (utility)
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --ink:        #0E1217;
  --slate:      #161C24;
  --slate-2:    #1F2732;
  --paper:      #F7F8FA;
  --paper-2:    #EEF1F5;
  --white:      #FFFFFF;
  --line:       #E4E8EE;
  --line-dark:  rgba(255,255,255,.10);
  --text:       #1A1F27;
  --text-soft:  #3C4552;
  --muted:      #5C6673;
  --muted-dark: #96A0AE;
  --accent:     #2F6BFF;   /* signal azure */
  --accent-ink: #1E4FCC;
  --teal:       #17B6A7;   /* secondary technical accent */

  --radius:     14px;
  --radius-sm:  10px;
  --radius-lg:  20px;

  --maxw:       1180px;
  --gutter:     clamp(20px, 5vw, 40px);

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  --shadow:     0 1px 2px rgba(14,18,23,.04), 0 8px 30px rgba(14,18,23,.06);
  --shadow-lg:  0 20px 60px rgba(14,18,23,.14);

  --ease:       cubic-bezier(.22,.61,.36,1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -.01em; color: var(--ink); }
p { margin: 0 0 1.1em; }
ul { margin: 0; padding: 0; }
strong { font-weight: 600; color: var(--text); }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 0 0 10px 0;
  font-family: var(--font-mono); font-size: 14px;
}
.skip-link:focus { left: 0; text-decoration: none; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

/* ---------- Layout primitives ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section-tight { padding-block: clamp(40px, 6vw, 72px); }
.narrow { max-width: 760px; }
.center { text-align: center; margin-inline: auto; }

/* ---------- Eyebrow / labels ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 18px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--accent); display: inline-block;
}
.on-dark .eyebrow { color: var(--muted-dark); }

/* ---------- Type scale ---------- */
.display   { font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.04; letter-spacing: -.02em; }
.h1        { font-size: clamp(2.1rem, 5vw, 3.2rem); }
.h2        { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.h3        { font-size: clamp(1.2rem, 2vw, 1.45rem); }
.lead      { font-size: clamp(1.08rem, 1.6vw, 1.28rem); color: var(--text-soft); line-height: 1.6; }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 4vw, 52px); }
.muted     { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-body); font-weight: 600; font-size: 15.5px;
  padding: 14px 22px; border-radius: 999px; border: 1.5px solid var(--ink);
  color: var(--ink); background: transparent; cursor: pointer; line-height: 1;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn svg { width: 16px; height: 16px; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(47,107,255,.28); }
.btn-accent:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-sm { padding: 10px 16px; font-size: 14px; }
.btn-lg { padding: 16px 26px; font-size: 16.5px; }
.on-dark .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.on-dark .btn-ghost:hover { background: #fff; color: var(--ink); border-color:#fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

.textlink {
  display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--accent-ink);
  font-size: 15.5px;
}
.textlink svg { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.textlink:hover { text-decoration: none; }
.textlink:hover svg { transform: translateX(4px); }
.on-dark .textlink { color: #7FA5FF; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247,248,250,.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); background: rgba(247,248,250,.94); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 70px; gap: 18px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--font-display); }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); display: inline-flex; }
.brand-word { font-weight: 700; font-size: 20px; letter-spacing: -.02em; }

.primary-nav { display: flex; }
.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-body); font-weight: 500; font-size: 15.5px; color: var(--text-soft);
  padding: 9px 14px; border-radius: 8px; background: none; border: none; cursor: pointer; line-height: 1;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.nav-link:hover { color: var(--ink); background: var(--paper-2); text-decoration: none; }
.nav-link.is-active { color: var(--ink); }
.nav-link.is-active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; background: var(--accent); border-radius: 2px;
}
.chev { transition: transform .2s var(--ease); }
.has-dropdown[data-open="true"] .chev { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 268px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; list-style: none;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
}
.has-dropdown[data-open="true"] .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-link {
  display: block; padding: 10px 13px; border-radius: 9px; font-size: 15px; font-weight: 500; color: var(--text-soft);
}
.dropdown-link:hover { background: var(--paper-2); color: var(--ink); text-decoration: none; }
.dropdown-link.is-active { color: var(--accent-ink); }
.nav-cta-item { margin-left: 8px; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 42px; height: 42px; align-items: center; justify-content: center; background: none; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.nav-toggle span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(56px, 9vw, 116px); overflow: hidden; }
.hero-grid { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .5; }
.hero-inner { position: relative; z-index: 1; max-width: 880px; }
.hero .display { margin-bottom: 22px; }
.hero .lead { max-width: 640px; margin-bottom: 30px; }
.hero-cta { margin-bottom: 40px; }

/* Signature: delivery pipeline */
.pipeline { display: flex; align-items: center; gap: 0; flex-wrap: wrap; margin-top: 8px; }
.pipeline-node { display: inline-flex; align-items: center; gap: 10px; }
.pipeline-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--accent); background: var(--paper); flex: none; }
.pipeline-node:last-child .pipeline-dot { background: var(--accent); }
.pipeline-label { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.pipeline-line { flex: 1 1 26px; min-width: 22px; height: 1.5px; background: linear-gradient(90deg, var(--accent), rgba(47,107,255,.25)); margin: 0 12px; }
.on-dark .pipeline-dot { background: var(--slate); }
.on-dark .pipeline-node:last-child .pipeline-dot { background: var(--accent); }
.on-dark .pipeline-label { color: var(--muted-dark); }

/* ---------- Generic grids ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Cards ---------- */
.card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); border-color: #C9D3E0; box-shadow: var(--shadow); }
.card-icon { width: 42px; height: 42px; border-radius: 11px; background: var(--paper-2); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.card-icon svg { width: 21px; height: 21px; }
.card h3 { font-size: 1.18rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15.5px; margin-bottom: 16px; }
.card .textlink { margin-top: auto; }
.card-link { text-decoration: none; }
.card-link:hover { text-decoration: none; }

/* Service card variant with eyebrow */
.svc-tag { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }

/* Case card */
.case-card { padding: 0; overflow: hidden; }
.case-card .case-visual { height: 128px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.case-card .case-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.case-card .case-body h3 { font-size: 1.22rem; margin-bottom: 8px; }
.case-card .case-body p { color: var(--muted); font-size: 15px; margin-bottom: 16px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.tag { font-family: var(--font-mono); font-size: 12px; color: var(--text-soft); background: var(--paper-2); border-radius: 6px; padding: 4px 9px; }
.case-flag { position: absolute; top: 14px; left: 14px; z-index: 2; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; background: var(--ink); color: #fff; padding: 5px 10px; border-radius: 6px; }

/* ---------- Feature list (checks) ---------- */
.feature-list { list-style: none; display: grid; gap: 12px; }
.feature-list li { position: relative; padding-left: 30px; color: var(--text-soft); }
.feature-list li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 16px; height: 16px; border-radius: 5px;
  background: var(--accent); opacity: .12;
}
.feature-list li::after {
  content: ""; position: absolute; left: 4.5px; top: 11px; width: 7px; height: 4px; border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: rotate(-45deg);
}
.on-dark .feature-list li { color: var(--muted-dark); }
.on-dark .feature-list li::before { background: #fff; opacity: .1; }
.on-dark .feature-list li::after { border-color: #7FA5FF; }

/* ---------- Dark sections ---------- */
.on-dark { background: var(--ink); color: #E8ECF2; position: relative; overflow: hidden; }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: #fff; }
.on-dark .lead { color: var(--muted-dark); }
.on-dark p { color: #C3CBD6; }
.on-dark .muted { color: var(--muted-dark); }
.on-dark .grid-lines { position: absolute; inset: 0; opacity: .5; pointer-events: none; }
.on-dark .card { background: var(--slate); border-color: var(--line-dark); }
.on-dark .card:hover { border-color: rgba(255,255,255,.22); box-shadow: none; }
.on-dark .card h3 { color: #fff; }
.on-dark .card p { color: var(--muted-dark); }
.on-dark .card-icon { background: rgba(255,255,255,.06); color: #7FA5FF; }
.on-dark .tag { background: rgba(255,255,255,.07); color: #C3CBD6; }

/* ---------- Leadership statement block ---------- */
.statement { position: relative; z-index: 1; }
.statement .h2 { max-width: 720px; margin-bottom: 22px; }
.statement-cols { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.statement-cols p { font-size: 1.05rem; }
.pull { font-family: var(--font-display); font-size: clamp(1.3rem,2.4vw,1.7rem); line-height: 1.32; color: #fff; letter-spacing: -.01em; border-left: 2px solid var(--accent); padding-left: 22px; }

/* ---------- Werkwijze steps ---------- */
.steps { display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 96px 1fr; gap: clamp(16px,3vw,36px); padding: clamp(26px,3.4vw,38px) 0; border-top: 1px solid var(--line); align-items: start; }
.step:last-child { border-bottom: 1px solid var(--line); }
.step-num { font-family: var(--font-mono); font-size: 15px; color: var(--accent-ink); letter-spacing: .04em; padding-top: 4px; }
.step h3 { font-size: 1.3rem; margin-bottom: 8px; }
.step p { color: var(--muted); margin-bottom: 0; }

/* ---------- Stat row ---------- */
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.stat { border-left: 2px solid var(--accent); padding-left: 18px; }
.stat-num { font-family: var(--font-display); font-size: clamp(2rem,4vw,2.8rem); font-weight: 600; color: var(--ink); line-height: 1; letter-spacing: -.02em; }
.on-dark .stat-num { color: #fff; }
.stat-label { font-size: 14.5px; color: var(--muted); margin-top: 8px; }
.on-dark .stat-label { color: var(--muted-dark); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative;
  font-family: var(--font-display); font-weight: 500; font-size: 1.12rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 27px; width: 12px; height: 12px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
  transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 32px; }
.faq .faq-body { padding: 0 44px 24px 0; color: var(--muted); }
.faq .faq-body p { color: var(--muted); margin-bottom: .8em; }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding-top: 26px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumbs li:not(:last-child)::after { content: "/"; color: var(--line); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--ink); text-decoration: none; }
.breadcrumbs [aria-current] { color: var(--text); }

/* ---------- Page hero (interior) ---------- */
.page-hero { padding-top: clamp(22px,3vw,36px); padding-bottom: clamp(36px,5vw,60px); }
.page-hero .h1 { max-width: 820px; margin-bottom: 20px; }
.page-hero .lead { max-width: 680px; }

/* ---------- Prose (long form) ---------- */
.prose h2 { font-size: clamp(1.5rem,3vw,2rem); margin: 1.6em 0 .5em; }
.prose h3 { font-size: 1.25rem; margin: 1.4em 0 .4em; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-soft); }
.prose ul { list-style: none; display: grid; gap: 10px; margin: 0 0 1.2em; }
.prose ul li { position: relative; padding-left: 26px; }
.prose ul li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }

/* ---------- Split panels ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px,5vw,64px); align-items: start; }
.split.narrow-right { grid-template-columns: 1.2fr .9fr; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.panel h3 { font-size: 1.15rem; margin-bottom: 14px; }
.on-dark .panel { background: var(--slate); border-color: var(--line-dark); }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band .h2 { max-width: 640px; margin: 0 auto 16px; }
.cta-band .lead { max-width: 560px; margin: 0 auto 30px; }
.cta-band .btn-row { justify-content: center; }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px,5vw,56px); align-items: start; }
.contact-methods { display: grid; gap: 14px; }
.contact-method { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; transition: border-color .2s var(--ease), transform .2s var(--ease); }
.contact-method:hover { text-decoration: none; border-color: #C9D3E0; transform: translateY(-2px); }
.contact-method .cm-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--paper-2); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.contact-method .cm-icon svg { width: 21px; height: 21px; }
.cm-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cm-value { font-weight: 600; color: var(--ink); font-size: 16px; }
.subject-list { display: grid; gap: 10px; margin-top: 8px; }
.subject-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--text); font-weight: 500; transition: border-color .2s var(--ease), background .2s var(--ease); }
.subject-list a:hover { text-decoration: none; border-color: var(--accent); background: var(--paper-2); }
.subject-list a svg { width: 16px; height: 16px; color: var(--accent-ink); flex: none; }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.kicker-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.chip { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-soft); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; }
.on-dark .chip { border-color: var(--line-dark); color: #C3CBD6; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .statement-cols { grid-template-columns: 1fr; gap: 26px; }
  .split, .split.narrow-right, .contact-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: fixed; inset: 70px 0 auto 0; background: #fff; border-bottom: 1px solid var(--line);
    padding: 14px var(--gutter) 26px; box-shadow: var(--shadow-lg);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
    max-height: calc(100vh - 70px); overflow-y: auto;
  }
  .primary-nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-link { justify-content: space-between; width: 100%; padding: 13px 12px; font-size: 16.5px; }
  .nav-link.is-active::after { display: none; }
  .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
    border: none; border-left: 2px solid var(--line); border-radius: 0; margin: 2px 0 8px 12px; padding: 2px 0;
    max-height: 0; overflow: hidden; transition: max-height .25s var(--ease);
  }
  .has-dropdown[data-open="true"] .dropdown { max-height: 420px; }
  .dropdown-link { padding: 11px 14px; }
  .nav-cta-item { margin: 12px 0 0; }
  .nav-cta-item .btn { width: 100%; justify-content: center; }
}

@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .step { grid-template-columns: 1fr; gap: 6px; }
  .step-num { padding-top: 0; }
  body { font-size: 16px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
