:root {
  --bg: #f2ece2;
  --fg: #201a16;
  --muted: #51463f;
  --line: rgba(30, 24, 20, 0.16);
  --font-size: calc(max(min(14px + 0.75vw, 50px), 14.5px + 0.75vw));
  --line-height: 1.5;
  --max-width: calc(min(100vw - 60px, 2000px, 145px + 50vw));
  --margin: calc((100vw - var(--max-width)) / 2);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Newsreader", Georgia, serif;
  background: var(--bg);
  color: var(--fg);
  line-height: var(--line-height);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga" 1, "kern" 1;
  font-kerning: normal;
  font-size: var(--font-size);
  transition: background-color 800ms ease, color 500ms ease;
  overflow-x: hidden;
}

h1,
h2,
.kicker,
blockquote {
  font-family: "Fraunces", "Times New Roman", serif;
  letter-spacing: -0.01em;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.05), transparent 42%),
    radial-gradient(circle at 70% 40%, rgba(0, 0, 0, 0.05), transparent 40%);
  opacity: 0.55;
  mix-blend-mode: multiply;
}

main,
header {
  width: 100%;
}

.section {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: clamp(1.3rem, 3.2vh, 2.8rem);
  padding-block: clamp(4rem, 10vh, 7.5rem);
  padding-inline: 0;
}

.section > :is(.kicker, h1, h2, h3, p, ul, .lead, .email-form) {
  text-align: left;
}

.hero {
  min-height: 100vh;
  padding-top: clamp(5rem, 15vh, 10rem);
}

.kicker {
  margin: 0;
  margin-inline: var(--margin);
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

h1 {
  margin: 0;
  margin-inline: var(--margin);
  font-weight: 400;
  line-height: 1.02;
  font-size: clamp(2.2rem, 6.3vw, 5rem);
}

.lead {
  margin: 0;
  margin-inline: var(--margin);
  color: var(--muted);
}

p,
li {
  margin: 0;
}

h2 {
  margin: 0;
  margin-inline: var(--margin);
  font-size: clamp(1.9rem, 4.1vw, 3.2rem);
  font-weight: 400;
  line-height: 1.05;
}

ul {
  margin: 0;
  margin-inline: var(--margin);
  padding-left: 1.25em;
  display: grid;
  gap: 0.5em;
}

p,
blockquote,
.email-form {
  margin-inline: var(--margin);
}

.pull-quote {
  width: 100%;
  padding-inline: 0;
}

blockquote {
  margin: 0;
  font-size: clamp(1.9rem, 4.7vw, 4.1rem);
  line-height: 1.06;
  font-weight: 400;
  max-width: none;
}

.pull-quote blockquote {
  width: auto;
  margin-inline: var(--margin);
  padding-inline: 0;
}

.pull-quote > blockquote {
  width: auto;
}

.outro {
  padding-bottom: min(14vh, 7rem);
}

.email-form {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  flex-wrap: wrap;
}

.email-form input {
  font: inherit;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.58em 0.92em;
  min-width: min(100%, 16.5rem);
  transition: border-color 220ms ease, background-color 220ms ease;
}

.email-form input::placeholder {
  color: var(--muted);
}

.email-form input:focus-visible {
  outline: none;
  border-color: var(--fg);
  background: color-mix(in srgb, var(--bg) 86%, var(--fg) 14%);
}

.email-form button {
  font: inherit;
  color: var(--bg);
  background: var(--fg);
  border: 1px solid var(--fg);
  border-radius: 999px;
  padding: 0.58em 1em;
  cursor: pointer;
  transition: transform 200ms ease, opacity 200ms ease;
}

.email-form button:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.email-form button:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

.form-status {
  margin-top: 0.55rem;
  min-height: 1.4em;
  color: var(--muted);
}

.trap-field {
  position: absolute;
  left: -9999px;
}

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

.progress {
  position: fixed;
  right: clamp(12px, 2vw, 26px);
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 0.65rem;
  z-index: 10;
}

.progress button {
  width: 7px;
  height: 42px;
  border: 0;
  background: var(--line);
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 280ms ease, transform 280ms ease;
}

.progress button:hover {
  transform: scaleX(1.35);
}

.progress button[aria-current="true"] {
  background: var(--fg);
}

body[data-theme="paper"] {
  --bg: #f2ece2;
  --fg: #201a16;
  --muted: #5e5249;
  --line: rgba(20, 16, 14, 0.24);
}

body[data-theme="clay"] {
  --bg: #d7c4af;
  --fg: #22160f;
  --muted: #5a4338;
  --line: rgba(20, 12, 8, 0.22);
}

body[data-theme="ink"] {
  --bg: #1d2329;
  --fg: #f5f0e8;
  --muted: #ccc2b5;
  --line: rgba(245, 240, 232, 0.28);
}

body[data-theme="sand"] {
  --bg: #c9b08f;
  --fg: #1e140d;
  --muted: #4b3729;
  --line: rgba(26, 16, 8, 0.24);
}

body[data-theme="ember"] {
  --bg: #9b6b54;
  --fg: #f7f1e8;
  --muted: #f0dfcb;
  --line: rgba(250, 241, 232, 0.34);
}

body[data-theme="night"] {
  --bg: #111417;
  --fg: #f4ede4;
  --muted: #d8c9b9;
  --line: rgba(244, 237, 228, 0.34);
}

@media (max-width: 900px) {
  :root {
    --margin: 20px;
  }

  body {
    font-size: clamp(19px, 5.1vw, 26px);
    line-height: 1.5;
  }

  .section {
    min-height: 78vh;
  }

  blockquote {
    font-size: clamp(1.85rem, 9vw, 3rem);
  }

  .progress {
    right: 10px;
  }

  .progress button {
    height: 28px;
    width: 6px;
  }

  .email-form {
    width: 100%;
  }

  .email-form input {
    width: 100%;
    min-width: 0;
  }
}
