@font-face {
  font-family: 'Newsreader';
  src: url('/assets/fonts/newsreader.woff2') format('woff2');
  font-weight: 300 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist';
  src: url('/assets/fonts/geist.woff2') format('woff2');
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f4f2ec;
  --sand: #c8c1b1;
  --ink: #171612;
  --ink-hover: #33312b;
  --muted: #6b675e;
  --hairline: #d9d5ca;
  --rule: #8a857a;
  --error: #9b2b1e;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Geist', system-ui, sans-serif;
  --curve: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: 24px;
  --bar: 80px;
  color-scheme: light;
}

@media (min-width: 768px) {
  :root {
    --gutter: 48px;
  }
}

@media (min-width: 1200px) {
  :root {
    --gutter: 64px;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

h1,
h2,
p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

.bar,
.hero,
.passage,
.examples,
.interest,
.lost-page {
  width: min(100% - 2 * var(--gutter), 1376px);
  margin-inline: auto;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--bar);
}

.wordmark {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 32px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

a.wordmark {
  transition: color 150ms var(--curve);
}

a.wordmark:hover {
  color: var(--muted);
}

.link {
  font-size: 14px;
  line-height: 20px;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: transparent;
  transition: text-decoration-color 150ms var(--curve);
}

.link:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.hero {
  position: relative;
  display: grid;
  align-items: end;
  justify-items: start;
  min-height: calc(100svh - var(--bar));
  padding-block: 64px;
}

.headline {
  grid-area: 1 / 1;
  font-family: var(--serif);
  font-size: clamp(3rem, 9vw, 8.5rem);
  line-height: 1;
  font-weight: 300;
  letter-spacing: -0.03em;
}

.headline span {
  display: block;
}

.headline-quiet {
  color: var(--muted);
  text-wrap: balance;
  animation: settle 900ms var(--curve) both;
}

.headline-name {
  white-space: nowrap;
  animation: settle 900ms var(--curve) 400ms both;
}

.headline-name a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: max(1px, 0.02em);
  text-underline-offset: 0.1em;
  text-decoration-color: transparent;
  transition: text-decoration-color 150ms var(--curve);
}

.headline-name a:hover,
.hero:has(.headline-name a:hover) .headline-lit a {
  text-decoration-color: currentColor;
}

.scene {
  position: absolute;
  top: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
}

.scene canvas {
  display: block;
  image-rendering: pixelated;
}

.headline-lit {
  position: relative;
  color: var(--paper);
  pointer-events: none;
  user-select: none;
}

.headline-lit span {
  animation: none;
}

.headline-lit .headline-quiet {
  color: var(--sand);
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.passage {
  padding-block: 96px;
  font-family: var(--serif);
  font-size: clamp(22px, 20px + 0.4vw, 26px);
  line-height: 1.45;
  font-weight: 400;
  letter-spacing: -0.005em;
}

.passage p {
  max-width: 46ch;
  text-wrap: pretty;
}

.passage p + p {
  margin-top: 1em;
}

.interest {
  border-top: 1px solid var(--hairline);
  padding-block: 64px 96px;
}

.example {
  border-top: 1px solid var(--hairline);
  padding-block: 48px;
}

.example h2,
.interest h2 {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 36px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.example p {
  max-width: 46ch;
  color: var(--muted);
  text-wrap: pretty;
}

.example header p {
  margin-top: 4px;
  font-size: 14px;
  line-height: 20px;
}

.example blockquote {
  max-width: 46ch;
  margin: 24px 0 12px;
  font-family: var(--serif);
  font-size: clamp(22px, 20px + 0.4vw, 26px);
  line-height: 1.3;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.interest h2 {
  margin-bottom: 48px;
}

.form {
  display: grid;
  gap: 32px;
  max-width: 32rem;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 14px;
  line-height: 20px;
}

.optional {
  margin-left: 8px;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  margin: 0;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 24px;
  transition: border-color 150ms var(--curve);
}

.field textarea {
  resize: none;
  field-sizing: content;
  min-height: 96px;
}

.field input:hover,
.field textarea:hover,
.field input:focus,
.field textarea:focus {
  border-bottom-color: var(--ink);
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline-color: transparent;
  outline-offset: 0;
  box-shadow: 0 1px 0 var(--ink);
}

.field [aria-invalid='true'] {
  border-bottom-color: var(--error);
}

.field [aria-invalid='true']:focus-visible {
  box-shadow: 0 1px 0 var(--error);
}

.field-error,
.failed {
  font-size: 14px;
  line-height: 20px;
  color: var(--error);
}

.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.actions {
  display: grid;
  justify-items: start;
  gap: 16px;
  padding-top: 8px;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 4px;
  padding: 12px 24px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 150ms var(--curve),
    opacity 150ms var(--curve),
    transform 150ms var(--curve);
}

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

.button:active {
  transform: translateY(1px);
}

[data-state='sending'] .button,
.button:disabled {
  opacity: 0.55;
  cursor: progress;
  transform: none;
}

.done:focus {
  outline: none;
}

.done {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 36px;
  letter-spacing: -0.01em;
}

.foot {
  border-top: 1px solid var(--hairline);
}

.foot .wordmark {
  font-size: 20px;
  line-height: 28px;
}

.link-back {
  font-size: 16px;
  line-height: 24px;
  text-decoration-color: var(--rule);
}

.lost {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  line-height: 1.05;
  font-weight: 300;
  letter-spacing: -0.025em;
}

.lost-page {
  display: grid;
  align-content: end;
  justify-items: start;
  gap: 32px;
  min-height: calc(100svh - 2 * var(--bar));
  padding-block: 64px;
}

.legal {
  width: min(100% - 2 * var(--gutter), 1376px);
  margin-inline: auto;
  padding-block: 64px 96px;
}

.legal > * {
  max-width: 40rem;
}

.legal h1 {
  margin-bottom: 16px;
  font-family: var(--serif);
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  line-height: 1.05;
  font-weight: 300;
  letter-spacing: -0.025em;
}

.legal h2 {
  margin-top: 48px;
  font-family: var(--serif);
  font-size: 28px;
  line-height: 36px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.legal p,
.legal ul {
  margin: 16px 0 0;
  text-wrap: pretty;
}

.legal ul {
  padding-left: 20px;
}

.legal li + li {
  margin-top: 8px;
}

.legal-date {
  color: var(--muted);
}

.legal .link {
  font-size: inherit;
  line-height: inherit;
  text-decoration-color: var(--rule);
}

@media (min-width: 960px) {
  .hero {
    padding-block: 96px;
  }

  .passage,
  .example,
  .interest {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 32px;
  }

  .example header {
    grid-column: 1 / 7;
  }

  .example-says {
    grid-column: 7 / -1;
  }

  .example blockquote {
    margin-top: 0;
  }

  .passage p {
    grid-column: 7 / -1;
  }

  .interest h2 {
    grid-column: 1 / 7;
    margin-bottom: 0;
  }

  .interest-body {
    grid-column: 7 / -1;
  }

  .form {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
