:root {
  /* ============================================================
     PART B PROJECT TOKENS
     Alliance Against Community Coercion and Targeted Extortion — stop-extortion.ca
     Generated per binding Design System Specification v1.0
     ============================================================ */

  /* ----------------------------------------------------------
     B3. Palette
     ---------------------------------------------------------- */
  --color-bg:          #FFFFFF;
  --color-surface:     #F6F7F4;
  --color-ink:         #1A1D16;
  --color-ink-muted:   #5C6352;
  --color-accent:      #3D6B1E;   /* UFV green; ≤10% of viewport */
  --color-accent-2:    #8FCF00;   /* emergency/urgent only */

  /* Derived: emergency/danger tones (not part of core palette) */
  --color-danger:      #C62828;
  --color-danger-bg:   #FFF5F5;

  /* ----------------------------------------------------------
     A2. Type scale — modular, ratio 1.25, base 16–18px
     ---------------------------------------------------------- */
  --text-xs:   clamp(0.75rem,  0.72rem  + 0.15vw, 0.8rem);
  --text-sm:   clamp(0.875rem, 0.84rem  + 0.18vw, 0.95rem);
  --text-base: clamp(1rem,     0.96rem  + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.25rem,  1.18rem  + 0.35vw, 1.45rem);
  --text-xl:   clamp(1.56rem,  1.44rem  + 0.6vw,  1.95rem);
  --text-2xl:  clamp(1.95rem,  1.7rem   + 1.2vw,  2.7rem);
  --text-3xl:  clamp(2.44rem,  2.0rem   + 2.2vw,  3.8rem);

  /* ----------------------------------------------------------
     B4. Typography — Inter, weights 400/500/600
     ---------------------------------------------------------- */
  --font-display: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-utility: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* ----------------------------------------------------------
     A3. Spacing system — 8px base, 4px half-step
     ---------------------------------------------------------- */
  --space-1:  0.25rem;   /* 4px */
  --space-2:  0.5rem;    /* 8px */
  --space-3:  0.75rem;   /* 12px */
  --space-4:  1rem;      /* 16px */
  --space-5:  1.5rem;    /* 24px */
  --space-6:  2rem;       /* 32px */
  --space-7:  3rem;       /* 48px */
  --space-8:  4rem;       /* 64px */
  --space-9:  6rem;       /* 96px */
  --space-10: 8rem;       /* 128px */
  --space-11: 12rem;      /* 192px */
  --space-12: 16rem;      /* 256px */

  /* ----------------------------------------------------------
     A1. Radius tokens
     ---------------------------------------------------------- */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-pill: 999px;

  /* ----------------------------------------------------------
     A1. Shadow tokens
     ---------------------------------------------------------- */
  --shadow-1: 0 1px 3px rgba(26, 29, 22, 0.06);
  --shadow-2: 0 4px 12px rgba(26, 29, 22, 0.08);
  --shadow-3: 0 8px 24px rgba(26, 29, 22, 0.10);

  /* ----------------------------------------------------------
     A6. Motion tokens
     ---------------------------------------------------------- */
  --motion-fast: 150ms;
  --motion-base: 250ms;
  --motion-slow: 400ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* ----------------------------------------------------------
     A3. Container constraints
     ---------------------------------------------------------- */
  --container-max: 1200px;
  --container-padding: var(--space-5);
}

/* ============================================================
   GLOBAL RESETS & BASE
   ============================================================ */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-ink);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----------------------------------------------------------
   A2. Typography rules
   ---------------------------------------------------------- */

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

h1 { font-size: var(--text-3xl); letter-spacing: -0.03em; }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.04em; }

p {
  max-width: 65ch;
  margin-bottom: var(--space-4);
}

/* Utility / caption sizes: positive tracking, uppercase */
.text-utility {
  font-family: var(--font-utility);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-ink-muted);
}

/* A2.4: Never pure black on pure white */
::selection {
  background-color: var(--color-accent);
  color: var(--color-bg);
}

/* ----------------------------------------------------------
   A3. Container
   ---------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-inline: var(--container-padding);
}

/* ----------------------------------------------------------
   A4. Links
   ---------------------------------------------------------- */

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition: color var(--motion-fast) var(--ease-out);
}

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

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ----------------------------------------------------------
   A5. Buttons
   ---------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-out),
              background-color var(--motion-fast) var(--ease-out);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-bg);
}

.btn-primary:hover {
  background-color: #2d5216; /* darkened accent */
  color: var(--color-bg);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
}

.btn-secondary:hover {
  background-color: var(--color-accent);
  color: var(--color-bg);
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-ink-muted);
}

.btn-ghost:hover {
  color: var(--color-ink);
}

.btn-emergency {
  background-color: var(--color-danger);
  color: var(--color-bg);
  font-size: var(--text-lg);
  padding: var(--space-4) var(--space-6);
}

.btn-emergency:hover {
  background-color: #a01e1e;
  color: var(--color-bg);
  transform: translateY(-1px);
}

/* ----------------------------------------------------------
   A5. Cards
   ---------------------------------------------------------- */

.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--motion-base) var(--ease-out),
              transform var(--motion-base) var(--ease-out);
}

.card:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

/* ----------------------------------------------------------
   A5. Forms
   ---------------------------------------------------------- */

label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
}

input, textarea, select {
  width: 100%;
  min-height: 44px; /* touch target */
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-ink);
  background-color: var(--color-bg);
  border: 1.5px solid #D1D5CC;
  border-radius: var(--radius-md);
  transition: border-color var(--motion-fast) var(--ease-out);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(61, 107, 30, 0.15);
}

/* ----------------------------------------------------------
   B6. Signature element: Five Things Right Now action bar
   ---------------------------------------------------------- */

.action-bar {
  background: linear-gradient(135deg, #1A1D16 0%, #2D3326 100%);
  color: var(--color-bg);
  padding: var(--space-6) var(--space-5);
  border-radius: var(--radius-lg);
  margin: var(--space-6) 0;
}

.action-bar h2 {
  color: var(--color-bg);
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}

.action-bar ol {
  list-style: none;
  counter-reset: action-step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}

.action-bar li {
  position: relative;
  padding-left: calc(var(--space-6) + var(--space-2));
  font-size: var(--text-base);
  line-height: 1.5;
  min-height: 32px;
}

.action-bar li::before {
  counter-increment: action-step;
  content: counter(action-step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 28px;
  height: 28px;
  background-color: var(--color-accent-2);
  color: var(--color-ink);
  font-weight: 700;
  font-size: var(--text-sm);
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ----------------------------------------------------------
   A6. Reduced motion
   ---------------------------------------------------------- */

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

/* ----------------------------------------------------------
   A3. Section spacing
   ---------------------------------------------------------- */

section {
  padding: var(--space-9) var(--space-5);
}

@media (max-width: 768px) {
  section {
    padding: var(--space-7) var(--space-5);
  }
  
  .action-bar ol {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------------
   Utility classes
   ---------------------------------------------------------- */

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

.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;
}
