:root {
  color-scheme: light dark;
  --ink: #1b1a18;
  --paper: #f4f1ea;
  --muted: #6b665d;
  --line: color-mix(in srgb, var(--ink) 8%, transparent);
  --accent: #b5532f; /* brick */
  --font: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --gutter: clamp(1rem, 5vw, 4rem);
  --grid: 2rem;
  --screen: 100svh;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ece8df;
    --paper: #161513;
    --muted: #9a9488;
    --accent: #d9774f;
  }
}

* { margin: 0; box-sizing: border-box; }

html {
  font: 1.125rem/1.5 var(--font);
  color: var(--ink);
  background: var(--paper);
  scroll-snap-type: y mandatory;
}

a { color: inherit; }

body {
  /* blueprint grid */
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: var(--grid) var(--grid);
  background-attachment: fixed;

  > header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1;
    padding: var(--gutter);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    pointer-events: none;
    > a { text-decoration: none; pointer-events: auto; }
  }

  > footer {
    scroll-snap-align: end;
    padding: var(--gutter);
    color: var(--muted);
    font-size: 0.9rem;
  }
}

/*
  Page system: every main > section is exactly one screen.
  Swipe up/down between sections. For more content within a
  section, use <ww-slides> to swipe left/right.
*/
main > section {
  height: var(--screen);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  display: grid;
  align-content: center;
  padding: calc(var(--gutter) * 2) var(--gutter);
}

/* Type */
h2 {
  font-size: clamp(2.25rem, 7vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 16ch;
}

main > section p { max-width: 36ch; font-size: clamp(1.125rem, 2.2vw, 1.5rem); line-height: 1.35; }

/* Eyebrow: <hgroup><p>Label</p><h2>Title</h2></hgroup> */
hgroup {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  > p:first-child {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
  }
}

address { font-style: normal; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
