/* ============================================================
   SoftwarePedia — Base: reset, typography, layout utilities
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "ss01";
  overflow-x: hidden;
}

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

a { color: var(--accent-ink); text-decoration: none; }
a:hover { color: var(--brand-600); }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--text-strong);
  font-weight: 500;
  line-height: var(--lh-snug);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-weight: 700; }

p { text-wrap: pretty; }

ul, ol { padding-left: 1.15em; }

::selection { background: var(--brand-200); color: var(--ink-900); }

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

.scroll-locked { overflow: hidden; }

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

.section { padding-block: clamp(3.5rem, 2rem + 7vw, 7rem); }
.section--tight { padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
.section--soft { background: var(--bg-soft); }
.section--tint { background: var(--bg-tint); }
.section--dark { background: var(--surface-dark); color: #C9CCD3; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }

.stack > * + * { margin-top: var(--sp-4); }

/* ---- Eyebrow / kicker ---------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.eyebrow::before {
  content: "";
  width: 1.1em; height: 1.1em;
  background: var(--brand-500);
  -webkit-clip-path: var(--hex); clip-path: var(--hex);
  flex: none;
}
.eyebrow--plain::before { display: none; }
.section--dark .eyebrow { color: var(--amber-soft); }

/* ---- Section heading block ----------------------------- */
.section-head { max-width: 46rem; }
.section-head.is-center { margin-inline: auto; text-align: center; }
.section-head .title { font-size: var(--fs-2xl); margin-top: var(--sp-3); }
.section-head .lede {
  margin-top: var(--sp-4);
  font-size: var(--fs-md);
  color: var(--text-muted);
  line-height: 1.55;
}

/* ---- Helpers ------------------------------------------- */
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent-ink); }
.mono { font-family: var(--font-mono); }
.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: 1rem; top: -100px;
  background: var(--ink-900); color: #fff; padding: .6rem 1rem;
  border-radius: var(--r-sm); z-index: 200; transition: top var(--dur);
}
.skip-link:focus { top: 1rem; color: #fff; }

/* Reveal-on-scroll (progressive enhancement; visible by default) */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
  [data-reveal].is-in { opacity: 1; transform: none; }
}
