/* ============================================================
   Klivr — SHARED stylesheet. Loaded by every page.
   The token layer lives here and ONLY here; never redeclare tokens
   in a page's own <style>. Page-specific section styles stay inline
   on their page. Source of truth: DESIGN.md (palette provisional).
   ============================================================ */
:root {
  --ink: #141B33;
  --white: #FFFFFF;
  --paper: #F5F7FC;
  --grey: #5B6480;
  --border: rgba(20, 27, 51, 0.08);

  --hero-blue: #2A5CFF;
  --blue-on-dark: #6E8FFF;
  --deep-blue: #17348C;
  --pink: #D62E7C;
  --teal: #00C2A8;
  --teal-text: #00806E;
  --cyan: #4CC9F0;        /* canon accent for numbers + labels on dark ground */

  --signature: linear-gradient(90deg, var(--hero-blue), var(--pink));

  --font-display: 'Clash Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Switzer', ui-sans-serif, system-ui, sans-serif;

  --text-label:  12px;
  --text-sm:     14px;
  --text-body:   16px;
  --text-lead:   18px;
  --text-h3:     21px;
  --text-h2:     clamp(28px, 4vw, 42px);
  --text-h1:     clamp(44px, 8vw, 96px);
  --text-figure: clamp(40px, 4.6vw, 58px);
  --text-mark:   26px;

  --shadow-whisper: inset 0 1px 0 rgba(255,255,255,0.5), 0 1px 2px rgba(20,27,51,0.04), 0 6px 16px -8px rgba(20,27,51,0.10);
  --shadow-lift: inset 0 1px 0 rgba(255,255,255,0.55), 0 1px 2px rgba(20,27,51,0.05), 0 8px 18px -10px rgba(20,27,51,0.10), 0 20px 40px -16px rgba(20,27,51,0.16);
  --shadow-float: inset 0 1px 0 rgba(255,255,255,0.5), 0 2px 6px rgba(20,27,51,0.06), 0 16px 32px -16px rgba(20,27,51,0.18), 0 40px 70px -30px rgba(20,27,51,0.30);
  --shadow-blue-press: 0 12px 28px -12px rgba(42,92,255,0.45);

  --radius-control: 14px;
  --radius-card: 28px;
  --radius-lg: 32px;
  --radius-pill: 100px;
  --radius-section: clamp(28px, 3.4vw, 44px);

  --press: cubic-bezier(.2,.7,.2,1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  --edge: 5vw;

  /* spacing scale */
  --space-heading: clamp(8px, 1vw, 16px);          /* label -> kop, kop -> subkop */
  --space-heading-hero: clamp(24px, 3vw, 40px);    /* alleen de hero-headline */
  --space-heading-body: clamp(18px, 2.2vw, 30px);  /* kop -> lopende tekst (buiten de tokens; eigen waarde) */
  --space-text-media: clamp(24px, 3vw, 40px);      /* tekst/kop -> afbeelding, mockup of kaart */
  --space-section: clamp(80px, 8vw, 120px);        /* verticale ruimte tussen secties */
  --space-cta: clamp(16px, 2vw, 24px);             /* laatste tekstregel -> CTA */

  --z-sticky: 200;
  --z-nav: 300;
  --z-modal: 400;
}

@media (max-width: 768px) {
  :root {
    --space-text-media: clamp(16px, 4vw, 24px);
    --space-section: clamp(48px, 8vw, 64px);
    --space-cta: clamp(12px, 3vw, 16px);
    --space-heading-body: clamp(16px, 4vw, 24px);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-weight: 400; font-size: var(--text-body); line-height: 1.65;
  overflow-x: hidden; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure, blockquote { margin: 0; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: pretty; }
.nowrap { white-space: nowrap; }
.keep { white-space: nowrap; }        /* keep a phrase together at every width */
@media (max-width: 640px) { .nowrap { white-space: normal; } br.brk { display: none; } }
:focus-visible { outline: 2px solid var(--hero-blue); outline-offset: 3px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--edge); }

/* ---------- type roles ---------- */
.display { font-family: var(--font-display); font-weight: 600; font-size: var(--text-h1); letter-spacing: -0.03em; line-height: 1.05; }
.headline { font-family: var(--font-display); font-weight: 500; font-size: var(--text-h2); letter-spacing: -0.03em; line-height: 1.05; }
.lead { font-size: var(--text-lead); line-height: 1.65; max-width: 60ch; }
.body-copy { font-size: var(--text-body); line-height: 1.65; max-width: 68ch; }
.label { font-family: var(--font-body); font-weight: 600; font-size: var(--text-label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--grey); display: block; margin-bottom: var(--space-heading); }
.accent-line { color: var(--hero-blue); }
.dark-ink .accent-line, .dark-blue .accent-line { color: var(--blue-on-dark); }
.hairline { height: 2px; border: 0; background: var(--signature); width: 100%; max-width: 440px; }

/* ---------- buttons ---------- */
.btn { display: inline-block; font-family: var(--font-body); font-weight: 600; font-size: var(--text-body); line-height: 1; padding: 15px 30px; border: none; border-radius: var(--radius-pill); cursor: pointer; text-align: center; transition: transform .14s var(--press), background .14s, border-color .14s, color .14s; }
.btn-primary { background: var(--hero-blue); color: var(--white); box-shadow: var(--shadow-blue-press); }
.btn-primary:hover { transform: scale(1.02); }
.btn-primary:active { transform: scale(0.98); }
.btn-on-dark { background: var(--white); color: var(--deep-blue); box-shadow: none; }
.btn-on-dark:hover { transform: scale(1.02); }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--hero-blue); color: var(--hero-blue); }

