/**
 * Sameday Foundation — Brand layer (loaded on every page, after components.css)
 * Colours come straight from the logo: royal blue fields, vivid orange for hope and giving.
 * Headings: Bricolage Grotesque, sentence case. No all-caps labels.
 */

:root {
  --h-blue: #0A4C97;         /* logo royal blue — large colour fields */
  --h-blue-2: #1B64B8;       /* lighter blue on blue */
  --h-navy: #0B3D7A;         /* headings on light */
  --h-deep: #0A2448;         /* text on orange, footer */
  --h-orange: #FD6308;       /* logo orange */
  --h-orange-bright: #FF7A1A;/* orange on blue (keeps 3:1 against the field) */
  --h-orange-text: #C44B00;  /* orange for small text on white */
  --h-sky: #EEF4FB;          /* blue-tint canvas */
  --h-peach: #FFF3EA;        /* orange-tint canvas */
  --h-ink: #16202E;          /* body text */
  --h-ink-soft: #4A5566;     /* secondary text */
  --h-line: #D8E1EC;         /* hairlines on light */
  --h-pale: #C8DBF2;         /* secondary text on blue */
  --h-display: 'Bricolage Grotesque', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --h-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --h-gutter: clamp(16px, 4vw, 56px);
  --h-max: 1280px;

  /* Re-point the shared design-system tokens at the brand */
  --color-blue: var(--h-blue);
  --color-blue-dark: var(--h-navy);
  --color-blue-tint: var(--h-sky);
  --color-orange-tint: var(--h-peach);
  --color-charcoal: var(--h-ink);
  --color-bg-light: var(--h-sky);
  --color-border: var(--h-line);
  --color-bg-charcoal: var(--h-deep);
  --font-family-display: var(--h-display);
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 14px;
  --container-max-width: var(--h-max);
  --container-padding: var(--h-gutter);
}

/* ---------- Type ---------- */
h1, h2, h3, h4, h5, h6 { color: var(--h-navy); font-feature-settings: normal; }

.t-hero-h1 {
  font-weight: 700;
  text-transform: none;
  letter-spacing: -0.028em;
  line-height: 1.02;
  font-size: clamp(2.4rem, 4.8vw, 4rem);
  max-width: 20ch;
}
.t-section-h2 { color: var(--h-navy); letter-spacing: -0.025em; line-height: 1.08; font-size: clamp(1.9rem, 3.2vw, 2.75rem); }
.t-card-h3, .t-card-h4 { color: var(--h-navy); }

/* All-caps overline labels were template chrome — headings carry the meaning */
.t-kicker { display: none; }

.t-lead { color: var(--h-ink-soft); }
.t-arrow-link { color: var(--h-blue); }
.t-arrow-link:hover { color: var(--h-orange-text); }

