/* ============================================================
   base.css — design refresh
   
   Reset, typography defaults, page texture, and global behaviour.
   Loaded after tokens.css; components.css loads after this.
   ============================================================ */

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--paper-dim);
  background-color: var(--abyss);
  /* Subtle mesh gradient — provides the depth Stitch's design uses. */
  background-image:
    radial-gradient(at 0% 0%,   rgba(125, 211, 252, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(249, 189, 34, 0.025) 0px, transparent 50%);
  background-attachment: fixed;
  overflow-x: hidden;
  min-height: 100vh;
}

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

a {
  color: inherit;
  text-decoration: none;
}
a:focus-visible {
  outline: 2px solid var(--waterline);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

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

/* ----- TYPOGRAPHY DEFAULTS ----- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--paper);
}
em {
  font-style: italic;
  color: var(--waterline);
  font-weight: inherit;
}
strong {
  font-weight: 600;
  color: var(--paper);
}

p {
  font-family: var(--sans);
  color: var(--paper-dim);
  line-height: 1.65;
}

/* ----- ACCESSIBILITY ----- */
@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;
  }
  /* Particle canvas should not render at all under reduced motion. */
  #particleCanvas { display: none !important; }
}

::selection {
  background: var(--waterline);
  color: var(--abyss);
}
