/* ==========================================================================
   Het Jan Marais Fonds – hetjan.org
   Diepgroen #264542 · Room #F3EFE8 · Fraunces + Montserrat
   ========================================================================== */

:root {
  --groen: #264542;
  --groen-diep: #1d3633;
  --room: #f3efe8;
  --ivoor: #faf8f3;
  --brons: #a9854f;
  --ink: #2e423e;
  --ink-sag: #5c6f6a;
  --haarlyn: rgba(38, 69, 66, 0.22);
  --haarlyn-room: rgba(243, 239, 232, 0.28);

  --serif: "Fraunces", "Georgia", serif;
  --sans: "Montserrat", "Helvetica Neue", sans-serif;

  --maat: 66ch;
  --kolom: 1120px;
}

/* ---------- Reset & basis ---------- */

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 360;
  font-size: 1.1rem;
  line-height: 1.72;
  color: var(--ink);
  background-color: var(--room);
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* papier-grein */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2000;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)'/%3E%3C/svg%3E");
}

::selection { background: var(--brons); color: var(--ivoor); }

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

/* ---------- Tipografie ---------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 420;
  line-height: 1.08;
  color: var(--groen);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6.5vw, 4.6rem); font-optical-sizing: auto; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.3rem; font-weight: 520; }

p, li { max-width: var(--maat); }

em { font-style: italic; }

/* klein-kaps etiket */
.etiket {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brons);
}

.etiket::before { content: "\2726"; margin-right: 0.75em; font-size: 0.8em; }

/* skakels in lopende teks */
.prosa a {
  color: var(--groen);
  text-decoration: underline;
  text-decoration-color: var(--brons);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: text-decoration-color 0.25s ease, color 0.25s ease;
}

.prosa a:hover { color: var(--brons); }

/* knoppies binne prosa behou hul eie kleure */
.prosa a.knoppie,
.prosa a.knoppie:hover { color: var(--room); text-decoration: none; }
.prosa a.knoppie-spook { color: var(--groen); }
.prosa a.knoppie-spook:hover { color: var(--room); }

/* ---------- Haarlyne & ornamente ---------- */

.reel { border: 0; border-top: 1px solid var(--haarlyn); }

.reel-dubbel {
  border: 0;
  border-top: 1px solid var(--haarlyn);
  position: relative;
  height: 5px;
}
.reel-dubbel::after {
  content: "";
  position: absolute;
  top: 3px; left: 0; right: 0;
  border-top: 1px solid var(--haarlyn);
}

.ornament {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: var(--brons);
  margin: 0 auto;
  max-width: 280px;
}
.ornament::before, .ornament::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--haarlyn);
}

/* ---------- Bladskelet ---------- */

.kolom {
  max-width: var(--kolom);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.kolom-smal { max-width: 820px; margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }

section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }

/* ---------- Navigasie ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(243, 239, 232, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--haarlyn);
}

.nav-binne {
  max-width: var(--kolom);
  margin-inline: auto;
  padding: 0.9rem clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-logo img { height: 52px; width: auto; }

.nav-skakels {
  display: flex;
  gap: clamp(1.2rem, 2.5vw, 2.2rem);
  list-style: none;
}

.nav-skakels a {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--groen);
  padding-block: 0.4rem;
  position: relative;
  white-space: nowrap;
}

.nav-skakels a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  border-bottom: 1px solid var(--brons);
  transition: right 0.3s ease;
}

.nav-skakels a:hover::after,
.nav-skakels a[aria-current="page"]::after { right: 0; }

.nav-skakels a[aria-current="page"] { color: var(--brons); }

.nav-knoppie {
  display: none;
  background: none;
  border: 1px solid var(--haarlyn);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--groen);
  cursor: pointer;
}

@media (max-width: 820px) {
  .nav-knoppie { display: block; }
  .nav-skakels {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--ivoor);
    border-bottom: 1px solid var(--haarlyn);
    padding: 0.5rem 0;
  }
  .nav-skakels.oop { display: flex; }
  .nav-skakels li { border-top: 1px solid var(--haarlyn); }
  .nav-skakels li:first-child { border-top: 0; }
  .nav-skakels a { display: block; padding: 1rem clamp(1.25rem, 4vw, 2.5rem); }
  .nav-skakels a::after { content: none; }
}

/* ---------- Knoppies ---------- */

