@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700;800&display=swap");

/* Skip to content link for accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
}
.skip-link:focus {
  left: 0;
  top: 0;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  z-index: 9999;
  text-decoration: none;
  font-weight: 700;
}

/* Leeds Food Aid Network — site stylesheet */

/* Design tokens */
:root {
  /* Background texture image: path is relative to this file */
  --colour-bg: #f7f7f7;
  --colour-bg-texture: url("images/bg01.png");
  --colour-page: #ffffff;
  --colour-text: #2a332f;
  --colour-muted: #5a6560;
  --colour-link: #1a6b8c;
  --colour-link-hover: #134d66;
  --colour-brand: #2b7a46;
  --colour-brand-hover: #23643a;
  --colour-nav-bg: var(--colour-brand);
  --colour-nav-text: #ffffff;
  --colour-current: #1f2d24;
  --radius-pill: 999px;
  --radius-box: 10px;
  --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.06);
  --max-content: 1120px;
  --focus-ring: 2px solid #0b4d6e;
  --page-pad-inline: clamp(1.1rem, 4.2vw, 1.6rem);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--colour-text);
  background-color: var(--colour-bg);
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.045) 0%, rgba(0, 0, 0, 0) 28rem),
    var(--colour-bg-texture);
  background-position: top left, top left;
  background-repeat: repeat-x, repeat;
  background-size: 100% 30rem, auto;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: var(--colour-link);
}

a:hover {
  color: var(--colour-link-hover);
}

a:focus-visible,
button:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  font-weight: 800;
  line-height: 1.2;
  color: #1a221e;
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  margin: 0 0 0.5em;
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  margin: 0 0 0.45em;
}

p {
  margin: 0 0 1em;
}

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

ul {
  margin: 0;
  padding: 0;
}

/* Users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body.is-preload *,
body.is-preload *::before,
body.is-preload *::after {
  transition: none !important;
}

/* Page shell */
#page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.container {
  width: 100%;
  max-width: var(--max-content);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--page-pad-inline);
  padding-right: var(--page-pad-inline);
}

#header.container {
  width: 100%;
  box-sizing: border-box;
}

/* Header */
#header-wrapper {
  background: transparent;
  box-shadow: none;
}

body.homepage #header-wrapper {
  padding-top: 1.35rem;
  padding-bottom: 2rem;
  margin-bottom: 0.85rem;
}

body.no-sidebar #header-wrapper {
  padding-top: 0.75rem;
  padding-bottom: 1.45rem;
  margin-bottom: 0;
}

/* Logo + nav row */
#header {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: clamp(1rem, 2.5vw, 1.65rem);
  width: 100%;
}

#logo {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  flex: 0 0 auto;
  min-width: 0;
  width: fit-content;
  max-width: min(100%, 340px);
}

#logo h1 {
  margin: 0;
  font-size: 0;
  line-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

#logo a {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-decoration: none;
  border-radius: 6px;
  line-height: 0;
  max-width: 100%;
}

#logo a:hover {
  opacity: 0.92;
}

.logo-mark {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  line-height: 0;
  max-width: min(100%, 340px);
  overflow: visible;
}

#logo .site-logo {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: clamp(4rem, 12.5vw, 6.75rem);
  object-fit: contain;
  object-position: left bottom;
}

/* Main navigation */
#nav {
  flex: 0 1 auto;
  width: min(100%, 46rem);
  max-width: 100%;
  min-width: 0;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

#nav ul {
  list-style: none;
  margin: 0;
  padding: 0.58rem clamp(0.35rem, 1.2vw, 0.65rem);
  display: flex;
  flex-wrap: nowrap;
  gap: 0.2rem;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  min-height: 3.55rem;
  background: var(--colour-nav-bg);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 4px 18px rgba(25, 75, 45, 0.14);
  box-sizing: border-box;
}

#nav li {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

#nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.72rem clamp(0.35rem, 1.1vw, 0.65rem);
  font-size: clamp(0.82rem, 1.45vw, 0.98rem);
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--colour-nav-text);
  text-decoration: none;
  border-radius: 999px;
  line-height: 1.28;
}

#nav a:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--colour-brand);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#nav li.current a:hover {
  background: #eaf5ee;
  color: var(--colour-brand);
  box-shadow: none;
}

#nav a:focus-visible {
  outline-color: #fff;
  outline-offset: 1px;
}

#nav li.current a {
  background: #fff;
  color: var(--colour-brand);
}

#nav li.current a:focus-visible {
  outline-color: var(--colour-brand);
}

@media (max-width: 640px) {
  #header {
    flex-direction: column;
    align-items: stretch;
  }

  #logo {
    align-items: center;
  }

  #logo a {
    align-items: center;
  }

  .logo-mark {
    max-width: 100%;
    justify-content: center;
  }

  #logo .site-logo {
    object-position: center bottom;
  }

  #nav {
    width: 100%;
  }

  #nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem 0.55rem;
    padding: 0.68rem 0.75rem;
    border-radius: 14px;
  }

  #nav li {
    flex: 0 1 auto;
  }

  #nav a {
    width: auto;
    min-width: 5.75rem;
    padding: 0.78rem 1rem;
    letter-spacing: 0.03em;
  }
}

