/* ============================================================
   GLOBAL — reset, base layout, container, decorative background
   ============================================================ */

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

html {
  scroll-behavior: auto; /* Lenis owns smooth scrolling once wired up in Phase 8 */
}

body {
  background: var(--color-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

ul, ol {
  list-style: none;
}

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

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Layout primitives ---- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
}

.section-pad {
  padding-inline: var(--section-px);
  padding-block: var(--section-py);
}

.section-pad-x {
  padding-inline: var(--section-px);
}

/* ---- Decorative full-page line/grid texture (Figma: "lines") ----
   Sits behind all page content, starting below the header. */
.bg-lines {
  position: absolute;
  inset: var(--header-h) 0 0 0;
  height: calc(100% - var(--header-h));
  background-image: url('../assets/images/bg-lines.svg');
  background-repeat: repeat-y;
  background-size: 100% auto;
  pointer-events: none;
  z-index: -1;
  top: 0;
}

main {
  position: relative;
  z-index: 1;
  /* Header is position:fixed (sections.css) and no longer reserves its
     own space in flow — this exactly replaces that reserved space so
     hero content sits exactly where it did under the old sticky header,
     not hidden underneath the fixed one. */
  padding-top: var(--header-h);
}
