/* ===========================================================================
   SEND in the Dengie — styles
   Palette and feel taken from the brand logo: deep navy, watercolour teals and
   greens, rainbow-arc gold and warm coral. Soft, organic, hand-drawn, calm.
   Contrasts checked for WCAG AA (navy text everywhere; CTA colours verified).
   =========================================================================== */

:root {
  /* Brand colours sampled from the logo */
  --navy: #1f3354; /* "SEND" wordmark — headings, primary buttons */
  --ink: #25364a; /* body text (high contrast on cream) */
  --ink-soft: #51657a; /* muted captions */
  --teal: #2f8e8a; /* "in the Dengie" script */
  --teal-dk: #1f6b67; /* links & secondary buttons (AA on white) */
  --teal-wash: #e4f1ef;
  --green: #6f9d78; /* watercolour foliage */
  --green-dk: #4f7d59; /* green where text/contrast is needed */
  --green-support: #3e7d56; /* donate / support button (white text passes AA) */
  --green-wash: #e8f1ea;
  --gold: #e6b84f; /* rainbow arc / sun */
  --gold-deep: #96690f; /* gold where text/contrast is needed */
  --gold-wash: #fbf0d8;
  --coral: #e27d5c; /* hearts & child figure — decorative pops */
  --coral-dk: #c8552f; /* coral where text/contrast is needed */
  --coral-wash: #fbe6dd;

  --paper: #fbfaf7; /* warm cream */
  --card: #ffffff;
  --line: #e8e3d8;

  --radius: 16px;
  --radius-lg: 26px;
  --radius-blob: 42% 58% 56% 44% / 50% 46% 54% 50%;
  --shadow: 0 12px 30px rgba(31, 51, 84, 0.08);
  --shadow-hover: 0 18px 44px rgba(31, 51, 84, 0.16);
  --container: 1140px;

  --font-head: "Baloo 2", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --font-script: "Caveat", "Baloo 2", cursive;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 0.5em;
}
a {
  color: var(--teal-dk);
}
img {
  max-width: 100%;
  display: block;
}
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* Accessibility -------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  z-index: 1000;
}
.skip-link:focus {
  left: 0;
}
:focus-visible {
  outline: 3px solid var(--coral-dk);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 13px 24px;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  min-height: 50px;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn-primary {
  background: var(--teal-dk);
  color: #fff;
  box-shadow: 0 8px 18px rgba(31, 107, 103, 0.26);
}
.btn-primary:hover {
  background: var(--navy);
}
.btn-support {
  background: var(--green-support);
  color: #fff;
  box-shadow: 0 8px 18px rgba(62, 125, 86, 0.26);
}
.btn-support:hover {
  background: #335f44;
}
.btn-facebook {
  background: #1877f2;
  color: #fff;
  box-shadow: 0 8px 18px rgba(24, 119, 242, 0.26);
}
.btn-facebook:hover {
  background: #0f63d6;
}
.btn-facebook .icon {
  width: 1.15em;
  height: 1.15em;
}
.icon.is-facebook {
  color: #1877f2;
}
.btn-gold {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 8px 18px rgba(230, 184, 79, 0.34);
}
.btn-gold:hover {
  background: #d8a833;
}
.btn-ghost {
  background: #fff;
  color: var(--teal-dk);
  border-color: var(--teal-wash);
}
.btn-ghost:hover {
  border-color: var(--teal);
}
.btn[disabled],
.btn.is-disabled {
  background: #e4e0d6;
  color: #7a8794;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
  box-shadow: none;
}

/* Custom icons (replacing emoji) -------------------------------------- */
.icon {
  width: 1.2em;
  height: 1.2em;
  display: inline-block;
  vertical-align: -0.22em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--teal-dk);
}
.icon.is-coral {
  color: var(--coral-dk);
}
.icon.is-teal {
  color: var(--teal-dk);
}
.icon.is-gold {
  color: var(--gold-deep);
}
.icon.is-green {
  color: var(--green-dk);
}
.icon.is-navy {
  color: var(--navy);
}

/* Header --------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 247, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand img {
  height: 88px;
  width: auto;
}
.header-funder {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}
.header-funder-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--ink-soft);
}
.header-funder img {
  height: 42px;
  width: auto;
  /* The logo art has built-in top padding; nudge it up to sit level with the
     "Proudly funded by" tagline. */
  margin-top: -4px;
}
.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}
.site-nav a {
  text-decoration: none;
  color: var(--navy);
  font-weight: 700;
  padding: 8px 13px;
  border-radius: 10px;
}
.site-nav a:hover {
  background: var(--teal-wash);
}
.site-nav a.nav-cta {
  background: var(--gold);
  color: var(--navy);
}
.site-nav a.nav-cta:hover {
  background: #d8a833;
}

/* Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(
      1100px 460px at 78% -12%,
      var(--teal-wash),
      transparent 62%
    ),
    radial-gradient(800px 360px at 8% 0%, var(--gold-wash), transparent 60%),
    linear-gradient(180deg, #fff, var(--paper));
  padding: 60px 0 64px;
}
.hero-inner {
  position: relative;
  max-width: 760px;
  z-index: 1;
}
.hero-eyebrow {
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--teal-dk);
  margin: 0 0 12px;
}
.hero-title {
  font-size: clamp(2.1rem, 5vw, 3.3rem);
  margin-bottom: 16px;
}
.hl {
  color: var(--teal-dk);
}
.hero-lead {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 60ch;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 26px 0 26px;
}
.hero-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-weight: 700;
  color: var(--ink-soft);
}
.hero-points li {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Sections ------------------------------------------------------------- */
.section {
  padding: 66px 0;
}
.section-tint-teal {
  background: var(--teal-wash);
}
.section-tint-green {
  background: var(--green-wash);
}
.section-tint-gold {
  background: var(--gold-wash);
}
.section-head {
  margin-bottom: 28px;
  max-width: 70ch;
}
.section-title {
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
}
.section-sub {
  color: var(--ink-soft);
  margin: 0;
  font-size: 1.08rem;
}

/* Handwritten script accent — echoes the brand logo lettering */
.script {
  font-family: var(--font-script);
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
}
.section-script {
  display: block;
  font-family: var(--font-script);
  font-weight: 700;
  color: var(--teal-dk);
  font-size: 1.7rem;
  line-height: 1;
  margin-bottom: 2px;
}
.section-script.is-coral {
  color: var(--coral-dk);
}
.section-script.is-green {
  color: var(--green-dk);
}
.section-script.is-gold {
  color: var(--gold-deep);
}

/* Reassurance banner — the charity's "parents remain responsible" message */
.reassure {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--coral-wash);
  border: 1px solid #f2cdbd;
  color: var(--navy);
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700;
  margin-bottom: 26px;
}
.reassure .icon {
  flex: none;
  color: var(--coral-dk);
}
.event-emoji .icon {
  width: 3rem;
  height: 3rem;
  color: rgba(31, 51, 84, 0.45);
}

/* Value strip ---------------------------------------------------------- */
.values {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.value-chip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px 8px 13px;
  font-weight: 700;
  color: var(--navy);
  font-size: 0.95rem;
}
/* A little coloured dot in front, cycling the logo's palette */
.value-chip::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  background: var(--teal);
}
.value-chip:nth-child(4n + 1)::before {
  background: var(--gold);
}
.value-chip:nth-child(4n + 2)::before {
  background: var(--teal);
}
.value-chip:nth-child(4n + 3)::before {
  background: var(--green);
}
.value-chip:nth-child(4n + 4)::before {
  background: var(--coral);
}

