:root {
  --paper: #fff;
  --ink: #16140f;
  --text: #2a2a2a;
  --muted: #8a8780;
  --rule: #e6e4de;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav-height: 7rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-snap-type: y proximity;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Home */

.home {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.5rem var(--nav-height);
  scroll-snap-align: start;
}

.slogan {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-align: center;
  text-wrap: balance;
}

/* Home link, pinned to the top once you leave the first screen */

.home-link {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 1.25rem 1.5rem 2.25rem;
  font-family: var(--serif);
  font-size: 1.125rem;
  color: var(--muted);
  background: linear-gradient(to bottom, var(--paper) 55%, rgb(255 255 255 / 0));
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.scrolled .home-link {
  opacity: 1;
  visibility: visible;
}

.home-link img {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
}

.home-link:hover {
  color: var(--ink);
}

/* Sections: each fills at least one screen */

.page {
  max-width: calc(35rem + 3rem);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 6.5rem 1.5rem calc(var(--nav-height) + 2rem);
  scroll-snap-align: start;
}

.page h2 {
  margin: 0 0 2.5rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.25rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}

.page h3 {
  margin: 0 0 0.75rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.4;
  color: var(--muted);
}

p {
  margin: 0 0 0.9rem;
}

.block {
  margin-top: 2.5rem;
}

hr {
  margin: 3rem 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

footer {
  margin-top: 4rem;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Nav, pinned to the bottom of the screen */

.nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 3rem 1.5rem 2.25rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--ink);
  background: linear-gradient(to top, var(--paper) 55%, rgb(255 255 255 / 0));
  z-index: 1;
  pointer-events: none;
}

.nav a {
  padding-bottom: 0.25rem;
  border-bottom: 1px solid transparent;
  pointer-events: auto;
}

.nav a:hover,
.nav a[aria-current] {
  color: var(--muted);
}

.nav a[aria-current] {
  border-bottom-color: var(--ink);
}

/* Motion */

@media (prefers-reduced-motion: no-preference) {
  .slogan {
    animation: rise 0.6s ease-out both;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
  }
}

@media (max-width: 600px) {
  .page h2 {
    font-size: 1.75rem;
  }

  .nav {
    gap: 2rem;
  }
}
