/* ==========================================================================
   Augmify Base
   Reset, fonts, typography defaults, layout primitives, a11y utilities.
   Requires tokens.css.
   ========================================================================== */

/* ---- Fonts ---------------------------------------------------------------
   Inter ships as a single variable file (100–900) — one @font-face covers
   400/500/600 usage. Space Grotesk and JetBrains Mono are static weights.
--------------------------------------------------------------------------- */

@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-400.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---- Reset ---------------------------------------------------------------- */

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

* {
  margin: 0;
}

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

html:focus-within {
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  background: var(--bg-0);
  color: var(--ink-100);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

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

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

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

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

p a,
li a:not([class]) {
  color: var(--ink-100);
  text-decoration: underline;
  text-decoration-color: var(--glass-stroke-hot);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur-fast) var(--ease-out);
}

p a:hover,
li a:not([class]):hover {
  text-decoration-color: var(--orange-500);
}

hr {
  border: 0;
  border-top: 1px solid var(--glass-stroke);
  margin: var(--sp-12) 0;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-heading);
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--ink-100);
}

h1,
.text-hero {
  font-size: var(--text-hero);
  line-height: var(--leading-tight);
  letter-spacing: -0.03em;
}

h2,
.text-h2 {
  font-size: var(--text-h2);
}

h3,
.text-h3 {
  font-size: var(--text-h3);
  font-weight: 500;
}

h4 {
  font-size: 1.125rem;
  font-weight: 500;
}

p {
  max-width: 65ch;
  text-wrap: pretty;
}

strong {
  font-weight: 600;
  color: var(--ink-100);
}

small,
.text-small {
  font-size: var(--text-small);
  color: var(--ink-300);
}

code,
kbd,
samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* Eyebrow — mono, gold, uppercase, tracked. Opens every section header. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  font-weight: 400;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--gold-400);
}

.eyebrow::before {
  content: "";
  width: var(--sp-6);
  height: 1px;
  background: linear-gradient(90deg, var(--orange-500), var(--gold-400));
  flex: none;
}

.lede {
  font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.25rem);
  color: var(--ink-300);
  max-width: 56ch;
}

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

.container,
.container-wide {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container {
  max-width: var(--container);
}

.container-wide {
  max-width: var(--container-wide);
}

/* Section rhythm — generous, consistent vertical breathing room. */
.section {
  padding-block: clamp(var(--sp-16), 6vw + var(--sp-8), 8.5rem);
}

.section--tight {
  padding-block: clamp(var(--sp-12), 4vw + var(--sp-6), var(--sp-20));
}

.section--flush-top {
  padding-block-start: 0;
}

main {
  display: block;
}

/* Anchored sections land below the sticky nav. */
[id] {
  scroll-margin-top: calc(var(--nav-height) + var(--sp-6));
}

/* ---- Accessibility ----------------------------------------------------------- */

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

.skip-link {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  z-index: var(--z-skip);
  padding: var(--sp-3) var(--sp-5);
  background: var(--bg-2);
  color: var(--ink-100);
  border: 1px solid var(--glass-stroke-hot);
  border-radius: var(--radius-pill);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

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

/* ---- Reduced motion: kill decorative animation globally ----------------------- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
