/* Daniel Spalthoff — site styles. Layout D+ (28 Oct 2026): one colour field on the home page, eggshell ground, dark contact band.
   Palette is set by data-palette on <html> (build_site.py PALETTE): sienna is the chosen one; forest, saffron and vermilion are kept for comparison. */

@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-variable-normal.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-variable-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("fonts/outfit-latin-variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  /* Sienna and sand */
  --ground: #F5EFE6;
  --ink: #2C211B;
  --muted: #66564B;
  --rule: #D6C3B2;
  --field: #A94C29;
  --field-text: #F7EDE2;
  --band: #4A2C20;
  --accent: #E8A27C;
  --soft: #EDDCCB;
  --num: #A94C29;
  --link: #A94C29;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
  --measure: 40rem;
}
:root[data-palette="forest"] {
  --ground: #F3EEE4; --ink: #1E2420; --muted: #545B53; --rule: #CFC9B8;
  --field: #2D4A3A; --field-text: #F3EEE4; --band: #223829; --accent: #C98250; --soft: #E3DFCD; --num: #2D4A3A; --link: #2D4A3A;
}
:root[data-palette="saffron"] {
  --ground: #F5EFE2; --ink: #2A2116; --muted: #5E513D; --rule: #D8CBAE;
  --field: #F2B233; --field-text: #2A2116; --band: #5A3B12; --accent: #F2B233; --soft: #EEE0C2; --num: #5A3B12; --link: #7A4E0E;
}
:root[data-palette="river"] {
  /* River and forest (proposed 21 Nov 2026): deep river blue, leaf-green accent */
  --ground: #F2F1EC; --ink: #1B2426; --muted: #526064; --rule: #CBD3D2;
  --field: #1F4C5B; --field-text: #EEF4F3; --band: #14303A; --accent: #9CC77A; --soft: #DCE6E3; --num: #1F4C5B; --link: #1F5E70;
}
:root[data-palette="vermilion"] {
  --ground: #F4EEE6; --ink: #1B2033; --muted: #555A6B; --rule: #D5C8BC;
  --field: #C8401F; --field-text: #FFFFFF; --band: #1B2547; --accent: #E2603F; --soft: #EBDCD0; --num: #C8401F; --link: #C8401F;
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.6;
}

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
a:focus-visible, .button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 40rem) { .wrap { padding: 0 2.5rem; } }

/* Header */
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.5rem 2rem; padding-top: 1.75rem; padding-bottom: 1.75rem;
}
.wordmark { font-family: var(--serif); font-weight: 300; font-size: 1.25rem; color: var(--ink); text-decoration: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 1.1rem; }
.wordmark:hover { color: var(--ink); }
.wordmark small { font-family: inherit; font-weight: inherit; font-size: 1em; color: var(--muted); }
.wordmark small::before { content: "|" / ""; margin-right: 1.1rem; opacity: 0.6; }
@media (max-width: 30rem) { .wordmark small::before { content: none; } }
.site-nav { font-size: 0.9375rem; font-weight: 400; display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--link); }

/* Home: header sits on the colour field */
.home .site-header { background: var(--field); }
.home .wordmark, .home .wordmark small, .home .site-nav a { color: var(--field-text); }
.home .site-nav a:hover { color: var(--field-text); opacity: 0.8; }

/* Home: the colour field */
.hero { background: var(--field); color: var(--field-text); padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(4rem, 9vw, 7.5rem); }
.hero h1 {
  font-family: var(--serif); font-weight: 300; letter-spacing: -0.015em;
  font-size: clamp(2.75rem, 6.5vw, 6rem); line-height: 0.98;
  margin: 0 0 2rem; max-width: 19ch; text-wrap: balance;
}
.hero .sub { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 2.5rem; }
.hero p { margin: 0; font-size: 1.25rem; line-height: 1.55; max-width: 44ch; }

.button {
  display: inline-block; font-family: var(--sans); font-weight: 400; font-size: 1rem;
  background: var(--band); color: var(--ground); text-decoration: none; padding: 1rem 1.75rem;
}
.button:hover { color: var(--ground); opacity: 0.88; }
.hero .button { background: var(--field-text); color: var(--field); }
.hero .button:hover { color: var(--field); }

