/* ==========================================================================
   Douglas & Dauw — design tokens & base styles
   ========================================================================== */

:root {
  /* Palette — earthy / scandi / dark */
  --ink:        #1a1713;   /* near-black, warm */
  --ink-soft:   #2a251f;
  --char:       #0e0c0a;   /* charcoal for logo bg */
  --bone:       #f4efe7;   /* warm off-white */
  --cream:      #ece4d5;   /* warmer paper */
  --sand:       #ddcfb8;   /* sand */
  --douglas:    #b9895a;   /* douglas wood tone */
  --douglas-dk: #8a5f39;
  --moss:       #6b7355;   /* gedempt groen */
  --line:       #1a1713;
  --line-soft:  rgba(26,23,19,0.14);

  /* Typography */
  --serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --sans:  "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --page-max: 1440px;
  --gutter: clamp(20px, 4vw, 56px);

  /* Theme surfaces (default = warm/light) */
  --bg: var(--bone);
  --fg: var(--ink);
  --muted: #6b6258;
  --surface: #ffffff;
  --surface-2: var(--cream);
  --accent: var(--douglas-dk);
  --rule: var(--line-soft);
  --nav-bg: rgba(244,239,231,0.82);
  --nav-fg: var(--ink);
}

[data-theme="dark"] {
  --bg: #12100d;
  --fg: #ede6d8;
  --muted: #9a9186;
  --surface: #1a1713;
  --surface-2: #201b15;
  --accent: #c99768;
  --rule: rgba(237,230,216,0.12);
  --nav-bg: rgba(18,16,13,0.82);
  --nav-fg: #ede6d8;
}

[data-theme="warm"] {
  --bg: #ebe0cc;
  --fg: #2a1f13;
  --muted: #7a6a52;
  --surface: #f3ead7;
  --surface-2: #e3d5ba;
  --accent: #8a5f39;
  --rule: rgba(42,31,19,0.16);
  --nav-bg: rgba(235,224,204,0.85);
  --nav-fg: #2a1f13;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .5s ease, color .5s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- Typography scale ---------- */
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.01em;
  line-height: 0.95;
  font-size: clamp(56px, 9vw, 148px);
  margin: 0;
}
.display.upright { font-style: normal; letter-spacing: -0.02em; }

h1.section-title,
.h-xl {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 .3em;
}

h2.h-lg, .h-lg {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 3.6vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.005em;
  margin: 0 0 .4em;
}

h3.h-md, .h-md {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(22px, 1.8vw, 28px);
  line-height: 1.15;
  margin: 0 0 .4em;
}

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

.lead {
  font-family: var(--serif);
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.45;
  font-style: italic;
  color: var(--fg);
  opacity: .86;
}

p { margin: 0 0 1em; }

.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap-narrow {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section { padding: clamp(80px, 10vw, 160px) 0; }
section.tight { padding: clamp(60px, 7vw, 100px) 0; }

.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
  color: var(--nav-fg);
}
.nav-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  letter-spacing: 0.01em;
  line-height: 1;
}
.nav-brand .amp { color: var(--accent); font-size: 1.1em; }
.nav-links {
  display: flex;
  gap: clamp(18px, 2.2vw, 34px);
  font-size: 13.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.nav-links a {
  position: relative;
  padding: 6px 2px;
  opacity: .78;
  transition: opacity .2s ease;
  white-space: nowrap;
}
.nav-links a:hover { opacity: 1; }
.nav-links a.active {
  opacity: 1;
}
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 2px; right: 2px; bottom: -2px;
  height: 1px;
  background: var(--fg);
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.theme-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border: 1px solid var(--fg);
  background: var(--fg);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  transition: transform .2s ease, background .2s ease, color .2s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn.ghost {
  background: transparent;
  color: var(--fg);
}
.btn.ghost:hover { background: var(--fg); color: var(--bg); }
.btn.sm { padding: 10px 16px; font-size: 11px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--fg);
  padding-bottom: 3px;
  transition: gap .2s ease;
}
.link-arrow:hover { gap: 16px; }
.link-arrow .arr { transition: transform .2s ease; }
.link-arrow:hover .arr { transform: translateX(4px); }

/* ---------- Placeholder image (monospace label) ---------- */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      var(--surface-2) 0 14px,
      color-mix(in oklab, var(--surface-2) 80%, var(--fg) 12%) 14px 15px
    );
  overflow: hidden;
  color: var(--fg);
}
.ph::before {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: .55;
  padding: 20px;
  text-align: center;
}
.ph.wood {
  background:
    linear-gradient(to bottom,
      #b98a5c 0%, #a8774a 20%, #b98a5c 21%, #a8774a 40%,
      #b98a5c 41%, #a8774a 60%, #b98a5c 61%, #a8774a 80%, #b98a5c 81%);
  background-size: 100% 8px;
}
.ph.wood::before { color: rgba(20,12,4,.55); }
.ph.dark {
  background:
    repeating-linear-gradient(
      135deg,
      #1a1713 0 14px,
      #22201b 14px 15px
    );
  color: #ece4d5;
}
.ph.dark::before { color: rgba(237,230,216,.55); }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--ink);
  color: var(--bone);
  padding: 96px 0 48px;
  margin-top: 0;
}
footer.site-footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; }
footer.site-footer .col h4 {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(244,239,231,0.5);
  margin: 0 0 18px;
  font-weight: 500;
}
footer.site-footer a { display: block; font-size: 14px; line-height: 2; opacity: .85; }
footer.site-footer a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
footer.site-footer .brand-block .display {
  font-size: 56px; line-height: 1; color: var(--bone); margin: 0 0 14px;
}
footer.site-footer .fine {
  max-width: var(--page-max); margin: 56px auto 0; padding: 22px var(--gutter) 0;
  border-top: 1px solid rgba(244,239,231,0.14);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: rgba(244,239,231,0.55);
}

@media (max-width: 1100px) {
  .nav-links { display: none; }
}
@media (max-width: 800px) {
  footer.site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .nav-cta { display: none; }
}

/* ---------- Utility ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.stack-sm > * + * { margin-top: 12px; }
.stack-md > * + * { margin-top: 20px; }
.stack-lg > * + * { margin-top: 32px; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.split-rule {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}
.split-rule:last-child { border-bottom: 1px solid var(--rule); }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field textarea,
.field select {
  border: 0;
  border-bottom: 1px solid var(--fg);
  background: transparent;
  padding: 10px 0;
  font-family: var(--serif);
  font-size: 20px;
  color: var(--fg);
  outline: none;
  transition: border-color .2s ease;
}
.field input:focus,
.field textarea:focus,
.field select:focus { border-bottom-color: var(--accent); }
.field textarea { resize: vertical; min-height: 120px; font-size: 18px; }
.field .hint { font-family: var(--sans); font-size: 12px; color: var(--muted); }
