:root {
  --cream: #F6F2E9;
  --cream-deep: #EFE9DB;
  --ink: #26231D;
  --ink-soft: #55503F;
  --metal-line: #C9C2B0;
  --metal-line-strong: #A69C86;
  --blueprint: #2C5170;
  --blueprint-soft: #DCE6EC;

  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

a { color: inherit; }

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

.site-header {
  border-bottom: 1px solid var(--metal-line);
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.header-wordmark {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink-soft);
}

.logo-banner {
  padding: 64px 0 44px;
  border-bottom: 1px solid var(--metal-line);
  text-align: center;
}

.logo-mark {
  height: 170px;
  width: auto;
  display: inline-block;
  mix-blend-mode: multiply;
}

.site-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 13px;

  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--cream);
  border: 1px solid var(--ink);
  padding: 6px 0;
  z-index: 20;

  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.site-nav.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-wrap {
  position: relative;
}

.nav-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 13px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 9px 15px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-toggle:hover {
  background: var(--ink);
  color: var(--cream);
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 10px 16px;
  border-bottom: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--cream-deep);
}

/* ---------- Shared annotation label ---------- */

.eyebrow-annotation {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--blueprint);
  margin: 0 0 18px;
  letter-spacing: 0.01em;
}

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

.hero {
  padding: 88px 0 96px;
  border-bottom: 1px solid var(--metal-line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: start;
}

.hero-lead h1 {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}

.hero-sub {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 32px;
}

.btn-primary {
  display: inline-block;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 13.5px;
  text-decoration: none;
  padding: 13px 24px;
  border: 1px solid var(--ink);
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-primary:hover {
  background: transparent;
  color: var(--ink);
}

/* Titleblock — engineering drawing title block */

.titleblock {
  position: relative;
  border: 1.5px solid var(--ink);
  background: var(--cream-deep);
  margin-top: 8px;
}

.titleblock::before,
.titleblock::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
}

.titleblock::before {
  top: -1.5px; left: -1.5px;
  border-top: 2px solid var(--blueprint);
  border-left: 2px solid var(--blueprint);
}

.titleblock::after {
  bottom: -1.5px; right: -1.5px;
  border-bottom: 2px solid var(--blueprint);
  border-right: 2px solid var(--blueprint);
}

.titleblock-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--metal-line-strong);
}

.titleblock-row:last-child { border-bottom: none; }

.titleblock-row--split {
  flex-direction: row;
  gap: 0;
}

.titleblock-row--split > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.titleblock-row--split > div:first-child {
  border-right: 1px solid var(--metal-line-strong);
  padding-right: 16px;
  margin-right: 16px;
}

.tb-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
}

.tb-value {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
}

/* ---------- Over ---------- */

.section-over {
  padding: 80px 0;
  border-bottom: 1px solid var(--metal-line);
}

.over-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
}

.over-text { max-width: 62ch; }

.over-lead {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.4;
  margin-top: 0;
}

.over-text p {
  color: var(--ink-soft);
  font-size: 16px;
}

.over-text p.over-lead { color: var(--ink); }

/* ---------- Diensten / phases ---------- */

.section-diensten {
  padding: 80px 0;
  border-bottom: 1px solid var(--metal-line);
}

.section-over h2,
.section-diensten h2,
.section-portfolio h2,
.section-contact h2 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  margin: 14px 0 40px;
  letter-spacing: -0.01em;
}

.phase-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--metal-line-strong);
}

.phase {
  padding: 28px 28px 0 28px;
  border-right: 1px solid var(--metal-line);
}

.phase:first-child { padding-left: 0; }

.phase:last-child { border-right: none; }

.phase-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--blueprint);
  margin-bottom: 14px;
}

.phase h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 10px;
}

.phase p {
  color: var(--ink-soft);
  font-size: 15px;
  margin: 0;
  padding-right: 12px;
}

/* ---------- Portfolio ---------- */