/* ---------- Buttons ---------- */
.c-btn {
  font-family: var(--h-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.005em;
  border-radius: 10px;
  min-height: 46px;
  padding: 12px 22px;
}
.c-btn:hover { transform: none; }
.c-btn--donate { background: var(--h-orange); border-color: var(--h-orange); color: #FFFFFF; letter-spacing: -0.005em; }
.c-btn--donate:hover { background: #E85100; border-color: #E85100; color: #FFFFFF; }
.c-btn--primary { background: var(--h-blue); border-color: var(--h-blue); }
.c-btn--primary:hover { background: var(--h-navy); border-color: var(--h-navy); }
.c-btn--outline { color: var(--h-blue); border-color: var(--h-blue); }
.c-btn--sm { min-height: 38px; padding: 8px 16px; font-size: 0.9375rem; }

/* Home-page primitives, shared so every page speaks the same language */
.h-wrap {
  width: 100%;
  max-width: var(--h-max);
  margin: 0 auto;
  padding-left: var(--h-gutter);
  padding-right: var(--h-gutter);
}
.h-section { padding: clamp(64px, 9vw, 128px) 0; }
.h-h2 {
  font-family: var(--h-display);
  font-weight: 700;
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 72;
  max-width: 18ch;
  margin-bottom: 20px;
  color: var(--h-navy);
}
.h-lead {
  font-size: clamp(1.0625rem, 1.3vw, 1.25rem);
  line-height: 1.55;
  color: var(--h-ink-soft);
  max-width: 58ch;
}
.h-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 28px;
  border-radius: 10px;
  font-family: var(--h-display);
  font-weight: 700;
  font-size: 1.1875rem;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: background-color 150ms ease-out, color 150ms ease-out;
}
.h-btn--give { background: var(--h-orange); color: #FFFFFF; }
.h-btn--give:hover { background: #E85100; color: #FFFFFF; }
.h-btn--navy { background: var(--h-deep); color: #FFFFFF; }
.h-btn--navy:hover { background: var(--h-navy); color: #FFFFFF; }
.h-link {
  font-weight: 600;
  color: var(--h-blue);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}
.h-link:hover { color: var(--h-orange-text); }
.h-link--light { color: #FFFFFF; }
.h-link--light:hover { color: var(--h-pale); }
.h-link--deep { color: var(--h-deep); }
.h-link--deep:hover { color: #FFFFFF; }
.h-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }

/* ---------- Top bar ---------- */
.c-topbar {
  background: var(--h-blue);
  color: #FFFFFF;
  font-size: 0.875rem;
}
.c-topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 38px;
}
.c-topbar__group { display: flex; align-items: center; gap: 24px; }
.c-topbar a { color: #FFFFFF; font-weight: 600; }
.c-topbar a:hover { color: var(--h-pale); }
.c-topbar__muted { color: var(--h-pale); }

/* ---------- Header & menu bar ---------- */
.c-header {
  height: 84px;
  border-bottom: 1px solid var(--h-line);
}
.c-header.is-scrolled { box-shadow: 0 6px 24px rgba(10, 36, 72, 0.08); }
.c-header__inner { gap: 32px; }
.c-header__logo { height: 58px; max-width: 230px; }
.c-header__logo:hover { transform: none; }

.c-nav { flex: 1; justify-content: center; }
.c-nav__list { gap: 4px; }
.c-nav__link {
  font-family: var(--h-display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--h-navy);
  padding: 10px 14px;
  border-radius: 8px;
  gap: 6px;
}
.c-nav__link:hover,
.c-nav__item:focus-within > .c-nav__link { color: var(--h-orange-text); background: var(--h-peach); }
.c-nav__link.is-active::after { display: none; }
.c-nav__link[aria-current="page"] { color: var(--h-orange-text); }
.c-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -19px;
  height: 4px;
  border-radius: 4px 4px 0 0;
  background: var(--h-orange);
}
.c-dropdown-icon { margin-left: 0; opacity: 0.7; }

.c-dropdown {
  min-width: 270px;
  padding: 8px;
  margin-top: 10px;
  border: 1px solid var(--h-line);
  border-top: 4px solid var(--h-orange);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(10, 36, 72, 0.14);
}
.c-dropdown::before { top: -22px; height: 22px; }
.c-dropdown__link {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.975rem;
  font-weight: 500;
  color: var(--h-ink);
}
.c-dropdown__link:hover,
.c-dropdown__link:focus-visible { background: var(--h-peach); color: var(--h-orange-text); }

.c-header__actions { gap: 12px; }
.c-header__donate { min-height: 48px; padding: 12px 26px; font-size: 1.0625rem; }
.c-header__donate[aria-current="page"] { box-shadow: 0 0 0 3px var(--h-peach), 0 0 0 5px var(--h-orange); }

.c-hamburger { border-color: var(--h-line); border-radius: 10px; }
.c-hamburger__icon,
.c-hamburger__icon::before,
.c-hamburger__icon::after { background-color: var(--h-navy); }
.c-hamburger.is-active .c-hamburger__icon { background-color: transparent; }

/* Mobile drawer */
.c-mobile-drawer { top: var(--header-height-mobile); }
.c-mobile-drawer__list { gap: 0; margin-bottom: 32px; }
.c-mobile-drawer__link {
  font-family: var(--h-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--h-navy);
  padding: 14px 0;
}
.c-mobile-drawer__link[aria-current="page"] { color: var(--h-orange-text); }
.c-mobile-drawer__sub { border-left: 3px solid var(--h-orange); margin: 4px 0 12px; }
.c-mobile-drawer__sub-link { font-size: 1rem; color: var(--h-ink-soft); }
.c-mobile-drawer__sub-link:hover { color: var(--h-orange-text); }
.c-mobile-drawer__contact { color: var(--h-ink-soft); }
.c-mobile-drawer__contact a { font-family: var(--h-display); font-size: 1.25rem; font-weight: 700; color: var(--h-orange-text); }

@media (max-width: 1180px) {
  .c-nav__link { padding: 10px 10px; font-size: 1rem; }
  .c-nav__link[aria-current="page"]::after { left: 10px; right: 10px; }
}
@media (max-width: 1024px) {
  .c-topbar__hide-sm { display: none; }
}
@media (max-width: 768px) {
  .c-header { height: var(--header-height-mobile); }
  .c-header__logo { height: 46px; }
  .c-header__donate { min-height: 42px; padding: 10px 18px; font-size: 1rem; }
  .c-topbar { display: none; }
}

/* ---------- Inner-page hero: the brand blue band ---------- */
.c-page-hero {
  background: var(--h-blue);
  color: #FFFFFF;
  border-bottom: 0;
  padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 7vw, 96px);
}
.c-page-hero .t-hero-h1 { color: #FFFFFF; }
.c-page-hero .t-hero-h1::after {
  content: "";
  display: block;
  width: 96px;
  height: 6px;
  margin-top: 24px;
  border-radius: 3px;
  background: var(--h-orange-bright);
}
.c-page-hero .t-lead,
.c-page-hero p { color: #E4EEFA !important; }
.c-page-hero .c-breadcrumbs { color: var(--h-pale); margin-bottom: 28px; }
.c-page-hero .c-breadcrumbs a { color: #FFFFFF; text-decoration: underline; text-underline-offset: 3px; }
.c-page-hero .c-breadcrumbs span { color: var(--h-pale); }
.c-page-hero img { border-radius: 14px; }
.c-page-hero [style*="border: 1px solid"] { border: 0 !important; box-shadow: none !important; }
.c-page-hero .c-btn--primary,
.c-page-hero .c-btn--donate { background: var(--h-orange-bright); border-color: var(--h-orange-bright); color: var(--h-deep); }
.c-page-hero .c-btn--primary:hover,
.c-page-hero .c-btn--donate:hover { background: #FF9447; border-color: #FF9447; color: var(--h-deep); }
.c-page-hero .c-btn--outline { color: #FFFFFF; border-color: rgba(255, 255, 255, 0.7); background: transparent; }
.c-page-hero .c-btn--outline:hover { background: rgba(255, 255, 255, 0.1); color: #FFFFFF; }
.c-page-hero .c-callout { background: rgba(255, 255, 255, 0.08); border-left-color: var(--h-orange-bright) !important; }
.c-page-hero .c-callout p, .c-page-hero .c-callout strong { color: #FFFFFF !important; }

/* ---------- Sections, badges, callouts ---------- */
.l-section--light { background: var(--h-sky); border-bottom: 0; }
.l-section--blue { background: var(--h-blue); }
.c-badge { text-transform: none; letter-spacing: 0; border-radius: 999px; padding: 4px 12px; font-size: 0.875rem; }
.c-badge--orange { background: var(--h-orange-text); }
.c-callout { border-left: 4px solid var(--h-orange); background: var(--h-peach); border-radius: 0 12px 12px 0; }
.c-transparency-box { border-left-color: var(--h-orange); border-radius: 12px; }
.c-filter-pill.is-active, .c-filter-pill:hover { background: var(--h-blue); border-color: var(--h-blue); color: #FFFFFF; }

/* ---------- Closing ask (same block on every page) ---------- */
.h-ask {
  background: linear-gradient(135deg, #F84800 0%, var(--h-orange) 50%, #FF8A1F 100%);
  color: var(--h-deep);
}
.h-ask__main {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 32px 64px;
  align-items: end;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(10, 36, 72, 0.25);
}
.h-ask .h-h2 { color: #FFFFFF; max-width: 16ch; font-size: clamp(2.25rem, 4.4vw, 3.75rem); }
.h-ask__main p { color: var(--h-deep); font-weight: 500; max-width: 52ch; margin-bottom: 0; }
.h-ask__note { margin-top: 16px; font-size: 0.9375rem; }
.h-ask__other {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 64px;
  padding-top: 40px;
}
.h-ask__other h3 {
  font-family: var(--h-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 6px;
}
.h-ask__other p { color: var(--h-deep); margin-bottom: 12px; max-width: 46ch; }

@media (max-width: 900px) {
  .h-ask__main { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .h-ask__other { grid-template-columns: 1fr; }
  .h-actions .h-btn, .h-ask .h-btn { width: 100%; }
}

/* ---------- Footer ---------- */
.c-footer { background: var(--h-deep); border-top: 6px solid var(--h-orange); }
.c-contact-item__label, .c-footer-col__title { text-transform: none; letter-spacing: 0; }
.c-contact-item__label { color: var(--h-pale); }
.c-footer-col__title { font-size: 1.0625rem; }
.c-footer-col__link:hover { color: var(--h-orange-bright); }
.c-contact-item__val--helpline, .c-contact-item__val--helpline a { color: var(--h-orange-bright); }

/* ==========================================================================
   Refinement: flatter, cleaner surfaces + in-depth mobile layout
   Much of the page markup carries inline styles (fixed paddings, 2-column
   grids, centred text); these rules normalise them without touching content.
   ========================================================================== */

/* Surfaces: one border weight, one radius, no drop shadows */
:root {
  --h-radius: 16px;
  --shadow-subtle: none;
  --shadow-hover: none;
}
main [style*="box-shadow"] { box-shadow: none !important; }
.c-form,
.c-commitment-card,
.c-shelf-tile,
.c-stat-box,
.c-pledge-steps,
.c-impact-node,
.c-reality-card,
.c-card,
.c-pathway-card {
  border: 1px solid var(--h-line);
  border-radius: var(--h-radius);
  box-shadow: none;
}
main [style*="border: 1px solid var(--color-border)"] { border-color: var(--h-line) !important; }
main [style*="border-radius: var(--radius-sm)"],
main [style*="border-radius: var(--radius-xs)"] { border-radius: var(--h-radius) !important; }
main img { border-radius: inherit; }

/* Inputs: taller, calmer focus ring */
.c-input, .c-select, .c-textarea {
  min-height: 50px;
  font-size: 1rem;           /* 16px stops iOS zooming into fields */
  border-radius: 10px;
  border-color: #C9D5E3;
}
.c-textarea { min-height: 128px; }
.c-input:focus, .c-select:focus, .c-textarea:focus {
  border-color: var(--h-blue);
  box-shadow: 0 0 0 4px rgba(10, 76, 151, 0.12);
}
.c-label { color: var(--h-navy); }

/* Badges sit at their natural width, never stretched */
.c-badge { width: fit-content; max-width: 100%; align-self: flex-start; }

/* Content is visible immediately; the only choreographed motion is on the home page */
.has-reveal .js-reveal { opacity: 1; transform: none; transition: none; }

/* Footer bottom links: spacing instead of bullet separators */
.c-footer-baseline__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; }
.c-footer-baseline__links li:not(:last-child)::after { content: none; }
.c-footer-baseline__assoc::before { content: none; }

/* Floating contact buttons: quieter, smaller */
.c-floating-btn { box-shadow: 0 6px 18px rgba(10, 36, 72, 0.22); }
.c-floating-btn--email { background: var(--h-navy); }

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  .l-grid-12 > [class*="l-col-"] { grid-column: span 12; }
}

/* ---------- Phones ---------- */
@media (max-width: 768px) {
  :root { --h-gutter: 20px; --h-radius: 14px; }

  .l-section { padding-top: 56px; padding-bottom: 56px; }
  .l-section-header { margin-bottom: 32px; }
  .l-grid-12 { gap: 24px; }

  /* Collapse every inline multi-column grid to a single column */
  main [style*="grid-template-columns"]:not(.c-amount-chips) { grid-template-columns: 1fr !important; }
  .c-form-grid { grid-template-columns: 1fr; gap: 0; }
  .c-form-group--full { grid-column: auto; }

  /* Fixed desktop paddings shrink to a phone rhythm */
  .c-form,
  .c-pledge-steps,
  .c-stat-box,
  .c-commitment-card,
  .c-shelf-tile,
  main [style*="padding: var(--space-2xl)"],
  main [style*="padding: var(--space-xl)"],
  main [style*="padding: 48px"],
  main [style*="padding: 40px"],
  main [style*="padding: 32px"] { padding: 20px !important; }

  /* Boxes inside boxes lose their frame: one border per visual group */
  main [style*="border: 1px solid"] [style*="border: 1px solid"]:not(input):not(select):not(textarea),
  .c-form [style*="border: 1px solid"],
  .c-shelf-tile [style*="border: 1px solid"] {
    border: 0 !important;
    background: transparent !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Long passages read left-aligned on a narrow screen */
  main [style*="text-align: center"]:not(.c-stat-box):not(.c-stat-box *) { text-align: left !important; }
  main [style*="margin: 0 auto"] { margin-left: 0 !important; margin-right: 0 !important; }

  /* Lists keep inside their card */
  main ul, main ol { max-width: 100%; }
  main li { overflow-wrap: anywhere; }
  main [style*="padding-left"] > li { margin-left: 0; }

  /* Buttons: full width, readable, thumb-sized */
  .c-btn-group { flex-direction: column; align-items: stretch; gap: 10px; }
  .c-btn-group .c-btn,
  .c-btn-group .c-btn--sm {
    flex: 0 0 auto;
    width: 100%;
    min-height: 50px;
    font-size: 1rem;
    padding: 12px 18px;
    white-space: normal;
  }
  .c-btn-group .t-arrow-link { margin-left: 0 !important; justify-content: center; }
  .c-btn--sm { min-height: 44px; }

  /* Section jump pills: one swipeable row that bleeds to the screen edge */
  .c-filter-pills {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    scrollbar-width: none;
    margin-left: calc(-1 * var(--h-gutter));
    margin-right: calc(-1 * var(--h-gutter));
    padding: 2px var(--h-gutter) 6px;
    scroll-padding-left: var(--h-gutter);
    -webkit-overflow-scrolling: touch;
  }
  .c-filter-pills::-webkit-scrollbar { display: none; }
  .c-filter-pill { flex: 0 0 auto; white-space: nowrap; }

  /* Inner-page hero */
  .c-page-hero { padding: 28px 0 44px; }
  .c-page-hero .c-breadcrumbs { margin-bottom: 18px; }
  .c-page-hero .t-hero-h1::after { width: 72px; height: 5px; margin-top: 20px; }
  .c-page-hero .l-grid-12 { margin-top: 0 !important; }

  /* Callouts: slimmer */
  .c-callout, .c-transparency-box { padding: 14px 16px; margin: 20px 0; }

  /* Footer: compact two-column directory */
  .c-footer { padding-top: 40px; }
  .c-contact-strip { grid-template-columns: 1fr 1fr; gap: 20px 16px; padding-bottom: 28px; margin-bottom: 28px; }
  .c-contact-item:first-child { grid-column: 1 / -1; }
  .c-footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 16px; padding-bottom: 28px; }
  .c-footer-brand { grid-column: 1 / -1; }
  .c-footer-grid > div:last-child { grid-column: 1 / -1; }
  .c-footer-col__list { gap: 2px; }

  /* Repeated small cards read as one divided list */
  .c-commitment-card,
  .c-impact-node {
    border: 0;
    border-bottom: 1px solid var(--h-line);
    border-radius: 0;
    background: transparent;
    padding: 14px 0 !important;
  }
  .c-impact-pipeline, [class*="c-commitment"] { gap: 0 !important; }

  /* Only WhatsApp floats on phones; email lives in the footer and menu */
  .c-floating-btn--email { display: none; }
  .c-floating-actions { right: 14px; bottom: 16px; }
  .c-floating-btn { width: 52px; height: 52px; padding: 0; justify-content: center; border-radius: 50%; }
  .c-floating-btn__label { display: none; }
}

@media (max-width: 340px) {
  :root { --h-gutter: 16px; }
  .c-contact-strip, .c-footer-grid { grid-template-columns: 1fr; }
}

/* Values list (Get involved) and programme jump list (Programmes) */
.c-value-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 24px;
}
.c-value-list li {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--h-sky);
  color: var(--h-navy);
  font-weight: 600;
  font-size: 0.9375rem;
}
.c-jump-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.c-jump-list a {
  display: inline-flex;
  padding: 10px 16px;
  border: 1px solid var(--h-line);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--h-blue);
}
.c-jump-list a:hover { border-color: var(--h-blue); background: var(--h-sky); }
.c-badge--neutral { border-radius: 10px; }

@media (max-width: 768px) {
  .c-contact-strip { grid-template-columns: 1fr; gap: 16px; }
  .c-jump-list { justify-content: flex-start; }
}
/* Framed photos always fill their frame */
main [style*="overflow: hidden"] > img { width: 100%; height: auto; display: block; }

/* Header fit: labels never wrap; tighten on laptops, hamburger before the menu runs out of room */
.c-nav__link { white-space: nowrap; }
.c-header__logo { flex-shrink: 0; }
.c-header__donate { white-space: nowrap; }
@media (max-width: 1480px) {
  .c-header__inner { gap: 20px; }
  .c-nav__list { gap: 0; }
  .c-nav__link { padding: 10px 9px; font-size: 1rem; }
  .c-nav__link[aria-current="page"]::after { left: 9px; right: 9px; }
  .c-header__donate { padding: 12px 20px; font-size: 1rem; }
}
@media (max-width: 1240px) {
  .c-nav { display: none; }
  .c-hamburger { display: flex; }
}
