/* L4GG 10-Year Impact Report: base styles. Tokens at the top. */

/* ---------- 1. Tokens ---------- */
:root {
  /* Core brand — hex values from the L4GG Brand Guidelines (Aug 2026) */
  --navy: #052460;
  --sky: #D9EFFA;           /* light-blue panels (cyan 20% tint) */
  --sky-line: #40B1E5;      /* cyan: timeline baselines, link underlines */
  --ink: #000000;           /* body text */
  --white: #FFFFFF;
  --paper: #E9E0DD;         /* warm neutral: Impact Docket */

  /* Pillar / program accents + their 20% tints */
  --purple: #884989;  --purple-tint: #E7DBE7;    /* Democracy & Rule of Law (Trans Rights accent) */
  --green: #57A773;   --green-tint: #DDEDE3;     /* Climate Change & Environmental Justice */
  --coral: #EE6352;   --coral-tint: #FBE0DC;     /* Civil & Human Rights (Project Corazon accent) */
  --teal: #216869;    --teal-tint: #D3E1E1;      /* Pro Bono Litigation Corps */
  --crimson: #89043D; --crimson-tint: #E8CDD8;   /* Reproductive Rights */
  --yellow: #FADF63;                             /* State Legislative Advocacy */

  /* Selected shades (for hovers and text-safe accents) */
  --navy-shade: #041A47;  --coral-shade: #D45949;  --green-shade: #3C734F;

  /* Timeline arc colors (10 Years of Impact): coral → yellow → green */
  --arc-1: var(--coral);  --arc-2: var(--yellow);  --arc-3: var(--green);
  --blue-line: var(--sky-line);                  /* overall 2016–2026 timeline */
  --docket: var(--paper);

  /* Active theme — override per section with .theme-* (see report.css) */
  --accent: var(--navy);
  --accent-text: var(--accent);   /* text-safe version of the accent (green needs a darker shade) */
  --accent-tint: var(--sky);

  /* Interactive */
  --grain: url("../assets/img/grain.png");
  --grain-strong: url("../assets/img/grain.png"); /* grayscale noise; use with overlay/soft-light */

  --link: var(--navy);
  --link-hover: var(--coral);
  --rule: rgba(5, 36, 96, 0.2);
  --bg: var(--white);

  /* Type families */
  --font-serif: "adobe-garamond-pro", "EB Garamond", Garamond, "Times New Roman", serif;
  --font-sans: "DM Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;   /* body + flowing copy */
  --font-ui: "Poppins", "DM Sans", "Helvetica Neue", Arial, sans-serif;     /* sans-serif headings, labels, nav, buttons */

  /* Type scale — print ratios (chapter 4.4×, section 2.6×, sub 2.1×, quote 1.8× body), bumped
     ~10% because Garamond's x-height is smaller than the print report's DM Serif faces */
  --fs-body: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);   /* 15 → 17px */
  --fs-lede: clamp(1.375rem, 1.15rem + 0.9vw, 1.75rem);
  --fs-colead: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --fs-h1: clamp(3rem, 1.7rem + 5.4vw, 5.25rem);
  --fs-h2: clamp(2.375rem, 1.7rem + 2.7vw, 3.375rem);
  --fs-h3: clamp(1.875rem, 1.5rem + 1.5vw, 2.5rem);
  --fs-h4: clamp(1.375rem, 1.2rem + 0.7vw, 1.625rem);
  --fs-label: 0.875rem;
  --fs-small: 0.8125rem;
  --fs-quote: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  --fs-stat: clamp(2.5rem, 1.5rem + 2.6vw, 3.25rem);

  /* Layout */
  --measure: 38rem;
  --measure-text: 31em;      /* ≈66 characters per line for flowing body copy (Bringhurst); scales with the type size */
  --wrap: 76rem;
  --gutter: clamp(1.5rem, 4vw, 3rem);
  --radius: 3px;
  --nav-h: 3.5rem;
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 1rem); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }

/* ---------- 3. Layout helpers ---------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.measure { max-width: var(--measure); }
.prose { max-width: var(--measure-text); }
.section { padding-block: clamp(3rem, 7vw, 6rem); }
.panel-navy { background: var(--navy); color: var(--white); }
.panel-sky { background: var(--sky); }
.panel-tint { background: var(--accent-tint); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- 4. Headings ---------- */
h1, h2, h3, h4, h5, h6 { margin: 0 0 0.5em; color: var(--navy); overflow-wrap: normal; word-break: normal; hyphens: none; }

/* H1–H4: Garamond. H5–H6: DM Sans caps (eyebrows, labels). */
h1, h2, h3, h4 { font-family: var(--font-serif); font-variant-numeric: lining-nums; }
/* H1 chapter title */
h1 { font-size: var(--fs-h1); font-weight: 500; line-height: 0.9; }
/* H2 section title */
h2 { font-size: var(--fs-h2); font-weight: 500; line-height: 0.9; }
/* H3 sub-section ("Impossible", "Possible") */
h3 { font-size: var(--fs-h3); font-weight: 500; line-height: 0.9; }
/* H4 colored subhead — semibold, takes the active accent */
h4 { font-size: var(--fs-h4); font-weight: 600; line-height: 0.9; color: var(--accent-text); }
/* H5 eyebrow / label — bold caps ("DEAR SUPPORTER,", "OUR WORK IN ACTION") */
h5 { font-family: var(--font-ui); font-size: var(--fs-label); font-weight: 700; line-height: 0.9; letter-spacing: 0.1em; text-transform: uppercase; }
/* H6 attribution — caps, small */
h6 { font-family: var(--font-ui); font-size: var(--fs-small); font-weight: 500; line-height: 0.9; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }

