/* IBM Plex Sans 1.1.0, SIL Open Font License 1.1 — license: /fonts/OFL.txt
   Subset "Latin1": covers umlauts, ß, the euro sign and German quotation marks. */
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/fonts/ibm-plex-sans-400-latin1.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/fonts/ibm-plex-sans-600-latin1.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Contrast ratios against --bg, computed with the WCAG formula.
   Do not change without measuring again — see design.md, decision 1. */
:root {
  --bg: #16110f;
  --ink: #f4f0e9; /* 16.49:1 */
  --ink-quiet: #b3a79b; /* 7.95:1 */
  --accent: #e2601f; /* 5.29:1 */
  --accent-edge: #d85618; /* 4.70:1 */

  --measure: 34rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

/* The home page carries its own palette, because the values above are measured
   against the dark ground and do not hold on a bright one — the orange accent
   only reaches 1.05:1 to 2.31:1 there. Separate names on purpose: these do not
   override the ones above, so the legal pages stay untouched. */
.daylight {
  --sky-high: #6fb3e0;
  --sky-low: #bfe3f5;
  --meadow: #7fb94a;
  --meadow-shade: #5e9636;
  --cloud: #ffffff;
  --cloud-shade: #dcebf7;
  /* 7.69:1 on --meadow, 5.07:1 on --meadow-shade, 7.91:1 to 13.35:1 on the sky */
  --ink-day: #1b1512;
  /* Held back on purpose, for the signpost down to the gallery. 5.35:1 on
     --meadow — one step softer and it drops below 4.5:1. */
  --ink-soft: #3a322c;
  /* Calm surface for the gallery — a grid of photos over sky and meadow would be
     restless and the pictures would lose their edges. */
  --surface: #f4f0e9;
}

/* Dark ink beats the orange accent on every surface of the scene. */
.daylight :focus-visible {
  outline-color: var(--ink-day);
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

/* A column so children can fill the remaining height — height: 100% does not
   resolve reliably inside a flex item. */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.prose {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(3rem, 10vh, 6rem) var(--gutter) 0;
}

.prose h2:first-of-type {
  margin-top: 0;
}

/* Placeholders the owner replaces — these are meant to stand out, not blend in. */
.placeholder {
  display: inline-block;
  padding: 0 0.35em;
  border: 1px dashed var(--accent-edge);
  border-radius: 3px;
  color: var(--accent);
  font-size: 0.9375em;
}

h1,
h2 {
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
}

h1 {
  font-size: 1.75rem;
  margin: 0 0 1.5rem;
}

h2 {
  font-size: 1.125rem;
  margin: 2.5rem 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

/* Available to screen readers only — not display:none, that would drop the text
   from the reading order as well. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Skip link: first focusable element, visible as soon as it takes focus. */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 0;
  z-index: 10;
  transform: translateY(-150%);
  padding: 0.6rem 1rem;
  background-color: var(--bg);
  border: 2px solid var(--accent-edge);
  border-radius: 0 0 4px 4px;
  color: var(--ink);
  text-decoration: none;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
  .skip-link {
    transition: transform 150ms ease-out;
  }
}
footer[data-astro-cid-jo6i4kqk] {
  display: flex;
  justify-content: flex-end;
  gap: 1.25rem;
  padding: var(--gutter);
  font-size: .875rem;
}

a[data-astro-cid-jo6i4kqk] {
  color: var(--ink-quiet);
  text-decoration-color: color-mix(in srgb, var(--ink-quiet) 45%, transparent);
}

a[data-astro-cid-jo6i4kqk]:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.daylight a[data-astro-cid-jo6i4kqk] {
  color: var(--ink-day);
  text-decoration-color: color-mix(in srgb, var(--ink-day) 45%, transparent);
}

.daylight a[data-astro-cid-jo6i4kqk]:hover {
  color: var(--ink-day);
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
}
