/* ==========================================================================
   Olaf Minten Architectuur — shared stylesheet (single source of truth)
   Dark warm gallery identity: near-black, warm off-white, copper accent,
   Inter + JetBrains Mono. Every page pulls colours, type scale and spacing
   from these tokens — no per-page palettes.
   ========================================================================== */

:root {
  /* ---------- palette ---------- */
  --bg: #171310;
  --bg-2: #1e1914;
  --bg-3: #241d17;
  --surface: #22201d;
  --card: #1f1c19;
  --fg: #f2f0eb;
  --muted: rgba(242, 240, 235, 0.62);
  --muted-2: rgba(242, 240, 235, 0.52);
  --copper: #c08a5e;
  --copper-2: #d09a6c;
  --copper-soft: rgba(192, 138, 94, 0.16);
  --line: rgba(242, 240, 235, 0.12);
  --line-strong: rgba(242, 240, 235, 0.22);
  --destructive: #d9534f;

  /* ---------- type ---------- */
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --font-sans: var(--sans);
  --font-mono: var(--mono);
  --font-heading: var(--sans);
  /* legacy alias: this identity has no display serif, headings are Inter */
  --font-serif: var(--sans);

  /* ---------- layout & scale ---------- */
  --maxw: 1240px;
  --wrap: 1240px;
  --gut: clamp(20px, 4vw, 56px);
  --header-h: 70px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 4px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 12px;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;

  /* ---------- legacy / cross-page aliases → shared palette ---------- */
  --ink: var(--fg);
  --ink-2: var(--bg-2);
  --ink-3: var(--bg-3);
  --cream: var(--fg);
  --paper: var(--bg-2);
  --hairline: var(--line);
  --color-ink: var(--fg);
  --color-bg: var(--bg);
  --color-paper: var(--bg-2);
  --color-surface: var(--bg-2);
  --color-card: var(--bg-2);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-2);
  --color-line: var(--line);
  --color-border: var(--line);
  --color-accent: var(--copper);
  --color-on-accent: var(--bg);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.02em; line-height: 1.08; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--copper);
  color: #171310;
  padding: 12px 20px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ==========================================================================
   Shared chrome
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(23, 19, 16, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--copper);
}
.brand__name {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.nav { flex: 1 1 auto; min-width: 0; }
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav__links::-webkit-scrollbar { display: none; }
.nav__link {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  padding: 6px 0;
  position: relative;
  transition: color 0.25s ease;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--copper);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.nav__link:hover, .nav__link:focus-visible { color: var(--fg); }
.nav__link:hover::after, .nav__link:focus-visible::after { transform: scaleX(1); }
.nav__link.is-active, .nav__link[aria-current="page"] { color: var(--fg); }
.nav__link.is-active::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); }
.header__cta {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--copper);
  border: 1px solid var(--copper-soft);
  border-radius: 999px;
  padding: 9px 16px;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.header__cta:hover, .header__cta:focus-visible { background: var(--copper); color: #171310; border-color: var(--copper); }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(64px, 10vw, 140px);
  padding: clamp(48px, 7vw, 88px) 0 40px;
  background: var(--bg);
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(32px, 5vw, 64px);
}
.footer__brand { max-width: 34ch; }
.footer__brand .brand__name { margin-bottom: 18px; }
.footer__brand p { color: var(--muted); font-size: 15px; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 14px 26px; align-content: start; }
.footer__nav a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s ease;
}
.footer__nav a:hover, .footer__nav a:focus-visible { color: var(--copper); }
.footer__meta {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  margin-top: clamp(32px, 5vw, 56px);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 15px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--copper); color: #171310; border-color: var(--copper); }
.btn--primary:hover { background: var(--copper-2); border-color: var(--copper-2); }
.btn--ghost { border-color: var(--line-strong); color: var(--fg); }
.btn--ghost:hover { border-color: var(--copper); color: var(--copper); }

/* ==========================================================================
   Layout primitives (home components reused by inner pages)
   ========================================================================== */
main { display: block; }
section { padding-block: clamp(64px, 10vw, 132px); }
section[id], [id] { scroll-margin-top: calc(var(--header-h) + 24px); }

.section-head { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: clamp(34px, 5vw, 60px); }
@media (min-width: 900px) {
  .section-head { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: end; }
}
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--copper); display: inline-block; }
.section-title { font-size: clamp(28px, 4.2vw, 46px); }
.section-lead { color: var(--muted); font-size: clamp(15px, 1.5vw, 18px); max-width: 60ch; }

/* hero */
.hero { padding-top: clamp(48px, 7vw, 96px); }
.hero__grid { display: grid; grid-template-columns: 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 960px) { .hero__grid { grid-template-columns: 1.05fr 0.95fr; } }
.hero__title { font-size: clamp(38px, 7.4vw, 80px); letter-spacing: -0.03em; max-width: 16ch; }
.hero__lead { color: var(--muted); font-size: clamp(16px, 1.7vw, 20px); max-width: 52ch; margin-top: 26px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero__media { position: relative; }
.hero__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.hero__media figcaption {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* cijfers */
.cijfers { background: var(--bg-2); border-block: 1px solid var(--line); }
.cijfers__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
@media (min-width: 820px) { .cijfers__grid { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--bg-2); padding: clamp(26px, 3.4vw, 42px); }
.stat__value { font-family: var(--mono); font-size: clamp(30px, 4.4vw, 50px); color: var(--copper); letter-spacing: -0.02em; line-height: 1; }
.stat__label { margin-top: 14px; font-size: 14px; color: var(--muted); line-height: 1.4; }

/* werkwijze preview */
.steps { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--bg); padding: clamp(26px, 3.4vw, 42px); }
.step__num { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; color: var(--copper); }
.step__title { margin-top: 22px; font-size: 22px; }
.step__text { margin-top: 12px; color: var(--muted); font-size: 15px; }
.section-more {
  margin-top: 34px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--copper);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.section-more:hover, .section-more:focus-visible { border-color: var(--copper); }
.section-more span { transition: transform 0.25s ease; }
.section-more:hover span { transform: translateX(4px); }

/* project grid */
.projects { display: grid; grid-template-columns: 1fr; gap: clamp(20px, 3vw, 34px); }
@media (min-width: 820px) { .projects { grid-template-columns: repeat(3, 1fr); } }
.project { display: flex; flex-direction: column; gap: 18px; }
.project__media { overflow: hidden; border: 1px solid var(--line); border-radius: 4px; }
.project__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.project:hover .project__media img { transform: scale(1.05); }
.project__meta { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.project__title { font-size: 21px; }
.project__loc { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); white-space: nowrap; }
.project__desc { color: var(--muted); font-size: 14.5px; margin-top: -6px; }
.project__link { margin-top: 2px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--copper); }
.project__link:hover, .project__link:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

