/* =================================================================
   Miracles To End Cancer 5K & Walk
   Bright, modern, hopeful. Brand palette over lots of white.
   ================================================================= */

:root {
  /* Brand palette (from the event logo) */
  --purple:       #5B2A86;
  --purple-deep:  #43205F;
  --purple-soft:  #efe7f7;
  --teal:         #1FA9B7;
  --teal-soft:    #e3f6f8;
  --navy:         #1B2A4A;
  --pink:         #EC4E8C;
  --pink-light:   #F472A6;
  --pink-soft:    #fdeaf2;
  --white:        #ffffff;

  /* Text */
  --ink:          #1d1733;
  --muted:        #6a6580;

  /* Surfaces */
  --bg:           #ffffff;
  --bg-alt:       #faf7fd;   /* very light lavender wash */
  --line:         rgba(91, 42, 134, .12);

  /* Gradients */
  --grad-brand:   linear-gradient(120deg, var(--purple) 0%, var(--pink) 100%);
  --grad-cta:     linear-gradient(120deg, var(--pink) 0%, var(--purple) 100%);
  --grad-teal:    linear-gradient(120deg, var(--teal) 0%, var(--purple) 100%);
  --grad-soft:    linear-gradient(180deg, #ffffff 0%, var(--bg-alt) 100%);

  /* Shape & motion */
  --radius:       20px;
  --radius-lg:    28px;
  --radius-pill:  999px;
  --shadow:       0 14px 40px rgba(91, 42, 134, .12);
  --shadow-sm:    0 6px 20px rgba(27, 42, 74, .08);
  --shadow-hover: 0 22px 56px rgba(91, 42, 134, .22);

  /* Layout */
  --max:          1180px;
  --pad:          clamp(20px, 5vw, 64px);
  --header-h:     78px;

  /* Type */
  --font-display: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--purple); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--pink); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  color: var(--navy);
  margin: 0 0 .4em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
p  { margin: 0 0 1rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.section { padding: clamp(56px, 9vw, 120px) 0; }
.section-alt { background: var(--bg-alt); }
.center { text-align: center; }
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .8rem;
  color: var(--teal);
  margin: 0 0 .7rem;
}
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 60ch; }
.center .lead { margin-left: auto; margin-right: auto; }
.text-grad {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  padding: .85rem 1.7rem;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad-cta);
  color: #fff;
  box-shadow: 0 4px 16px rgba(91, 42, 134, .18);
}
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(91, 42, 134, .28); }
.btn-ghost {
  background: rgba(255,255,255,.14);
  color: #fff;
  border-color: rgba(255,255,255,.55);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: #fff; color: var(--purple); transform: translateY(-3px); }
.btn-outline {
  background: #fff;
  color: var(--purple);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.btn-outline:hover { color: var(--pink); border-color: var(--pink); transform: translateY(-3px); }
/* Solid white CTA for use ON colored/gradient backgrounds (high contrast, no blend) */
.btn-white {
  background: #fff;
  color: var(--purple);
  box-shadow: 0 12px 30px rgba(27,42,74,.28);
}
.btn-white:hover { color: var(--pink); transform: translateY(-3px); box-shadow: 0 18px 40px rgba(27,42,74,.36); }
.btn-lg { font-size: 1.12rem; padding: 1.05rem 2.1rem; }
.btn i { font-size: 1.15em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}
/* Header CTA: flat, crisp pill (no shadow halo against the header) */
.site-header .nav a.btn-primary { box-shadow: none; border: none; }
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .7rem var(--pad);
  max-width: var(--max);
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: .65rem; flex-shrink: 0; }
.brand img { display: block; height: 52px; width: 80px; object-fit: contain; object-position: left center; }
.brand-fallback {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--purple);
}
.brand-fallback span { display: block; color: var(--navy); font-size: .72rem; letter-spacing: .12em; }
/* Nav pushed right via margin; on mobile it's position:fixed so margin resets */
.nav { display: flex; align-items: center; gap: 1.8rem; margin-left: auto; }
.nav a.navlink {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  font-size: 1rem;
  position: relative;
}
.nav a.navlink:hover, .nav a.navlink.is-current { color: var(--pink); }
.nav a.navlink.is-current::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -6px;
  height: 3px; border-radius: 3px; background: var(--grad-brand);
}
.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; padding: 8px;
}
.nav-toggle span { display: block; height: 3px; border-radius: 3px; background: var(--navy); margin: 5px 0; transition: .25s; }

