/* ==========================================================================
   Modern CSS Reset (Josh Comeau-inspired + custom)
   ========================================================================== */

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

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overscroll-behavior-y: contain;
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

body {
  min-height: 100vh;
  line-height: var(--lh-body);
  font-family: var(--font-display);
  background-color: var(--color-bg);
  color: var(--color-text-1);
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overscroll-behavior-y: contain;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  position: relative;
  isolation: isolate;
}

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

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

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: inherit;
  font-size: inherit;
}

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

#root, #__next {
  isolation: isolate;
}

/* ---------- A11y utilities ---------- */
.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;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  background: var(--color-cta);
  color: var(--color-white);
  font-weight: 500;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus,
.skip-link:focus-visible {
  position: fixed;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  padding: var(--space-6) var(--space-7);
  margin: 0;
  clip: auto;
  white-space: normal;
  z-index: 1000;
  outline: 2px solid var(--color-white);
  outline-offset: -4px;
}

:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}

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