:root {
  --ink: #07120f;
  --forest-deep: #0b1c17;
  --forest: #17372e;
  --pine: #234b3f;
  --sage: #86a79a;
  --mist: #c9d4c9;
  --paper: #f3ead4;
  --cream: #fff4d8;
  --sun: #f6ce83;
  --ember: #df7b3b;
  --fur: #9d5c35;
  --line: rgba(243, 234, 212, 0.22);
  --font-display: "Bitter", Georgia, serif;
  --font-body: "Manrope", "Helvetica Neue", sans-serif;
  --page: min(1180px, calc(100vw - 3rem));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-height: 78px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  overflow-x: clip;
  background: var(--forest-deep);
  color-scheme: dark;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  color: var(--paper);
  background:
    radial-gradient(circle at 80% 8%, rgba(128, 166, 151, 0.18), transparent 26rem),
    var(--forest-deep);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-underline-position: from-font; text-decoration-thickness: from-font; }

button, a { -webkit-tap-highlight-color: transparent; }

button { font: inherit; }

h1, h2, h3, p { margin-top: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.045em;
  line-height: 1.02;
  text-wrap: balance;
}

h1 { font-size: clamp(3.2rem, 7.2vw, 7.4rem); }
h2 { font-size: clamp(2.7rem, 5.7vw, 5.7rem); }
h3 { font-size: clamp(2.25rem, 4vw, 4.4rem); }

em { color: var(--sun); font-weight: 600; }

::selection { color: var(--ink); background: var(--sun); }

:focus-visible { outline: 3px solid var(--sun); outline-offset: 4px; }

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

.skip-link {
  position: fixed;
  inset-block-start: 0.75rem;
  inset-inline-start: 50%;
  z-index: 100;
  padding: 0.8rem 1rem;
  color: var(--ink);
  background: var(--sun);
  border-radius: 999px;
  transform: translate(-50%, -160%);
  transition: transform 180ms var(--ease);
}

.skip-link:focus { transform: translate(-50%, 0); }

#forest-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.7;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

@media (max-width: 700px) {
  :root { --page: min(100% - 2rem, 1180px); --header-height: 68px; }
  body { font-size: 0.96rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  #forest-canvas { display: none; }
}
