/* Base reset, typography and shared utilities ------------------------------- */

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

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

[id] {
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

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

::selection {
  background: rgba(122, 92, 240, 0.25);
  color: inherit;
}

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--accent-1);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* inline code (page prose) */
:where(.section, .footer) p > code,
:where(.section, .footer) li > code,
:where(.section, .footer) span > code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.12em 0.4em;
  white-space: nowrap;
}

.dark :where(p, li, span) > code,
.hero :where(p, li, span) > code {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #d6d7e4;
}

.section {
  padding-block: clamp(4.5rem, 10vw, 7.5rem);
}

.section.dark {
  background: var(--bg);
}

.section--soft {
  background: var(--bg-soft);
}

/* eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-grad);
}

.eyebrow--center {
  justify-content: center;
}

.eyebrow--center::after {
  content: "";
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-grad);
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.h2 {
  font-size: var(--type-scale-2);
  margin-top: 1rem;
}

.section--head {
  max-width: 780px;
}

.section--lead {
  margin-top: 1.1rem;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  line-height: 1.65;
  color: var(--body);
}

.section--head + .grid,
.section--head + .flow {
  margin-top: clamp(2.75rem, 6vw, 4.25rem);
}

/* reveal-on-scroll animation */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}