/* ============================================================
   BASE / RESET
   ============================================================ */

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

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

@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;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--dur-mid) var(--ease-out), color var(--dur-mid) var(--ease-out);
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

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

p {
  margin: 0;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.4rem, 5vw + 1rem, 4.2rem); }
h2 { font-size: clamp(1.8rem, 2.6vw + 1rem, 2.6rem); }
h3 { font-size: clamp(1.2rem, 1.1vw + 1rem, 1.5rem); }
h4 { font-size: 1.05rem; }

p, li {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

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

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

/* Visible keyboard focus ring, always */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Scrollbar (webkit) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--neutral-300);
  border-radius: var(--r-pill);
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: var(--navy-600);
}

/* ---- Layout helpers ---- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

.section {
  padding-block: clamp(56px, 9vw, 120px);
  position: relative;
  scroll-margin-top: 96px;
}

#hero {
  scroll-margin-top: 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--sp-6);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: var(--sp-3);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1.5px;
  background: var(--accent);
  display: inline-block;
}

.section-lead {
  margin-top: var(--sp-3);
  color: var(--text-secondary);
  max-width: 56ch;
}

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

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -60px;
  background: var(--ink-900);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--r-md);
  z-index: 999;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus {
  top: var(--sp-4);
}
