/* ============================================================================
   Reset + primitives
   ========================================================================= */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--sp-5));
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.55;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* `clip`, not `hidden`: hidden turns the body into a scroll container, which
     silently breaks `position: sticky` on the header. */
  overflow-x: clip;
  transition: background-color var(--t-base) var(--ease), color var(--t-base) var(--ease);
}

body.is-locked {
  overflow: hidden;
}

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

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

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

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

:where(h1, h2, h3, h4) {
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

/* ---------------------------------------------------------------- Layout */

.wrap {
  width: 100%;
  max-width: var(--content);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

.section {
  padding-block: clamp(var(--sp-7), 7vw, var(--sp-9));
}

.section--tight {
  padding-block: clamp(var(--sp-6), 5vw, var(--sp-8));
}

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
}

/* ------------------------------------------------------------ Typography */

.eyebrow {
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
  max-width: 46ch;
}

.section-head h2 {
  font-size: var(--step-3);
}

.section-head p {
  color: var(--ink-2);
  font-size: var(--step-0);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

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

/* --------------------------------------------------------------- Buttons */

.btn {
  --btn-bg: var(--surface);
  --btn-ink: var(--ink);
  --btn-line: var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.72em 1.35em;
  border: 1px solid var(--btn-line);
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-size: var(--step--1);
  font-weight: 550;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  --btn-bg: var(--accent);
  --btn-ink: var(--accent-ink);
  --btn-line: transparent;
  box-shadow: var(--shadow-accent);
}

.btn--primary:hover {
  --btn-bg: var(--accent-hover);
}

.btn--solid {
  --btn-bg: var(--ink);
  --btn-ink: var(--bg);
  --btn-line: transparent;
}

.btn--solid:hover {
  --btn-bg: var(--ink);
  filter: brightness(1.25);
}

.btn--ghost {
  --btn-bg: transparent;
}

.btn--ghost:hover {
  --btn-bg: var(--surface);
  --btn-line: var(--line-strong);
}

.btn--lg {
  padding: 0.9em 1.7em;
  font-size: var(--step-0);
}

.btn--block {
  width: 100%;
}

/* ----------------------------------------------------------------- Chips */

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.34em 0.8em;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: var(--step--2);
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
}

.chip--accent {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-text);
}

/* Pulsing "live" dot. One animation, reused everywhere something is live. */
.dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
}

.dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: ping 2.4s var(--ease) infinite;
}

@keyframes ping {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  70%,
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

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