/* ==========================================================================
   FINKA — Design System
   Editorial / warm / quiet · geïnspireerd op Egenstil-vibe
   ========================================================================== */

/* Cormorant Garamond — local woff2 (latin only, klein) */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/cormorant-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/cormorant-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Colors — warm off-white, ink, soft accents */
  --bg: oklch(0.975 0.005 80);
  --bg-2: oklch(0.945 0.008 80);
  --bg-soft: oklch(0.94 0.012 75);
  --bg-deep: oklch(0.22 0.008 80);
  --bg-deep-2: oklch(0.18 0.008 80);
  --ink: oklch(0.22 0.01 80);
  --ink-2: oklch(0.42 0.008 80);
  --ink-3: oklch(0.62 0.006 80);
  --line: oklch(0.88 0.006 80);
  --line-2: oklch(0.80 0.006 80);
  --accent: oklch(0.45 0.04 140);

  --on-deep: oklch(0.94 0.005 80);
  --on-deep-2: oklch(0.72 0.006 80);
  --line-deep: oklch(0.32 0.008 80);

  --display: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --container: 1400px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--ink); color: var(--bg); }

/* Typography */
.display {
  font-family: var(--display);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.04;
  text-wrap: balance;
}
.display-xl { font-size: clamp(46px, 7vw, 108px); }
.display-lg { font-size: clamp(36px, 4.8vw, 76px); }
.display-md { font-size: clamp(28px, 3.2vw, 48px); }
.display-sm { font-size: clamp(22px, 2vw, 30px); }

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 500;
}

.lede { font-size: clamp(16px, 1.2vw, 18px); line-height: 1.6; color: var(--ink); max-width: 52ch; }
.body { font-size: 15px; line-height: 1.7; color: var(--ink-2); max-width: 56ch; text-wrap: pretty; }

/* Layout */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */
.site-header {
  position: sticky; top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 20px var(--gutter);
}
.nav-left, .nav-right {
  display: flex;
  gap: 32px;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.nav-right { justify-content: flex-end; }
.nav-left a, .nav-right a {
  position: relative;
  padding: 6px 0;
  color: var(--ink);
  transition: color 0.2s;
}
.nav-left a:hover, .nav-right a:hover { color: var(--ink-2); }
.nav-left a.active::after, .nav-right a.active::after {
  content: ""; position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--ink);
}

/* Logo */
.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  user-select: none;
}
.logo-mark {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 22px;
  letter-spacing: 0.22em;
  padding-left: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}
.logo-sub {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: lowercase;
  color: var(--ink-2);
  margin-top: 4px;
}

.on-deep .logo-mark { color: var(--on-deep); }
.on-deep .logo-sub { color: var(--on-deep-2); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 26px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn.filled { background: var(--ink); color: var(--bg); }
.btn.filled:hover { background: var(--bg-deep-2); border-color: var(--bg-deep-2); }
.btn .arrow { font-family: var(--display); font-size: 16px; }

/* Links */
.link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
  transition: gap 0.25s;
}
.link:hover { gap: 16px; }
.link .arrow { font-family: var(--display); }

