/* deweert.ai — layout is CSS-only.
   Breakpoints match the values the old JS build computed from window.innerWidth:
     base            <= 560px  ("narrow")
     min-width 561   561-760   ("mobile")
     min-width 761   desktop
   Nothing here depends on JavaScript, so the page is correct on first paint. */

/* @font-face rules live in fonts.css, generated by tools/assemble-assets.mjs. */

:root {
  --page-bg: #ffffff;
  --alt-bg: #f5f6fa;
  --ink: #1e2333;
  --ink-soft: #4a5164;
  /* #8A90A2 was only 3.19:1 on white and 2.95:1 on --alt-bg, which fails WCAG
     AA for the 13-14px text it is used on. This clears 4.5:1 on both. */
  --ink-faint: #656b7e;
  --line: #e3e5ed;
  --accent: #1240a0;
  --accent-dark: #0c2c73;
  --contact-bg: #122b6b;
  --contact-ink: #ffffff;
  --contact-soft: #9daeda;
  --contact-accent: #f5b914;

  --display: 'Montserrat', Helvetica, sans-serif;

  --pad-x: 20px;
  --section-pad: 48px var(--pad-x) 56px;
  --contact-pad: 56px var(--pad-x) 64px;
}

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

html {
  /* Stop iOS Safari inflating text after an orientation change. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  /* Guard against any child forcing the document wider than the viewport,
     which is what makes mobile Safari zoom out. `clip` rather than `hidden`,
     because `hidden` silently creates a scroll container. */
  overflow-x: clip;
}

@supports not (overflow-x: clip) {
  html,
  body { overflow-x: hidden; }
}

body {
  background: var(--page-bg);
  color: var(--ink);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
::selection { background: var(--accent); color: #fff; }

img { max-width: 100%; }

h1, h2, h3 { font-family: var(--display); letter-spacing: -0.01em; margin: 0; }

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

/* Off-screen until focused, so keyboard users can jump past the nav. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 3000;
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 3px 0;
}
.skip-link:focus {
  left: 0;
  color: #fff;
  text-decoration: none;
}

/* ---------- shell ---------- */

.page {
  /* svh, deliberately NOT dvh. On iOS both vh and svh stay constant while
     scrolling, whereas dvh changes as the URL bar collapses -- using it here
     would reintroduce exactly the shifting this rewrite removes. */
  min-height: 100vh;
  min-height: 100svh;
  background: var(--page-bg);
  color: var(--ink);
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: var(--section-pad);
}

.brandbar {
  display: grid;
  grid-template-columns: 3fr 2fr 1fr;
  height: 5px;
}
.brandbar > :nth-child(1) { background: #1240a0; }
.brandbar > :nth-child(2) { background: #f5b914; }
.brandbar > :nth-child(3) { background: #d9232b; }

.section { border-top: 1px solid var(--line); }
.section--alt { background: var(--alt-bg); }
.section__title { margin: 0 0 44px; font-weight: 700; font-size: 28px; }
.section__intro {
  margin: 0 0 40px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 56ch;
}

/* ---------- nav ---------- */

.masthead {
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
}

.masthead__brand { display: flex; align-items: center; gap: 12px; }
/* On the article pages the brand is a link home. Without this it would inherit
   the global link colour and repaint "deweert" in accent blue. */
a.masthead__brand { color: inherit; }
.masthead__logo { height: 30px; width: auto; display: block; }
.masthead__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--accent);
}
.masthead__name span { color: #f5b914; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  font-size: 14px;
  color: var(--ink-soft);
}
.nav a { color: inherit; }

/* ---------- hero ---------- */

.hero {
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px var(--pad-x) 56px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
}

.hero__eyebrow {
  margin: 0 0 20px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero__title {
  font-weight: 800;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 17ch;
  text-wrap: pretty;
}

.hero__lead {
  margin: 28px 0 0;
  font-size: 18px;
  line-height: 1.65;
  max-width: 56ch;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.hero__actions {
  margin-top: 36px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.hero__email { font-size: 14px; color: var(--ink-faint); }

.hero__figure {
  /* min() stops the fixed 310px overflowing a 320px viewport, and in a
     one-column grid it is justify-self (not align-self) that centres it --
     the old build used align-self, so it never actually centred. */
  width: min(310px, 100%);
  aspect-ratio: 310 / 390;
  border-radius: 6px;
  overflow: hidden;
  order: -1;
  justify-self: center;
}
.hero__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 13px 26px;
  font-size: 15px;
  border-radius: 3px;
}
.btn:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }

.btn--ghost {
  align-self: flex-start;
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 9px 20px;
  font-size: 14px;
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
}
.btn--ghost:hover { background: var(--accent); color: #fff; text-decoration: none; }

/* ---------- diensten ---------- */

.services {
  display: grid;
  /* min() keeps the track from forcing a wider-than-viewport row on small
     phones, which a bare minmax(260px, 1fr) would do. */
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 40px;
}
.service {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 2px solid var(--accent);
  padding-top: 20px;
}
.service h3 { font-size: 18px; font-weight: 700; }
.service p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* ---------- portfolio ---------- */

.sites {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 40px;
}
.site-card { display: flex; flex-direction: column; gap: 14px; color: inherit; }
.site-card:hover { text-decoration: none; color: inherit; }
.site-card__meta { display: flex; flex-direction: column; gap: 4px; }
.site-card__name { font-size: 16px; font-weight: 700; }
.site-card__desc { font-size: 14px; color: var(--ink-soft); }

/* Preview of a 1280px-wide capture, cropped from the top.
   This reproduces the old scaled-iframe output exactly: at card width W the
   iframe showed the top 300/(W/1280) px of a 1280-wide render, which is the
   same region `cover` + `object-position: top` yields -- but with no iframe,
   no third-party request and no width-dependent JavaScript. */
.frame {
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  height: 300px;
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* ---------- project blocks ---------- */

.project {
  margin-top: 56px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}
.project__body { display: flex; flex-direction: column; gap: 18px; }
.project__head { display: flex; flex-direction: column; gap: 6px; }
.project__head h3 { font-size: 20px; font-weight: 700; }
.project__stack { margin: 0; font-size: 14px; color: var(--ink-faint); }
.project__body p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
  text-wrap: pretty;
}
/* Inline links inside body copy must not rely on colour alone to be
   distinguishable (WCAG 1.4.1). Standalone links in nav/cards are fine,
   because they are not embedded in a block of text. */
.project__body p a,
.split__lead a,
.article__body p a,
.article__aside p a,
.article__links a { text-decoration: underline; }
.project__list {
  margin: 0;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}
.project__note { font-size: 13px !important; color: var(--ink-faint) !important; }

/* "Lees meer" is a native <details>, so it works with JavaScript disabled and
   needs no script at all. The label is swapped in CSS. */
.project__more { display: flex; flex-direction: column; gap: 18px; }
.project__more > summary {
  align-self: flex-start;
  list-style: none;
  cursor: pointer;
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 9px 20px;
  font-size: 14px;
  border-radius: 3px;
  order: 1;
}
.project__more > summary::-webkit-details-marker { display: none; }
.project__more > summary:hover { background: var(--accent); color: #fff; }

/* Both labels live in the DOM and are toggled with CSS. Generating them with
   ::after instead would leave the <summary> with no accessible name, which
   screen readers announce as an unlabelled control. */
.project__more:not([open]) .more-label--close { display: none; }
.project__more[open] .more-label--open { display: none; }
/* order puts the extra copy above the toggle, matching the old layout where
   the button sat below the text it revealed. */
.project__more__body { order: 0; display: flex; flex-direction: column; gap: 18px; }

/* phone mockups */
.phones {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: center;
}
.phones img {
  width: calc(50% - 10px);
  max-width: 210px;
  height: auto;
  display: block;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(26, 26, 24, 0.18);
}
.phones img:last-child { margin-top: 36px; }

/* rotating screenshot deck */
.deck-wrap { display: flex; flex-direction: column; gap: 14px; }
.deck {
  position: relative;
  aspect-ratio: 960 / 516;
  margin: 0 24px 28px 0;
}
/* Each shot is a button so it is keyboard-reachable; the deck order is driven
   purely by data-pose, which is rendered into the HTML so the stack is already
   correct before site.js runs. */
.shot {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  transition: transform 1.4s ease, opacity 1.4s ease;
}
.shot img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(26, 26, 24, 0.14);
  background: #fff;
}

.shot[data-pose='0'] { transform: translate(0, 0) rotate(0deg) scale(1);            opacity: 1;    z-index: 10; }
.shot[data-pose='1'] { transform: translate(10px, 12px) rotate(1.1deg) scale(0.975); opacity: 0.9;  z-index: 9; }
.shot[data-pose='2'] { transform: translate(20px, 24px) rotate(-0.9deg) scale(0.95); opacity: 0.75; z-index: 8; }
.shot[data-pose='3'] { transform: translate(28px, 34px) rotate(0.6deg) scale(0.93);  opacity: 0.55; z-index: 7; }
.deck__hint {
  margin: 0;
  font-size: 13px;
  color: var(--ink-faint);
  text-align: center;
}

/* ---------- achtergrond ---------- */

.split {
  max-width: 1040px;
  margin: 0 auto;
  padding: var(--section-pad);
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.split__lead {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.split__title { margin: 0 0 16px; font-weight: 700; font-size: 28px; }

.cv { display: flex; flex-direction: column; }
.cv__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.cv__period { font-size: 13px; color: var(--ink-faint); padding-top: 2px; }
.cv__main { display: flex; flex-direction: column; gap: 4px; }
.cv__role { font-size: 15px; font-weight: 700; }
.cv__detail {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.cv__sub {
  margin: 8px 0 0 20px;
  padding-left: 14px;
  border-left: 2px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cv__sub-title { font-size: 14px; font-weight: 600; }
.cv__sub-detail {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.cv__link { margin-top: 24px; }

/* ---------- werkgebied ---------- */

.regio__points {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}
.regio__point { display: flex; align-items: center; gap: 10px; }
.regio__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d9232b;
  flex-shrink: 0;
}
.map {
  height: 380px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: #e8edf0;
}

/* ---------- contact ---------- */

.contact {
  border-top: 1px solid var(--line);
  background: var(--contact-bg);
  color: var(--contact-ink);
}
.contact__inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: var(--contact-pad);
}
.contact__title {
  font-weight: 700;
  font-size: 28px;
  max-width: 24ch;
  text-wrap: pretty;
}
.contact__links {
  margin-top: 32px;
  display: flex;
  gap: 32px;
  align-items: baseline;
  flex-wrap: wrap;
}
.contact__primary {
  font-size: 18px;
  color: var(--contact-accent);
  border-bottom: 1px solid var(--contact-accent);
}
.contact__primary:hover { color: var(--contact-accent); text-decoration: none; opacity: 0.8; }
.contact__secondary { font-size: 15px; color: var(--contact-soft); }
.contact__secondary:hover { color: var(--contact-ink); }
/* The footer continues the contact section's dark panel, so it drops the top
   border and sets its own vertical rhythm in place of the section's. */
footer.contact { border-top: 0; }
/* The gap above the footer row is padding on the wrapper, not a margin on the
   row itself. As a margin it had nothing above it to collapse against, so it
   escaped the footer and pushed it down the page -- opening a 56px strip of
   white between two halves of what should read as one dark panel.
   Bottom matches top so the row sits in an even band; the section's own
   64-88px bottom padding left far more air under the row than above it. */
.contact__foot-wrap { padding-top: 56px; padding-bottom: 56px; }

.contact__foot {
  display: flex;
  justify-content: space-between;
  /* Centred, not bottom-aligned: the mark is far taller than the one line of
     small print beside it, so flex-end dropped that line to the very bottom of
     the mark and left the two looking unrelated. */
  align-items: center;
  gap: 24px 32px;
  flex-wrap: wrap;
}
.contact__copy { margin: 0; font-size: 13px; color: var(--contact-soft); }
.contact__mark {
  height: 52px;
  width: auto;
  display: block;
  /* The artwork is baked onto its own opaque plate, so on this dark panel it
     is a white card whether we style it or not. Padded out in the plate's own
     off-white it reads as a deliberate card instead of a tight crop -- the
     art leaves only ~6px of white around itself at this size. content-box so
     the height above still means the artwork, not artwork minus padding. */
  box-sizing: content-box;
  padding: 10px 16px;
  background: #fdfdfd;
  border-radius: 10px;
}

/* ---------- artikelen ---------- */

/* Long-form gets a narrower column than .wrap's 1040px. At 16px that puts the
   measure around 70 characters, which is the comfortable range for reading a
   page of prose rather than scanning a section of the homepage. */
.article__wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--section-pad);
}

.crumbs { margin: 0 0 28px; font-size: 13px; }
.crumbs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}
/* The separator is generated content, so screen readers and copy-paste never
   pick it up -- the list structure already conveys the nesting. */
.crumbs__list li + li::before {
  content: "/";
  margin-right: 10px;
  color: var(--ink-faint);
}
.crumbs__list a { color: var(--ink-soft); text-decoration: underline; }
.crumbs__list [aria-current="page"] { color: var(--ink-faint); }

.article__eyebrow {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.article__title {
  margin: 0 0 16px;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
  text-wrap: balance;
}
.article__meta { margin: 0 0 28px; font-size: 13px; color: var(--ink-faint); }
.article__sep { margin: 0 8px; }
.article__meta a { color: var(--ink-soft); text-decoration: underline; }
.article__standfirst {
  margin: 0 0 36px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  text-wrap: pretty;
}

/* The facts panel. --ink-soft and --ink-faint are both checked against
   --alt-bg in a11y.spec.js, so this background is a safe one to sit on. */
.article__aside {
  margin: 0 0 36px;
  padding: 24px;
  background: var(--alt-bg);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
}
.article__aside-title { margin: 0 0 12px; font-size: 18px; font-weight: 700; }
.article__aside p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.article__aside p:last-child { margin-bottom: 0; }
.article__facts {
  margin: 0 0 12px;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.article__facts strong { color: var(--ink); }
.article__note { font-size: 13px; color: var(--ink-faint); }

.article__body p {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  text-wrap: pretty;
}
.article__body p:last-child { margin-bottom: 0; }

/* Set apart from the body copy on purpose: it is the editor speaking, not the
   author, and the reader should be able to see which is which. */
.article__correction {
  margin: 32px 0 0;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-faint);
}

.article__section {
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.article__section h2 { margin: 0 0 20px; font-size: 22px; font-weight: 700; }
.article__links {
  margin: 0;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}

/* The index list. Rule-separated rather than boxed, matching .cv__row, so one
   article does not look like a lonely card on a wide screen. */
.article-list { list-style: none; margin: 0; padding: 0; }
.article-card {
  display: block;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  color: inherit;
}
.article-list li:last-child .article-card { border-bottom: 1px solid var(--line); }
.article-card__meta { margin: 0 0 8px; font-size: 13px; color: var(--ink-faint); }
.article-card__title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  text-wrap: balance;
}
.article-card__desc {
  margin: 0 0 12px;
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.article-card__more { font-size: 14px; font-weight: 700; color: var(--accent); }
.article-card:hover .article-card__title { color: var(--accent-dark); }
.article-card:hover .article-card__more { text-decoration: underline; }

/* ---------- lightbox ---------- */

/* Native <dialog> gives Esc-to-close, a focus trap and background inert for
   free -- all things the old seven-images-with-display:none version lacked. */
.lightbox {
  padding: 32px;
  border: 0;
  background: none;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  cursor: zoom-out;
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(26, 26, 24, 0.88); }
.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

/* =======================================================================
   561px and up  — the old build's "not narrow"
   ======================================================================= */

@media (min-width: 561px) {
  :root {
    --pad-x: 32px;
    --section-pad: 72px var(--pad-x) 84px;
    --contact-pad: 80px var(--pad-x) 88px;
  }

  .hero { padding: 56px 24px 64px; }
  .hero__title { font-size: 42px; }

  .cv__row { grid-template-columns: 110px 1fr; gap: 20px; }

  .article__title { font-size: 38px; }
  .article__standfirst { font-size: 18px; }
  .article__aside { padding: 28px 32px; }

  .contact__title { font-size: 38px; }
}

/* =======================================================================
   761px and up — the old build's desktop
   ======================================================================= */

@media (min-width: 761px) {
  .masthead { flex-wrap: nowrap; }
  .nav { gap: 28px; }

  .hero {
    padding: 88px var(--pad-x) 96px;
    /* The image column is stated explicitly rather than left to `auto`.
       .hero__figure uses min(310px, 100%) so it cannot overflow a 320px phone,
       but inside an `auto` track that percentage is indefinite, so the track
       fell back to the portrait's intrinsic 600px and squeezed the intro text
       into ~312px. minmax(0, 1fr) also stops the text track refusing to shrink
       below its longest word. */
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 64px;
  }
  .hero__title { font-size: 56px; }
  .hero__figure { order: 0; justify-self: start; align-self: start; }

  .project {
    grid-template-columns: minmax(280px, 420px) 1fr;
    gap: 56px;
  }

  .split {
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 56px;
  }
}
