/* ==========================================================================
   katherinareiche.com — base system
   Palette: petrol · mineral · warm white · sand · graphite · silver · saffron
   Type:    Newsreader (display) · Schibsted Grotesk (text) · Archivo (figures)
   ========================================================================== */

:root {
  /* petrol / deep teal */
  --petrol-950: #082427;
  --petrol-900: #0b2f33;
  --petrol-800: #0f3d42;
  --petrol-700: #14525a;
  --petrol-600: #1d6670;
  --petrol-400: #5d959b;
  /* mineral green */
  --mineral-700: #3d6a5d;
  --mineral-500: #5f8b7e;
  --mineral-300: #a9c3b8;
  --mineral-100: #e2ebe6;
  /* warm white + sand */
  --paper: #fbf9f4;
  --white: #ffffff;
  --sand-50: #f6f2e9;
  --sand-100: #f0eadd;
  --sand-200: #e6dcc8;
  --sand-400: #cbbd9f;
  /* graphite + silver */
  --graphite: #1f2527;
  --graphite-2: #353d40;
  --slate: #566164;
  --silver: #c3c9c8;
  --silver-100: #e3e7e6;
  /* saffron accent (use sparingly) */
  --saffron: #e2a11c;
  --saffron-soft: #f5dea5;
  --saffron-ink: #7f5600;

  --ink: var(--graphite);
  --ink-muted: var(--slate);
  --rule: #d6d0c2;
  --rule-strong: #a99f88;

  --f-display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-text: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-figure: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;

  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.1875rem;
  --fs-lg: clamp(1.25rem, 1.05rem + .8vw, 1.5rem);
  --fs-xl: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
  --fs-2xl: clamp(2rem, 1.3rem + 2.8vw, 3.25rem);
  --fs-3xl: clamp(2.6rem, 1.4rem + 4.8vw, 5rem);
  --fs-4xl: clamp(3.1rem, 1.2rem + 7.6vw, 8rem);

  --wrap: 1320px;
  --wrap-narrow: 780px;
  --gutter: clamp(16px, 4vw, 48px);
  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
  --space-7: clamp(4.5rem, 3rem + 6vw, 9rem);

  --head-h: 112px;
  --radius: 2px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: var(--fs-base);
  line-height: 1.68;
  font-feature-settings: "kern", "liga";
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
img { border: 0; }

a { color: var(--petrol-700); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--petrol-900); text-decoration-color: var(--saffron); }

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

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.012em;
  color: var(--petrol-900);
  margin: 0 0 .55em;
  font-optical-sizing: auto;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: var(--fs-3xl); letter-spacing: -.022em; }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-family: var(--f-text); font-size: var(--fs-md); font-weight: 600; letter-spacing: 0; line-height: 1.35; }
h1 em, h2 em, h3 em { font-style: italic; color: var(--petrol-600); }

p { margin: 0 0 1.1em; }
p, li { text-wrap: pretty; }
ul, ol { padding-left: 1.2em; margin: 0 0 1.2em; }
li { margin-bottom: .35em; }
strong { font-weight: 600; }
small { font-size: var(--fs-sm); }
abbr[title] { text-decoration: underline dotted; cursor: help; }
hr { border: 0; border-top: 1px solid var(--rule); margin: var(--space-5) 0; }

blockquote { margin: 0; }
figure { margin: 0; }

table { border-collapse: collapse; width: 100%; }

::selection { background: var(--saffron-soft); color: var(--petrol-950); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 300;
  background: var(--saffron); color: var(--petrol-950); padding: .6rem 1rem; font-weight: 600;
  text-decoration: none; transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: calc(var(--wrap-narrow) + 2 * var(--gutter)); }
.section { padding-block: var(--space-6); }
.section--tight { padding-block: var(--space-5); }
.section--sand { background: var(--sand-50); }
.section--sand-deep { background: var(--sand-100); }
.section--mineral { background: var(--mineral-100); }
.section--petrol { background: var(--petrol-900); color: #dfe9e8; }
.section--petrol h2, .section--petrol h3, .section--petrol h4 { color: #fff; }
.section--petrol a { color: var(--saffron-soft); }
.section--petrol a:hover { color: #fff; }
.section + .section--rule { border-top: 1px solid var(--rule); }

.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-4); }

/* ---------- type utilities ---------- */
.label {
  font-family: var(--f-figure);
  font-stretch: 85%;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--ink-muted);
  line-height: 1.4;
}
.label--saffron { color: var(--saffron-ink); }
.section--petrol .label, .on-dark .label { color: var(--mineral-300); }

.lede {
  font-family: var(--f-display);
  font-size: var(--fs-lg);
  line-height: 1.5;
  color: var(--graphite-2);
  font-weight: 400;
  max-width: 46em;
}
.section--petrol .lede { color: #e9f0ef; }

.prose { max-width: 68ch; }
.prose > h2 { margin-top: 1.6em; }
.prose > h3 { margin-top: 1.5em; font-size: clamp(1.4rem, 1.15rem + 1vw, 1.85rem); }
.prose > h4 { margin-top: 1.6em; }
.prose > :first-child { margin-top: 0; }
.prose ul li::marker { color: var(--mineral-500); }
.prose ol li::marker { color: var(--petrol-600); font-family: var(--f-figure); font-weight: 600; }

.figure-num {
  font-family: var(--f-figure);
  font-stretch: 75%;
  font-weight: 600;
  line-height: .9;
  letter-spacing: -.01em;
  color: var(--petrol-800);
  font-variant-numeric: tabular-nums lining-nums;
}

.muted { color: var(--ink-muted); }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }

/* ---------- reveal (motion is opt-in by JS + respects reduced motion) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .nav-drawer, .progress { display: none !important; }
  body { background: #fff; }
}
