/* ==========================================================================
   Reset — modern, minimal
   ========================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--sp-5));
  /* Clip sideways overflow here, NOT on body. Setting overflow on body
     makes it the scroll container, which stops IntersectionObserver from
     ever intersecting the viewport root and kills all scroll reveals. */
  overflow-x: clip;
}

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

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

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

img,
video { height: auto; }

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Visible focus for keyboard users only */
:focus-visible {
  outline: 3px solid var(--ember-hi);
  outline-offset: 3px;
  border-radius: 3px;
}

:focus:not(:focus-visible) { outline: none; }

/* Screen-reader-only utility */
.sr-only {
  position: absolute;
  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;
  top: -100%;
  left: var(--sp-4);
  z-index: var(--z-toast);
  padding: var(--sp-3) var(--sp-5);
  background: var(--ember);
  color: var(--white);
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 700;
  transition: top var(--dur) var(--ease-out);
}

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

::selection {
  background: var(--ember);
  color: var(--white);
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--ink-deep); }
::-webkit-scrollbar-thumb {
  background: #37373a;
  border-radius: var(--radius-pill);
  border: 3px solid var(--ink-deep);
}
::-webkit-scrollbar-thumb:hover { background: var(--ember-lo); }
