/* Riemer de Vries — site styles
   Palette: polder fog, slate ink, Wadden blue, lamplight ochre */
:root {
  --paper: #E8ECEA;
  --paper-2: #DDE3E1;
  --ink: #1F2B30;
  --ink-soft: #4E5C61;
  --rule: #B9C3C1;
  --wadden: #2E5468;
  --lamp: #A9792B;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Karla", "Helvetica Neue", Arial, sans-serif;
  --measure: 68ch;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #162127;
    --paper-2: #1D2B32;
    --ink: #E4E9E7;
    --ink-soft: #A6B3B4;
    --rule: #34454C;
    --wadden: #8DB7CC;
    --lamp: #D9A853;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: var(--wadden); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--lamp); }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 8px 24px; padding-top: 18px; padding-bottom: 14px;
}
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-family: var(--sans); font-size: 0.95rem; }
.nav a { color: var(--ink-soft); text-decoration: none; padding: 4px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }
.nav a.cta { color: var(--wadden); font-weight: 700; }

/* Home hero */
.hero { padding: 72px 0 56px; }
.hero h1 {
  font-size: clamp(2.6rem, 8vw, 5.6rem);
  line-height: 1.02; font-weight: 500; letter-spacing: -0.02em;
  margin: 0 0 24px; max-width: 14ch;
}
.hero p.lede { font-size: clamp(1.15rem, 2.4vw, 1.4rem); color: var(--ink-soft); max-width: 40ch; margin: 0 0 28px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; font-family: var(--sans); }

.button {
  display: inline-block; font-family: var(--sans); font-weight: 700; font-size: 1rem;
  padding: 12px 20px; border-radius: 3px; text-decoration: none;
  background: var(--wadden); color: var(--paper); border: 1px solid var(--wadden);
}
.button:hover { background: var(--lamp); border-color: var(--lamp); color: var(--paper); }
.button.quiet { background: transparent; color: var(--wadden); }
.button.quiet:hover { color: var(--lamp); background: transparent; }

/* Three ways in */
.ways { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.way { padding: 28px 24px 32px 0; }
.way + .way { border-left: 1px solid var(--rule); padding-left: 24px; }
.way h2 { font-size: 1.6rem; font-weight: 500; margin: 0 0 6px; }
.way p { margin: 0 0 12px; color: var(--ink-soft); }
.way .latest { font-family: var(--sans); font-size: 0.95rem; }
@media (max-width: 760px) {
  .ways { grid-template-columns: 1fr; }
  .way, .way + .way { border-left: 0; padding: 24px 0; }
  .way + .way { border-top: 1px solid var(--rule); }
}

.quote { padding: 64px 0; text-align: left; }
.quote blockquote { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.35; max-width: 30ch; font-style: italic; }
.quote cite { display: block; margin-top: 12px; font-family: var(--sans); font-style: normal; font-size: 0.95rem; color: var(--ink-soft); }

/* Page headers */
.page-head { padding: 56px 0 24px; }
.page-head h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 500; line-height: 1.08; margin: 0 0 12px; letter-spacing: -0.015em; }
.page-head p { max-width: var(--measure); color: var(--ink-soft); margin: 0; font-size: 1.15rem; }

section { padding-bottom: 48px; }
section > h2 { font-size: 1.5rem; font-weight: 500; margin: 32px 0 8px; }

/* Lists of work */
.works { list-style: none; margin: 0; padding: 0; max-width: 820px; }
.works li { padding: 22px 0; border-top: 1px solid var(--rule); }
.works li:last-child { border-bottom: 1px solid var(--rule); }
.works h3 { font-size: 1.3rem; font-weight: 500; margin: 0 0 4px; line-height: 1.3; }
.works h3 a { color: var(--ink); text-decoration: none; }
.works h3 a:hover { color: var(--wadden); text-decoration: underline; }
.works .meta { font-family: var(--sans); font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 8px; }
.works p { margin: 0; max-width: var(--measure); }

