:root {
  --bg: #f5f1e8;
  --surface: #ece6d9;
  --ink: #1d1b18;
  --muted: #6b655b;
  --line: #d9d2c3;
  --accent: #a4532b;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 56px);
  --measure: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151412;
    --surface: #1e1c19;
    --ink: #ece7dc;
    --muted: #9c958a;
    --line: #2f2c27;
    --accent: #d98a5f;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

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

::selection {
  background: var(--accent);
  color: var(--bg);
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.01em;
}

.brand svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.nav {
  display: flex;
  gap: clamp(18px, 3vw, 34px);
  font-size: 15px;
  color: var(--muted);
}

.nav a { transition: color 0.2s ease; }
.nav a:hover { color: var(--ink); }

/* Hero */

.hero {
  padding-top: clamp(72px, 16vh, 168px);
  padding-bottom: clamp(80px, 16vh, 168px);
}

.eyebrow {
  margin: 0 0 22px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(44px, 8.4vw, 104px);
  line-height: 1.02;
  letter-spacing: -0.022em;
  max-width: 11em;
}

h1 em {
  font-style: italic;
  color: var(--accent);
}

.lede {
  margin: 34px 0 0;
  max-width: 34em;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.55;
  color: var(--muted);
}

/* Sections */

.section {
  border-top: 1px solid var(--line);
  padding-top: clamp(56px, 9vw, 104px);
  padding-bottom: clamp(56px, 9vw, 104px);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr);
  gap: clamp(24px, 5vw, 72px);
}

.label {
  margin: 6px 0 0;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Definition */

.definition h2 {
  font-size: clamp(34px, 5vw, 56px);
  font-style: italic;
  line-height: 1.1;
}

.pron {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.definition .meaning {
  margin: 26px 0 0;
  max-width: 30em;
  font-family: var(--serif);
  font-size: clamp(21px, 2.5vw, 27px);
  line-height: 1.42;
}

.definition .note {
  margin: 22px 0 0;
  max-width: 36em;
  color: var(--muted);
}

/* Principles */

.principles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px);
}

.principles .num {
  display: block;
  margin-bottom: 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--accent);
}

.principles h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
}

.principles p {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}

/* Now + contact */

.statement {
  margin: 0;
  max-width: 24em;
  font-family: var(--serif);
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.3;
  text-wrap: balance;
}

.statement + p {
  margin: 20px 0 0;
  max-width: 34em;
  color: var(--muted);
}

.mail {
  display: inline-block;
  margin-top: 26px;
  font-family: var(--serif);
  font-size: clamp(24px, 3.6vw, 40px);
  line-height: 1.2;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: border-color 0.2s ease, color 0.2s ease;
  overflow-wrap: anywhere;
}

.mail:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  padding-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 14px;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  gap: 24px;
}

.site-footer a:hover { color: var(--ink); }

/* Plain document pages (privacy) */

.doc {
  padding-top: clamp(48px, 9vh, 96px);
  padding-bottom: clamp(64px, 10vh, 120px);
  max-width: 680px;
}

.doc h1 {
  font-size: clamp(38px, 6vw, 60px);
  line-height: 1.08;
}

.doc .updated {
  margin: 16px 0 44px;
  font-size: 15px;
  color: var(--muted);
}

.doc h2 {
  margin: 40px 0 10px;
  font-size: 25px;
  line-height: 1.25;
}

.doc p { margin: 0 0 16px; }

.doc a {
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.doc a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Entrance */

@media (prefers-reduced-motion: no-preference) {
  .rise {
    opacity: 0;
    transform: translateY(14px);
    animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  }
  .rise.d1 { animation-delay: 0.12s; }
  .rise.d2 { animation-delay: 0.26s; }

  @keyframes rise {
    to {
      opacity: 1;
      transform: none;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Small screens */

@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; gap: 20px; }
  .principles { grid-template-columns: 1fr; }
  .label { margin-top: 0; }
}

@media (max-width: 420px) {
  .nav a.optional { display: none; }
}
