/* ==========================================================================
   reset.css — a small, opinionated normalisation. Nothing decorative here.
   ========================================================================== */

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

* { margin: 0; }

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

body {
  min-height: 100svh;
  background: var(--c-night);
  color: var(--t-night);
  font-family: var(--f-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* `clip` rather than `hidden`: it contains the ambient washes without
     turning <body> into a scroll container, which would break sticky. */
  overflow-x: clip;
}

@supports not (overflow: clip) {
  body { overflow-x: hidden; }
}

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

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

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

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

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

h1, h2, h3, h4 { font-weight: 400; line-height: var(--lh-snug); text-wrap: balance; }

p { text-wrap: pretty; }

::selection {
  background: var(--c-kunyit);
  color: var(--c-night);
}

:focus-visible {
  outline: 2px solid var(--c-kunyit);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Scrollbar — quiet, matches the night base */
@supports (scrollbar-color: red blue) {
  html { scrollbar-color: var(--c-night-3) var(--c-night); scrollbar-width: thin; }
}