/* Embeds */
.embed { margin: 12px 0 0; max-width: 820px; }
.embed iframe { width: 100%; border: 0; border-radius: 4px; }
.video { position: relative; aspect-ratio: 16 / 9; background: var(--paper-2); }
.video iframe { position: absolute; inset: 0; height: 100%; }

/* Art grid */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px 20px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--paper-2); }
.gallery figcaption { font-family: var(--sans); font-size: 0.95rem; margin-top: 8px; color: var(--ink-soft); }

/* Prose */
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.1em; }

/* Services */
.intro-split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 760px) { .intro-split { grid-template-columns: 1fr; gap: 16px; } }
.services { border-top: 2px solid var(--ink); margin-top: 24px; }
.service-group { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 32px 0; border-bottom: 1px solid var(--rule); }
@media (max-width: 760px) { .service-group { grid-template-columns: 1fr; gap: 8px; } }
.service-group > h2 { margin: 0; font-size: 1.6rem; font-weight: 500; line-height: 1.2; }
.service-group > h2 small { display: block; font-family: var(--sans); font-size: 0.95rem; color: var(--ink-soft); font-weight: 400; margin-top: 6px; }
.offer { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; padding: 14px 0; }
.offer + .offer { border-top: 1px dashed var(--rule); }
.offer h3 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.offer .price { font-family: var(--sans); font-weight: 700; white-space: nowrap; color: var(--wadden); }
.offer p { grid-column: 1 / -1; margin: 0; color: var(--ink-soft); max-width: var(--measure); }
@media (max-width: 480px) { .offer { grid-template-columns: 1fr; } }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 16px 0 0; max-width: var(--measure); }
.steps li { counter-increment: step; padding: 10px 0 10px 44px; position: relative; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 10px;
  width: 30px; height: 30px; border: 1px solid var(--wadden); border-radius: 50%;
  font-family: var(--sans); font-weight: 700; font-size: 0.9rem; color: var(--wadden);
  display: grid; place-items: center; line-height: 1;
}

.contact-box { background: var(--paper-2); padding: 32px; margin: 16px 0 56px; border-left: 4px solid var(--lamp); }
.contact-box h2 { margin: 0 0 8px; font-size: 1.6rem; font-weight: 500; }
.contact-box p { margin: 0 0 16px; max-width: var(--measure); }

/* Footer */
.site-foot { border-top: 1px solid var(--rule); padding: 28px 0 40px; font-family: var(--sans); font-size: 0.95rem; color: var(--ink-soft); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.site-foot a { color: var(--ink-soft); }
.site-foot a:hover { color: var(--lamp); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }

.lang-switch { font-family: var(--sans); font-size: 0.95rem; }

@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .lede, .hero .actions { animation: rise 0.7s ease-out both; }
  .hero .lede { animation-delay: 0.12s; }
  .hero .actions { animation-delay: 0.24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* Item pages */
.item { padding: 48px 0 64px; max-width: 760px; }
.item .crumb { font-family: var(--sans); font-size: 0.95rem; margin: 0 0 16px; }
.item h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 500; line-height: 1.1; margin: 0 0 8px; letter-spacing: -0.015em; }
.item > .meta { font-family: var(--sans); color: var(--ink-soft); margin: 0 0 32px; }
.reading { font-size: 1.125rem; line-height: 1.8; margin-top: 24px; }
.reading p + p { text-indent: 1.5em; margin-top: -0.6em; }
.lede-text { font-style: italic; color: var(--ink-soft); }
.pending, .source { font-family: var(--sans); font-size: 0.95rem; color: var(--ink-soft); border-top: 1px solid var(--rule); padding-top: 16px; margin-top: 32px; }
.artwork { margin: 0; }
.artwork img { max-height: 80vh; width: auto; max-width: 100%; }
.pager { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--sans); margin-top: 24px; }
.gallery figcaption a { color: var(--ink-soft); text-decoration: none; }
.gallery figcaption a:hover { color: var(--wadden); text-decoration: underline; }

