/* ============================================================
   LOOK & FEEL
   Colors and font are set here at the top — change them in one place.
   ============================================================ */

:root {
  --paper: #faf9f5;      /* background: near-white, warm undertone */
  --ink: #2a2320;        /* main text: deep brown */
  --muted: #6f6b62;      /* secondary text, meta: warm grey */
  --line: #e4e2da;       /* thin divider lines */
  --accent: #5b5e43;     /* muted olive (from the shirt in the photo): button, links, section labels */
  --accent-alt: #efefe8; /* calm surfaces: contact block, behind the photo */

  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --column: 38rem;       /* the centered reading column: text, section names and photo */
  --measure: 100%;       /* text lines fill the column */
  --gap: 4rem;           /* wide screens: space between the two columns */

  /* Spacing scale: use these instead of new one-off values */
  --space-xs: 0.5rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2.5rem;
  --space-xl: 4rem;
  --section: 4rem;        /* space above and below a section */
  --section-follow: 2.5rem; /* a section that continues the one before it */
}

@media (min-width: 40rem) {
  :root {
    --section: 5.5rem;
    --section-follow: 3.5rem;
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--line) var(--paper);
  accent-color: var(--accent);
}

/* Menu and hero links glide to their section, unless someone prefers less motion */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

a:hover {
  color: var(--ink);
}

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

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

[hidden] {
  display: none !important;
}

/* "Naar de inhoud": hidden until someone tabs to it with the keyboard */
.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:hover {
  color: var(--paper);
}

.skip-link:focus-visible {
  transform: none;
  outline-color: var(--ink);
}

/* Shown only when the page text fails to load: script.js removes it on success, and it
   stays invisible for the first few seconds so a normal load never flashes it */
.load-error {
  max-width: var(--measure);
  margin: 2rem 0 0;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  background: var(--accent-alt);
  font-weight: 500;
  visibility: hidden;
  animation: reveal 0s 3s forwards;
}

@keyframes reveal {
  to {
    visibility: visible;
  }
}

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

.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding-inline: 1.25rem;
}

@media (min-width: 40rem) {
  .wrap {
    padding-inline: 2rem;
  }
}

@media (min-width: 64rem) {
  .wrap {
    padding-inline: 3rem;
  }
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}

.brand {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.25rem;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--accent);
}

.lang {
  display: flex;
  gap: 0.125rem;
}

.lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.lang a:hover {
  color: var(--ink);
}

.lang a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

/* ---------- Hero: the headline, with Niek's photo beside it on wide screens ---------- */

.hero {
  display: grid;
  gap: var(--space-xl);
  padding-block: var(--space-xl) var(--section);
}

@media (min-width: 40rem) {
  .hero {
    padding-top: 6rem;
  }
}

@media (min-width: 56rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 18rem);
    column-gap: var(--gap);
    align-items: end;
  }
}

.hero h1 {
  max-width: 22ch;
  margin: 0;
  font-size: clamp(1.875rem, 3.6vw + 0.75rem, 3rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}


/* Slim bar under the hero: jumps to the email form for the exercises */
.download-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem var(--space-m);
  width: fit-content;
  max-width: 100%;
  margin: var(--space-l) 0 0;
  padding: var(--space-s) var(--space-m) var(--space-m);
  border-radius: 0.75rem;
  background: var(--accent-alt);
}

.download-bar p {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.45;
}


.button-small {
  min-height: 2.75rem;
  padding: 0 1.125rem;
  font-size: 0.9375rem;
}