.knoppie {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 2.2rem;
  border-radius: 999px;
  border: 1px solid var(--groen);
  color: var(--room);
  background: var(--groen);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.knoppie:hover { background: var(--groen-diep); border-color: var(--groen-diep); }

.knoppie-spook {
  background: transparent;
  color: var(--groen);
}

.knoppie-spook:hover { background: var(--groen); color: var(--room); }

.knoppie-room {
  background: var(--room);
  border-color: var(--room);
  color: var(--groen);
}

.knoppie-room:hover { background: var(--ivoor); border-color: var(--ivoor); }

/* ---------- Held (tuisblad) ---------- */

.held {
  min-height: calc(100svh - 81px);
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: clamp(4rem, 9vw, 7rem);
}

.held-binne { display: grid; justify-items: center; gap: 2.2rem; width: 100%; }

.held-logo { width: clamp(240px, 38vw, 420px); height: auto; }

.held-leuse {
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  line-height: 1.55;
  font-weight: 340;
  max-width: 30ch;
  color: var(--groen);
  text-wrap: balance;
}

.held-leuse em { font-style: italic; }

.held-knoppies { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

/* intree-animasie */
@media (prefers-reduced-motion: no-preference) {
  .held-binne > * {
    opacity: 0;
    transform: translateY(18px);
    animation: intree 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }
  .held-binne > :nth-child(1) { animation-delay: 0.1s; }
  .held-binne > :nth-child(2) { animation-delay: 0.3s; }
  .held-binne > :nth-child(3) { animation-delay: 0.45s; }
  .held-binne > :nth-child(4) { animation-delay: 0.6s; }
}

@keyframes intree {
  to { opacity: 1; transform: none; }
}

/* ---------- Panele ---------- */

.paneel {
  background: var(--ivoor);
  border: 1px solid var(--haarlyn);
  padding: clamp(1.8rem, 4vw, 3rem);
  position: relative;
}

.paneel::before, .paneel::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid var(--haarlyn);
  pointer-events: none;
}
.paneel::after { content: none; }

/* akte-paneel: die testament */
.akte {
  background: var(--ivoor);
  border: 1px solid var(--haarlyn);
  padding: clamp(2.2rem, 5vw, 4rem);
  position: relative;
  text-align: center;
}
.akte::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--haarlyn);
  pointer-events: none;
}

.akte blockquote {
  font-style: italic;
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.85;
  max-width: 58ch;
  margin-inline: auto;
  text-align: left;
  color: var(--ink);
}

/* ---------- Lyste ---------- */

.lys-bepalings { list-style: none; max-width: var(--maat); }

.lys-bepalings li {
  padding: 1.1rem 0 1.1rem 2.1rem;
  border-top: 1px solid var(--haarlyn);
  position: relative;
}

.lys-bepalings li:last-child { border-bottom: 1px solid var(--haarlyn); }

.lys-bepalings li::before {
  content: "\2726";
  position: absolute;
  left: 0;
  top: 1.2rem;
  font-size: 0.7rem;
  color: var(--brons);
}

/* geletterde lys (a–e) */
.lys-letters { list-style: none; counter-reset: letter; max-width: var(--maat); }

.lys-letters li {
  counter-increment: letter;
  padding: 0.85rem 0 0.85rem 3rem;
  position: relative;
}

.lys-letters li::before {
  content: counter(letter, lower-alpha);
  position: absolute;
  left: 0;
  top: 0.62rem;
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid var(--brons);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--brons);
}

/* genommerde stappe */
.stappe { list-style: none; counter-reset: stap; max-width: var(--maat); }