/* expertise tiles */
.tiles { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile { background: var(--bg-2); padding: clamp(24px, 3vw, 38px); transition: background 0.3s ease; }
.tile:hover { background: var(--bg-3); }
.tile__index { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--muted-2); }
.tile__title { margin-top: 20px; font-size: 20px; }
.tile__text { margin-top: 10px; color: var(--muted); font-size: 14.5px; }

/* bureau (text-image) */
.bureau__grid { display: grid; grid-template-columns: 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 960px) { .bureau__grid { grid-template-columns: 0.9fr 1.1fr; } }
.bureau__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; }
.bureau__body p { color: var(--muted); font-size: clamp(15px, 1.6vw, 18px); max-width: 58ch; }
.bureau__body p + p { margin-top: 22px; }
.bureau__sign { margin-top: 30px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--copper); }

/* verhalen */
.stories { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
@media (min-width: 820px) { .stories { grid-template-columns: repeat(3, 1fr); } }
.story { display: flex; flex-direction: column; background: var(--bg); padding: clamp(24px, 3vw, 38px); gap: 16px; transition: background 0.3s ease; }
.story:hover { background: var(--bg-2); }
.story__date { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--copper); }
.story__title { font-size: 20px; }
.story__excerpt { color: var(--muted); font-size: 14.5px; flex: 1; }
.story__more { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* start-project / contact */
.start { background: var(--bg-2); border-block: 1px solid var(--line); }
.start__grid { display: grid; grid-template-columns: 1fr; gap: clamp(34px, 5vw, 72px); }
@media (min-width: 960px) { .start__grid { grid-template-columns: 1fr 1.05fr; align-items: start; } }
.start__title { font-size: clamp(30px, 4.6vw, 52px); max-width: 16ch; }
.start__text { margin-top: 24px; color: var(--muted); font-size: clamp(15px, 1.6vw, 18px); max-width: 46ch; }
.start__details { margin-top: 34px; display: grid; gap: 16px; }
.start__detail { display: grid; gap: 4px; }
.start__detail dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); }
.start__detail dd { margin: 0; font-size: 16px; color: var(--fg); }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15px;
  padding: 13px 14px;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--copper); background: var(--bg-2); }
.form__submit { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.form__note { font-size: 12.5px; color: var(--muted-2); font-family: var(--mono); letter-spacing: 0.02em; max-width: 34ch; }

/* ==========================================================================
   Motion — shared reveal + reference keyframe names
   ========================================================================== */
.reveal, .reveal-up, [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-visible, .reveal.is-in,
.reveal-up.is-visible, .reveal-up.is-in, .reveal-up.visible, .reveal-up[data-visible="true"],
[data-reveal].is-in { opacity: 1; transform: none; }

@keyframes reveal-up {
  0% { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  50% { opacity: 0.5; }
}
@keyframes enter {
  0% {
    opacity: var(--tw-enter-opacity, 1);
    transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0)
      scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1))
      rotate(var(--tw-enter-rotate, 0));
    filter: blur(var(--tw-enter-blur, 0));
  }
}
@keyframes exit {
  100% {
    opacity: var(--tw-exit-opacity, 1);
    transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0)
      scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1))
      rotate(var(--tw-exit-rotate, 0));
    filter: blur(var(--tw-exit-blur, 0));
  }
}
@keyframes accordion-down {
  0% { height: 0; }
  100% { height: var(--radix-accordion-content-height, var(--bits-accordion-content-height, var(--reka-accordion-content-height, var(--kb-accordion-content-height, var(--ngp-accordion-content-height, auto))))); }
}
@keyframes accordion-up {
  0% { height: var(--radix-accordion-content-height, var(--bits-accordion-content-height, var(--reka-accordion-content-height, var(--kb-accordion-content-height, var(--ngp-accordion-content-height, auto))))); }
  100% { height: 0; }
}
@keyframes caret-blink {
  0%, 70%, 100% { opacity: 1; }
  20%, 50% { opacity: 0; }
}

.animate-reveal-up { animation: reveal-up 0.7s var(--ease) both; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.animate-enter { animation: enter 0.3s ease both; }
.animate-exit { animation: exit 0.3s ease both; }
.animate-accordion-down { animation: accordion-down 0.2s ease-out; overflow: hidden; }
.animate-accordion-up { animation: accordion-up 0.2s ease-out; overflow: hidden; }
.animate-caret-blink { animation: caret-blink 1s steps(1) infinite; }

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

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 600px) {
  .form { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .header__inner { gap: 14px; }
  .brand__name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal, .reveal-up, [data-reveal] { opacity: 1; transform: none; }
}