/* Numbered steps in "Hoe ik werk", numbers in the accent color like the PDF */
.steps {
  max-width: var(--measure);
  margin: var(--space-m) 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  margin: 0 0 1.25rem;
  padding-left: 2rem;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

.steps strong {
  font-weight: 600;
}

/* ---------- Sections ---------- */

.section {
  padding-block: var(--section);
  border-top: 1px solid var(--line);
}

/* A section that continues the previous one ("Samenwerken" after "Het werk", "Waar ik mee
   bezig ben" after "Voor koppels"): no divider, a shorter gap, so the two read as one movement */
.section:has(+ .section-follow) {
  padding-bottom: 0;
}

.section-follow {
  padding-top: var(--section-follow);
  border-top: 0;
}

/* Section name ("Mijn verhaal", "Het werk"): directly above the text. On every screen size the
   sections sit in one centered column; only the hero and the signup panel are wider. */
.label {
  max-width: none;
  margin: 0 0 1.5rem;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}

.section > .label,
.section-body,
.load-error {
  max-width: var(--column);
  margin-inline: auto;
}

.section-body > :first-child {
  margin-top: 0;
}

.section-body > :last-child {
  margin-bottom: 0;
}

h2 {
  max-width: 24ch;
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h3 {
  margin: var(--space-l) 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.prose p {
  max-width: var(--measure);
  margin: 0 0 1.25em;
  text-wrap: pretty; /* no single word left alone on the last line */
}

.prose p:last-child {
  margin-bottom: 0;
}

/* First paragraph of the story reads a little larger */
.story p:first-child {
  font-size: 1.25rem;
  line-height: 1.5;
}

/* ---------- Exercises for couples ---------- */

.section[id] {
  scroll-margin-top: 1rem;
}

.lead {
  max-width: var(--measure);
  margin: 0 0 var(--space-m);
  text-wrap: pretty;
  font-size: 1.25rem;
  line-height: 1.5;
}


/* A link that looks like the signup button */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.5rem;
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--paper);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: var(--ink);
  color: var(--paper);
}

/* "Samenwerken": the intro-call button with a quieter message link under it */
.booking {
  margin: var(--space-l) 0 0;
}

.booking-note {
  margin: var(--space-xs) 0 0;
  font-size: 0.9375rem;
}

/* Bigger tap area for the message link, same look */
.booking-note a {
  display: inline-block;
  padding-block: 0.625rem;
}


.download-note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ---------- Photos inside the text (California, Verman Je): same width as the text ---------- */

.inline-photo {
  margin: var(--space-l) 0;
}

.inline-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
  background: var(--accent-alt);
}

/* The last line of "Waar ik mee bezig ben" continues the text: same gap as between paragraphs */
.stage-closing {
  max-width: var(--measure);
  margin: 1.25em 0 0;
}

/* ---------- Photo (in the hero) ---------- */

.portrait {
  width: 100%;
  max-width: 19rem;
  margin: 0;
}

@media (min-width: 56rem) {
  .portrait {
    max-width: none;
  }
}

.portrait picture {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 4px;
  background: var(--accent-alt);
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait figcaption {
  margin-top: 0.875rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ---------- Signup (Kit), in "Voor koppels" ---------- */

.signup {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.signup-couples {
  margin: var(--space-l) 0 0;
}

@media (min-width: 30rem) {
  .signup-couples .signup {
    flex-direction: row;
  }
}

.signup input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 3.25rem;
  padding: 0 1rem;
  border: 1px solid var(--muted);
  border-radius: 0.5rem;
  background: var(--paper);
  color: var(--ink);
  caret-color: var(--accent);
  font: inherit;
  font-size: 1rem; /* 16px stops iPhones from zooming in */
}

.signup input::placeholder {
  color: var(--muted);
}

.signup input:focus-visible {
  outline-offset: 2px;
}

.signup button {
  height: 3.25rem;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--paper);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.signup button:hover {
  background: var(--ink);
}

.signup button:disabled {
  opacity: 0.7;
  cursor: progress;
}

.signup button:disabled:hover {
  background: var(--accent);
}

.form-error {
  margin: 1rem 0 0;
  padding: 0.875rem 1rem;
  border-radius: 0.5rem;
  background: var(--accent-alt);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
}

/* Full privacy information, folded away under the form */
.privacy-details {
  margin: 0; /* the link's own 44px tap height already gives the space above it */
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.privacy-details summary {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  cursor: pointer;
}

.privacy-details .prose p {
  margin: 0 0 0.5em;
}

.thanks {
  margin: 0;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  background: var(--accent-alt);
  color: var(--ink);
  font-weight: 500;
}

.thanks:focus {
  outline: none;
}


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

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 2.5rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.site-footer p {
  margin: 0;
}
