/* nocbox.ai base styles
   Reset + typography + utilities. Hung on tokens.css.
   Mobile-first; WCAG 2.2 AA compliant. */

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

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

/* Anchored sections land clear of the sticky header */
[id] {
  scroll-margin-top: 96px;
}

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

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  min-height: 100dvh;
  text-rendering: optimizeLegibility;
}

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

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

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

/* ---------- Typography defaults ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--fg);
}

h1 { font-size: var(--text-hero); font-weight: 800; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  line-height: var(--leading-relaxed);
  color: var(--fg-muted);
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
}

ul, ol {
  list-style: none;
}

/* ---------- Focus styles (WCAG 2.2 Focus Appearance) ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Remove default outline only when :focus-visible is supported */
:focus:not(:focus-visible) {
  outline: none;
}

/* ---------- Selection ---------- */
::selection {
  background: var(--accent);
  color: var(--nocblack);
}

/* ---------- Skip link (WCAG: Bypass Blocks) ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--accent);
  color: var(--nocblack);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: 600;
  z-index: var(--z-modal);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
  color: var(--nocblack);
}

/* ---------- Utility: visually hidden but available to screen readers ---------- */
.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;
}

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

.container-narrow {
  max-width: 800px;
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ---------- Section spacing ---------- */
.section {
  padding-block: var(--space-12);
  position: relative;
}

@media (min-width: 768px) {
  .section {
    padding-block: var(--space-16);
  }
}

.section + .section {
  border-top: 1px solid var(--border);
}

/* ---------- Eyebrow label (monospace, small caps, gold) ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-4);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 1px;
  background: var(--nocblue-light);
}

/* ---------- Section header ---------- */
.section-header {
  margin-bottom: var(--space-12);
  max-width: 720px;
}

.section-header .section-title {
  margin-bottom: var(--space-4);
}

.section-header .section-lede {
  font-size: var(--text-lg);
  color: var(--fg-muted);
  line-height: var(--leading-relaxed);
}