/* Thumbnails and covers */
.works li.has-thumb { display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: start; }
.works .thumb img { width: 120px; height: 120px; object-fit: cover; background: var(--paper-2); border-radius: 2px; }
@media (max-width: 480px) {
  .works li.has-thumb { grid-template-columns: 80px 1fr; gap: 14px; }
  .works .thumb img { width: 80px; height: 80px; }
}
.cover { margin: 0 0 28px; }
.cover img { width: auto; max-width: 100%; max-height: 420px; border-radius: 2px; }

/* Long reads */
.reading h2 { font-size: 1.6rem; font-weight: 500; margin: 2.2em 0 0.2em; line-height: 1.25; text-indent: 0; }
.reading .subhead { font-family: var(--sans); font-size: 1rem; color: var(--ink-soft); text-indent: 0; margin: 0 0 1.2em; }
.reading p.subhead + p, .reading h2 + p { text-indent: 0; margin-top: 0; }
.reading > p:first-child:not(.subhead):not(.lede-text):not(.intro):not(.q)::first-letter { font-size: 3.4em; float: left; line-height: 0.9; padding: 0.06em 0.1em 0 0; font-weight: 500; }
.reading .intro { font-weight: 600; text-indent: 0; }
.reading .q { font-family: var(--sans); font-weight: 700; text-indent: 0; margin: 1.8em 0 0.4em; }
.reading .q + p, .reading .intro + p { text-indent: 0; margin-top: 0; }
.reading > p.intro:first-child::first-letter, .reading > p.q:first-child::first-letter { font-size: inherit; float: none; padding: 0; }

/* Click-to-play embeds */
.consent { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px;
  padding: 20px 24px; background: var(--paper-2); border: 1px solid var(--rule); border-radius: 4px; min-height: 152px; }
.consent.video { aspect-ratio: 16 / 9; min-height: 0; align-items: center; text-align: center; }
.consent p { margin: 0; font-family: var(--sans); font-size: 0.9rem; color: var(--ink-soft); max-width: 46ch; }
.consent .play { font-family: var(--sans); font-weight: 700; font-size: 1rem; cursor: pointer;
  padding: 12px 20px 12px 44px; border: 0; border-radius: 3px; background: var(--wadden); color: var(--paper); position: relative; }
.consent .play::before { content: ""; position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent currentColor; }
.consent .play:hover { background: var(--lamp); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Art gallery: keep each drawing's own shape */
.gallery { display: block; columns: 4 220px; column-gap: 20px; }
.gallery figure { break-inside: avoid; margin: 0 0 28px; }
.gallery img { aspect-ratio: auto; height: auto; object-fit: initial; }

/* Portrait */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; padding-bottom: 64px; }
.portrait { margin: 0; }
.portrait img { width: 100%; height: auto; border-radius: 2px; }
.about-nl { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--rule); color: var(--ink-soft); }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; gap: 24px; } .portrait img { max-height: 70vh; width: auto; } }
.contact-box.with-photo { display: grid; grid-template-columns: 140px 1fr; gap: 28px; align-items: center; }
.contact-photo { width: 140px; height: 180px; object-fit: cover; object-position: 50% 35%; border-radius: 2px; }
@media (max-width: 520px) { .contact-box.with-photo { grid-template-columns: 1fr; } .contact-photo { width: 110px; height: 140px; } }

/* ===== Colour: lamplight accent + a colour per discipline ===== */
:root {
  --lamp-strong: #8A5F1C;       /* buttons: ochre dark enough for light text */
  --on-lamp: #FBF7EE;
  --c-read: #2F4F86;            /* ink blue */
  --c-film: #9A4632;            /* brick / sepia red */
  --c-music: #5D4B8C;           /* dusky violet */
  --c-art: #4E6B3C;             /* moss green */
  --sec: var(--wadden);
}
@media (prefers-color-scheme: dark) {
  :root {
    --lamp-strong: #D9A853;
    --on-lamp: #1A1408;
    --c-read: #8FB0EA;
    --c-film: #E59A84;
    --c-music: #B9A6EC;
    --c-art: #A8C78F;
  }
}
.sec-read  { --sec: var(--c-read); }
.sec-film  { --sec: var(--c-film); }
.sec-music { --sec: var(--c-music); }
.sec-art   { --sec: var(--c-art); }
.sec-work  { --sec: var(--lamp); }

