/* ==========================================================================
   [Foundation Name] – site styles
   Single stylesheet for the whole site. Change colours and fonts by editing
   the tokens in :root; everything else references them.
   ========================================================================== */

/* ---- Design tokens -------------------------------------------------------- */
:root {
  --color-bg: #faf9f6;
  --color-surface: #ffffff;
  --color-text: #1f1f1f;
  --color-muted: #5f5f5f;
  --color-accent: #2f6f5e;        /* reserved for the primary action (Donate) */
  --color-accent-contrast: #ffffff;
  --color-border: #e4e2dc;

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: var(--font-body);

  --max-width: 60rem;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #151514;
    --color-surface: #1e1e1c;
    --color-text: #f2f1ed;
    --color-muted: #a9a7a0;
    --color-accent: #6fb79f;
    --color-accent-contrast: #0f1a16;
    --color-border: #2c2c29;
    color-scheme: dark;
  }
}

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

html,
body {
  margin: 0;
  padding: 0;
}

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

/* ---- Base ----------------------------------------------------------------- */
html {
  font-size: 100%;               /* 16px baseline; never smaller */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  line-height: 1.15;
  margin: 0 0 var(--space-2);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p {
  margin: 0 0 var(--space-2);
}

a {
  color: var(--color-accent);
  text-underline-offset: 0.15em;
}

a:hover,
a:focus-visible {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

.muted {
  color: var(--color-muted);
}

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

/* ---- Buttons (ready for the Donate call to action) ------------------------ */
.button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  min-height: 44px;
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  border: 0;
  border-radius: 0.375rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.button:focus-visible {
  filter: brightness(1.1);
}

/* ---- Header --------------------------------------------------------------- */
.site-header {
  padding-block: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.site-logo {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-text);
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

/* ---- Main / hero ---------------------------------------------------------- */
.site-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: var(--space-5);
}

.hero-lead {
  max-width: 36rem;
  font-size: 1.125rem;
  color: var(--color-muted);
}

.hero-note {
  font-weight: 600;
}

/* ---- Footer --------------------------------------------------------------- */
.site-footer {
  padding-block: var(--space-3);
  border-top: 1px solid var(--color-border);
  font-size: 0.9375rem;
  text-align: center;
}

.site-footer p {
  margin-bottom: var(--space-1);
}

/* ---- Larger screens ------------------------------------------------------- */
@media (min-width: 48rem) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2rem; }

  .hero-lead {
    font-size: 1.25rem;
  }

  .container {
    padding-inline: var(--space-3);
  }
}