.panel-navy h1, .panel-navy h2, .panel-navy h3, .panel-navy h5 { color: var(--white); }

/* ---------- 5. Body text ---------- */
p { margin: 0 0 1em; }
/* Lede — big intro blurb under a heading (Garamond) */
.lede { font-family: var(--font-serif); font-size: var(--fs-lede); font-weight: 500; line-height: 1.3; color: var(--navy); }
/* Column lead — sans, navy (Impossible / Possible / Repeatable columns) */
.colead { font-family: var(--font-sans); font-size: var(--fs-colead); line-height: 1.5; color: var(--navy); }
/* Mission statement — Garamond, white on navy */
.statement { font-family: var(--font-serif); font-size: clamp(1.375rem, 1.1rem + 1.1vw, 1.875rem); font-weight: 500; line-height: 1.35; text-wrap: pretty; color: var(--white); text-align: center; }
small, .small { font-size: var(--fs-small); }
strong, b { font-weight: 700; }
em, i { font-style: italic; }
mark { background: rgba(64, 177, 229, 0.25); color: inherit; padding: 0 0.15em; }
sup, sub { font-size: 0.65em; line-height: 0; }
code, kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em; background: var(--sky); padding: 0.1em 0.35em; border-radius: var(--radius);
}
.caption, figcaption { font-size: 0.8125rem; line-height: 1.4; margin-top: 0.6rem; }
/* Drop-cap style opener: first words in bold caps ("LOREM IPSUM dolor sit amet") */
.runin { font-weight: 700; text-transform: uppercase; }

/* ---------- 6. Links ---------- */
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--sky-line);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
a:hover { color: var(--link-hover); text-decoration-color: currentColor; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--sky-line); outline-offset: 3px; border-radius: 2px; }
.panel-navy a:not(.btn) { color: var(--white); }
.panel-navy a:not(.btn):hover { color: var(--sky); }

/* ---------- 7. Lists ---------- */
ul, ol { margin: 0 0 1.25em; padding-left: 1.3em; }
li { margin-bottom: 0.4em; padding-left: 0.2em; }
li > ul, li > ol { margin: 0.4em 0 0; }
ul li::marker { color: var(--accent); }
ol li::marker { color: var(--accent-text); font-family: var(--font-ui); font-weight: 700; }
ul.plain { list-style: none; padding: 0; }
ul.plain li { padding: 0; }
dl { margin: 0 0 1.25em; }
dt { font-family: var(--font-ui); font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy); }
dd { margin: 0 0 1em; }

/* ---------- 8. Pull quote & blockquote ---------- */
blockquote, .pullquote {
  margin: 2rem 0;
  font-family: var(--font-serif);
  font-size: var(--fs-quote);
  font-weight: 500;
  line-height: 1.2;
  color: var(--navy);
  /* Hanging opening quote like the print layout */
  text-indent: -0.45em;
  padding-left: 0.45em;
}
blockquote p, .pullquote p { margin: 0; }
.qm { color: var(--accent); font-weight: 700; }
blockquote footer, blockquote cite, .pullquote footer {
  display: block;
  margin-top: 1.1rem;
  text-indent: 0;
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}
.panel-navy blockquote, .panel-navy .pullquote, .panel-navy blockquote footer { color: var(--white); }

/* ---------- 9. Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  color: var(--white);
  background: var(--navy);
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  padding: 1.1em 1.9em;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { color: var(--white); background: var(--navy-shade); border-color: var(--navy-shade); }
.btn--accent { background: var(--coral); border-color: var(--coral); }
.btn--accent:hover { background: var(--coral-shade); border-color: var(--coral-shade); }
.btn--outline { background: transparent; color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: var(--white); }
.panel-navy .btn--outline { color: var(--white); border-color: var(--white); }
.panel-navy .btn--outline:hover { background: var(--white); color: var(--navy); }
.btn--lg { font-size: 1.0625rem; padding: 1.2em 2.2em; }
.btn--sm { font-size: 0.8125rem; padding: 0.8em 1.3em; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }

/* ---------- 10. Rules, tables, forms ---------- */
hr { border: 0; height: 1px; background: var(--rule); margin: 2rem 0; }
.panel-navy hr { background: rgba(255, 255, 255, 0.25); }

table { width: 100%; border-collapse: collapse; line-height: 1.4; }
th, td { text-align: left; padding: 0.75em 1em; border-bottom: 1px solid var(--rule); }
th { font-family: var(--font-ui); font-size: var(--fs-small); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy); border-bottom: 2px solid var(--navy); }

label { font-family: var(--font-ui); font-size: var(--fs-small); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy); }
input[type="text"], input[type="email"], textarea, select {
  font: 400 1rem/1.4 var(--font-sans);
  width: 100%; padding: 0.7em 0.8em; color: var(--ink); background: var(--white);
  border: 1px solid #9BA7C0; border-radius: var(--radius);
}
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(64, 177, 229, 0.5); border-color: var(--sky-line); }
