@property --reveal {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}

:root {
  --bg: #000;
  --fg: #fff;
  --muted: #8a8a8a;
  --line: #3a3a3a;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 68ch;
  margin: 0 auto;
  padding: 96px 20px 120px;
}

header {
  text-align: center;
  margin-bottom: 88px;
}

h1 {
  margin: 0 0 24px;
  font-size: clamp(28px, 6vw, 44px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.intro {
  margin: 0;
  color: var(--muted);
  text-wrap: pretty;
}

section {
  margin-bottom: 64px;
}

h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

p {
  margin: 0 0 16px;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
  a:hover {
    text-decoration-color: var(--fg);
  }
}

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 96px;
  padding: 0;
  list-style: none;
}

.socials a {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms var(--ease-out);
}

.socials a:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .socials a:hover {
    border-color: var(--fg);
    background: #111;
  }
}

/* Children of a block wipe in top to bottom behind a soft gradient edge once the block enters view. */
.js .reveal > * {
  --reveal: 0%;
  opacity: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(var(--reveal) - 40%), transparent var(--reveal));
  mask-image: linear-gradient(to bottom, #000 calc(var(--reveal) - 40%), transparent var(--reveal));
}

.js .reveal.in > * {
  animation: reveal 1100ms var(--ease-out) both;
}

.js .reveal.in > :nth-child(2) { animation-delay: 120ms; }
.js .reveal.in > :nth-child(3) { animation-delay: 240ms; }
.js .reveal.in > :nth-child(n + 4) { animation-delay: 360ms; }

.js main {
  animation: intro 1600ms var(--ease-out) both;
}

:root {
  --intro-from: 48px;
}

[data-intro="down"] {
  --intro-from: -48px;
}

.js .reveal.shown > * {
  opacity: 1;
  -webkit-mask-image: none;
  mask-image: none;
}

@keyframes intro {
  from {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(var(--intro-from));
  }
}

@keyframes reveal {
  from {
    --reveal: 0%;
    opacity: 0;
    filter: blur(6px);
    transform: translateY(16px);
  }
  to {
    --reveal: 140%;
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal > * {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .js main,
  .js .reveal.in > * {
    animation-name: fade;
    animation-duration: 400ms;
  }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
