@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --ink: #12303c;
  --cool: #4a7c8c;
  --paper: #f6f1e8;
  --paper-2: #ede4d6;
  --clay: #c96f4a;
  --rust: #b4472b;
  --rule: rgb(18 48 60 / 12%);
  --rule-strong: rgb(18 48 60 / 32%);
  --on-dark: #f6f1e8;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Space Grotesk", Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: 2rem;
  --step-4: 3rem;
  --step-5: clamp(3.2rem, 5vw, 4.5rem);
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4.5rem;
  --space-8: 7rem;
  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --container: 86rem;
  --hairline: 1px solid var(--rule);
  --motion-fast: 120ms;
  --motion-resolve: 900ms;
  --ease-mechanical: cubic-bezier(0.65, 0, 0.35, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2eadf;
    --paper: #0e2029;
    --paper-2: #162d36;
    --cool: #80aeb9;
    --clay: #db8763;
    --rust: #d96848;
    --rule: rgb(242 234 223 / 17%);
    --rule-strong: rgb(242 234 223 / 38%);
    --on-dark: #f6f1e8;
  }
}

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

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 20rem;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }

a { color: inherit; }

button, input, textarea, select {
  color: inherit;
  font: inherit;
}

button { cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--clay);
  outline-offset: 4px;
}

::selection { background: var(--clay); color: #fff; }

.shell {
  width: min(100%, var(--container));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.measure { max-width: 68ch; }

.display, h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 120, "SOFT" 40, "WONK" 1;
  font-weight: 520;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

h1 { font-size: var(--step-5); }
h2 { font-size: clamp(2.35rem, 4vw, var(--step-4)); }
h3 { font-size: var(--step-3); }

p { margin-block: 0; }

.small-caps {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.15em;
  line-height: 1.2;
  text-transform: uppercase;
}

.text-link {
  display: inline;
  padding-block: 0.2rem;
  text-decoration-line: underline;
  text-decoration-color: var(--clay);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
  transition: text-decoration-thickness var(--motion-fast) linear;
}

.text-link:hover { text-decoration-thickness: 4px; }

.button {
  display: inline-flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.25rem;
  border: 1px solid var(--rust);
  border-radius: 0;
  background: var(--rust);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.button:hover { background: var(--ink); border-color: var(--ink); }

.section-rule {
  height: 3px;
  margin-bottom: var(--space-5);
  overflow: hidden;
  background: var(--rule);
}

.section-rule::after {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--cool), var(--clay));
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 700ms var(--ease-mechanical);
}

.section-rule.is-visible::after { transform: scaleX(1); }

.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;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
  .section-rule::after { transform: scaleX(1); }
}

@media (max-width: 48rem) {
  :root {
    --gutter: 1.25rem;
    --space-7: 3.5rem;
    --space-8: 5rem;
  }
  h1 { font-size: clamp(2rem, 11vw, 3.2rem); }
  h2 { font-size: clamp(2rem, 9vw, 2.75rem); }
  body { font-size: 1.0625rem; }
}
