/* base.css: reset, design tokens, typography */

:root {
  /* Blackletter for headings; small labels use small capitals, which stay
     legible at sizes where blackletter doesn't. */
  --font-display: "Grenze Gotisch", Georgia, serif;
  --font-label: "Alegreya SC", Georgia, serif;
  --font-body: "Texturina", Georgia, serif;
  --font-hand: "Texturina", Georgia, serif;

  --ink: #f3ead8;
  --ink-muted: color-mix(in srgb, var(--ink) 72%, transparent);
  --night: #07060f;
  --accent: #c9a050;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --gutter: clamp(1rem, 4vw, 3rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}

body {
  background: var(--night);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  text-wrap: balance;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

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

/* Hidden visually, still read by assistive tech. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: var(--space-1);
  left: var(--space-1);
  z-index: 100;
  padding: var(--space-1) var(--space-2);
  background: var(--accent);
  color: var(--night);
  font-weight: 600;
  translate: 0 -200%;
}

.skip-link:focus {
  translate: 0 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
  }
}