.section-portfolio {
  padding: 80px 0;
  border-bottom: 1px solid var(--metal-line);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.portfolio-item {
  position: relative;
  border: 1px solid var(--metal-line-strong);
  background: var(--cream-deep);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.portfolio-item img,
.portfolio-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portfolio-item::before,
.portfolio-item::after,
.crop-tl, .crop-br {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
}

.portfolio-item::before {
  top: 6px; left: 6px;
  border-top: 1.5px solid var(--cream);
  border-left: 1.5px solid var(--cream);
}

.portfolio-item::after {
  bottom: 6px; right: 6px;
  border-bottom: 1.5px solid var(--cream);
  border-right: 1.5px solid var(--cream);
}

.portfolio-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: rgba(38, 35, 29, 0.82);
  color: var(--cream);
  transform: translateY(100%);
  transition: transform 0.2s ease;
}

.portfolio-item:hover .portfolio-caption {
  transform: translateY(0);
}

.portfolio-empty {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink-soft);
  border: 1px dashed var(--metal-line-strong);
  padding: 32px;
  text-align: center;
}

.portfolio-empty code {
  background: var(--cream-deep);
  padding: 2px 6px;
}

/* Omschrijving die over een portfolio-item komt bij klikken */

.portfolio-item.has-info { cursor: pointer; }

.portfolio-item::before,
.portfolio-item::after { z-index: 3; }

.portfolio-badge {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 2;
  width: 22px; height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-style: italic;
  line-height: 1;
  color: var(--cream);
  background: rgba(38, 35, 29, 0.72);
  border: 1px solid var(--cream);
  border-radius: 50%;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.portfolio-item.is-open .portfolio-badge { opacity: 0; }

.portfolio-info {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 24px;
  overflow-y: auto;
  background: rgba(38, 35, 29, 0.9);
  color: var(--cream);

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
}

.portfolio-item.is-open .portfolio-info {
  opacity: 1;
  visibility: visible;
}

.portfolio-item.is-open .portfolio-caption { transform: translateY(100%); }

.portfolio-info-title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--metal-line);
}

.portfolio-info-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-line; /* lege regel in het .txt-bestand = nieuwe alinea */
}

.portfolio-item:focus-visible {
  outline: 2px solid var(--blueprint);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-info,
  .portfolio-badge { transition: none; }
}

/* ---------- Contact ---------- */

.section-contact { padding: 80px 0 100px; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
}

.contact-block {
  border-left: 1.5px solid var(--ink);
  padding-left: 24px;
}

.contact-email {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1.5px solid var(--blueprint);
}

.contact-note {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 10px;
}

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

.site-footer {
  border-top: 1px solid var(--metal-line);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero-grid,
  .over-grid,
  .contact-grid { grid-template-columns: 1fr; }


  .phase-list { grid-template-columns: 1fr; }
  .phase { border-right: none; padding-left: 0; border-bottom: 1px solid var(--metal-line); padding-bottom: 24px; margin-bottom: 24px; }

  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }

  .logo-mark { height: 96px; }
  .logo-banner { padding: 40px 0 32px; }
}

@media (max-width: 560px) {
  .portfolio-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .portfolio-caption { transition: none; }
}

/* Focus visibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blueprint);
  outline-offset: 2px;
}

/* ---------- Over Fred ---------- */

.section-fred {
  padding: 80px 0 100px;
  border-top: 1px solid var(--metal-line);
}

.fred-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 64px;
  align-items: center;
}

.fred-photo {
  margin: 0;
}

.fred-photo img {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: multiply; /* wit van de foto gaat op in de crèmekleurige achtergrond */
}

.fred-text { max-width: 62ch; }

.section-fred h2 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  margin: 14px 0 28px;
  letter-spacing: -0.01em;
}

.fred-lead {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.4;
  margin-top: 0;
  color: var(--ink);
}

.fred-text p:not(.eyebrow-annotation):not(.fred-lead) {
  color: var(--ink-soft);
  font-size: 16px;
}

@media (max-width: 860px) {
  .fred-grid { grid-template-columns: 1fr; gap: 32px; }
  .fred-photo { max-width: 240px; }
}

