/* ==========================================================================
   Real Aid — realaid.org.uk
   Single stylesheet. Mobile-first; breakpoints at 40em / 60em.
   Brand colours recovered from the original site's theme.
   ========================================================================== */

:root {
  /* Brand */
  --green: #8ac200;
  --green-dark: #6d9a00;
  --green-darker: #4f7000;
  --blue: #007eb1;
  --blue-dark: #00658d;
  --blue-tint: #e5f2f7;
  --blue-tint-light: #f2fafd;

  /* Neutrals */
  --ink: #1f2933;
  --ink-soft: #52606d;
  --rule: #dfe4e8;
  --paper: #ffffff;
  --paper-alt: #f7f9fa;

  /* Type */
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --measure: 68ch;

  /* Space */
  --gap: 1.25rem;
  --section-y: 3.5rem;
  --radius: 6px;
  --shadow: 0 1px 3px rgb(31 41 51 / 0.10), 0 6px 16px rgb(31 41 51 / 0.06);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 2.9rem); color: var(--blue); }
h2 { font-size: clamp(1.4rem, 1.15rem + 1.1vw, 1.95rem); color: var(--blue); }
h3 { font-size: 1.2rem; color: var(--green-darker); }

p, ul, ol { margin: 0 0 1.1em; }
p, li { max-width: var(--measure); }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--blue-dark); }

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

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

/* --- Layout helpers ------------------------------------------------------ */

.wrap { width: min(100% - 2.5rem, 68rem); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2.5rem, 48rem); margin-inline: auto; }

/* Prose sections.
   Body text is capped at a readable measure, so in a full-width 68rem
   container it fills only the left half and leaves a growing void to the
   right. Text-only sections instead use a container sized to the measure
   itself, so the block is centred and the whitespace is symmetric. Sections
   containing a grid (cards, stats, shops, press, roles) keep the full width. */
.wrap--prose { width: min(100% - 2.5rem, 42rem); margin-inline: auto; }
.wrap--prose p,
.wrap--prose li,
.wrap--prose blockquote { max-width: none; }

.section { padding-block: var(--section-y); }
.section--tint { background: var(--blue-tint-light); border-block: 1px solid var(--rule); }
.section--alt { background: var(--paper-alt); border-block: 1px solid var(--rule); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--blue); color: #fff; padding: .75rem 1.25rem;
  font-weight: 600; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* --- Header -------------------------------------------------------------- */

.site-header {
  border-bottom: 3px solid var(--green);
  background: var(--paper);
  position: sticky; top: 0; z-index: 50;
}

.header-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--gap); padding-block: .75rem;
}

.logo { flex: 0 0 auto; }
.logo img { width: 168px; }

.header-contact {
  display: none;
  text-align: right;
  font-size: .95rem;
  line-height: 1.4;
}
.header-contact a { font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.header-contact .charity-no { color: var(--ink-soft); font-size: .8rem; }

@media (min-width: 40em) {
  .header-contact { display: block; }
}

/* Nav toggle (mobile) */
.nav-toggle {
  display: inline-flex; align-items: center; gap: .5rem;
  font: inherit; font-weight: 600;
  background: var(--blue); color: #fff;
  border: 0; border-radius: var(--radius);
  padding: .6rem .9rem; cursor: pointer;
}
.nav-toggle:hover { background: var(--blue-dark); }
.nav-toggle-bars { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

/* Nav */
.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
}
.site-nav a {
  display: block;
  padding: .8rem .25rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}
.site-nav a:hover { color: var(--blue); }
.site-nav a[aria-current="page"] { color: var(--green-darker); }

/* Mobile: nav collapses behind the toggle — but only when JS is available to
   open it again. Without JS the menu stays expanded and the toggle is hidden,
   so every page remains reachable. */
@media (max-width: 59.999em) {
  .site-nav { display: none; padding-bottom: .5rem; }
  .site-nav.is-open { display: block; }
  .no-js .site-nav { display: block; }
  .no-js .nav-toggle { display: none; }
}

@media (min-width: 60em) {
  .nav-toggle { display: none; }
  .site-nav { display: block !important; }
  .site-nav ul { flex-direction: row; gap: 1.5rem; justify-content: flex-end; }
  .site-nav a { padding: .9rem 0; border-bottom: 3px solid transparent; }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--green); }
  .site-nav a:hover { border-bottom-color: var(--blue); }
  .nav-row { border-top: 1px solid var(--rule); }
}

/* --- Hero ---------------------------------------------------------------- */

.hero { position: relative; background: var(--blue-tint); }
.hero-img { width: 100%; aspect-ratio: 821 / 367; object-fit: cover; }

.hero-body { padding-block: 2rem 2.5rem; }
.hero-body h1 { margin-bottom: .35em; }
.hero-lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 54ch; }

@media (min-width: 60em) {
  .hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 3rem; }
  .hero-body { padding-block: 3rem; }
}

/* Page banner (inner pages) */
.page-banner { background: var(--blue-tint); border-bottom: 3px solid var(--green); }
.page-banner img { width: 100%; aspect-ratio: 821 / 250; object-fit: cover; }