/* ---------- nav (3-zone grid: links | centred logo | buttons) ---------- */
#nav { position: fixed; top: 0; left: 0; width: 100%; z-index: var(--z-nav); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 14px var(--edge); background: var(--white); border-bottom: 1px solid transparent; transition: border-color .3s ease, box-shadow .3s ease; }
#nav.scrolled { border-bottom-color: var(--border); box-shadow: 0 1px 16px rgba(20,27,51,0.06); }
.nav-left { grid-column: 1; display: flex; align-items: center; gap: clamp(16px, 2vw, 28px); justify-self: start; }
.nav-link { font-weight: 500; font-size: var(--text-sm); color: var(--grey); transition: color .2s ease; }
.nav-link:hover { color: var(--ink); }
/* active page marker: subtle, on-token */
.nav-link[aria-current="page"] { color: var(--ink); border-bottom: 2px solid var(--hero-blue); padding-bottom: 2px; }
.nav-logo { grid-column: 2; justify-self: center; }
.lockup-mark { font-family: var(--font-display); font-weight: 600; font-size: var(--text-mark); letter-spacing: -0.03em; line-height: 1; color: var(--ink); }
.nav-right { grid-column: 3; display: flex; align-items: center; gap: 10px; justify-self: end; }
.nav-btn { font-size: var(--text-sm); padding: 11px 20px; }
@media (max-width: 900px) { .nav-left { display: none; } }
@media (max-width: 560px) { .nav-book { display: none; } }

/* ---------- sticky cta ---------- */
.sticky-cta { position: fixed; bottom: 0; left: 0; width: 100%; z-index: var(--z-sticky); padding: 20px 24px; text-align: center; background: linear-gradient(to top, var(--paper) 55%, rgba(245,247,252,0)); opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.sticky-cta.visible { opacity: 1; pointer-events: auto; }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease-out-expo), transform .7s var(--ease-out-expo); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- dark sections ---------- */
/* every dark section shares one ground: canon Ink #13103A with a subtle cyan glow */
.dark-ink, .dark-blue { background: #13103A; color: var(--white); }
.dark-ink .label, .dark-blue .label { color: var(--cyan); }
.dark-ink p, .dark-blue p { color: rgba(255,255,255,0.75); }
.dark-ink h2, .dark-ink h3, .dark-blue h2, .dark-blue h3 { color: var(--white); }
.dark-ink :focus-visible, .dark-blue :focus-visible { outline-color: var(--white); }
section { padding-block: var(--space-section); }
.dark-ink, .dark-blue { position: relative; isolation: isolate; overflow: hidden; }
/* dark sections are framed as floating, fully-rounded cards on the Paper canvas — not full-bleed slabs */
.dark-ink, .dark-blue { max-width: min(1200px, 92vw); margin: clamp(36px, 5vw, 60px) auto; border-radius: var(--radius-section); box-shadow: var(--shadow-float); padding-block: clamp(56px, 6vw, 92px); }
@media (max-width: 768px) { .dark-ink, .dark-blue { max-width: calc(100% - 32px); margin: 28px auto; border-radius: 20px; padding-block: clamp(44px, 9vw, 60px); } }
.dark-ink::before, .dark-blue::before, footer::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background:
    radial-gradient(90% 90% at 85% -12%, rgba(76, 201, 240, 0.15) 0%, transparent 60%),
    radial-gradient(80% 70% at 6% 110%, rgba(76, 201, 240, 0.08) 0%, transparent 64%);
}

/* ---------- footer ---------- */
/* footer is a full-bleed flat base — the one dark surface that spans edge to edge */
footer { background: #13103A; color: rgba(255,255,255,0.72); padding: clamp(48px, 5vw, 64px) 0 clamp(40px, 4vw, 52px); position: relative; isolation: isolate; overflow: hidden; }
.foot-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 24px; }
.foot-mark { font-family: var(--font-display); font-weight: 600; font-size: var(--text-mark); letter-spacing: -0.03em; color: var(--white); }
.foot-tag { font-size: var(--text-label); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-top: 6px; }
.foot-desc { font-size: var(--text-sm); color: rgba(255,255,255,0.55); margin-top: 8px; max-width: 24ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: 24px; font-size: var(--text-body); }
.foot-links a { transition: color .2s ease; }
.foot-links a:hover { color: var(--white); }
footer .hairline { margin: 32px 0 24px; max-width: none; opacity: .55; }
.foot-legal { font-size: var(--text-sm); color: rgba(255,255,255,0.5); }

/* ---------- book-an-intro-call modal ---------- */
body.book-lock { overflow: hidden; }
.book-overlay {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: grid; place-items: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(20, 27, 51, 0.55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .25s var(--ease-out-expo);
}
.book-overlay[hidden] { display: none; }
.book-overlay.is-open { opacity: 1; }

.book-modal {
  position: relative;
  width: min(640px, 100%); max-height: 100%;
  display: flex; flex-direction: column;
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-float);
  overflow: hidden;
  transform: translateY(12px) scale(.985);
  transition: transform .3s var(--ease-out-expo);
}
.book-overlay.is-open .book-modal { transform: none; }

.book-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px 20px; flex: none;
  border-bottom: 1px solid var(--border);
}
.book-modal-title {
  margin: 0; font-family: var(--font-display); font-weight: 600;
  font-size: var(--text-h3); color: var(--ink);
}
.book-modal-close {
  display: grid; place-items: center;
  width: 40px; height: 40px; flex: none;
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: var(--paper); color: var(--ink); cursor: pointer;
  transition: background .2s var(--press), color .2s var(--press), transform .2s var(--press);
}
.book-modal-close:hover { background: var(--ink); color: var(--white); }
.book-modal-close:active { transform: scale(.94); }
.book-modal-close:focus-visible { outline: 2px solid var(--hero-blue); outline-offset: 2px; }
.book-modal-close svg { width: 20px; height: 20px; }

.book-modal-body { flex: 1 1 auto; min-height: 0; background: var(--white); }
.book-frame { display: block; width: 100%; height: 700px; min-height: 700px; max-height: 100%; border: 0; }

@media (max-width: 768px) {
  .book-overlay { padding: 0; }
  .book-modal { width: 100%; height: 100%; max-height: none; border-radius: 0; }
  .book-modal-body { overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .book-frame { height: 100%; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .btn-primary:hover, .btn-primary:active, .btn-on-dark:hover { transform: none; }
}
