:root {
  --edge: #DFE1DD;
  --paper: #ECEDEA;
  --glow: #F7F7F4;
  --ink: #0C1B2B;
  --tide: #5E6B7E;
  /* streamline colour, as r, g, b (read by air.js) */
  --air: 12, 27, 43;
}

html, body { margin: 0; height: 100%; }

body {
  background: radial-gradient(110% 85% at 50% 44%, var(--glow) 0%, var(--paper) 52%, var(--edge) 100%);
  background-color: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.air {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  animation: rise 4s ease 1.2s forwards;
}

main {
  position: relative;
  min-height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: clamp(1.25rem, 2.6vh, 1.9rem);
  padding: 1.5rem;
  box-sizing: border-box;
  /* sit slightly above the true centre, where the eye expects it */
  padding-bottom: 6vh;
}

h1 { margin: 0; line-height: 0; }

.logo {
  display: block;
  width: clamp(9rem, 18vw, 18rem);
  height: auto;
  overflow: visible;
}

.tagline {
  margin: 0;
  color: var(--tide);
  line-height: 0;
}
.tagline svg { display: block; height: clamp(0.8rem, 1vw, 0.95rem); width: auto; max-width: 80vw; }

.visually_hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Arrival: the gust draws itself and curls, the line of air follows, the name settles in */
.logo .gust, .logo .under {
  /* the gap is longer than the path, so the round cap of the empty dash stays off the path */
  stroke-dasharray: 1 1.2;
  animation: draw 1.7s cubic-bezier(.35, .1, .15, 1) 0.25s both;
}
.logo .under { animation-duration: 1.2s; animation-delay: 0.7s; }
.logo .word { animation: settle 1.4s cubic-bezier(.2, .7, .2, 1) 1s both; }
.tagline { animation: rise 1.6s ease 2s both; }

@keyframes draw {
  from { stroke-dashoffset: 1.1; }
  to { stroke-dashoffset: 0; }
}
@keyframes settle {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: none; }
}
@keyframes rise {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-aspect-ratio: 3/4) {
  .logo { width: 46vw; }
}

@media (prefers-reduced-motion: reduce) {
  .air, .logo .gust, .logo .under, .logo .word, .tagline { animation: none; opacity: 1; }
  .logo .gust, .logo .under { stroke-dasharray: none; }
}

/* 404 */
.lost .logo { width: clamp(9rem, 18vw, 14rem); }
.lost .logo .gust, .lost .logo .under, .lost .logo .word { animation: none; stroke-dasharray: none; }
.home { display: block; line-height: 0; color: inherit; border-radius: 4px; }
.message { margin: 0; color: var(--tide); }
.message a { color: var(--ink); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }
