:root {
  color-scheme: light;
  --paper: #f3f1eb;
  --ink: #172238;
  --ink-soft: #667080;
  --line: #c9c9c2;
  --accent: #a3382b;
  --white: #ffffff;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  line-height: 24px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 10;
  padding: 8px 12px;
  border-radius: 4px;
  color: var(--white);
  background: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  transform: translateY(-80px);
  transition: transform 700ms var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.page-shell {
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 24px;
}

.site-footer {
  justify-self: center;
}

.hero {
  display: grid;
  align-items: center;
  padding: 48px 0;
}

.hero-copy {
  width: min(100%, 680px);
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-wrap: pretty;
}

h1 {
  max-width: 680px;
  margin: 0;
  color: var(--ink);
  font-size: 48px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.contact-link {
  display: inline-block;
  margin-top: 32px;
  border-radius: 4px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  text-decoration: none;
  text-decoration-line: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 8px;
  transition: color 700ms var(--ease), text-decoration-color 700ms var(--ease), transform 700ms var(--ease);
}

.contact-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
  transform: translateY(-2px);
}

.contact-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.contact-link:active {
  transform: scale(0.98);
}

.site-footer {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 16px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: enter 1000ms var(--ease) forwards;
}

.reveal-one {
  animation-delay: 80ms;
}

.reveal-two {
  animation-delay: 160ms;
}

.reveal-three {
  animation-delay: 240ms;
}

@keyframes enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.error-page {
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: 24px;
}

.error-copy {
  align-self: center;
  width: min(100%, 680px);
  margin: 0 auto;
}

.back-link {
  display: inline-block;
  margin-top: 32px;
  border-radius: 4px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  text-underline-offset: 4px;
  transition: color 700ms var(--ease), transform 700ms var(--ease);
}

.back-link:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.back-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.back-link:active {
  transform: scale(0.98);
}

@media (min-width: 640px) {
  .page-shell,
  .error-page {
    padding: 32px;
  }

  .hero {
    padding: 64px 0;
  }

  h1 {
    font-size: 60px;
  }
}

@media (min-width: 1024px) {
  .page-shell,
  .error-page {
    padding: 40px;
  }

  h1 {
    font-size: 72px;
  }
}

@media (max-height: 720px) {
  .hero {
    padding: 32px 0;
  }

  h1 {
    font-size: 48px;
  }
}

@media (max-width: 420px) and (max-height: 620px) {
  .page-shell {
    padding: 16px;
  }
}

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