/* Feint design system. Shared by every page; page-specific rules live inline. */

@import url("https://fonts.googleapis.com/css2?family=Libre+Caslon+Display&family=Libre+Caslon+Text:ital,wght@0,400;0,700;1,400&family=Schibsted+Grotesk:ital,wght@0,400..700;1,400..700&display=swap");

:root {
  /* Neutrals are tinted toward the oxblood hue (~25). */
  --paper: oklch(0.966 0.009 60);
  --paper-2: oklch(0.938 0.013 55);
  --paper-3: oklch(0.905 0.016 50);
  --ink: oklch(0.225 0.014 35);
  --ink-2: oklch(0.43 0.016 35);
  --ink-3: oklch(0.5 0.014 40);
  --rule: oklch(0.86 0.014 50);
  --oxblood: oklch(0.385 0.105 24);
  --oxblood-deep: oklch(0.31 0.09 24);
  --night: oklch(0.205 0.016 30);
  --night-2: oklch(0.26 0.018 30);
  --on-night: oklch(0.93 0.012 60);
  --on-night-2: oklch(0.76 0.014 55);

  --display: "Libre Caslon Display", "Libre Caslon Text", Georgia, serif;
  --serif: "Libre Caslon Text", Georgia, serif;
  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;

  /* Five-step fluid scale, >= 1.25 ratio. Body is large on purpose: many readers are over 60. */
  --t-small: 0.875rem;
  --t-body: clamp(1.0625rem, 0.98rem + 0.3vw, 1.1875rem);
  --t-lead: clamp(1.3rem, 1.1rem + 0.8vw, 1.65rem);
  --t-h3: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem);
  --t-h2: clamp(2.3rem, 1.6rem + 2.8vw, 4rem);
  --t-h1: clamp(3rem, 1.8rem + 5vw, 6.6rem);

  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  --section: clamp(72px, 6vw + 40px, 168px);
  --gutter: clamp(16px, 4vw, 64px);
  --max: 1360px;
  --measure: 64ch;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--t-body) / 1.6 var(--sans);
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--oxblood); color: var(--paper); }
:focus-visible { outline: 2px solid var(--oxblood); outline-offset: 3px; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * 0.6); }
.measure { max-width: var(--measure); }
.night { background: var(--night); color: var(--on-night); }
.night .muted, .night .label { color: var(--on-night-2); }
.paper-2 { background: var(--paper-2); }

/* ---------- Type ---------- */
.display, h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -0.012em; margin: 0; text-wrap: balance; }
h1, .t-h1 { font-size: var(--t-h1); line-height: 1.0; }
h2, .t-h2 { font-size: var(--t-h2); line-height: 1.06; }
h3, .t-h3 { font-family: var(--serif); font-weight: 400; font-size: var(--t-h3); line-height: 1.18; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.lead { font-size: var(--t-lead); line-height: 1.45; color: var(--ink-2); }
.night .lead { color: var(--on-night-2); }
.muted { color: var(--ink-2); }
.small { font-size: var(--t-small); line-height: 1.5; }
em, .italic { font-family: var(--serif); font-style: italic; }
h1 em, h2 em { font-family: var(--display); font-style: italic; }

.label {
  font: 600 0.8125rem/1.3 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.label--ox { color: var(--oxblood); }
.night .label--ox { color: oklch(0.72 0.09 28); }

.stack > * + * { margin-top: var(--space-lg); }
.stack-sm > * + * { margin-top: var(--space-sm); }
.stack-lg > * + * { margin-top: var(--space-2xl); }

/* ---------- Links and buttons ---------- */
.link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in oklch, currentColor 40%, transparent);
  transition: text-decoration-color 0.25s var(--ease-out);
}
.link:hover { text-decoration-color: currentColor; }
.link--arrow::after { content: "\2192"; display: inline-block; margin-left: 0.4em; transition: transform 0.3s var(--ease-out); }
.link--arrow:hover::after { transform: translateX(4px); }

