/*
  Volunteer Toolbox landing page.

  Uses the Volunteer Toolbox brand exactly as the scheduling app does
  (C:\Volunteer\static\css\base.css): same colours, font, sizes and 40rem column.
  Accessibility target: WCAG 2.2 AA, 18px body text, 7:1 body contrast,
  48px touch targets, no pop-ups. Sizes are in rem so text-size settings scale everything.
*/

:root {
  --color-text: #183D26;          /* deep green: 11.6:1 on cream, 12.1:1 on white */
  --color-text-muted: #4A5563;    /* gray: 7.3:1 on cream, 7.6:1 on white */
  --color-bg: #FBFAF6;            /* cream page */
  --color-surface: #FFFFFF;       /* white cards on the cream page */
  --color-surface-edge: #CFE0D4;  /* mist: decorative card edge */
  --color-border: #6b6b6b;
  --color-heading: #245536;       /* green: 8.3:1 on cream */
  --color-primary: #245536;       /* button fill; white text 8.6:1 */
  --color-primary-hover: #183D26;
  --color-selected: #E3EEE6;      /* text on it 10.2:1 */
  --color-link: #245536;
  --color-focus: #D9651B;         /* brand orange focus ring. Never text. */
  --color-accent: #D9651B;        /* brand orange, decoration only */

  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --text-base: 1.125rem;          /* 18px */
  --text-lg: 1.25rem;             /* 20px */
  --text-h2: 1.5rem;              /* 24px */
  --text-h1: 2rem;                /* 32px */
  --line-height: 1.5;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --target-min: 3rem;             /* 48px */
  --radius: 0.5rem;
  --content-width: 40rem;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-bg);
  overflow-wrap: break-word;
}

/* One centred column at every width. */
.site-header, main, .site-footer {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--space-2);
}
.site-header {
  padding-block: var(--space-2);
  border-bottom: 4px solid var(--color-heading);
}
.brand { display: inline-flex; min-height: var(--target-min); align-items: center; }
.brand-logo { display: block; height: 2.5rem; width: auto; }   /* never under 32px tall */

main { padding-block: var(--space-4); }
main > * + * { margin-top: var(--space-4); }

h1, h2 { line-height: 1.25; margin: 0 0 var(--space-2); color: var(--color-heading); }
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
p, ul { margin: 0 0 var(--space-2); }

a { color: var(--color-link); text-decoration-thickness: 0.1em; text-underline-offset: 0.15em; }
a:hover { color: var(--color-primary-hover); }

/* Skip link for keyboard and screen-reader users. */
.skip-link {
  position: absolute;
  left: var(--space-1);
  top: -10rem;
  padding: var(--space-1) var(--space-2);
  background: var(--color-bg);
  color: var(--color-text);
  border: 2px solid var(--color-text);
}
.skip-link:focus { top: var(--space-1); }
.skip-link { display: inline-flex; align-items: center; min-height: var(--target-min); }

/* A link on its own line gets a full 48px tap height. */
.tap-link { display: inline-flex; align-items: center; min-height: var(--target-min); }

/* A highly visible focus ring on everything (WCAG 2.2 focus appearance). */
:focus-visible {
  outline: 3px solid var(--color-text);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--color-focus);
}
main:focus { outline: none; }

/* Mission */
.lead { font-size: var(--text-lg); }
.notice {
  padding: var(--space-2);
  border-left: 6px solid var(--color-accent);
  background: var(--color-surface);
  margin-bottom: 0;
}

/* Tool cards */
.tool-card {
  background: var(--color-surface);
  border: 1px solid var(--color-surface-edge);
  border-top: 6px solid var(--color-heading);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-2);
}
@media (min-width: 30em) { .tool-card { padding-inline: var(--space-3); } }
.tool-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-2);
  margin-bottom: var(--space-1);
}
.tool-head h2 { margin: 0; }
.status {
  margin: 0;
  padding: 0.125rem 0.75rem;
  font-weight: 700;
  color: var(--color-text);
  background: var(--color-selected);
  border: 2px solid var(--color-heading);
  border-radius: 999px;
  white-space: nowrap;
}
.tool-line { font-size: var(--text-lg); font-weight: 700; }
.points { padding-left: 1.5rem; }
.points li + li { margin-top: 0.25rem; }
.points li::marker { color: var(--color-heading); }

.phone { margin: var(--space-3) 0; text-align: center; }
.phone img {
  display: block;
  width: 15rem;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
  border: 2px solid var(--color-text);
  border-radius: 1.25rem;
  background: var(--color-bg);
}
.phone figcaption { margin-top: var(--space-1); color: var(--color-text-muted); }

/* Buttons: large, plain words, full width on phones. */
.button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--target-min);
  padding: 0.75rem var(--space-3);
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius);
  background: var(--color-primary);
  color: #ffffff;
}
.button:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); color: #ffffff; }
@media (min-width: 40em) { .button { display: inline-flex; width: auto; } }

/* Footer */
.site-footer {
  padding-block: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border);
}
.footer-title { font-size: var(--text-lg); margin-bottom: var(--space-1); }
.site-footer address { font-style: normal; margin-bottom: var(--space-2); }
.site-footer p { color: var(--color-text-muted); }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .skip-link, .button { display: none; }
  body { font-size: 12pt; }
}
