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

html,
body,
h1, h2, h3, h4, h5, h6,
p,
figure,
blockquote,
dl,
dd,
ul,
ol {
  margin: 0;
  padding: 0;
}

ul[class],
ol[class] {
  list-style: none;
}

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

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

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* — body — */
body {
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-14);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
}

/* — headings — */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  text-wrap: balance;
}

h1 { font-size: var(--fs-38); }
h2 { font-size: var(--fs-30); }
h3 { font-size: var(--fs-20); }
h4 { font-size: var(--fs-16); }

p {
  text-wrap: pretty;
}

/* — media — */
img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

/* — links — */
a {
  color: inherit;
  text-decoration: none;
}

a.link {
  color: var(--accent);
}

a.link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* — code — */
code,
pre,
kbd,
samp {
  font-family: var(--font-mono);
  font-size: .92em;
}

/* — focus — */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

:focus:not(:focus-visible) {
  outline: none;
}

/* — selection — */
::selection {
  background: var(--accent-soft);
  color: var(--text-primary);
}

/* — scrollbars — */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--r-full);
  border: 3px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
  background-clip: content-box;
}

/* — hidden — */
[hidden] {
  display: none !important;
}

/* — utilities — */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--wide {
  max-width: 1400px;
}

.stack > * + * {
  margin-block-start: var(--sp-4);
}

.row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.row--between {
  justify-content: space-between;
}

.row--end {
  justify-content: flex-end;
}

.row--wrap {
  flex-wrap: wrap;
}

.grid {
  display: grid;
  gap: var(--sp-4);
}

.spacer {
  flex: 1 1 auto;
}

.muted {
  color: var(--text-muted);
}

.secondary {
  color: var(--text-secondary);
}

.mono {
  font-family: var(--font-mono);
}

.tnum {
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  font-size: var(--fs-11);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-muted);
}

.lead {
  font-size: var(--fs-18);
  line-height: var(--lh-normal);
  color: var(--text-secondary);
  max-width: 62ch;
}

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

.divider {
  height: 1px;
  background: var(--border-subtle);
  border: 0;
  margin-block: var(--sp-6);
}

.no-scroll {
  overflow: hidden;
}

.gradient-text {
  background: linear-gradient(100deg, var(--text-primary) 20%, var(--accent-hover) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* — scroll reveal — */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 480ms var(--ease), transform 480ms var(--ease);
}

.fade-up {
  opacity: 1;
  transform: none;
}

[data-reveal][data-delay="1"] {
  transition-delay: 60ms;
}

[data-reveal][data-delay="2"] {
  transition-delay: 120ms;
}

[data-reveal][data-delay="3"] {
  transition-delay: 180ms;
}

[data-reveal][data-delay="4"] {
  transition-delay: 240ms;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* — page backdrop — */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 40% at 50% 0%, rgba(110, 90, 246, .10), transparent 70%),
    radial-gradient(circle at 1px 1px, var(--border-subtle) 1px, transparent 0);
  background-size: 32px 32px, 32px 32px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
}