.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.95em 1.5em;
  font: 600 0.9375rem/1 var(--sans);
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid var(--oxblood);
  background: var(--oxblood);
  color: var(--paper);
  border-radius: 2px;
  transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out);
}
.btn:hover { background: var(--oxblood-deep); border-color: var(--oxblood-deep); color: var(--paper); }
.btn--ghost { background: transparent; color: var(--ink); border-color: color-mix(in oklch, var(--ink) 35%, transparent); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.night .btn--ghost { color: var(--on-night); border-color: color-mix(in oklch, var(--on-night) 40%, transparent); }
.night .btn--ghost:hover { background: var(--on-night); color: var(--night); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-md) var(--space-lg); align-items: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in oklch, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-out);
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); min-height: 72px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.wordmark svg { width: 30px; height: 30px; flex: none; }
.wordmark span { font: 400 1.6rem/1 var(--display); letter-spacing: 0.16em; padding-top: 3px; }
.nav { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 32px); }
.nav a { text-decoration: none; font-size: 0.9375rem; color: var(--ink-2); padding-block: 6px; border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--oxblood); }
.nav .btn { padding: 0.75em 1.1em; color: var(--paper); border-bottom: 1px solid var(--oxblood); }
.nav-toggle { display: none; }

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    background: none; border: 1px solid var(--rule); border-radius: 2px;
    font: 600 0.875rem/1 var(--sans); color: var(--ink); padding: 10px 14px; cursor: pointer;
  }
  .nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: var(--space-sm) var(--gutter) var(--space-xl);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out), visibility 0.25s;
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav a { padding-block: 14px; font-size: 1.125rem; border-bottom: 1px solid var(--rule); }
  .nav a[aria-current="page"] { border-bottom-color: var(--rule); color: var(--oxblood); }
  .nav .btn { margin-top: var(--space-lg); justify-content: center; }
}

/* ---------- Photography ---------- */
.photo { position: relative; margin: 0; background: var(--paper-3); overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo--tall { aspect-ratio: 4 / 5; }
.photo--wide { aspect-ratio: 3 / 2; }
.photo--pano { aspect-ratio: 21 / 9; }
.caption { display: flex; justify-content: space-between; gap: var(--space-md); margin-top: var(--space-sm); font-size: var(--t-small); color: var(--ink-3); }
.caption b { font-weight: 600; color: var(--ink-2); }
.night .caption { color: var(--on-night-2); }
.night .caption b { color: var(--on-night); }

/* Reveal: images unveil once, text rises once. Disabled for reduced motion. */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
.unveil img { clip-path: inset(0 0 100% 0); transform: scale(1.06); transition: clip-path 1.4s var(--ease-out), transform 2.2s var(--ease-out); }
.unveil.is-in img { clip-path: inset(0 0 0 0); transform: scale(1); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .unveil img { opacity: 1; transform: none; clip-path: none; transition: none; }
}
.no-js .reveal { opacity: 1; transform: none; }
.no-js .unveil img { clip-path: none; transform: none; }

/* ---------- Rules and lists ---------- */
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }
.night .rule { border-top-color: color-mix(in oklch, var(--on-night) 18%, transparent); }
.numbered { list-style: none; padding: 0; margin: 0; counter-reset: n; }
.numbered > li { counter-increment: n; display: grid; grid-template-columns: 3.2rem 1fr; gap: var(--space-md); padding-block: var(--space-lg); border-top: 1px solid var(--rule); }
.numbered > li::before { content: counter(n, upper-roman) "."; font: 400 1.25rem/1.3 var(--display); color: var(--oxblood); }
.night .numbered > li { border-top-color: color-mix(in oklch, var(--on-night) 18%, transparent); }

/* ---------- Pull quote ---------- */
.quote { font: italic 400 var(--t-h3) / 1.3 var(--serif); margin: 0; text-wrap: balance; }
.quote cite { display: block; margin-top: var(--space-md); font: 400 var(--t-small) / 1.4 var(--sans); font-style: normal; color: var(--ink-3); }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: var(--on-night-2); padding-block: var(--space-4xl) var(--space-2xl); }
.site-footer .wordmark { color: var(--on-night); }
.footer-grid { display: grid; gap: var(--space-2xl); grid-template-columns: 1.4fr repeat(3, 1fr); }
.footer-grid h2 { margin: 0 0 var(--space-md); font: 600 0.8125rem/1.3 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-night); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-xs); }
.footer-grid a { text-decoration: none; color: var(--on-night-2); }
.footer-grid a:hover { color: var(--on-night); }
.footer-note { margin-top: var(--space-3xl); padding-top: var(--space-lg); border-top: 1px solid color-mix(in oklch, var(--on-night) 15%, transparent); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-md); font-size: var(--t-small); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Utility ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--gutter); top: -60px; background: var(--ink); color: var(--paper); padding: 10px 14px; z-index: 50; }
.skip:focus { top: 12px; }
