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

@font-face {
  font-family: "Hanken Grotesk";
  src: url("/assets/fonts/hanken-grotesk.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #F3F0E8;
  --ink: #14211F;
  --kelp: #2E4A3F;
  --tide: #4F6B70;
  --anemone: #A24B2E;
  --mist: #5C6762;
  --line: #D9D3C5;
  color-scheme: light;

  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F1716;
    --ink: #E9E5DB;
    --kelp: #9DBFAE;
    --tide: #9DB6BA;
    --anemone: #E08A6A;
    --mist: #8F9A95;
    --line: #24302E;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #0F1716;
  --ink: #E9E5DB;
  --kelp: #9DBFAE;
  --tide: #9DB6BA;
  --anemone: #E08A6A;
  --mist: #8F9A95;
  --line: #24302E;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

h1 {
  margin: 0 auto;
  max-width: 14em;
  text-wrap: balance;
  color: var(--kelp);
  font-family: var(--display);
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

p {
  max-width: 52ch;
  margin: 1.5rem auto 0;
  text-wrap: balance;
}

/* Temporary. Remove this and the line in index.html when the site is final. */
.notice {
  position: absolute;
  top: 1rem;
  left: 0;
  right: 0;
  max-width: none;
  margin: 0;
  padding-inline: 1rem;
  color: var(--mist);
  font-size: 0.8125rem;
  text-align: center;
  letter-spacing: 0.04em;
}

.invitation {
  margin-top: 2rem;
  color: var(--mist);
  font-family: var(--display);
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.3;
}

a {
  color: var(--kelp);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: var(--tide);
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 20;
  padding: 0.5rem 0.75rem;
  background: var(--paper);
}

.skip-link:focus {
  top: 0.75rem;
}

/* One screen: the content centers in the viewport, and a very short window
   scrolls rather than cutting anything off. */
.page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
  min-height: 100vh;
  min-height: 100dvh;
  margin-inline: auto;
  padding: 3.5rem 1rem 2rem;
  text-align: center;
}

main {
  margin-top: 3.5rem;
}

.lockup {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3em;
  color: var(--kelp);
  font-family: var(--display);
  font-size: clamp(2.75rem, 5vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-decoration: none;
}

/* The ray spans the wordmark's full height: its head meets the top of the d,
   its body sits on the baseline, and its tail drops as far as the p. */
.lockup svg {
  flex: none;
  width: 1.062em;
  height: 0.965em;
  position: relative;
  top: 0.242em;
}

.lockup .tail {
  fill: var(--anemone);
}

@media (min-width: 640px) {
  .page {
    padding-inline: 2rem;
  }
}

@media (min-width: 960px) {
  body {
    font-size: 1.125rem;
  }
}
