/* =========================================================
   Link Bypasser — Reset, typography, primitives
   ========================================================= */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  font-feature-settings: "cv02", "cv03", "cv04", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, #000 10%, transparent 72%);
}

body > * {
  position: relative;
  z-index: 1;
}

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

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

button {
  cursor: pointer;
}

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

ul,
ol {
  list-style: none;
  padding: 0;
}

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

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

/* ---------- Headings ---------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-5);
}
h2 {
  font-size: var(--step-4);
}
h3 {
  font-size: var(--step-2);
}
h4 {
  font-size: var(--step-1);
}

p {
  text-wrap: pretty;
}

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

.section {
  padding-block: var(--section-y);
  border-top: 1px solid var(--line);
}

.section--flush {
  border-top: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--line-3);
}

.section-head {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(2.25rem, 4vw, 3.5rem);
  max-width: 720px;
}

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

.section-head__sub {
  color: var(--text-2);
  font-size: var(--step-1);
  max-width: 58ch;
}

.grad {
  background: linear-gradient(104deg, var(--grad-a) 8%, var(--grad-b) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

.small {
  font-size: var(--step--1);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.82rem 1.3rem;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: none;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease),
    color var(--t-base) var(--ease), transform var(--t-fast) var(--ease),
    box-shadow var(--t-base) var(--ease);
}

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

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

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.btn--primary:hover {
  background: linear-gradient(100deg, var(--accent) 60%, var(--accent-2) 130%);
  box-shadow: 0 10px 30px -14px var(--accent-glow);
}

.btn--ghost {
  border-color: var(--line-2);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--line-3);
  background: var(--surface-2);
}

.btn--quiet {
  color: var(--text-2);
  padding-inline: 0.75rem;
}

.btn--quiet:hover {
  color: var(--text);
}

.btn[disabled] {
  opacity: 0.55;
  pointer-events: none;
}

/* ---------- Text link with arrow ---------- */
.tlink {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--accent-line);
  padding-bottom: 2px;
  transition: gap var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}

.tlink:hover {
  gap: 0.8rem;
  border-color: var(--accent);
}

/* ---------- Chips / tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.22rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: var(--surface-2);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

/* ---------- Pulse dot ---------- */
.pulse {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0;
  animation: pulse-ring 2.4s var(--ease-out) infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.6);
    opacity: 0.8;
  }
  70%,
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
