/* ==========================================================================
   Base — reset, document defaults and shared primitives
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--color-ink);
  background-color: var(--color-canvas);
  background-image:
    radial-gradient(58rem 40rem at 78% -12%, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 65%),
    radial-gradient(36rem 34rem at 104% 42%, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #f4f2fc 0%, #efedfa 46%, var(--color-canvas-deep) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* Wide, very soft diagonal sheen that crosses the composition from the
   top-right. It sits above the page background but below all content. */
body::before {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    72deg,
    rgba(255, 255, 255, 0) 41%,
    rgba(255, 255, 255, 0.4) 47%,
    rgba(255, 255, 255, 0) 78%
  );
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
  height: auto;
}

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

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

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

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

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.625rem 1rem;
  font-size: var(--fs-ui);
  font-weight: 500;
  color: var(--color-white);
  background: var(--color-ink);
  border-radius: var(--radius-sm);
  transform: translateY(-160%);
  transition: transform var(--duration-base) var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
