/* ==========================================================================
   Holland Huis – base (→ Bricks theme style + custom fonts)
   ========================================================================== */

/* Schibsted Grotesk, self-hosted (Fontsource 5.3.0, latin) – OFL */
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/schibsted-grotesk-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/schibsted-grotesk-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/schibsted-grotesk-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/schibsted-grotesk-700-normal.woff2") format("woff2"); }

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  color: var(--body);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--weight-semibold);
  color: var(--headings);
  overflow-wrap: break-word;
  text-wrap: balance;   /* no single word on the last line of a heading */
}
h1 { font-size: var(--text-h1); line-height: var(--leading-heading); }
h2 { font-size: var(--text-h2); line-height: var(--leading-heading); }
h3 { font-size: var(--text-h3); line-height: var(--leading-title); }
h4 { font-size: var(--text-h4); line-height: var(--leading-title); }
h5 { font-size: var(--text-h5); line-height: var(--leading-title); }
h6 { font-size: var(--text-h6); line-height: var(--leading-title); }

p, ul, ol, figure { margin: 0; }
p, li { text-wrap: pretty; }   /* avoid orphans in running text */

a {
  color: var(--focus);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--focus-hover); }

strong, b { font-weight: var(--weight-semibold); }

/* Focus: 2px outline, 2px offset, body colour – on all interactive elements */
:focus-visible {
  outline: 2px solid var(--body);
  outline-offset: 2px;
}

/* Page transitions (cross-document View Transitions; browsers without support navigate as usual) */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.3s; }
.site-header { view-transition-name: site-header; }   /* header stays put instead of fading */
::view-transition-group(.project-image) {              /* card image ↔ project-page image */
  animation-duration: 0.55s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
::view-transition-old(.project-image),
::view-transition-new(.project-image) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  overflow: clip;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -10rem;
  left: var(--gutter);
  z-index: 1000;
  padding: var(--space-xs) var(--space-m);
  background-color: var(--secondary);
  color: var(--white);
  font-weight: var(--weight-semibold);
}
.skip-link:focus { top: var(--space-xs); color: var(--white); }

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

/* --------------------------------------------------------------------------
   .prose – lopende tekst uit de editor (post_content, rich text)
   Bricks: class custom CSS (descendant rules)
   -------------------------------------------------------------------------- */
.prose { max-width: var(--text-width); }
.prose > * + * { margin-top: var(--space-text); }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: var(--text-h3); }
.prose h3 { font-size: var(--text-h4); }
.prose h2, .prose h3, .prose h4 { margin-top: var(--space-xl); }
.prose ul, .prose ol { padding-left: 2.4rem; }
.prose li + li { margin-top: var(--space-2xs); }
.prose a { text-decoration: underline; text-underline-offset: 0.2em; }
.prose blockquote { margin-left: 0; padding-left: var(--space-m); border-left: 4px solid var(--primary); }
