/* ==========================================================================
   Good Deeds - gooddeeds.org.uk
   Static build. All shared styles live in this one file.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   Change the brand colour or the typeface here and it updates site-wide.
   -------------------------------------------------------------------------- */
:root {
  --brand: #3898cd;
  --brand-dark: #2a7cab;

  --text: #1a1a1a;
  --text-muted: #999999;
  --text-footer: #777777;
  --rule: #ececec;
  --bg: #ffffff;

  --font-body: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Helvetica, Arial, sans-serif;

  --container: 1140px;   /* header and footer width */
  --content: 940px;      /* text column width */
  --gutter: 24px;
}

/* --------------------------------------------------------------------------
   2. Reset and base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--brand-dark);
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

/* Skip link - hidden until keyboard focused */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
  color: #fff;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   3. Layout containers
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.content {
  width: 100%;
  max-width: var(--content);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Sticky footer without flex on body children breaking anything */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  flex: 1 0 auto;
}

/* --------------------------------------------------------------------------
   4. Header
   -------------------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--rule);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 30px;
  padding-bottom: 30px;
}

.site-logo {
  display: inline-block;
  line-height: 0;
}

.site-logo img {
  width: 300px;
  height: auto;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 34px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: #333333;
  font-size: 15px;
  line-height: 1.4;
  display: inline-block;
  padding: 4px 0;
  transition: color 0.15s ease;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--brand);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--brand);
}

/* --------------------------------------------------------------------------
   5. Page content
   -------------------------------------------------------------------------- */
.page {
  padding-top: 78px;
  padding-bottom: 100px;
}

.page-title {
  margin: 0 0 30px;
  font-size: 36px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* Home page hero sits above the title */
.hero {
  margin-bottom: 44px;
}

.hero img {
  width: 100%;
}

.page p {
  margin: 0 0 26px;
}

.page p:last-child {
  margin-bottom: 0;
}

.page ul {
  margin: 0 0 26px;
  padding-left: 22px;
}

.page li {
  margin-bottom: 14px;
}

.page li:last-child {
  margin-bottom: 0;
}

.page strong,
.page b {
  font-weight: 700;
}

/* Pull quote line at the foot of the About page */
.statement {
  font-weight: 700;
}

/* Contact details - the label is muted, the value is not.
   The email and phone are live links but keep the original dark text. */
.contact-label {
  color: var(--text-muted);
}

.contact-link {
  color: var(--text);
  text-decoration: none;
}

.contact-link:hover,
.contact-link:focus {
  color: var(--brand);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   6. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--rule);
  color: var(--text-footer);
  font-size: 14px;
}

.site-footer .container {
  padding-top: 28px;
  padding-bottom: 28px;
}

.site-footer p {
  margin: 0;
}

/* --------------------------------------------------------------------------
   7. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .site-header .container {
    flex-direction: column;
    gap: 20px;
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .site-nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 26px;
  }

  .page {
    padding-top: 48px;
    padding-bottom: 64px;
  }

  .page-title {
    font-size: 30px;
  }

  .hero {
    margin-bottom: 32px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
    line-height: 1.8;
  }

  .site-logo img {
    width: 240px;
  }

  .page-title {
    font-size: 26px;
  }
}

/* --------------------------------------------------------------------------
   8. Print
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .site-footer {
    border: 0;
  }

  .site-nav,
  .skip-link {
    display: none;
  }
}