.page-head { padding-block: 2.25rem 0; }
.page-head p { font-size: 1.15rem; color: var(--ink-soft); max-width: 58ch; }

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-weight: 700; text-decoration: none;
  padding: .8rem 1.4rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
}
.btn--primary { background: var(--green); color: #1c2b00; }
.btn--primary:hover { background: var(--green-dark); color: #fff; }
.btn--secondary { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn--secondary:hover { background: var(--blue); color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* --- Cards --------------------------------------------------------------- */

.cards { display: grid; gap: 1.5rem; padding: 0; margin: 0; list-style: none; }
@media (min-width: 40em) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.card-body { padding: 1.25rem; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin-bottom: .4em; }
.card p { flex: 1; font-size: .98rem; }
.card a.card-link { font-weight: 700; text-decoration: none; }
.card a.card-link::after { content: " \2192"; }
.card a.card-link:hover { text-decoration: underline; }

/* --- Stats --------------------------------------------------------------- */

.stats { display: grid; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
@media (min-width: 40em) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60em) { .stats { grid-template-columns: repeat(4, 1fr); } }

.stat {
  background: var(--paper);
  border-left: 5px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow);
}
.stat-figure { display: block; font-size: 1.9rem; font-weight: 700; color: var(--blue); line-height: 1.1; }
.stat-label { display: block; font-size: .95rem; color: var(--ink-soft); margin-top: .3rem; max-width: none; }

/* --- Press --------------------------------------------------------------- */

.press { display: grid; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
@media (min-width: 50em) { .press { grid-template-columns: repeat(2, 1fr); } }

.press-item {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.press-item blockquote { margin: 0 0 1rem; font-size: 1.15rem; line-height: 1.5; color: var(--ink); }
.press-item blockquote p { max-width: none; }
.press-item cite { display: block; font-style: normal; font-size: .95rem; color: var(--ink-soft); }
.press-masthead { font-weight: 700; color: var(--blue); letter-spacing: .01em; }

/* --- Shops --------------------------------------------------------------- */

.shops { display: grid; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
@media (min-width: 45em) { .shops { grid-template-columns: repeat(2, 1fr); } }

.shop {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.shop h2 { font-size: 1.25rem; margin-bottom: .15em; color: var(--blue); }
.shop .shop-town { color: var(--ink-soft); font-size: .95rem; margin-bottom: 1rem; }
.shop dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; font-size: .98rem; }
.shop dt { font-weight: 700; color: var(--green-darker); }
.shop dd { margin: 0; }
.shop dd p { margin: 0 0 .3em; max-width: none; }

/* --- Roles (volunteering) ------------------------------------------------ */

.roles { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: 1.25rem; }
@media (min-width: 45em) { .roles { grid-template-columns: repeat(3, 1fr); } }
.role {
  border: 1px solid var(--rule); border-radius: var(--radius);
  border-top: 4px solid var(--green);
  padding: 1.25rem; background: var(--paper); box-shadow: var(--shadow);
}
.role h3 { margin-bottom: .4em; }
.role p, .role li { font-size: .98rem; max-width: none; }
.role ul { padding-left: 1.1rem; margin-bottom: 0; }

/* --- Contact panel ------------------------------------------------------- */

.contact-grid { display: grid; gap: 2rem; }
@media (min-width: 50em) { .contact-grid { grid-template-columns: 1fr 1fr; } }

.contact-card {
  background: var(--blue-tint);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.contact-card h2 { margin-top: 0; }
.contact-card dt { font-weight: 700; color: var(--green-darker); margin-top: 1rem; }
.contact-card dt:first-of-type { margin-top: 0; }
.contact-card dd { margin: .2rem 0 0; }
.contact-card dd a { font-weight: 600; }
.contact-big { font-size: 1.35rem; font-weight: 700; text-decoration: none; }

/* --- News ---------------------------------------------------------------- */

.news-item {
  padding-block: 2rem;
  border-bottom: 1px solid var(--rule);
}
.news-item:last-child { border-bottom: 0; }
.news-item h3 { font-size: 1.35rem; color: var(--blue); margin-bottom: .3em; }
.news-meta { font-size: .9rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .6em; }

/* --- Callout ------------------------------------------------------------- */

.callout {
  background: var(--blue-tint);
  border-left: 5px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin-block: 1.75rem;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--blue); }

.pullquote {
  border-left: 5px solid var(--green);
  margin: 2rem 0;
  padding-left: 1.5rem;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink);
}
.pullquote cite { display: block; font-style: normal; font-size: .95rem; color: var(--ink-soft); margin-top: .6rem; }

/* --- Footer -------------------------------------------------------------- */

.site-footer {
  background: var(--ink);
  color: #cfd6dd;
  padding-block: 2.5rem 1.5rem;
  margin-top: var(--section-y);
}
.site-footer a { color: #fff; }
.site-footer h2 { color: #fff; font-size: 1.05rem; margin-bottom: .6em; }

.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 45em) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }

.site-footer img { width: 150px; margin-bottom: 1rem; }
.site-footer p, .site-footer li { font-size: .95rem; max-width: none; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45rem; }

.social-links { display: flex; gap: 1rem; margin-top: .5rem; }
.social-links a {
  display: inline-flex; align-items: center; gap: .4rem;
  text-decoration: none; font-weight: 600; font-size: .95rem;
}
.social-links a:hover { text-decoration: underline; }
.social-links svg { width: 20px; height: 20px; fill: currentColor; flex: 0 0 auto; }

.footer-legal {
  margin-top: 2rem; padding-top: 1.25rem;
  border-top: 1px solid rgb(255 255 255 / 0.15);
  font-size: .875rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
}
.footer-legal p { margin: 0; }

.to-top { text-decoration: none; font-weight: 600; }
.to-top::before { content: "\2191 "; }

/* --- Utilities ----------------------------------------------------------- */

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

.lede { font-size: 1.2rem; color: var(--ink-soft); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

@media print {
  .site-header, .site-footer, .nav-toggle, .btn-row { display: none; }
  body { font-size: 11pt; }
}
