/* Base — reset, drafting-sheet foundations, typography.
   Logical properties throughout so a future RTL locale needs no rewrite. */

*, *::before, *::after { box-sizing: border-box; }
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 {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  /* faint drafting grid, like graph paper under the whole dossier */
  background-image:
    linear-gradient(var(--blueprint-wash) 1px, transparent 1px),
    linear-gradient(90deg, var(--blueprint-wash) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, svg, figure { max-width: 100%; display: block; margin: 0; }

input, textarea, select, button { font: inherit; color: inherit; }
input, textarea, select { accent-color: var(--blueprint); }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: var(--fs-hero); font-weight: 800; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.2; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 var(--space-3); }
p:last-child { margin-bottom: 0; }

a { color: var(--blueprint); text-decoration: none; }
a:hover, a:focus-visible { color: var(--blueprint-deep); }

:focus-visible { outline: 2px solid var(--blueprint); outline-offset: 3px; }

button { cursor: pointer; }

ul, ol { margin: 0; padding-inline-start: 1.1em; }

strong, b { font-weight: 600; }

::selection { background: var(--blueprint); color: var(--paper); }

/* ---- Layout primitives ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
@media (max-width: 767px) { .container { padding-inline: var(--space-4); } }

.text-center { text-align: center; }

.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; inset-inline-start: var(--space-4); top: -60px;
  background: var(--ink); color: var(--paper);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-base);
  font-family: var(--font-mono); font-size: var(--fs-small);
  z-index: 1000; transition: top .2s ease;
}
.skip-link:focus { top: var(--space-3); }

/* anchored sections clear the sticky header when scrolled to */
:target, [id] { scroll-margin-top: 96px; }

/* ---- Scroll reveal (JS adds .reveal, then .reveal--in in view) ---- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s cubic-bezier(.2,.6,.2,1), transform .7s cubic-bezier(.2,.6,.2,1);
  will-change: opacity, transform;
}
.reveal--in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- Section rhythm ---- */
.content-inner    { padding-block: var(--space-section); }
.content-inner-1  { padding-block: var(--space-section); }
.content-inner-2  { padding-block: var(--space-section) 0; }
.content-inner-3  { padding-block: var(--space-section-sm) var(--space-5); }
.content-inner-4  { padding-block: var(--space-section-lg); }

.section { position: relative; }
.section--light  { background: transparent; }
.section--tint   { background: var(--paper-panel); background-image: none; }
.section--dark   { background: var(--blueprint-deep); color: #dce8f1; background-image: none; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }

.section--narrow .container, .container.section--narrow { max-width: 760px; }

@media (max-width: 991px) {
  .content-inner, .content-inner-1, .content-inner-4 { padding-block: var(--space-section-sm); }
  .content-inner-2 { padding-block: var(--space-section-sm) 0; }
}