.stappe li {
  counter-increment: stap;
  padding: 1.4rem 0 1.4rem 4.4rem;
  position: relative;
  border-top: 1px solid var(--haarlyn);
}
.stappe li:last-child { border-bottom: 1px solid var(--haarlyn); }

.stappe li::before {
  content: counter(stap);
  position: absolute;
  left: 0;
  top: 1.05rem;
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 300;
  font-style: italic;
  color: var(--brons);
  line-height: 1.4;
}

.stappe h3 { margin-bottom: 0.3rem; }

/* ---------- Datums ---------- */

.datums {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
}

.datums > div { padding: clamp(1.5rem, 3vw, 2.5rem) 1rem; }

.datums > div + div { border-left: 1px solid var(--haarlyn); }

.datums .syfer {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 340;
  font-style: italic;
  color: var(--groen);
  line-height: 1.15;
}

.datums .nota {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-sag);
  margin-top: 0.6rem;
}

@media (max-width: 640px) {
  .datums { grid-template-columns: 1fr; }
  .datums > div + div { border-left: 0; border-top: 1px solid var(--haarlyn); }
}

/* ---------- Groen band ---------- */

.band {
  background: var(--groen);
  color: var(--room);
  text-align: center;
}

.band h2 { color: var(--room); }

.band .etiket { color: var(--brons); }

/* ---------- Hoofstuk-kop ---------- */

.bladkop { padding-block: clamp(4rem, 9vw, 6.5rem) clamp(2rem, 5vw, 3.5rem); }

.bladkop .etiket { display: block; margin-bottom: 1.4rem; }

.bladkop p.intro {
  margin-top: 1.6rem;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.65;
  color: var(--ink-sag);
  max-width: 52ch;
}

/* ---------- Prosa ---------- */

.prosa > * + * { margin-top: 1.3em; }

.prosa h2 { margin-top: 2.2em; }

.prosa h3 { margin-top: 1.8em; }

/* hoofletter-aanvang */
.aanvang::first-letter {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 3.4em;
  float: left;
  line-height: 0.82;
  padding-right: 0.12em;
  color: var(--groen);
}

/* uittreksel / stat */
.uittreksel {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 320;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.35;
  color: var(--groen);
  max-width: 24ch;
  margin-block: 2.5rem;
  padding-left: 1.6rem;
  border-left: 2px solid var(--brons);
}

/* ---------- Aflaai-kaart ---------- */

.aflaai {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: var(--ivoor);
  border: 1px solid var(--haarlyn);
  padding: clamp(1.5rem, 3vw, 2.2rem);
}

.aflaai .besonderhede h3 { margin-bottom: 0.25rem; }

.aflaai .besonderhede p {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--ink-sag);
}

/* ---------- E-pos vertoon ---------- */

.epos-groot {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.6rem, 4.5vw, 3rem);
  color: var(--groen);
  text-decoration: none;
  border-bottom: 1px solid var(--brons);
  padding-bottom: 0.15em;
  transition: color 0.25s ease;
}

.epos-groot:hover { color: var(--brons); }

/* ---------- Voetstuk ---------- */

.voet {
  background: var(--groen);
  color: var(--room);
}

.voet-binne {
  max-width: var(--kolom);
  margin-inline: auto;
  padding: clamp(3rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 2.5rem) 2.5rem;
}

.voet-bo {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--haarlyn-room);
}

.voet-logo img { height: 86px; width: auto; }

.voet nav ul {
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.voet nav a {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--room);
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.voet nav a:hover { opacity: 1; }

.voet-kontak {
  font-size: 0.98rem;
  line-height: 2;
}

.voet-kontak a {
  color: var(--room);
  text-decoration: underline;
  text-decoration-color: var(--brons);
  text-underline-offset: 0.25em;
}

.voet-onder {
  padding-top: 1.8rem;
  display: grid;
  gap: 0.5rem;
}

.voet-onder p {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  line-height: 1.8;
  color: rgba(243, 239, 232, 0.66);
  max-width: none;
}

/* ---------- Toeganklikheid ---------- */

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

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