/* Netherrealm shared styles. No external fonts or scripts. */

:root {
  --paper: #f4f7f9;
  --ink: #15233a;
  --muted: #52617a;
  --delft: #1d4d9f;
  --rule: #d5dee7;
  --water: #bcd5e5;
  --water-ink: #3a6587;
  --sand: #e3d4ac;
  --land: #86ab5f;
  --oranje: #ec6f12;
  /* Cambria and Calibri were drawn by Dutch type designers Jelle Bosma and Lucas de Groot */
  --serif: Cambria, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: Calibri, Carlito, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1928;
    --ink: #e3e9f0;
    --muted: #9eacbf;
    --delft: #93b4f0;
    --rule: #26354b;
    --water: #1f3e5a;
    --water-ink: #9cc2e0;
    --sand: #7d6f4f;
    --land: #4d6d38;
    --oranje: #ff8c33;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.125rem/1.65 var(--serif);
}

.wrap {
  max-width: 70rem;
  margin: 0 auto;
  padding-left: clamp(1rem, 4vw, 2.5rem);
  padding-right: clamp(1rem, 4vw, 2.5rem);
}

.prose { max-width: 40rem; }

h1, h2, h3 {
  font-family: var(--sans);
  font-weight: 700;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  letter-spacing: -0.015em;
  max-width: 18ch;
  margin: 0 0 1rem;
}

h2 { font-size: 1.625rem; margin: 2.75rem 0 0.75rem; }
h3 { font-size: 1.25rem; margin: 1.75rem 0 0.5rem; }

p { margin: 0 0 1rem; }

a {
  color: var(--delft);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2px; }

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

.lede {
  font-size: 1.3rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 36rem;
}

.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.6rem; }

[lang="nl"],
[lang="fy"] { font-style: italic; }

/* Header */

.site-header { border-bottom: 1px solid var(--rule); }

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font: 700 1.375rem/1 var(--sans);
  color: var(--ink);
  text-decoration: none;
}
.brand::before {
  content: "";
  width: 1.4rem;
  height: 0.95rem;
  border-radius: 2px;
  background: linear-gradient(#ae1c28 0 33.34%, #fff 0 66.67%, #21468b 0);
  box-shadow: 0 0 0 1px var(--rule);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--sans);
  font-size: 1.0625rem;
}
.site-nav a {
  display: inline-block;
  padding: 0.25rem 0;
  border-bottom: 3px solid transparent;
  color: var(--ink);
  text-decoration: none;
}
.site-nav a:hover { border-bottom-color: var(--rule); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--oranje); }

main { padding: clamp(2rem, 6vw, 4rem) 0 4rem; }

/* Cross-section on the home page */

.cross-section { margin: 2.5rem 0 0; }
.cross-section svg { display: block; width: 100%; height: auto; }
.cross-section figcaption {
  max-width: 40rem;
  margin-top: 0.75rem;
  font: 1rem/1.5 var(--sans);
  color: var(--muted);
}

.s-water { fill: var(--water); }
.s-sand { fill: var(--sand); }
.s-land { fill: var(--land); }
.s-nap { stroke: var(--oranje); stroke-width: 3; }
.s-mill { fill: var(--ink); }
.s-cloth { opacity: 0.55; }
.s-label {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 700;
  fill: var(--ink);
}
.s-label-water { fill: var(--water-ink); }

.sails {
  transform-box: fill-box;
  transform-origin: center;
  animation: turn 16s linear infinite;
}
@keyframes turn { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .sails { animation: none; }
}

@media (max-width: 40rem) {
  .s-label { display: none; }
}

/* Fact lists */

.facts {
  display: grid;
  grid-template-columns: minmax(9rem, 14rem) 1fr;
  max-width: 46rem;
  margin: 0;
  border-top: 1px solid var(--rule);
}
.facts dt,
.facts dd {
  margin: 0;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}
.facts dt {
  padding-right: 1rem;
  font-family: var(--sans);
  color: var(--muted);
}

/* Section links on the home page */

.sections {
  max-width: 46rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sections li {
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}
.sections a { font: 700 1.5rem/1.2 var(--sans); }
.sections p { margin: 0.25rem 0 0; color: var(--muted); }

/* Timeline */

.timeline {
  max-width: 46rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}
.timeline li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1.25rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}
.timeline .year {
  font: 700 1.25rem/1.4 var(--sans);
  color: var(--delft);
}
.timeline p { margin: 0; }

/* Province list */

.provinces {
  max-width: 46rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}
.provinces li {
  display: grid;
  grid-template-columns: 13rem 1fr;
  gap: 1.25rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}
.provinces h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.4;
  color: var(--delft);
}
.provinces h2 span {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted);
}
.provinces p { margin: 0; }

.note {
  max-width: 40rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font: 1rem/1.55 var(--sans);
  color: var(--muted);
}

/* Word table */

.words {
  margin: 1rem 0 1.5rem;
  border-collapse: collapse;
}
.words th,
.words td {
  padding: 0.45rem 2rem 0.45rem 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
}
.words th {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--muted);
}

/* Footer */

.site-footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--rule);
  font: 1rem/1.55 var(--sans);
  color: var(--muted);
}
.site-footer p { max-width: 40rem; margin: 0 0 0.5rem; }

@media (max-width: 34rem) {
  .facts { grid-template-columns: 1fr; }
  .facts dt { padding-bottom: 0; border-bottom: 0; }
  .facts dd { padding-top: 0.1rem; }
  .timeline li,
  .provinces li { grid-template-columns: 1fr; gap: 0.25rem; }
}
