/* ============================================================
   GovProtocol / GDPRLedger — base.css
   Reset · CSS variables · Typography
   ============================================================ */

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

:root {
  /* ── Colour palette ── */
  --ink:        #0f1117;
  --paper:      #fafaf8;
  --mid:        #f0efe9;
  --border:     #e0dfd7;
  --muted:      #5a5955;
  --dim:        #7a7975;

  --green:      #1a7a4a;
  --green-md:   #2ea864;
  --green-lt:   #e8f5ee;
  --green-dk:   #145c38;

  --amber:      #b45309;
  --amber-lt:   #fef3c7;
  --amber-md:   #d97706;

  --red:        #c0392b;
  --red-lt:     #fdecea;
  --red-md:     #e74c3c;

  --blue:       #1d4ed8;
  --blue-lt:    #eff6ff;
  --blue-md:    #3b82f6;

  --white:      #ffffff;
  --black:      #000000;

  /* ── Typography ── */
  --font-serif:  'Fraunces', Georgia, serif;
  --font-sans:   'Instrument Sans', system-ui, sans-serif;
  --font-mono:   'DM Mono', 'Courier New', monospace;

  /* ── Spacing scale ── */
  --s1:   4px;
  --s2:   8px;
  --s3:  12px;
  --s4:  16px;
  --s5:  20px;
  --s6:  24px;
  --s7:  32px;
  --s8:  40px;
  --s9:  48px;
  --s10: 64px;
  --s11: 80px;
  --s12: 96px;

  /* ── Border radius ── */
  --r-xs:  4px;
  --r-sm:  8px;
  --r:    12px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* ── Shadows ── */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.06);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:    0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.10), 0 8px 24px rgba(0,0,0,.06);
  --shadow-xl: 0 32px 80px rgba(0,0,0,.14), 0 12px 32px rgba(0,0,0,.08);

  /* ── Transitions ── */
  --t-fast:   0.12s ease;
  --t:        0.20s ease;
  --t-slow:   0.35s ease;

  /* ── Z-index scale ── */
  --z-base:    1;
  --z-above:   10;
  --z-nav:     100;
  --z-modal:   200;
  --z-toast:   300;
}

/* ── Base ── */

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* ── Typography ── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 { font-size: clamp(32px, 5vw, 56px); font-weight: 900; }
h2 { font-size: clamp(26px, 4vw, 40px); font-weight: 700; }
h3 { font-size: clamp(20px, 3vw, 28px); font-weight: 700; }
h4 { font-size: clamp(16px, 2vw, 20px); font-weight: 600; }
h5 { font-size: 15px;  font-weight: 600; font-family: var(--font-sans); }
h6 { font-size: 13px;  font-weight: 600; font-family: var(--font-sans); }

p {
  color: var(--muted);
  line-height: 1.75;
  max-width: 68ch;
}

p + p { margin-top: var(--s4); }

a {
  color: var(--green);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--green-dk); }

strong { color: var(--ink); font-weight: 600; }
em     { font-style: italic; }

small  { font-size: 0.8125rem; color: var(--dim); }

.mono, code, pre {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

pre {
  background: var(--mid);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: var(--s4) var(--s5);
  overflow-x: auto;
  line-height: 1.6;
}

code {
  background: var(--mid);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  padding: 2px 6px;
}

/* ── Lists ── */

ul, ol { padding-left: 1.5em; }
li { margin-bottom: var(--s1); color: var(--muted); }
li::marker { color: var(--green-md); }

/* ── HR ── */

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--s7) 0;
}

/* ── Images ── */

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

/* ── Focus ── */

:focus-visible {
  outline: 2px solid var(--green-md);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* ── Selection ── */

::selection {
  background: var(--green-lt);
  color: var(--green-dk);
}

/* ── Utility — display ── */

.hidden   { display: none !important; }
.sr-only  {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* ── Utility — text ── */

.text-muted   { color: var(--muted); }
.text-dim     { color: var(--dim); }
.text-green   { color: var(--green-md); }
.text-amber   { color: var(--amber); }
.text-red     { color: var(--red); }
.text-mono    { font-family: var(--font-mono); }
.text-serif   { font-family: var(--font-serif); }
.text-sm      { font-size: 0.875rem; }
.text-xs      { font-size: 0.75rem; }
.text-lg      { font-size: 1.125rem; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }

/* ── Utility — spacing ── */

.mt-1 { margin-top: var(--s2); }
.mt-2 { margin-top: var(--s4); }
.mt-3 { margin-top: var(--s6); }
.mt-4 { margin-top: var(--s7); }
.mt-5 { margin-top: var(--s9); }

.mb-1 { margin-bottom: var(--s2); }
.mb-2 { margin-bottom: var(--s4); }
.mb-3 { margin-bottom: var(--s6); }

/* ── Eyebrow label ── */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--green);
  display: block;
  margin-bottom: var(--s3);
}

/* ── Section heading pattern ── */

.section-heading {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 700;
  margin-bottom: var(--s4);
  color: var(--ink);
}

.section-sub {
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 600px;
  font-weight: 300;
  line-height: 1.75;
}

/* ── Status colours (traffic light) ── */

.status-present { color: var(--green);    background: var(--green-lt); }
.status-partial { color: var(--amber);    background: var(--amber-lt); }
.status-missing { color: var(--red);      background: var(--red-lt);   }
.status-pending { color: var(--dim);      background: var(--mid);      }