@media (max-width: 860px) {
  .nav-toggle { display: block; margin-left: auto; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; gap: 1.2rem;
    background: #fff; padding: 1.8rem var(--pad) 2.2rem;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(calc(-100% - var(--header-h))); transition: transform .3s ease;
    z-index: 98;
    margin-left: 0;
  }
  .nav.open { transform: translateY(0); }
  .nav .btn { width: 100%; justify-content: center; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  text-align: center;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  padding: clamp(28px, 5vw, 56px) 0 clamp(56px, 8vw, 96px);
  background:
    linear-gradient(125deg, rgba(67,32,95,.86) 0%, rgba(91,42,134,.80) 45%, rgba(236,78,140,.80) 100%),
    url('harlinsdale-farm.jpg') center 35% / cover no-repeat;
  overflow: hidden;
}
.hero .wrap { width: 100%; }
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(31,169,183,.45), transparent 40%),
    radial-gradient(circle at 84% 86%, rgba(244,114,166,.4), transparent 42%);
}
.hero .wrap { position: relative; z-index: 2; }
.hero-logo {
  display: inline-block;
  background: #fff;
  border-radius: 24px;
  padding: clamp(18px, 3vw, 30px) clamp(26px, 4.5vw, 44px);
  margin: 0 auto clamp(1.1rem, 2.5vw, 1.7rem);
  box-shadow: 0 22px 60px rgba(27,42,74,.4);
  line-height: 0;
}
.hero-logo img { width: clamp(230px, 40vw, 360px); height: auto; }
.hero h1 { color: #fff; text-shadow: 0 4px 24px rgba(27,42,74,.25); }
.hero .lead { color: rgba(255,255,255,.95); margin-inline: auto; font-size: clamp(1.1rem, 2vw, 1.4rem); }
.hero-meta {
  display: inline-flex; flex-wrap: wrap; gap: .6rem 1.4rem; justify-content: center;
  margin: 1.3rem auto 2rem;
  font-family: var(--font-display); font-weight: 600;
}
.hero-meta span { display: inline-flex; align-items: center; gap: .45rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center; }
/* curved bottom edge */
.hero-wave { position: absolute; bottom: -1px; left: 0; width: 100%; z-index: 1; display: block; line-height: 0; }
.hero-wave svg { width: 100%; height: clamp(40px, 6vw, 80px); display: block; }

/* ---------- Quick facts ---------- */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
  margin-top: clamp(-70px, -7vw, -90px);
  position: relative; z-index: 5;
}
.fact {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem 1.3rem;
  box-shadow: var(--shadow);
  text-align: center;
  border-top: 4px solid var(--teal);
}
.fact:nth-child(2) { border-top-color: var(--pink); }
.fact:nth-child(3) { border-top-color: var(--purple); }
.fact:nth-child(4) { border-top-color: var(--navy); }
.fact-ico { font-size: 1.9rem; margin-bottom: .4rem; line-height: 1; color: var(--teal); }
.fact:nth-child(2) .fact-ico { color: var(--pink); }
.fact:nth-child(3) .fact-ico { color: var(--purple); }
.fact:nth-child(4) .fact-ico { color: var(--navy); }
.hero-meta i { font-size: 1.15rem; }
.fact-label { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; color: var(--teal); margin-bottom: .25rem; }
.fact-value { font-family: var(--font-display); font-weight: 700; color: var(--navy); font-size: 1.08rem; line-height: 1.25; }
@media (max-width: 760px) {
  .facts { grid-template-columns: repeat(2, 1fr); margin-top: 1.5rem; }
}

/* ---------- About / two-col ---------- */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 880px) { .split, .split.reverse { grid-template-columns: 1fr; } .split.reverse > :first-child { order: 0; } }
.media-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--grad-teal);
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  color: #fff; text-align: center; padding: 2rem;
}
.media-card img { width: 100%; height: 100%; object-fit: cover; }
.placeholder-note { font-family: var(--font-display); font-weight: 600; opacity: .92; }
.placeholder-note small { display:block; font-family: var(--font-body); font-weight:400; opacity:.8; margin-top:.4rem; }

/* ---------- The Cause ---------- */
/* Inline links on colored/gradient sections stay readable */
.cause a:not(.btn), .cta-band a:not(.btn), .hero a:not(.btn) {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}
.cause a:not(.btn):hover, .cta-band a:not(.btn):hover, .hero a:not(.btn):hover { color: var(--pink-light); }
.cause { background: var(--grad-teal); color: #fff; position: relative; overflow: hidden; }
.cause h2, .cause h3 { color: #fff; }
.cause .lead { color: rgba(255,255,255,.95); }
.cause-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem,5vw,4rem); align-items: center; }
@media (max-width: 880px){ .cause-grid { grid-template-columns: 1fr; } }
.cause-card {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius);
  padding: 1.6rem;
  backdrop-filter: blur(4px);
}
.support-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.support-list li { display: flex; align-items: center; gap: .55rem; font-weight: 600; }
.support-list li i { color: var(--pink-light); font-size: 1.15rem; flex: none; }

/* ---------- Ribbon teaser strip ---------- */
.ribbon-strip { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; margin: 1.6rem 0 2rem; }
.ribbon-chip {
  display: inline-flex; align-items: center; gap: .5rem;
  background: #fff; border: 1px solid var(--line);
  padding: .5rem .95rem; border-radius: var(--radius-pill);
  font-family: var(--font-display); font-weight: 600; font-size: .92rem; color: var(--navy);
  box-shadow: var(--shadow-sm);
}
.ribbon-chip .dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }

/* ---------- Ribbon image / placeholder ---------- */
.ribbon-img { width: 46px; height: auto; flex: none; object-fit: contain; }
.ribbon-placeholder {
  width: 46px;
  height: 72px;
  flex: none;
  border-radius: 8px;
  background: var(--bg-alt);
  border: 2px dashed var(--line);
}

/* ---------- Cards grid (ribbons page) ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.3rem;
}
.ribbon-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  display: flex; gap: 1.1rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.ribbon-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.ribbon-card h3 { margin-bottom: .15rem; font-size: 1.18rem; }
.ribbon-card .month { font-family: var(--font-display); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--teal); margin-bottom: .5rem; }
.ribbon-card p { font-size: .95rem; color: var(--muted); margin: 0; }

/* ---------- Course map embed ---------- */
.map-embed {
  max-width: 1000px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0f0f10;
  line-height: 0;
}
.map-embed iframe { display: block; width: 100%; height: 520px; border: 0; }

/* ---------- Photo gallery ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.photo-grid img {
  width: 100%; height: 100%;
  aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.photo-grid img:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
@media (max-width: 600px) { .photo-grid { grid-template-columns: 1fr; } }

/* ---------- Sponsors ---------- */
.sponsor-callout {
  background: linear-gradient(180deg, #fff 0%, var(--bg-alt) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(2.4rem, 5vw, 3.8rem);
  box-shadow: var(--shadow-sm);
  max-width: 780px;
  margin-inline: auto;
}
.sponsor-callout .lead { margin: 0 auto 1.7rem; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--grad-cta); color: #fff; text-align: center; border-radius: var(--radius-lg); padding: clamp(2.5rem, 6vw, 4.5rem); box-shadow: var(--shadow); }
.cta-band h2 { color: #fff; }
.cta-band .lead { color: rgba(255,255,255,.95); max-width: 56ch; margin-left: auto; margin-right: auto; }
.cta-row { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; margin-top: 1.4rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 1.3rem; margin-top: 2rem; }
.contact-card { background:#fff; border:1px solid var(--line); border-radius: var(--radius); padding: 1.7rem; box-shadow: var(--shadow-sm); text-align:center; }
.contact-card .ico { font-size: 2.4rem; margin-bottom:.5rem; line-height: 1; color: var(--purple); }
.socials { display:flex; gap:.8rem; justify-content:center; margin-top:.8rem; }
.socials a {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--purple-soft); color: var(--purple);
  transition: .2s ease;
}
.socials a:hover { background: var(--grad-brand); color:#fff; transform: translateY(-3px); }
.socials svg { width: 22px; height: 22px; }

/* ---------- Page hero (subpages) ---------- */
.page-hero { color:#fff; text-align:center; padding: clamp(70px,11vw,120px) 0 clamp(80px,12vw,130px); position:relative; overflow:hidden;
  background:
    linear-gradient(125deg, rgba(67,32,95,.88) 0%, rgba(91,42,134,.82) 45%, rgba(236,78,140,.82) 100%),
    url('harlinsdale-farm.jpg') center 40% / cover no-repeat;
}
.page-hero::before { content:""; position:absolute; inset:0; background: radial-gradient(circle at 20% 25%, rgba(31,169,183,.4), transparent 45%), radial-gradient(circle at 82% 80%, rgba(244,114,166,.38), transparent 45%); }
.page-hero .wrap { position:relative; z-index:2; }
.page-hero h1 { color:#fff; }
.page-hero .lead { color: rgba(255,255,255,.95); margin-inline:auto; }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: rgba(255,255,255,.82); padding: clamp(40px,6vw,70px) 0 1.8rem; }
.footer-top { display:flex; flex-wrap:wrap; justify-content:space-between; gap:2rem; align-items:flex-start; }
.footer-brand { max-width: 360px; }
.footer-brand .brand-fallback { color:#fff; }
.footer-brand .brand-fallback span { color: var(--pink-light); }
.footer-logo { height: 66px; width: auto; margin-bottom: .3rem; }
.footer-brand p { color: rgba(255,255,255,.7); margin-top:.8rem; font-size:.95rem; }
.footer-nav { display:flex; flex-direction:column; gap:.6rem; }
.footer-nav a { color: rgba(255,255,255,.82); font-family: var(--font-display); font-weight:600; }
.footer-nav a:hover { color: var(--pink-light); }
.footer-col h4 { color:#fff; font-size:1rem; margin-bottom:.9rem; }
.footer-bottom { border-top:1px solid rgba(255,255,255,.14); margin-top:2.4rem; padding-top:1.4rem; display:flex; flex-wrap:wrap; justify-content:space-between; gap:.6rem; font-size:.85rem; color: rgba(255,255,255,.6); }
.footer a.footer-link { color: rgba(255,255,255,.82); }

/* ---------- Utility ---------- */
.mt-2 { margin-top: 1.4rem; }
.divider-wave { line-height:0; }
.divider-wave svg { width:100%; height: clamp(30px,5vw,60px); display:block; }