/* Inner pages */
#main-wrapper {
  flex: 1 1 auto;
  background: var(--colour-page);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  padding: 2.5rem 0 3rem;
}

body.no-sidebar #main-wrapper {
  margin-top: 0.75rem;
  padding-top: 0;
  box-shadow: none;
}

/* Homepage banner and features */
#banner-wrapper {
  padding: clamp(0.85rem, 2.2vw, 1.35rem) 0 2.5rem;
  background: transparent;
}

#banner {
  margin-top: 0.35rem;
  padding: clamp(2rem, 4.5vw, 2.85rem) clamp(1.35rem, 3.5vw, 2.1rem);
  background: var(--colour-page);
  border-radius: var(--radius-box);
  box-shadow: var(--shadow-soft);
  border: 1px solid #e2e8e4;
  box-sizing: border-box;
}

/* Hero: spacing between text and image */
body.homepage #banner .row {
  gap: clamp(1.35rem, 4vw, 2.35rem);
  align-items: center;
}

#banner.box.container {
  width: 100%;
}

/* Homepage 12-column grid */
.row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1rem, 3vw, 1.75rem);
  align-items: start;
}

.row > [class*="col-"] {
  min-width: 0;
}

.col-4 {
  grid-column: span 4;
}

.col-5 {
  grid-column: span 5;
}

.col-6 {
  grid-column: span 6;
}

.col-7 {
  grid-column: span 7;
}

@media (max-width: 980px) {
  .col-12-medium {
    grid-column: 1 / -1;
  }
}

#features-wrapper {
  padding: 2rem 0 3rem;
  background: transparent;
}

.section-heading {
  text-align: center;
}

.quick-grid {
  margin-top: 0.5rem;
}

.box.feature {
  background: var(--colour-page);
  border-radius: var(--radius-box);
  border: 1px solid #e5ebe7;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.box.feature .image.featured {
  display: block;
  line-height: 0;
  background: #f2f7f3;
}

.box.feature .image.featured img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.box.feature .inner {
  padding: 1rem 1.1rem 1.25rem;
  flex: 1 1 auto;
}

.box.feature .inner header h2,
.box.feature .inner header h3 {
  margin: 0 0 0.35em;
  font-size: 1.1rem;
}

.box.feature .inner header p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--colour-muted);
  line-height: 1.55;
}

/* Buttons */
.button {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  border: 2px solid transparent;
  line-height: 1.3;
  cursor: pointer;
  color: var(--colour-text);
  background: #e8eeea;
}

.button:hover {
  filter: brightness(0.97);
}

.button.primary {
  background: var(--colour-brand);
  border-color: var(--colour-brand);
  color: #fff !important;
}

.button.primary:hover {
  background: var(--colour-brand-hover);
  border-color: var(--colour-brand-hover);
  color: #fff !important;
}

.button.blue {
  background: #2a7ca8;
  border-color: #2a7ca8;
  color: #fff !important;
}

.button.blue:hover {
  background: #236892;
  border-color: #236892;
}

.button.large {
  padding: 0.75rem 1.35rem;
  font-size: 1.02rem;
}

/* Hero action buttons: equal height */
.hero-actions .button {
  min-height: 3.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Footer */
#footer-wrapper {
  padding: 2.5rem 0 3rem;
  background: #2d3a34;
  color: #dfe7e3;
  margin-top: auto;
}

#footer h3 {
  color: #fff;
  margin: 0 0 0.5em;
  font-size: 1.05rem;
}

#footer p {
  margin: 0 0 0.35em;
  color: #c5d0cb;
  font-size: 0.95rem;
}

#footer a {
  color: #b8e0f5;
}

#footer a:hover {
  color: #fff;
}

/* Contact form (labels in HTML) */
.contact-form label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  color: #2f3d35;
  margin-bottom: 0.25rem;
}

.contact-form label + input,
.contact-form label + textarea {
  margin-top: 0;
}

/* Donate page styles moved from inline CSS */
.donate-page {
  --donate-brand-green: #2b7a46;
  --donate-brand-green-dark: #23643a;
  --donate-brand-blue: #2a7ca8;
  --donate-ink: #233129;
  --donate-muted: #5f6c65;
  --donate-panel: #ffffff;
  --donate-border: #dfe9e2;
}

