/* Digital Shack v3: base. Reset, document defaults, type, browser surfaces. */

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

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

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: var(--leading-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/* Browser surfaces carry the design too. */
::selection { background: var(--nx-blue); color: var(--on-accent); }
:root { caret-color: var(--nx-blue-deep); scrollbar-color: rgba(10,24,38,.28) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: rgba(10,24,38,.22); border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(10,24,38,.34); }

:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius); }
.on-stage :focus-visible { box-shadow: var(--focus-ring-stage); }

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

/* Type */
h1, h2, h3, h4 { font-weight: 400; text-wrap: balance; overflow-wrap: break-word; }
h1, h2, .display {
  font-family: var(--font-display);
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-display);
}
h2 { font-size: var(--size-h2); }
h3 { font-family: var(--font-body); font-weight: 600; font-size: var(--size-h3); line-height: 1.3; letter-spacing: -0.01em; }

p, li { max-width: var(--measure); }
p { text-wrap: pretty; }
.lede { font-size: var(--size-body-lg); line-height: 1.55; color: var(--text-muted); }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
small, .small { font-size: var(--size-small); font-weight: 500; line-height: 1.5; }
strong, b { font-weight: 600; }

/* The eyebrow: small spaced caps in brackets above a heading. Pinned by the reference. */
.eyebrow {
  display: inline-block;
  font-size: var(--size-eyebrow);
  font-weight: 500;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--s2);
}
.eyebrow::before { content: "( "; }
.eyebrow::after  { content: " )"; }
.on-stage .eyebrow { color: var(--on-stage-faint); }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: rgba(10,24,38,.35);
  transition: color var(--dur-fast) var(--ease), text-decoration-color var(--dur-fast) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  a:not(.btn):not(.pill):not(.skip-link):hover { color: var(--nx-blue-deep); text-decoration-color: currentColor; }
}

ul, ol { padding-left: 1.2em; }
li + li { margin-top: var(--s1); }
li::marker { color: var(--nx-blue-deep); }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s5) 0; }
.tabular { font-variant-numeric: tabular-nums; }

.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: -100px; left: var(--s2); z-index: 100;
  padding: var(--s1) var(--s2); background: var(--nx-blue); color: var(--on-accent);
  font-weight: 600; border-radius: var(--radius); text-decoration: none;
}
.skip-link:focus-visible { top: var(--s2); }

@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;
  }
}