/* Home: figures */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 3rem; padding-top: clamp(5rem, 10vw, 9rem); }
.figure { border-top: 1px solid var(--rule); padding-top: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.figure b { font-family: var(--serif); font-weight: 300; font-size: clamp(3.5rem, 6vw, 4.75rem); line-height: 1; color: var(--num); white-space: nowrap; }
.figure span { font-size: 1.0625rem; line-height: 1.5; max-width: 28ch; }

/* Home: areas and about teaser */
.home-areas { padding: clamp(3.5rem, 7vw, 6.5rem) 0 clamp(3rem, 6vw, 6rem); }
.home-about { padding-bottom: clamp(3.5rem, 7vw, 6.5rem); }
.home-about .wrap { display: block; }
.home-about figure { margin: 0; }
.home-about img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.home-about h2 { margin-bottom: 1.25rem; max-width: none; font-size: clamp(1.5rem, 2.6vw, 2.25rem); }
.home-about p { font-size: 1.125rem; line-height: 1.65; }
.more-link { font-weight: 400; color: var(--ink); }

/* Headings and text */
.label {
  font-size: 0.9375rem; font-weight: 400;
  color: var(--muted); margin: 0 0 1rem;
}
h2 { font-family: var(--serif); font-weight: 300; color: var(--ink); font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.15; margin: 0 0 2rem; max-width: 26ch; text-wrap: balance; }
h3 { font-family: var(--serif); font-weight: 300; color: var(--ink); font-size: 1.75rem; line-height: 1.2; margin: 0 0 0.75rem; }
p { margin: 0 0 1rem; }
strong { font-weight: 500; }
.prose { max-width: var(--measure); }
.note {
  margin-top: 3rem; max-width: var(--measure); padding-left: 1.25rem; border-left: 2px solid var(--field);
  font-size: 1.0625rem;
}

/* Areas of work list (home and services page) */
.group-label { margin: 0 0 0.75rem; font-weight: 600; color: var(--ink); font-size: 1rem; }
.service-list + .group-label { margin-top: 2.25rem; }
.service-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.service-list li { border-bottom: 1px solid var(--rule); }
.service-list a { display: grid; gap: 0.5rem 3.5rem; padding: 1.3rem 0; text-decoration: none; color: var(--ink); }
@media (min-width: 52rem) { .service-list a { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: baseline; } }
.service-list h3 { margin: 0; }
.service-list p { margin: 0; font-size: 1.0625rem; color: var(--muted); }
.service-list .more { font-size: 0.9375rem; font-weight: 400; color: var(--link); white-space: nowrap; }
.service-list a:hover h3 { color: var(--link); }

/* Inner pages */
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 1.25rem; }
.page-head .label a { color: inherit; text-decoration: none; }
.page-head h1 { font-family: var(--serif); font-weight: 300; color: var(--ink); font-size: clamp(2.5rem, 5.5vw, 4.25rem); line-height: 1.05; letter-spacing: -0.01em; margin: 0 0 1.75rem; max-width: 18ch; text-wrap: balance; }
.page-head .lead { max-width: var(--measure); font-size: 1.25rem; margin: 0; }
.page-body { padding: 1.5rem 0 3.5rem; }
.page-body h2 { font-size: 1.75rem; margin: 3rem 0 1rem; }
.page-body h2:first-child { margin-top: 0; }
/* Section headings inside the area-of-work pages: plain sans, like the body text */
.page-body > .wrap > .prose > h2 { font-family: var(--sans); font-weight: 400; font-size: 1.5rem; line-height: 1.3; color: var(--ink); margin: 3rem 0 1rem; max-width: none; }
.page-body > .wrap > .prose > h2:first-child { margin-top: 0; }
/* Sub-headings: same face and weight as the h2, one step smaller */
.page-body > .wrap > .prose > h3 { font-family: var(--sans); font-weight: 400; font-size: 1.1875rem; line-height: 1.4; color: var(--ink); margin: 1.75rem 0 0.5rem; }
/* Table and independence note in the body text style, no bold */
.page-body .standards { font-size: inherit; }
.page-body .standards th { font-family: var(--sans); font-weight: 400; font-size: inherit; }
.page-body .note { font-size: inherit; }
.page-body .note strong { font-weight: 400; }
.page-body ul, .page-body > .wrap > ol { padding-left: 1.2rem; }
.page-body li { margin-bottom: 0.4rem; }
.page-body .service-list { padding-left: 0; }
.page-body .service-list li { margin-bottom: 0; }
.page-body .note { margin-top: 2.5rem; }
.standards { border-collapse: collapse; width: 100%; max-width: var(--measure); font-size: 1rem; margin: 0 0 1rem; }
.standards th, .standards td { text-align: left; vertical-align: top; padding: 0.85rem 1rem 0.85rem 0; border-bottom: 1px solid var(--rule); }
.standards th { font-family: var(--serif); font-weight: 300; color: var(--ink); font-size: 1.125rem; width: 11rem; }