/* Hero — kleiner dan voorheen, rustiger */
.hero {
  position: relative;
  height: clamp(560px, 78vh, 820px);
  overflow: hidden;
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,0.35) 100%);
}
.hero-content {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 8vh;
  color: var(--bg);
  max-width: 880px;
}
.hero-content .eyebrow { color: rgba(255,255,255,0.75); }
.hero-content .display { color: #fff; }

/* Sections */
section { position: relative; }
.section { padding: clamp(72px, 10vh, 140px) 0; }
.section-tight { padding: clamp(48px, 7vh, 88px) 0; }

.section-dark {
  background: var(--bg-deep);
  color: var(--on-deep);
}
.section-dark .body, .section-dark .eyebrow { color: var(--on-deep-2); }
.section-dark .display { color: var(--on-deep); }

/* Splits */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.split-3-2 { grid-template-columns: 3fr 2fr; }
.split-2-3 { grid-template-columns: 2fr 3fr; }

@media (max-width: 820px) {
  .split, .split-3-2, .split-2-3 { grid-template-columns: 1fr; gap: 36px; }
}

/* Index labels */
.idx {
  font-family: var(--display);
  font-size: 13px;
  font-style: italic;
  color: var(--ink-3);
  letter-spacing: 0.05em;
}

/* Project / impression card — figure and caption locked together */
.proj-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.proj-card > figure { margin-bottom: 14px; }
.proj-card .idx { display: block; margin-top: 0; }
.proj-card h3 { margin-top: 4px; }
.proj-card:hover figure img { transform: scale(1.02); }
.proj-card figure img { transition: transform 600ms ease; }

/* Figures — compact, rustig */
figure { margin: 0; overflow: hidden; background: var(--bg-soft); }
figure img { display: block; width: 100%; height: 100%; object-fit: cover; }
figure.full {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 60vh;
}
figcaption {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 14px;
}

/* Project rows */
[data-screen-label^="Project"] > figure.full {
  aspect-ratio: 16 / 9;
  max-height: 56vh;
}
[data-screen-label^="Project"] .triptych-row { grid-auto-rows: clamp(220px, 30vh, 340px); }
[data-screen-label^="Project"] .triptych-row figure,
[data-screen-label^="Project"] .triptych-row img {
  width: 100%; height: 100%; object-fit: cover;
}

/* Placeholder figure (geen echte foto beschikbaar) */
.placeholder {
  position: relative;
  background-color: var(--bg-soft);
  background-image:
    repeating-linear-gradient(
      135deg,
      transparent 0,
      transparent 14px,
      color-mix(in oklab, var(--ink) 6%, transparent) 14px,
      color-mix(in oklab, var(--ink) 6%, transparent) 15px
    );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 24px;
}
.placeholder span {
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  padding: 8px 14px;
  border: 1px solid var(--line);
  max-width: 80%;
  line-height: 1.5;
}

/* Reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Ken-burns — slow, continuous, looping (egenstil-style) */
@keyframes kb-hero {
  0%   { transform: scale(1.06) translate3d(-1.2%, -0.6%, 0); }
  50%  { transform: scale(1.10) translate3d( 1.2%,  0.6%, 0); }
  100% { transform: scale(1.06) translate3d(-1.2%, -0.6%, 0); }
}
@keyframes kb-full {
  0%   { transform: scale(1.04) translate3d(-0.8%, 0, 0); }
  50%  { transform: scale(1.08) translate3d( 0.8%, -0.4%, 0); }
  100% { transform: scale(1.04) translate3d(-0.8%, 0, 0); }
}
.hero-img {
  animation: kb-hero 26s ease-in-out infinite both;
  will-change: transform;
}
[data-screen-label^="Project"] > figure.full img {
  animation: kb-full 22s ease-in-out infinite both;
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  .hero-img,
  [data-screen-label^="Project"] > figure.full img { animation: none; }
}

/* Footer */
.site-footer {
  background: var(--bg-deep);
  color: var(--on-deep);
  padding: clamp(56px, 8vh, 110px) 0 36px;
}
.site-footer .eyebrow { color: var(--on-deep-2); }
.site-footer a { color: var(--on-deep); }
.site-footer a:hover { color: var(--on-deep-2); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line-deep);
}
.footer-grid h4 {
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--on-deep-2);
  margin-bottom: 18px;
}
.footer-grid ul { list-style: none; display: grid; gap: 10px; font-size: 14px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 12px;
  color: var(--on-deep-2);
  letter-spacing: 0.08em;
}

/* Mobile nav toggle (hamburger) — standaard verborgen op desktop */
.mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  color: var(--ink);
}
.mobile-toggle svg { width: 22px; height: 22px; }