/* Lamplight: buttons, play buttons, focus, hover */
.button, .consent .play { background: var(--lamp-strong); border-color: var(--lamp-strong); color: var(--on-lamp); }
.button:hover, .consent .play:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.button.quiet { background: transparent; color: var(--lamp-strong); border-color: var(--lamp-strong); }
.button.quiet:hover { background: transparent; color: var(--ink); border-color: var(--ink); }
a:hover { color: var(--lamp); }
.nav a.cta { color: var(--lamp-strong); }
.offer .price { color: var(--lamp-strong); }
.steps li::before { border-color: var(--lamp); color: var(--lamp-strong); }
.services { border-top-color: var(--lamp); }

/* Discipline colours in the menu */
.nav a[href^="articles"], .nav a[href^="stories"] { --nav-c: var(--c-read); }
.nav a[href^="films"]  { --nav-c: var(--c-film); }
.nav a[href^="music"]  { --nav-c: var(--c-music); }
.nav a[href="art.html"] { --nav-c: var(--c-art); }
.nav a { text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--nav-c, var(--ink)); text-decoration-color: var(--nav-c, var(--ink)); }
.nav a[aria-current="page"] { text-decoration: underline; }

/* Section colour on its pages */
.page-head h1, .item h1 { color: var(--sec); }
.item .crumb a, .works h3 a:hover, .reading a, .page-head a, .works .meta { color: var(--sec); }
.reading h2 { color: var(--sec); }
.reading .q { color: var(--sec); }
.reading > p:first-child:not(.subhead):not(.lede-text):not(.intro):not(.q)::first-letter { color: var(--sec); }
.site-head { border-bottom: 3px solid var(--sec); }
.sec-home .site-head { border-bottom: 1px solid var(--rule); }
.works .thumb img { outline: 3px solid var(--sec); outline-offset: -3px; }
.cover img, .artwork img { box-shadow: 0 0 0 3px var(--sec); }
.gallery figure a:hover img { outline: 3px solid var(--c-art); outline-offset: -3px; }

/* Home: Read / Watch / Listen each in their colour */
.way { border-top: 4px solid var(--way-c); }
.ways { border-top: 0; }
.way:nth-child(1) { --way-c: var(--c-read); }
.way:nth-child(2) { --way-c: var(--c-film); }
.way:nth-child(3) { --way-c: var(--c-music); }
.way h2, .way .latest a { color: var(--way-c); }
.hero h1 { color: var(--ink); }
.quote blockquote { color: var(--c-music); }
.quote cite { color: var(--lamp-strong); }

/* Work with me: discipline colours on the service groups */
.service-group:nth-child(1) > h2 { color: var(--c-read); }
.service-group:nth-child(2) > h2 { color: var(--c-film); }
.service-group:nth-child(3) > h2 { color: var(--c-music); }

/* Language switch */
.lang { display: inline-flex; align-items: center; margin-left: 6px; border: 1px solid var(--rule); border-radius: 999px; padding: 2px; font-family: var(--sans); font-size: 0.8rem; font-weight: 700; line-height: 1; }
.lang a, .lang .on { padding: 5px 9px; border-radius: 999px; text-decoration: none; letter-spacing: 0.02em; }
.lang a { color: var(--ink-soft); }
.lang a:hover { color: var(--ink); background: var(--paper-2); }
.lang .on { background: var(--ink); color: var(--paper); }
.nav { align-items: center; }
@media (max-width: 640px) {
  .site-head .wrap { position: relative; padding-right: 92px; }
  .lang { position: absolute; right: 20px; top: 16px; margin: 0; }
}