/* Framed photos (About, climate evidence, data pages) */
.photo-band { margin: 0; }
.photo-band.contained { max-width: 72rem; margin: 2.5rem auto 0; padding: 0 1rem; }
@media (min-width: 40rem) { .photo-band.contained { padding: 0 2.5rem; } }
.photo-band.contained img { display: block; width: 100%; height: auto; aspect-ratio: 2.1; object-fit: cover; }
.photo-band.contained + .contact { margin-top: 2.5rem; }
.photo-band.contained + .figures { padding-top: 3rem; }

/* About */
.about { display: grid; gap: 2.5rem; }
/* Credentials come first in the page (top on phones) but sit in the right column on wider screens */
@media (min-width: 52rem) { .about { grid-template-columns: 2fr 1fr; gap: 4.5rem; align-items: start; } .about .facts { order: 2; } }
.facts { font-size: 0.9375rem; margin: 0; }
.facts dt { color: var(--muted); font-size: 0.9375rem; margin-top: 1.25rem; }
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: 0.25rem 0 0; color: var(--ink); }
.facts dd + dd { margin-top: 0.6rem; }

/* Area navigation at the foot of service pages */
.area-nav { padding-bottom: 3.5rem; }
.area-nav ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); font-size: 1rem; }
.area-nav li { border-bottom: 1px solid var(--rule); }
.area-nav a, .area-nav span { display: block; padding: 0.7rem 0; color: var(--ink); text-decoration: none; }
.area-nav b { display: inline-block; width: 1.75rem; color: var(--link); font-weight: 400; }
.area-nav a:hover { color: var(--link); }
.area-nav span { color: var(--link); font-weight: 400; background: var(--soft); padding-left: 0.75rem; border-left: 3px solid var(--field); }

/* Contact band */
.contact { background: var(--band); color: var(--ground); padding: clamp(3.5rem, 7vw, 6rem) 0 3rem; }
.contact h2 { color: var(--ground); font-size: clamp(2.25rem, 5vw, 3.5rem); margin-bottom: 1.5rem; }
.contact p { max-width: var(--measure); font-size: 1.1875rem; }
.contact a { color: var(--ground); word-break: break-word; }
.contact .button { background: var(--accent); color: var(--band); margin-top: 1rem; }
.contact .button:hover { color: var(--band); }
.contact-icons { display: flex; gap: 1.25rem; align-items: center; margin-top: 2rem; }
/* Contact page: the call to action sits on the beige ground under the photo */
.contact.light { background: transparent; color: var(--ink); padding: 2.5rem 0 clamp(3.5rem, 7vw, 6rem); }
.contact.light h2 { color: var(--ink); }
.contact.light a { color: var(--ink); }
.contact.light .button { background: var(--accent); color: var(--band); }
.contact.light .button:hover { color: var(--band); }
.contact.light .email-text a { color: var(--link); }
.contact-page .site-footer { padding-top: 3rem; }
.contact-page .site-footer .wrap { border-top: 0; padding-top: 0; }
.icon-link { display: inline-flex; color: var(--ground); }
.icon-link svg { width: 1.75rem; height: 1.75rem; }
.icon-link:hover { color: var(--accent); }
.email-text { margin-top: 0.75rem; font-size: 0.9375rem; }

/* Footer: continues the contact band */
.site-footer { background: var(--band); color: var(--ground); padding: 0 0 3rem; font-size: 0.875rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; border-top: 1px solid rgba(255, 255, 255, 0.2); padding-top: 1.5rem; opacity: 0.85; }
.site-footer a { color: var(--ground); }

/* Legal pages */
.legal { padding: 4rem 0 5rem; }
.legal .prose h1 { font-family: var(--serif); font-weight: 300; color: var(--ink); font-size: clamp(2.25rem, 5vw, 3rem); margin: 0 0 2rem; }
.legal .prose h2 { font-size: 1.5rem; margin: 2.25rem 0 0.75rem; }
.legal .prose { font-size: 1.0625rem; }
.legal + .site-footer { padding-top: 0; }
.legal + .site-footer .wrap { border-top: 0; padding-top: 2rem; }
.placeholder { background: #FFF3C4; color: #2C211B; padding: 0 0.2em; }

/* About: selected work */
.about .prose h2 { margin-top: 3rem; }
.about .prose h3 { font-size: 1.375rem; margin: 2rem 0 0.5rem; }

/* Portrait on the About page */
.portrait { margin: 0 0 2rem; }
.portrait img { display: block; width: 100%; max-width: 20rem; height: auto; border-radius: 2px; }

/* Language switch (EN | FR) at the end of the main menu */
.lang-switch { display: inline-flex; align-items: baseline; gap: 0.4rem; }
.lang-switch .sep { color: var(--muted); opacity: 0.6; }
.lang-switch span[aria-current] { color: var(--link); }
.home .lang-switch span[aria-current] { color: var(--field-text); font-weight: 600; }
.home .lang-switch .sep { color: var(--field-text); }
