@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #f3efe6;
  --ink: #15171b;
  --muted: #5b616b;
  --accent: #bf3f14;

  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: clamp(20px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1114;
    --ink: #ece8df;
    --muted: #a1a6ae;
    --accent: #ff7a4d;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

/* The single screen: art, name, descriptor, stacked in the centre. */

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
  text-align: center;
}

.art {
  width: min(50vh, 78vw, 500px);
  width: min(50svh, 78vw, 500px);
  aspect-ratio: 1;
}
.whirl { display: block; width: 100%; height: 100%; }

.wordmark {
  margin: clamp(4px, 1.5vh, 16px) 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(4rem, 11vw, 8rem);
  line-height: 1;
  letter-spacing: -0.015em;
  animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both;
}

.descriptor {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: clamp(0.68rem, 1.6vw, 0.8rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s both;
}
.descriptor::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

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

/* Footer */

.foot {
  display: flex;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
  padding: 22px var(--gutter);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}
.foot a { text-decoration: none; transition: color 0.15s ease; }
.foot a:hover { color: var(--accent); }

/* 404 */

.notfound .wordmark { font-size: clamp(3.2rem, 9vw, 6rem); }
.notfound .descriptor a { text-decoration: none; }
.notfound .descriptor a:hover { color: var(--accent); }

@media (max-width: 520px) {
  .descriptor { letter-spacing: 0.14em; }
  .foot { justify-content: center; }
}

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