/* ROSA — gedeelde structuur. Kleur, type en vorm komen uit de richting-stylesheet
   (css/modernisme.css), die de tokens hieronder overschrijft. */

:root {
  --bg: #f6f1ea;
  --surface: #fbf8f3;
  --band: #efe7dc;
  --ink: #2b2a27;
  --ink-soft: #57524b;
  --line: #ddd3c5;
  --accent: #96463a;
  --accent-ink: #ffffff;
  --accent-soft: #f1e2dc;
  --on-dark: #f6f1ea;
  --on-dark-soft: #c9c2b8;
  --dark: #2a3133;

  --font-display: Georgia, serif;
  --font-body: system-ui, sans-serif;
  --display-weight: 400;
  --display-tracking: -0.015em;

  --radius: 12px;
  --radius-lg: 20px;
  --frame: 1px;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(4rem, 9vw, 7.5rem);
  --measure: 65ch;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 8rem;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 0.3vw + 1rem, 1.1875rem);
  line-height: 1.65;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--accent-ink); }

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 4.6vw + 0.6rem, 4.25rem); }
h2 { font-size: clamp(1.9rem, 2.4vw + 0.8rem, 2.85rem); }
h3 { font-size: clamp(1.3rem, 0.6vw + 1.1rem, 1.55rem); line-height: 1.25; }

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  transition: text-decoration-color 0.2s, color 0.2s;
}
a:hover { text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 6.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  margin-right: auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  border: 1px solid currentColor;
  font-family: "Jost", var(--font-body);
  font-weight: 300;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  line-height: 1;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 600; font-size: 1.3rem; }
.brand-sub { font-size: 0.92rem; color: var(--ink-soft); }

.nav ul {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  display: block;
  padding: 0.55rem 0.8rem;
  text-decoration: none;
  font-size: 0.98rem;
  color: var(--ink-soft);
  border-radius: var(--radius);
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.7rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease-out);
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, black); }

.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }

.btn-call { min-height: 2.75rem; padding: 0.55rem 1rem; font-size: 0.95rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(3.5rem, 8vw, 6.5rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: center;
}

.hero-copy h1 { max-width: 16ch; }

.lead {
  font-size: clamp(1.15rem, 0.5vw + 1.05rem, 1.35rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 34rem;
  margin-top: 1.5rem;
}

.hero-photo { margin: 0; position: relative; }
.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 30%;
}
.hero-photo figcaption {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Eén moment beweging: de foto opent bij laden. */
@media (prefers-reduced-motion: no-preference) {
  .hero-photo img {
    animation: reveal 1.3s var(--ease-out) both 0.1s;
  }
  @keyframes reveal {
    from { clip-path: inset(8% 8% 8% 8%); filter: saturate(0.6); }
    to { clip-path: inset(0 0 0 0); filter: saturate(1); }
  }
}

/* ---------- Feiten ---------- */

.facts { border-block: 1px solid var(--line); }
.facts-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}
.facts-list > div { padding: 1.5rem 1.25rem 1.5rem 0; }
.facts-list > div + div { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.facts-list dt { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 0.2rem; }
.facts-list dd { margin: 0; font-weight: 600; line-height: 1.35; }

/* ---------- Secties ---------- */

.section { padding-block: var(--section); }
.section-band { background: var(--band); }

.section-head { max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head p { color: var(--ink-soft); margin-top: 1rem; font-size: 1.1em; }

.prose { max-width: var(--measure); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

/* Kosteloze bijstand */
.assist {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.assist-note {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.assist-note h3 { margin-bottom: 0.75rem; }
.assist-note ul { margin: 0; padding-left: 1.2rem; }
.assist-note li + li { margin-top: 0.4rem; }

/* Rechtsgebieden */
.areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.area { padding: 2rem 2rem 2rem 0; border-bottom: 1px solid var(--line); }
.area:nth-child(even) { padding-left: 2rem; border-left: 1px solid var(--line); }
.area h3 { margin-bottom: 0.6rem; }
.area p { color: var(--ink-soft); }
.area ul { margin: 0.75rem 0 0; padding-left: 1.2rem; color: var(--ink-soft); }
.area li + li { margin-top: 0.3rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
}
.link-arrow .icon { transition: transform 0.25s var(--ease-out); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* Tijdlijn */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 1.1rem;
  border-top: 1px solid var(--line);
}
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline time {
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.3;
  font-variant-numeric: lining-nums tabular-nums;
}
.timeline p { margin: 0; color: var(--ink-soft); }
.timeline strong { color: var(--ink); font-weight: 600; }

/* Paginakop (subpagina's) */
.page-head { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 4vw, 3rem); }
.page-head p { max-width: 42rem; margin-top: 1.25rem; }

/* Boek */
.book {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.book-cover { margin: 0; }
.book-cover img {
  width: 100%;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12), 0 18px 40px -18px rgb(0 0 0 / 0.45);
}

blockquote {
  margin: 0;
  font-size: 1.1em;
}
blockquote footer { margin-top: 1.25rem; font-size: 0.95rem; color: var(--ink-soft); }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.contact-card {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: 0.9rem;
  padding-block: 1rem;
  border-top: 1px solid var(--line);
}
.contact-list li:first-child { border-top: 0; padding-top: 0; }
.contact-list .icon { margin-top: 0.2rem; color: var(--accent); }
.contact-list .label { display: block; font-size: 0.85rem; color: var(--ink-soft); }
.contact-list a, .contact-list .value { font-weight: 600; overflow-wrap: anywhere; }

.substitutes { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.substitutes li { padding-block: 1.1rem; border-top: 1px solid var(--line); }
.substitutes .topic { display: block; font-size: 0.85rem; color: var(--ink-soft); }
.substitutes .who { display: block; font-weight: 600; }
.substitutes .reach { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin-top: 0.25rem; font-size: 0.95rem; }
.substitutes .reach a { overflow-wrap: anywhere; }

/* CTA-band */
.cta {
  background: var(--dark);
  color: var(--on-dark);
  padding-block: clamp(3.5rem, 8vw, 6rem);
}
.cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 2rem 4rem;
  align-items: end;
}
.cta p { color: var(--on-dark-soft); margin-top: 1rem; max-width: 34rem; }
.cta .actions { margin-top: 0; justify-content: flex-end; }
.cta .btn-ghost { color: var(--on-dark); border-color: color-mix(in srgb, var(--on-dark) 35%, transparent); }
.cta .btn-ghost:hover { border-color: var(--on-dark); }
.cta :focus-visible { outline-color: var(--on-dark); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--dark);
  color: var(--on-dark-soft);
  font-size: 0.95rem;
  padding-block: 3rem 2.5rem;
  border-top: 1px solid color-mix(in srgb, var(--on-dark) 12%, transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr));
  gap: 2rem;
}
.site-footer .brand { color: var(--on-dark); }
.site-footer .brand-sub { color: var(--on-dark-soft); }
.site-footer h2 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--on-dark);
  margin-bottom: 0.75rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 0.4rem; }
.site-footer a { color: var(--on-dark-soft); text-decoration: none; }
.site-footer a:hover { color: var(--on-dark); text-decoration: underline; }
.site-footer :focus-visible { outline-color: var(--on-dark); }
.footer-address { margin-top: 1.25rem; font-style: normal; line-height: 1.6; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid color-mix(in srgb, var(--on-dark) 12%, transparent);
  font-size: 0.85rem;
}
.socials { display: flex; gap: 0.5rem; }
.socials a {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid color-mix(in srgb, var(--on-dark) 20%, transparent);
  border-radius: 999px;
}
.socials a:hover { border-color: var(--on-dark); text-decoration: none; }

/* ---------- Responsief ---------- */

@media (max-width: 960px) {
  .facts-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts-list > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts-list > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .cta-inner { grid-template-columns: 1fr; align-items: start; }
  .cta .actions { justify-content: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .header-inner { min-height: 5.25rem; gap: 0.75rem; }
  .brand-mark { width: 3.5rem; height: 3.5rem; font-size: 0.95rem; }
  .brand-name { font-size: 1.1rem; }
  .btn-call .btn-label { display: none; }
  .btn-call { width: 2.75rem; padding: 0; }
  .nav {
    position: absolute;
    inset: 100% 0 auto 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.25rem;
    display: none;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; }
  .nav a { padding: 0.85rem 0; font-size: 1.1rem; border-bottom: 1px solid var(--line); border-radius: 0; }

  .hero-grid, .split, .assist, .book, .contact-grid { grid-template-columns: 1fr; }
  .hero-photo { max-width: 26rem; }
  .areas { grid-template-columns: 1fr; }
  .area, .area:nth-child(even) { padding: 1.75rem 0; border-left: 0; }
  .book-cover { max-width: 16rem; }
}

@media (max-width: 520px) {
  .brand-sub { display: none; }
  .facts-list { grid-template-columns: 1fr; }
  .facts-list > div, .facts-list > div + div { padding: 1rem 0; border-left: 0; }
  .facts-list > div + div { border-top: 1px solid var(--line); }
  .timeline li { grid-template-columns: 1fr; gap: 0.2rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .actions .btn { flex: 1 1 100%; }
}

/* ---------- Beweging: tekenende kaders en groeiende tijdlijn ---------- */

.frame-draw {
  position: absolute;
  inset: 0.5px;
  width: calc(100% - 1px);
  height: calc(100% - 1px);
  overflow: visible;
  pointer-events: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
}
.brand-mark { position: relative; border: 0; }
.hero-photo figcaption { z-index: 1; }

.timeline { position: relative; padding-left: 2.25rem; }
.timeline::before,
.timeline::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0.3rem;
  width: 1px;
}
.timeline::before { background: var(--line); }
.timeline::after {
  background: var(--accent);
  transform-origin: top;
  transform: scaleY(var(--tl-progress, 1));
}
.timeline li { position: relative; }
.timeline li::before {
  content: "";
  position: absolute;
  left: calc(-2.25rem + 0.3rem - 0.3125rem);
  top: 1.55rem;
  width: 0.625rem;
  height: 0.625rem;
  background: var(--accent);
  border: 1px solid var(--accent);
  transition: background-color 0.4s, border-color 0.4s;
}
.timeline time { transition: color 0.4s; }
.timeline.is-animated li:not(.is-reached)::before { background: var(--band); border-color: var(--ink-soft); }
.timeline.is-animated li:not(.is-reached) time { color: var(--ink-soft); }

@media (prefers-reduced-motion: no-preference) {
  /* Het ROSA-vierkant tekent zichzelf, eenmaal per bezoek. */
  .intro .site-header .brand-mark .frame-draw rect {
    stroke-dasharray: 100;
    animation: draw 1s cubic-bezier(0.65, 0, 0.35, 1) both 0.15s;
  }
  .intro .site-header .brand-letters { animation: letters 0.9s var(--ease-out) both 0.85s; }
  .intro .site-header .brand-text { animation: fade 0.8s var(--ease-out) both 1.1s; }

  /* Het kader rond het portret tekent mee met de foto. */
  .hero-photo .frame-draw rect {
    stroke-dasharray: 100;
    animation: draw 1.6s cubic-bezier(0.65, 0, 0.35, 1) both 0.2s;
  }
  .hero-photo figcaption { animation: fade 0.8s var(--ease-out) both 1.4s; }

  @keyframes draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
  @keyframes letters { from { opacity: 0; letter-spacing: 0.35em; } to { opacity: 1; letter-spacing: 0.08em; } }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
}

/* Kaders en scheidingslijnen tekenen zich zodra ze in beeld komen (alleen met JS en zonder 'minder beweging'). */
.js-motion [data-draw] { position: relative; border-color: transparent; }
.js-motion [data-draw] > .frame-draw { color: var(--ink); }
.js-motion [data-draw] > .frame-draw rect {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.js-motion [data-draw].is-in > .frame-draw rect { stroke-dashoffset: 0; }

.js-motion .book-cover[data-draw] img { clip-path: inset(6% 6% 6% 6%); opacity: 0; transition: clip-path 1.2s var(--ease-out) 0.3s, opacity 0.8s var(--ease-out) 0.3s; }
.js-motion .book-cover[data-draw].is-in img { clip-path: inset(0 0 0 0); opacity: 1; }

.js-motion [data-rules] > * {
  border-top-color: transparent;
  border-bottom-color: transparent;
  background-image: linear-gradient(var(--line), var(--line));
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size 0.9s cubic-bezier(0.65, 0, 0.35, 1);
  transition-delay: calc(var(--i, 0) * 120ms);
}
.js-motion .substitutes[data-rules] > * { background-position: left top; }
.js-motion .areas[data-rules] > * { background-position: left bottom; }
.js-motion [data-rules].is-in > * { background-size: 100% 1px; }
