/* ==========================================================================
   Base — reset, element defaults, typography, utilities
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  @view-transition { navigation: auto; }
}

body {
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body.is-locked { overflow: hidden; }

/* `hidden` must always win over component display rules */
[hidden] { display: none !important; }

/* Side-sliding reveals and decorative blobs must never create sideways scroll.
   `clip` (unlike `hidden`) doesn't create a scroll container, so sticky still works. */
main, .site-footer { overflow-x: clip; }

/* Long email addresses must wrap on narrow phones */
a[href^="mailto:"], .break-anywhere { overflow-wrap: anywhere; }

img, picture, video, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }

input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

p, h1, h2, h3, h4, h5, h6, li, dd, blockquote { overflow-wrap: break-word; }

/* Headings ---------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  color: var(--color-heading);
  font-variation-settings: "SOFT" 100, "WONK" 0;
  letter-spacing: -.01em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }
h4 { font-size: var(--fs-h4); line-height: var(--lh-snug); font-family: var(--font-body); font-weight: 700; letter-spacing: 0; }

p { text-wrap: pretty; }

em.accent, .accent-italic {
  font-style: italic;
  font-weight: 500;
  color: var(--caramel-700);
}

a {
  color: var(--color-link);
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--chocolate-800); }

strong, b { font-weight: 700; }

::selection { background: var(--caramel-400); color: var(--chocolate-900); }

/* Focus ------------------------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Utilities --------------------------------------------------------------- */
.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: absolute;
  left: 1rem; top: -100px;
  z-index: 1000;
  padding: .75rem 1.25rem;
  background: var(--chocolate-800);
  color: var(--cream-50);
  border-radius: var(--radius-pill);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; color: var(--cream-50); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--caramel-700);
}
.eyebrow .icon { width: 1.1em; height: 1.1em; }

.lead { font-size: var(--fs-lead); color: var(--color-text-muted); max-width: 60ch; }

.script {
  font-family: var(--font-script);
  font-weight: 600;
  font-size: var(--fs-script);
  line-height: 1.1;
  color: var(--caramel-700);
}

.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.mx-auto { margin-inline: auto; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--fill { fill: currentColor; stroke: none; }

/* Prose (long-form text pages) */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: .4em; }

/* TODO marker for unconfirmed owner content — visible so it's never missed */
.todo {
  background: #FFF3C4;
  color: #5A4200 !important;
  outline: 1px dashed var(--amber-500);
  border-radius: 4px;
  padding: 0 .25em;
}
