/* NGD base stylesheet
   Resets, body treatment, container and heading defaults. Depends on
   tokens.css being loaded first. No component or page-specific rules here. */

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-weight: 340;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* Ambient radial glow, sits behind all content */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60vw 60vw at 82% -8%, rgba(41, 161, 221, .18), transparent 60%),
    radial-gradient(55vw 55vw at 6% 8%, rgba(216, 30, 91, .16), transparent 60%);
}

a { color: inherit; }

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

/* Container */
.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Heading defaults */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.01em;
}

::selection { background: var(--secondary); color: var(--paper); }

/* Focus */
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

/* Scroll reveal. Elements start hidden and lifted, motion.js adds `.in`
   once each one enters the viewport (or immediately under reduced motion). */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}

[data-reveal].in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