/* ---------- Meer lezen ---------- */

/* Zonder JavaScript is alle tekst zichtbaar en is de knop verborgen */
.more-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  margin: 4px 0 0;
  font-family: var(--font-mono);
  font-size: 13px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 9px 15px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.js .more-toggle { display: inline-flex; }

.more-toggle:hover {
  background: var(--ink);
  color: var(--cream);
}

.more-toggle svg { transition: transform 0.2s ease; }
.more-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.js .more-content { display: none; }
.js .more-content.is-open { display: block; margin-top: 22px; }

.more-content > p:first-child { margin-top: 0; }
.more-content > p:last-child { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  .more-toggle svg { transition: none; }
}

/* ---------- Portfolio: projecttegels (coverfoto) ---------- */

.portfolio-item--project {
  display: block;
  text-decoration: none;
  color: var(--cream);
  cursor: pointer;
}

/* Bij projecten is de naam altijd zichtbaar (ook op telefoons zonder hover) */
.portfolio-item--project .portfolio-caption {
  transform: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 14px;
  font-size: 12px;
}

.portfolio-caption-name { font-weight: 500; }
.portfolio-caption-count { opacity: 0.8; white-space: nowrap; }

.portfolio-item--project img,
.portfolio-item--project video { transition: transform 0.3s ease; }

.portfolio-item--project:hover img,
.portfolio-item--project:hover video { transform: scale(1.03); }

@media (prefers-reduced-motion: reduce) {
  .portfolio-item--project img,
  .portfolio-item--project video { transition: none; }
  .portfolio-item--project:hover img,
  .portfolio-item--project:hover video { transform: none; }
}

/* ---------- Projectpagina ---------- */

.back-link-header { text-decoration: none; }

.section-project { padding: 56px 0 72px; }

.project-title {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1.2;
  font-weight: 600;
  margin: 14px 0 20px;
  letter-spacing: -0.01em;
}

.project-intro {
  max-width: 62ch;
  margin: 0 0 32px;
  font-size: 16px;
  color: var(--ink-soft);
  white-space: pre-line; /* lege regel in project.txt = nieuwe alinea */
}

.project-title + .portfolio-grid,
.project-intro[hidden] + .portfolio-grid { margin-top: 28px; }

.project-back {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--metal-line);
}

/* ---------- Compacter op telefoon en tablet: minder wit, kortere tekstvlakken ---------- */

@media (max-width: 860px) {
  .wrap { padding: 0 20px; }

  .hero { padding: 44px 0 48px; }
  .hero-grid { gap: 32px; }
  .hero-lead h1 { font-size: 28px; margin-bottom: 16px; }
  .hero-sub { font-size: 16px; margin-bottom: 24px; }

  .section-over,
  .section-diensten,
  .section-portfolio,
  .section-fred { padding: 48px 0; }
  .section-contact { padding: 48px 0 56px; }
  .section-project { padding: 36px 0 56px; }

  .over-grid { gap: 0; }
  .contact-grid { gap: 24px; }
  .fred-grid { gap: 24px; }

  .eyebrow-annotation { margin-bottom: 10px; }

  .section-over h2,
  .section-diensten h2,
  .section-portfolio h2,
  .section-contact h2,
  .section-fred h2 {
    font-size: 26px;
    margin: 6px 0 20px;
  }

  .project-title { font-size: 28px; margin: 8px 0 16px; }
  .project-intro { margin-bottom: 24px; }

  .over-lead,
  .fred-lead { font-size: 19px; margin-bottom: 14px; }

  .over-text p,
  .fred-text p:not(.eyebrow-annotation):not(.fred-lead) {
    font-size: 15.5px;
    margin: 0 0 12px;
  }

  .phase { padding-bottom: 16px; margin-bottom: 16px; }
  .phase-num { margin-bottom: 8px; }

  .portfolio-grid { gap: 16px; }
  .portfolio-empty { padding: 24px 16px; }

  .logo-banner { padding: 28px 0 24px; }
  .project-back { margin-top: 32px; }
}