@media (max-width: 820px) {
  .site-header .row { grid-template-columns: auto 1fr auto; }
  .nav-left { display: none; }
  .nav-right { display: none; }
  .site-header .row > .logo { grid-column: 2; justify-self: center; }
  .mobile-toggle { grid-column: 3; display: inline-flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 14px; align-items: flex-start; }
}

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 24px var(--gutter);
  transform: translateY(-100%);
  transition: transform 0.35s ease;
  visibility: hidden;
}
.mobile-menu.open { transform: translateY(0); visibility: visible; }
.mobile-menu .mm-top {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.mobile-menu .mm-close {
  background: transparent; border: 0; cursor: pointer;
  font-size: 28px; line-height: 1;
  color: var(--ink); padding: 8px;
}
.mobile-menu nav {
  display: flex; flex-direction: column;
  padding-top: 40px;
  gap: 4px;
}
.mobile-menu nav a {
  font-family: var(--display);
  font-weight: 300;
  font-size: 36px;
  line-height: 1.3;
  color: var(--ink);
  padding: 8px 0;
  border-bottom: 1px solid transparent;
}
.mobile-menu nav a.active { color: var(--ink-3); font-style: italic; }
.mobile-menu .mm-foot {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px;
  font-size: 13px;
  color: var(--ink-2);
}

/* ==========================================================================
   MOBILE OVERRIDES — < 720px
   Forces multi-column inline grids to stack, tightens type and spacing
   ========================================================================== */
@media (max-width: 720px) {
  :root { --gutter: 20px; }

  /* Collapse any inline grid-template-columns to single column */
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  /* But keep 2-up image rows readable as 2-up */
  [style*="repeat(3,1fr)"][style*="aspect-ratio"],
  [style*="repeat(4,1fr)"][style*="aspect-ratio"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Hero — smaller, less padding */
  .hero { height: clamp(440px, 70vh, 620px); }
  .hero-content { bottom: 6vh; }
  .display-xl { font-size: clamp(40px, 12vw, 58px); }
  .display-lg { font-size: clamp(32px, 9vw, 46px); }
  .display-md { font-size: clamp(24px, 7vw, 34px); }
  .display-sm { font-size: clamp(20px, 5.5vw, 26px); }

  /* Section padding */
  .section { padding: clamp(56px, 9vh, 96px) 0; }
  .section-tight { padding: clamp(40px, 6vh, 72px) 0; }

  /* Article body wider on mobile */
  .article-body { font-size: 16px; padding: clamp(36px, 6vh, 64px) 0; }
  .article-body blockquote { padding-left: 18px; }
  .article-body table { font-size: 13px; }
  .article-body table th,
  .article-body table td { padding: 10px 8px; }

  /* Article-next collapses */
  .article-next { grid-template-columns: 1fr !important; gap: 8px; }
  .article-next .arrow { display: none; }

  /* Footer — single column */
  .footer-grid { grid-template-columns: 1fr !important; gap: 28px; }

  /* Article hero spacing */
  .article-hero { padding-top: clamp(96px, 14vh, 140px); }
  .article-meta { gap: 16px; font-size: 11px; }

  /* Buttons full-width-ish */
  .btn { padding: 13px 22px; font-size: 11px; }
}

/* Very small screens */
@media (max-width: 420px) {
  .display-xl { font-size: 44px; }
  .logo-mark { font-size: 20px; }
  .logo-sub { font-size: 9px; }
}

/* ==========================================================================
   ARTICLE / LONGFORM
   ========================================================================== */
.article-hero {
  padding-top: clamp(120px, 16vh, 180px);
  padding-bottom: clamp(40px, 6vh, 80px);
}
.article-hero .eyebrow { display: block; margin-bottom: 24px; }
.article-hero h1 {
  max-width: 22ch;
  margin-bottom: 28px;
}
.article-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 32px;
}
.article-body {
  max-width: 64ch;
  margin: 0 auto;
  padding: clamp(48px, 7vh, 96px) 0 clamp(60px, 9vh, 120px);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
}
.article-body > * + * { margin-top: 1.1em; }
.article-body p { color: var(--ink); }
.article-body .lede {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(20px, 1.7vw, 24px);
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 1.6em;
  max-width: none;
}
.article-body h2 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-top: 2.2em;
  margin-bottom: 0.4em;
  color: var(--ink);
  text-wrap: balance;
}
.article-body h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-top: 2em;
  margin-bottom: 0.6em;
}
.article-body ul, .article-body ol {
  padding-left: 0;
  list-style: none;
}
.article-body ul li, .article-body ol li {
  position: relative;
  padding-left: 28px;
  margin-top: 0.5em;
  color: var(--ink);
}
.article-body ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ink-3);
  font-family: var(--display);
}
.article-body ol { counter-reset: li; }
.article-body ol li { counter-increment: li; }
.article-body ol li::before {
  content: counter(li, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-3);
}
.article-body blockquote {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.35;
  color: var(--ink);
  border-left: 2px solid var(--line-2);
  padding: 8px 0 8px 28px;
  margin: 1.8em 0;
  max-width: none;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 1.8em 0;
}
.article-body table th,
.article-body table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.article-body table th {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-2);
}
.article-body table tr:last-child td { border-bottom: 1px solid var(--line-2); }
.article-body .figure-full {
  margin: clamp(48px, 7vh, 96px) 0;
}
.article-body .pullquote {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(28px, 2.6vw, 38px);
  line-height: 1.25;
  color: var(--ink);
  text-align: center;
  margin: clamp(48px, 6vh, 80px) 0;
  padding: clamp(36px, 5vh, 60px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-wrap: balance;
}
.article-body .checklist {
  background: var(--bg-2);
  padding: clamp(28px, 4vh, 44px) clamp(28px, 4vw, 44px);
  margin: 2em 0;
}
.article-body .checklist h3 {
  margin-top: 0;
}
.article-body .footer-note {
  margin-top: 3em;
  padding-top: 2em;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-3);
}

/* article footer-cta — small banner */
.article-cta {
  background: var(--bg-2);
  padding: clamp(60px, 9vh, 110px) 0;
  border-top: 1px solid var(--line);
}
.article-cta h2 { max-width: 18ch; margin-bottom: 20px; }
.article-cta .body { color: var(--ink); }

/* "next article" link */
.article-next {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background 0.25s;
}
.article-next:hover { background: var(--bg-2); }
.article-next .idx {
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  color: var(--ink-3);
}
.article-next .article-next-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.1;
  color: var(--ink);
}
.article-next .arrow {
  font-family: var(--display);
  font-size: 28px;
  color: var(--ink-3);
  transition: transform 0.25s, color 0.2s;
}
.article-next:hover .arrow { transform: translateX(6px); color: var(--ink); }

/* Editor-only marker for copy under review (outline disabled — kept for `body.show-review-marks` toggling only) */
.copy-review {
  /* no visible outline by default */
}
body.show-review-marks .copy-review {
  background: color-mix(in oklab, gold 12%, transparent);
}
body.show-review-marks .copy-review::after {
  content: attr(data-review);
  display: block;
  margin-top: 8px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: oklch(0.45 0.12 50);
  text-transform: none;
}
