/* ============================================================
   Quanshium AI Core Base: reset, type, layout primitives
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 96px; /* fixed header offset for in-page anchors */
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--text-on-dark);
  background: var(--ink-950);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--ink-950);
  pointer-events: none;
}

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

/* Reserve space for Lucide <i> placeholders until the SVG swap happens */
i[data-lucide] { display: inline-block; width: 1em; height: 1em; }

a { color: var(--quantum-cyan); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--saffron-400); }
a:focus-visible {
  outline: 2px solid var(--quantum-cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ── Headings ── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--text-on-dark);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); letter-spacing: 0; }

p { color: var(--text-on-dark-dim); }
strong { color: var(--text-on-dark); font-weight: 600; }

/* ── Layout primitives ── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}
.container--wide { max-width: var(--container-wide); }
.container--narrow { max-width: 860px; }
.container--medium { max-width: 900px; margin-inline: auto; }

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(2.5rem, 6vh, 4rem); }

/* Light "proof" sections */
.section--paper {
  background: var(--paper-50);
  color: var(--text-on-light);
}
.section--paper h1,
.section--paper h2,
.section--paper h3,
.section--paper h4 { color: var(--text-on-light); }
.section--paper p { color: var(--text-on-light-dim); }
.section--paper strong { color: var(--text-on-light); }
.section--paper a:not(.btn):not(.card):not(.card__link) { color: var(--quantum-blue); }
.section--paper a:not(.btn):not(.card):not(.card__link):hover { color: var(--saffron-600); }

.section--ink { background: var(--ink-900); }

/* Anchor targets clear the fixed header */
[id] { scroll-margin-top: 96px; }

.sr-only {
  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: 50%; top: -100px; transform: translateX(-50%);
  background: var(--saffron-500); color: var(--navy-900); font-weight: 600;
  padding: 0.75rem 1.5rem; border-radius: 0 0 var(--radius-md) var(--radius-md);
  z-index: 1000; transition: top var(--transition);
}
.skip-link:focus { top: 0; color: var(--navy-900); }

/* ── Section heading block ── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--quantum-cyan);
  margin-bottom: var(--space-4);
}

.section--paper .eyebrow { color: var(--saffron-600); }

.section-head { max-width: 720px; margin-bottom: var(--space-7); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head p { font-size: var(--fs-body-lg); margin-top: var(--space-4); }

/* ── Utility ── */
.text-saffron { color: var(--saffron-500); }
.text-cyan { color: var(--quantum-cyan); }
.text-green { color: var(--green-500); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
