/* Modern reset (based on Andy Bell + Josh Comeau, trimmed) */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Sticky-header не должен закрывать topы секций при якорной прокрутке (#calc и т.д.). */
  scroll-padding-top: calc(var(--header-height) + var(--space-4));
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body { overflow-x: hidden; }

/* Grid/flex children should respect parent track sizing, never auto-expand
 * past their container — иначе display-токены ломают раскладку. */
main *,
.container > *,
section > * { min-width: 0; }

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

body {
  min-height: 100dvh;
  line-height: var(--leading-normal);
  font-family: var(--ga-body-font);
  background: var(--ga-cream);
  color: var(--ga-ink);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  font-feature-settings: "ss01", "cv11";
}

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

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

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

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

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

#root, #__next { isolation: isolate; }

/* Selection in brand color */
::selection { background: var(--ga-lime); color: var(--ga-black); }

/* Focus states — visible only for keyboard */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--ga-focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* Hidden but accessible */
.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;
}
