/* ===========================================================
   Modern reset
   =========================================================== */

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

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  font-size: 16px;
  tab-size: 4;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  font-variant-ligatures: common-ligatures;
  min-height: 100svh;
  overflow-x: hidden;
  transition: background var(--duration) var(--ease-out), color var(--duration) var(--ease-out);
}

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

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

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-snug);
  color: var(--color-text);
}

p { line-height: var(--lh-relaxed); color: var(--color-text-muted); }

::selection {
  background: var(--color-primary);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

/* Custom scrollbar */
@media (pointer: fine) {
  ::-webkit-scrollbar { width: 12px; height: 12px; }
  ::-webkit-scrollbar-track { background: var(--color-bg); }
  ::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border: 3px solid var(--color-bg);
    border-radius: var(--radius-pill);
  }
  ::-webkit-scrollbar-thumb:hover { background: var(--color-border-strong); }
}
