/* Tokens, type and shared pieces for the paper direction. Used by index.html and brand.html. */
:root {
  --paper: #fbf6ea;
  --paper-2: #f2e9d6;
  --ink: #1d3a32;
  --ink-2: #45594f;
  --foil: #a07a32;
  --wax: #8e2c35;

  --display: "Libre Caslon Display", "Libre Caslon Text", Georgia, serif;
  --text: "Libre Caslon Text", Georgia, serif;
  --fibre: url("../img/paper.webp");

  --ease-out: cubic-bezier(0.22, 0.8, 0.24, 1);
  --ease-in-out: cubic-bezier(0.6, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.3, 1.45, 0.45, 1);

  /* One scale for space, so sections keep the same rhythm. */
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --gap-5: clamp(2.75rem, 6vw, 4.5rem);
  --section: clamp(4.5rem, 10vw, 8.5rem);

  /* Type sizes. Body copy never goes below --small. */
  --small: 0.94rem;
  --body: 1.0625rem;
  --lead: clamp(1.12rem, 1.02rem + 0.45vw, 1.3rem);
}

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

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

body {
  margin: 0;
  background: #0a1814;
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  hanging-punctuation: first;
}

h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }

h1, h2 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.014em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 1.2rem + 4.8vw, 5.2rem); }
h2 { font-size: clamp(2.15rem, 1.3rem + 3.4vw, 4rem); }
h3 { font-family: var(--display); font-weight: 400; font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); line-height: 1.12; letter-spacing: -0.008em; }
p { text-wrap: pretty; }
em, .it { font-style: italic; }

.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }

/* The discount code is written once, in index.html, as the custom property --code. */
.code::after { content: var(--code); }
.code { letter-spacing: 0.08em; white-space: nowrap; }

/* The wordmark: Caslon italic, with the apostrophe pressed in sealing wax. */
.wordmark {
  font-family: var(--text); font-style: italic; font-size: 1.28rem; line-height: 1;
  letter-spacing: 0.005em; text-decoration: none; white-space: nowrap; color: var(--ink);
}
.wordmark .wax { color: var(--wax); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 3.25rem; padding: 0.7rem 1.7rem;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ink); color: var(--paper);
  font-family: var(--text); font-size: var(--body); line-height: 1.1; text-decoration: none; white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 10px 24px -12px rgba(29, 58, 50, 0.75);
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out), background 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 16px 28px -12px rgba(29, 58, 50, 0.8); transition-duration: 0s; }
.btn:active { transform: translateY(0) scale(0.975); }

.link { text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
.link:hover { text-decoration-thickness: 2px; }

.text-btn {
  border: 0; background: none; padding: 0.4rem 0.2rem; cursor: pointer; font-style: italic; font-size: var(--small);
  text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 1px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; transition-delay: 0s !important;
  }
}