.donate-page .page-hero {
  background: linear-gradient(135deg, #2f8450 0%, #1f5f38 100%);
  padding: 2.3em 2.5em 1.9em;
  color: #fff;
}

.donate-page .page-hero h2 {
  color: #fff;
  margin: 0 0 0.22em;
  font-size: 2em;
  letter-spacing: 0.01em;
}

.donate-page .page-hero p {
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
  font-size: 1.02em;
  max-width: 820px;
}

.donate-page .donate-body {
  padding: 2.5em;
  background: linear-gradient(180deg, #f8fcf9 0%, #ffffff 70%);
}

.donate-page .panel {
  background: var(--donate-panel);
  border: 1px solid var(--donate-border);
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(14, 37, 24, 0.06);
  padding: 1.45em 1.55em;
}

.donate-page .cta-panel {
  width: 100%;
  margin: 0 0 1em;
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 1.1em;
  align-items: center;
  border-top: 4px solid var(--donate-brand-green);
}

.donate-page .cta-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #d8e7dc;
  background: #fff;
  padding: 0.35em;
}

.donate-page .cta-meta span {
  display: inline-block;
  font-size: 0.78em;
  font-weight: 800;
  color: #5f6f66;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.35em;
}

.donate-page .cta-meta h3,
.donate-page .flow-card h3 {
  margin: 0 0 0.45em;
  font-size: 1.2em;
  color: var(--donate-ink);
}

.donate-page .cta-meta p,
.donate-page .flow-card p {
  margin: 0;
  font-size: 0.94em;
  color: var(--donate-muted);
  line-height: 1.7;
}

.donate-page .donate-cta {
  display: inline-block;
  background: var(--donate-brand-green);
  border: 1px solid var(--donate-brand-green);
  color: #fff !important;
  font-weight: 800;
  border-radius: 7px;
  padding: 0.72em 1.35em;
  text-decoration: none;
  font-size: 0.92em;
  white-space: nowrap;
}

.donate-page .donate-cta:hover {
  background: var(--donate-brand-green-dark);
  border-color: var(--donate-brand-green-dark);
}

.donate-page .info-grid {
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1em;
}

.donate-page .flow-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.85em;
  flex-wrap: wrap;
}

.donate-page .flow-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.7em;
  align-items: start;
  flex: 1;
  min-width: 230px;
  border: 1px solid #e3ece6;
  border-radius: 8px;
  padding: 0.75em 0.8em;
  background: #fbfdfb;
}

.donate-page .flow-number {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #eaf5ee;
  color: var(--donate-brand-green);
  font-weight: 800;
  font-size: 0.85em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.donate-page .flow-text strong {
  display: block;
  color: var(--donate-ink);
  font-size: 0.93em;
  margin-bottom: 0.15em;
}

.donate-page .flow-text p {
  margin: 0;
  font-size: 0.9em;
  color: var(--donate-muted);
  line-height: 1.65;
}

.donate-page .help-inline {
  margin-top: 0.95em;
  font-size: 0.9em;
  color: #63716a;
}

.donate-page .help-inline a {
  color: var(--donate-brand-blue);
  font-weight: 700;
}

.donate-page .fareshare-section {
  margin-top: 2em;
  border-top: 1px solid var(--donate-border);
  padding-top: 2em;
}

.donate-page .fareshare-section h2 {
  font-size: 1.25em;
  color: var(--donate-ink);
  margin: 0 0 0.3em;
}

.donate-page .fareshare-section .section-intro {
  font-size: 0.97em;
  color: var(--donate-muted);
  line-height: 1.7;
  margin: 0 0 1.4em;
  border-left: 3px solid var(--donate-brand-green);
  padding-left: 0.8em;
}

.donate-page .org-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.4em;
  align-items: start;
  background: var(--donate-panel);
  border: 1px solid var(--donate-border);
  border-left: 3px solid var(--donate-brand-green);
  border-radius: 8px;
  padding: 1.1em;
  margin-bottom: 1em;
}

.donate-page .org-row img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  object-position: center;
  border-radius: 6px;
  background: #f4f8f5;
  display: block;
}

.donate-page .org-row-body h3 {
  font-size: 1em;
  font-weight: 800;
  color: var(--donate-ink);
  margin: 0 0 0.4em;
}

.donate-page .org-row-body p {
  font-size: 0.87em;
  color: var(--donate-muted);
  line-height: 1.7;
  margin: 0 0 0.4em;
}

.donate-page .org-row-body p:last-child {
  margin-bottom: 0;
}

.donate-page .org-meta {
  font-size: 0.83em;
  color: var(--donate-muted);
}

.donate-page .org-meta a {
  color: var(--donate-brand-blue);
  font-weight: 700;
}

@media (max-width: 900px) {
  .donate-page .cta-panel {
    grid-template-columns: 1fr;
  }

  .donate-page .cta-logo {
    width: 84px;
    height: 84px;
  }

  .donate-page .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .donate-page .page-hero {
    padding: 2em 1.2em 1.7em;
  }

  .donate-page .donate-body {
    padding: 1.7em 1.2em 2.2em;
  }

  .donate-page .donate-cta {
    width: 100%;
    text-align: center;
  }

  .donate-page .org-row {
    grid-template-columns: 1fr;
  }

  .donate-page .org-row img {
    height: 180px;
  }
}
