/* Fonts */

@font-face {
  font-family: 'Manrope';
  src: url('fonts/manrope-200.woff2') format('woff2');
  font-weight: 200;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('fonts/manrope-300.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('fonts/manrope-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('fonts/manrope-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('fonts/manrope-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('fonts/manrope-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('fonts/manrope-800.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}

/* Design tokens */

:root {
  --bg:    #faf8f3;
  --fg:    #1a1a18;
  --muted: #6e6b63;
  --line:  rgba(26, 26, 24, 0.14);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:    #0e0e0c;
    --fg:    #ece8df;
    --muted: #8a877e;
    --line:  rgba(236, 232, 223, 0.16);
  }
}

/* Reset */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Layout */

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Manrope', system-ui, sans-serif;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 1.5rem;
}

main > div {
  max-width: 52ch;
}

main p {
  font-size: 1.125rem;
  text-wrap: pretty;
  opacity: 0;
  animation: rise 1.1s 0.1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

main p + p {
  margin-top: 1.4em;
}

footer {
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  opacity: 0;
  animation: rise 1.1s 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Family hero variant */

body.family main {
  text-align: center;
}

body.family main > div {
  max-width: 36ch;
}

body.family main p {
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  line-height: 1.4;
  letter-spacing: -0.005em;
}

/* Links */

a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 220ms ease;
}

a:hover,
a:focus-visible {
  text-decoration-color: var(--fg);
}

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

/* Motion */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  main p,
  footer {
    animation: none;
    opacity: 1;
  }
}