/* Events grid ---------------------------------------------------------- */
.events-status {
  color: var(--ink-soft);
  padding: 4px 0 18px;
  font-weight: 600;
}
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.event-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.event-media-link {
  display: block;
}
.event-media {
  height: 124px;
  position: relative;
}
.event-title a {
  color: inherit;
  text-decoration: none;
}
.event-title a:hover {
  text-decoration: underline;
  text-decoration-color: var(--teal);
  text-underline-offset: 2px;
}
.event-emoji {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.event-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.event-cat {
  position: absolute;
  left: 14px;
  bottom: -14px;
  background: #fff;
  color: var(--navy);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 13px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.event-body {
  padding: 26px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.event-title {
  font-size: 1.28rem;
  margin: 0;
}
.event-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 0.96rem;
}
.event-meta li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}
.event-meta .icon {
  width: 1.05em;
  height: 1.05em;
  color: var(--teal);
  margin-top: 0.14em;
}
.event-desc {
  color: var(--ink);
  font-size: 0.98rem;
  margin: 2px 0 0;
}
.event-foot {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.event-price {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.18rem;
  color: var(--navy);
}
.event-price small {
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 0.78rem;
}
.badge {
  display: inline-block;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.badge-soldout {
  background: var(--coral-wash);
  color: var(--coral-dk);
}
.badge-cancelled {
  background: #ededed;
  color: #6b6b6b;
}
.badge-spaces {
  background: var(--teal-wash);
  color: var(--teal-dk);
}
.empty {
  text-align: center;
  padding: 50px 20px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* Previous events (collapsible) --------------------------------------- */
.past-toggle-wrap {
  text-align: center;
  margin-top: 30px;
}
.past-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  color: var(--teal-dk);
  background: #fff;
  border: 2px solid var(--teal-wash);
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 46px;
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.past-toggle:hover {
  border-color: var(--teal);
  transform: translateY(-1px);
}
.past-chevron {
  width: 1.1em;
  height: 1.1em;
  transition: transform 0.2s ease;
}
.past-toggle[aria-expanded="true"] .past-chevron {
  transform: rotate(180deg);
}
.past-section {
  margin-top: 30px;
}
.past-heading {
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--navy);
  margin: 0 0 18px;
}
.event-card--past {
  opacity: 0.82;
}
.event-finished {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* Activities grid ------------------------------------------------------ */
.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.activity {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--navy);
  box-shadow: var(--shadow);
}
.activity .icon {
  width: 1.7rem;
  height: 1.7rem;
}
.activity-note {
  margin-top: 18px;
  color: var(--ink-soft);
}

/* About / split sections ---------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 44px;
  align-items: start;
}
.card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.card-list li {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.card-list strong {
  color: var(--coral-dk);
}

/* Info cards (how we work) -------------------------------------------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.info-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.info-card h3 {
  font-size: 1.14rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-card p {
  margin: 0;
  color: var(--ink-soft);
}

/* Support / charity ---------------------------------------------------- */
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.support-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  text-align: center;
  display: flex;
  flex-direction: column;
}
/* Pin the button to the bottom so every card's CTA lines up across the row */
.support-card .btn {
  margin-top: auto;
}
.support-card .big {
  font-size: 2.2rem;
  line-height: 1;
}
.support-card .big .icon {
  width: 2.6rem;
  height: 2.6rem;
  stroke-width: 1.7;
}
.support-card h3 {
  margin: 8px 0 6px;
}
.support-card p {
  color: var(--ink-soft);
  margin: 0 0 18px;
}
.funders {
  border-top: 1px solid rgba(31, 51, 84, 0.12);
  padding-top: 24px;
}
.funders h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}
.funder-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.funder-list li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 700;
  color: var(--navy);
  font-size: 0.92rem;
}

/* Footer --------------------------------------------------------------- */
.site-footer {
  background: var(--navy);
  color: #d7e3ec;
  padding: 50px 0 26px;
  margin-top: 10px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
}
.footer-logo {
  background: #fff;
  border-radius: 16px;
  padding: 12px 14px;
  display: inline-block;
}
.footer-logo img {
  height: 76px;
  width: auto;
}
/* Brand mark sits directly on the navy footer (white monochrome logo) */
.footer-brand-logo img {
  height: 86px;
  width: auto;
  display: block;
}
.footer-funder {
  margin-top: 18px;
}
.footer-funder-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 26px;
}
.footer-funder-label {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9fb6c6;
  margin-bottom: 12px;
}
/* White monochrome funder marks sit directly on the navy footer */
.footer-funder-mark {
  height: 46px;
  width: auto;
  display: block;
}
.footer-blurb {
  max-width: 38ch;
  color: #b7cad8;
  margin-top: 14px;
}
.site-footer h2 {
  color: #fff;
  font-size: 1.16rem;
}
.site-footer a {
  color: var(--gold);
  font-weight: 700;
}
.footer-col p {
  margin: 6px 0;
  color: #cddbe6;
}
.footer-socials {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 8px;
}
.footer-socials a {
  color: #fff;
  display: inline-flex;
}
.footer-socials a:hover {
  opacity: 0.82;
}
.footer-socials .icon {
  width: 22px;
  height: 22px;
  color: inherit;
}
.footer-bottom {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.88rem;
  color: #a6bccb;
}
.footer-bottom .note {
  margin-top: 6px;
}

/* Responsive ----------------------------------------------------------- */
@media (max-width: 1000px) {
  .header-funder {
    display: none;
  }
}

@media (max-width: 820px) {
  .split,
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .site-nav {
    gap: 2px;
  }
  .site-nav a:not(.nav-cta) {
    display: none;
  }
  .brand img {
    height: 68px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
