@font-face {
  font-family: 'Space Grotesk';
  src: url('../assets/fonts/SpaceGrotesk-Variable.ttf') format('truetype');
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('../assets/fonts/InstrumentSerif-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('../assets/fonts/InstrumentSerif-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #2b1206;
  --brown-deep: #4a1d0b;
  --brown: #6c2b11;
  --brown-warm: #8f3f1c;
  --clay: #b8622f;
  --peach-deep: #e3955d;
  --peach: #f2ad78;
  --peach-light: #f6c597;
  --cream: #fadcbc;
  --paper: #fff3e6;
  --card: #fffaf4;
  --cobalt-night: #00234f;
  --cobalt-deep: #003b80;
  --cobalt: #0057ba;
  --cobalt-bright: #2f7fd8;
  --sky: #8fc0f2;

  --font-sans: 'Space Grotesk', system-ui, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;

  --edge: 3px;
  --drop: 4px 4px 0 rgb(43 18 6 / 0.35);
  --safe-top: max(12px, env(safe-area-inset-top));
  --safe-bottom: max(14px, env(safe-area-inset-bottom));
  --safe-left: max(12px, env(safe-area-inset-left));
  --safe-right: max(12px, env(safe-area-inset-right));
  color-scheme: light;
}

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

/* Component display rules must never reveal an element the code has hidden. */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--cobalt-night);
  color: var(--brown);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img,
canvas,
svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
}

a {
  color: var(--cobalt);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--cobalt-bright);
  outline-offset: 3px;
}

.icon {
  width: 1.05em;
  height: 1.05em;
  flex: none;
  fill: currentColor;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Chunky pixel button with a hard shadow that presses in. */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 0.55em 1em;
  border: var(--edge) solid var(--ink);
  background: var(--peach);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: transform 80ms ease, box-shadow 80ms ease, background-color 120ms ease;
}

.button:hover {
  background: var(--peach-light);
}

.button:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--ink);
}

.button--ghost {
  background: var(--card);
}

.button--ghost:hover {
  background: var(--cream);
}

.button--quiet {
  background: transparent;
  box-shadow: none;
  border-style: dashed;
}

.button--quiet:active {
  transform: none;
}

.link {
  font-weight: 600;
}

.noscript {
  max-width: 640px;
  margin: 10vh auto;
  padding: 24px;
  background: var(--paper);
  border: 4px solid var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
