/*
Theme Name: RVV Interim & Advies
Theme URI: https://rogiervanvalen.nl
Author: Rogier van Valen
Author URI: https://rogiervanvalen.nl
Description: Maatwerkthema voor Rogier van Valen Interim & Advies. Modern, strak en menselijk. Gebouwd from scratch, zonder page builder. Typografie en witruimte als primaire vormgeving.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
Text Domain: rvv-interim
*/

/* ============================================================
   1. Design tokens
   ============================================================ */
:root {
  --paper:        #F7F4EF;
  --paper-2:      #FFFFFF;
  --ink:          #17150F;
  --ink-soft:     #4E4940;
  --ink-mute:     #8A8275;
  --line:         #E4DDD1;
  --line-strong:  #D3CABA;
  --accent:       #B3492B;
  --accent-deep:  #8F3621;
  --accent-tint:  #F2E6DF;
  --accent-wash:  #FBF4EF;

  --maxw:         1180px;
  --gutter:       clamp(1.5rem, 5vw, 4rem);

  --step--1: clamp(0.86rem, 0.83rem + 0.15vw, 0.95rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2:  clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --step-3:  clamp(2rem, 1.6rem + 2vw, 3rem);
  --step-4:  clamp(2.6rem, 1.9rem + 3.4vw, 4.4rem);
  --step-5:  clamp(3.2rem, 2rem + 5.6vw, 6rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================
   2. Reset & base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv05";
}

h1, h2, h3, h4 {
  font-family: "DM Sans", "Inter", system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

p { text-wrap: pretty; }

a { color: inherit; text-decoration: none; }

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

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

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

/* ============================================================
   3. Layout helpers
   ============================================================ */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow { max-width: 760px; }

section { position: relative; }

.section {
  padding-block: clamp(3.5rem, 8vw, 7rem);
}

.divider {
  border: 0;
  border-top: 1px solid var(--line);
}

.accent { color: var(--accent); }

.eyebrow {
  display: inline-block;
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.lead {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
  font-weight: 400;
}

.prose p { margin-bottom: 1.3em; max-width: 62ch; }
.prose p:last-child { margin-bottom: 0; }

.fine {
  font-size: var(--step--1);
  color: var(--ink-mute);
  line-height: 1.6;
  max-width: 70ch;
}

/* ============================================================
   4. Header / navigation
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
}

.brand {
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  line-height: 1.15;
  display: inline-flex;
  align-items: baseline;
  gap: 0.5ch;
  max-width: 70vw;
}
.brand__mark { color: var(--accent); white-space: nowrap; }
.brand__sub {
  display: block;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  margin-top: 0.15rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.2rem);
}
.nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.2rem);
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding-block: 0.4rem;
  transition: color 0.2s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after,
.nav .current-menu-item > a::after,
.nav .current_page_item > a::after { transform: scaleX(1); }
.nav .current-menu-item > a,
.nav .current_page_item > a { color: var(--ink); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: none; border: 0; cursor: pointer;
  padding: 10px;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--ink); border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.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); }

/* ============================================================
   5. Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6ch;
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1;
  padding: 1rem 1.6rem;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease), color 0.25s var(--ease);
}
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 0 rgba(143,54,33,0.4);
}
.btn--primary:hover {
  background: var(--accent-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -10px rgba(143,54,33,0.55);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

/* ============================================================
   6. Hero
   ============================================================ */
.hero {
  padding-top: clamp(3rem, 8vw, 6.5rem);
  padding-bottom: clamp(3rem, 7vw, 6rem);
}
.hero__title {
  font-size: var(--step-5);
  letter-spacing: -0.03em;
  max-width: 16ch;
}
.hero__title .br { display: block; }
.hero__intro {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  max-width: 56ch;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
}
.hero__cta { margin-top: clamp(2rem, 4vw, 2.75rem); }

/* ============================================================
   7. Two-column prose (waar het misgaat)
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.split__aside {
  font-size: var(--step-2);
  font-weight: 500;
  font-family: "DM Sans", sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  position: sticky;
  top: 110px;
}
.split__aside .accent-line {
  display: block;
  width: 48px; height: 3px;
  background: var(--accent);
  margin-bottom: 1.75rem;
  border-radius: 3px;
}
.split__body p {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 1.5em;
}
.split__body p:last-child { margin-bottom: 0; }
.split__body strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   8. Trio blocks (3 losse blokken)
   ============================================================ */
.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.trio__item {
  padding-top: 2rem;
  border-top: 2px solid var(--ink);
}
.trio__num {
  font-family: "DM Sans", sans-serif;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  display: block;
  margin-bottom: 1rem;
}
.trio__item p {
  font-size: var(--step-1);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
}

/* ============================================================
   9. About page
   ============================================================ */
.about-head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.about-portrait {
  margin: 0;
  position: relative;
  justify-self: end;
  max-width: 380px;
  width: 100%;
}
.about-portrait img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  background: var(--accent-tint);
  box-shadow: 0 40px 80px -48px rgba(23, 21, 15, 0.5);
}
.about-portrait::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid var(--accent);
  border-radius: 20px;
  z-index: -1;
  opacity: 0.5;
}

.about__intro {
  font-size: var(--step-2);
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
  max-width: 24ch;
}
.about__body { margin-top: clamp(2.5rem, 6vw, 4rem); }
.about__body p {
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 1.4em;
  max-width: 60ch;
}
.about__body p.accent-lead {
  color: var(--ink);
  font-weight: 500;
  font-family: "DM Sans", sans-serif;
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
}
.about__clients {
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

/* ============================================================
   10. Service cards (2x2)
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2.2vw, 1.75rem);
  counter-reset: card;
}
.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(1.75rem, 3vw, 2.75rem);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.card::before {
  counter-increment: card;
  content: counter(card, decimal-leading-zero);
  position: absolute;
  top: clamp(1.5rem, 3vw, 2.5rem);
  right: clamp(1.5rem, 3vw, 2.5rem);
  font-family: "DM Sans", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--line-strong);
  transition: color 0.35s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 24px 48px -28px rgba(23,21,15,0.28);
}
.card:hover::before { color: var(--accent); }
.card h3 {
  font-size: var(--step-1);
  margin-bottom: 0.9rem;
  max-width: 14ch;
}
.card p {
  color: var(--ink-soft);
  font-size: var(--step-0);
  line-height: 1.55;
}

/* ============================================================
   11. Feature block (uitgelicht)
   ============================================================ */
.feature {
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  padding: clamp(1.75rem, 5vw, 4rem);
  position: relative;
  box-shadow: 0 40px 80px -56px rgba(143,54,33,0.4);
}
.feature::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(160deg, var(--accent) 0%, transparent 38%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5ch;
  background: var(--accent);
  color: #fff;
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 1.75rem;
}
.feature__title {
  font-size: var(--step-3);
  max-width: 20ch;
}
.feature__sub {
  margin-top: 1rem;
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 48ch;
  line-height: 1.45;
}

.feature__grid {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.recognise h4 {
  font-family: "DM Sans", sans-serif;
  font-size: var(--step-1);
  margin-bottom: 1.5rem;
}
.recognise ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}
.recognise li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.recognise li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.72em;
  width: 14px; height: 2px;
  background: var(--accent);
}
.feature__text p {
  color: var(--ink-soft);
  margin-bottom: 1.2em;
  line-height: 1.6;
}
.feature__text p:last-child { margin-bottom: 0; }
.feature__text strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   12. Steps (5 op een rij)
   ============================================================ */
.steps {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  counter-reset: step;
}
.step {
  background: var(--accent-wash);
  border: 1px solid var(--accent-tint);
  border-radius: 14px;
  padding: 1.4rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.step__num {
  counter-increment: step;
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  background: var(--accent);
  width: 2rem; height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.step__num::before { content: counter(step); }
.step p {
  font-size: var(--step--1);
  line-height: 1.45;
  color: var(--ink-soft);
}
.step strong { color: var(--ink); font-weight: 600; font-family: "DM Sans", sans-serif; }

.feature__quote {
  margin-top: clamp(2rem, 4vw, 3rem);
  border-left: 3px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1.5rem;
  font-family: "DM Sans", sans-serif;
  font-size: var(--step-1);
  font-style: italic;
  color: var(--ink);
  max-width: 50ch;
}

.feature__outro {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 64ch;
}

/* ============================================================
   13. Contact page
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.contact-portrait {
  margin: 0;
  position: relative;
}
.contact-portrait img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  object-fit: cover;
  background: var(--accent-tint);
  box-shadow: 0 40px 80px -48px rgba(23, 21, 15, 0.5);
}
.contact-portrait::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid var(--accent);
  border-radius: 20px;
  z-index: -1;
  opacity: 0.5;
}

.contact__title {
  font-size: var(--step-4);
  max-width: 14ch;
}
.contact__lead {
  margin-top: clamp(1.5rem, 4vw, 2.25rem);
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 52ch;
  line-height: 1.55;
}
.contact-list {
  list-style: none;
  margin: clamp(2.5rem, 6vw, 4rem) 0 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
  max-width: 640px;
}
.contact-list li { background: var(--paper); }
.contact-list a,
.contact-list span {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 0.25rem;
  font-family: "DM Sans", sans-serif;
  font-size: var(--step-1);
  font-weight: 500;
  color: var(--ink);
  transition: color 0.2s var(--ease), padding 0.3s var(--ease);
}
.contact-list a:hover { color: var(--accent); padding-left: 1rem; }
.contact-list .ico {
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent);
}
.contact-list .ico svg { width: 20px; height: 20px; }

/* ============================================================
   14. Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  margin-top: clamp(3rem, 7vw, 6rem);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.site-footer .brand { font-size: 1rem; }
.site-footer__meta {
  font-size: var(--step--1);
  color: var(--ink-mute);
}
.site-footer__nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  padding: 0; margin: 0;
}
.site-footer__nav a {
  font-size: var(--step--1);
  color: var(--ink-soft);
  transition: color 0.2s var(--ease);
}
.site-footer__nav a:hover { color: var(--accent); }

/* ============================================================
   15. Page header (interior pages)
   ============================================================ */
.page-head {
  padding-top: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.page-head__title {
  font-size: var(--step-4);
  max-width: 18ch;
}

/* ============================================================
   16. Reveal-on-scroll
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  }
  .reveal.is-in { opacity: 1; transform: none; }
}

/* ============================================================
   17. Responsive
   ============================================================ */
@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    inset: 76px 0 auto 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.5rem;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
  .nav li { border-bottom: 1px solid var(--line); }
  .nav a { display: block; padding: 1rem 0; font-size: 1.1rem; }
  .nav a::after { display: none; }

  .split { grid-template-columns: 1fr; gap: 2rem; }
  .split__aside { position: static; }

  .trio { grid-template-columns: 1fr; gap: 0; }
  .trio__item { padding-block: 1.75rem; }
  .trio__item + .trio__item { border-top-width: 1px; }

  .cards { grid-template-columns: 1fr; }
  .feature__grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step { flex-direction: row; align-items: flex-start; }

  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-portrait { order: -1; max-width: 360px; }
  .contact-portrait::before { inset: 10px -10px -10px 10px; }

  .about-head { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-portrait { justify-self: start; max-width: 360px; }
  .about-portrait::before { inset: 10px -10px -10px 10px; }
}

@media (min-width: 881px) and (max-width: 1080px) {
  .steps { grid-template-columns: repeat(5, 1fr); gap: 0.6rem; }
  .step { padding: 1.1rem 0.9rem 1.2rem; }
}
