/* =====================================================================
   A PATCH OF HOPE — stylesheet
   Aesthetic: warm cream paper, blush pink, heart-red, gold sparkle,
   elegant script + clean sans. Soft scrapbook / collage feel.
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* palette */
  --cream:        #FBF4E9;
  --cream-2:      #F6ECDC;
  --paper:        #FFFDF8;
  --blush:        #F4DAD6;
  --blush-2:      #EBC4C0;
  --rose:         #D98B8B;
  --rose-deep:    #C97B7B;
  --red:          #C2453A;
  --red-deep:     #A8392F;
  --gold:         #E3A938;
  --gold-soft:    #F0CE86;
  --gold-light:   #FCE3A6;  /* light gold for labels on dark bands */
  --gold-deep:    #8C5E10;  /* AA-contrast gold for text on cream */
  --accent:       #A8392F;  /* AA-contrast accent for small labels on cream */
  --mint:         #A8D5C4;
  --blue:         #8FB6D9;
  --ink:          #3C2E2A;
  --ink-soft:     #6E5C54;
  --line:         #E7D6c8;

  /* type */
  --f-script: "Dancing Script", "Segoe Script", cursive;
  --f-serif:  "Playfair Display", Georgia, serif;
  --f-sans:   "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* shape */
  --radius:   18px;
  --radius-lg:28px;
  --shadow:   0 14px 34px rgba(120, 70, 60, .12);
  --shadow-sm:0 6px 18px rgba(120, 70, 60, .10);
  --container: 1120px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 92px; }
body {
  margin: 0;
  font-family: var(--f-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 17px;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-deep); }

/* ---------- Visible keyboard focus (WCAG 2.4.7) ---------- */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}
/* lighter outline on dark/colored bands */
.impact :focus-visible, .funds :focus-visible, .donate :focus-visible,
.site-footer :focus-visible, .cart-drawer :focus-visible,
.amount-chip:focus-visible, .cart-fab:focus-visible, .btn-primary:focus-visible {
  outline-color: #fff;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--red); color: #fff; font-weight: 800;
  padding: .8rem 1.2rem; border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1rem; }

.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.narrow { max-width: 780px; }
.narrow-block { max-width: 620px; margin-inline: auto; }
.center { text-align: center; }

/* paper grain (very subtle) on body */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at 18% 12%, rgba(244,218,214,.45), transparent 38%),
    radial-gradient(circle at 86% 8%, rgba(240,206,134,.30), transparent 36%),
    radial-gradient(circle at 78% 88%, rgba(244,218,214,.40), transparent 40%);
}

/* ---------- Typography helpers ---------- */
.script { font-family: var(--f-script); font-weight: 700; }
.kicker {
  font-family: var(--f-sans);
  text-transform: uppercase; letter-spacing: .18em;
  font-size: .78rem; font-weight: 800; color: var(--accent);
  margin: 0 0 .6rem;
}
.kicker.light { color: var(--gold-light); }
.section-title {
  font-family: var(--f-serif);
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 700; color: var(--ink);
  margin-bottom: .4em;
}
.section-title.light { color: var(--paper); }
.lead { font-size: 1.18rem; color: var(--ink); }
.light-text { color: #fbeee6; }
.body-text { color: var(--ink-soft); }
.eyebrow {
  display: inline-block;
  background: var(--paper); color: var(--accent);
  border: 1.5px solid var(--blush-2);
  padding: .35rem .9rem; border-radius: 999px;
  font-size: .76rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; margin-bottom: 1.1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--f-sans); font-weight: 800; font-size: .98rem;
  padding: .8rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  line-height: 1; text-align: center;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(194,69,58,.32); }
.btn-primary:hover { background: var(--red-deep); color:#fff; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--red); border-color: var(--rose); }
.btn-ghost:hover { background: var(--paper); transform: translateY(-2px); }
.btn-light { background: #fff; color: var(--red); box-shadow: 0 10px 24px rgba(0,0,0,.14); }
.btn-light:hover { transform: translateY(-2px); color: var(--red-deep); }
.btn-soft { background: var(--blush); color: var(--red-deep); }
.btn-soft:hover { background: var(--blush-2); color: var(--red-deep); transform: translateY(-2px); }

/* =====================================================================
   HEADER / NAV
   ===================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,244,233,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding: .7rem 0; }
.brand { display: flex; align-items: center; gap: .55rem; color: var(--ink); }
.brand-mark { color: var(--red); display: grid; place-items: center; }
.brand-name { font-family: var(--f-script); font-weight: 700; font-size: 1.55rem; color: var(--ink); white-space: nowrap; }
.main-nav { display: flex; align-items: center; gap: 1.15rem; }
.main-nav a { color: var(--ink); font-weight: 700; font-size: .96rem; }
.main-nav a:not(.btn):hover { color: var(--red); }
.nav-donate { padding: .55rem 1.2rem; color:#fff; }
.nav-donate:hover { color:#fff; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 26px; height: 3px; background: var(--ink); border-radius: 3px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* =====================================================================
   SECTION SPACING
   ===================================================================== */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; position: relative; }

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  position: relative;
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(5rem, 9vw, 8rem);
  background:
    radial-gradient(1200px 500px at 50% -10%, var(--blush) 0%, transparent 60%),
    repeating-linear-gradient(45deg, rgba(244,218,214,.18) 0 14px, transparent 14px 28px),
    var(--cream);
  overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.hero-copy { position: relative; z-index: 2; }
.hero-title { margin: 0 0 .2em; }
.hero-title .script {
  font-size: clamp(3.2rem, 9vw, 6rem);
  color: var(--ink);
  display: inline-block;
  transform: rotate(-2deg);
  text-shadow: 2px 3px 0 rgba(217,139,139,.25);
}
.hero-tagline {
  font-family: var(--f-serif); font-size: clamp(1.3rem, 3vw, 1.9rem);
  color: var(--red-deep); font-weight: 600; margin: 0 0 .6rem;
}
.hero-tagline em { color: var(--gold-deep); font-style: italic; }
.hero-sub { font-size: 1.15rem; color: var(--ink-soft); max-width: 30rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.6rem 0 1.2rem; }
.hero-note { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--accent); font-size: .95rem; }
.hero-note .dot { width: 9px; height: 9px; background: var(--mint); border-radius: 50%; box-shadow: 0 0 0 4px rgba(168,213,196,.35); }

/* hero art card */
.hero-art { position: relative; z-index: 2; display: grid; place-items: center; }
.art-card {
  position: relative; background: var(--paper);
  border-radius: var(--radius-lg); padding: 2.4rem 2rem;
  box-shadow: var(--shadow); text-align: center;
  transform: rotate(2.5deg); border: 1px solid var(--line);
  min-width: 240px; max-width: 100%;
}
.art-card .big-heart { font-size: 4.5rem; }
.art-emoji { font-size: 3.4rem; line-height: 1; }
.art-row { display: flex; justify-content: center; gap: .6rem; margin: 1rem 0 .4rem; }
.pill-badge {
  width: 52px; height: 52px; display: grid; place-items: center;
  background: var(--blush); border-radius: 14px; font-size: 1.6rem;
  box-shadow: var(--shadow-sm);
}
.art-caption { font-size: 1.5rem; color: var(--rose-deep); margin: .4rem 0 0; }

/* washi tape */
.tape {
  position: absolute; width: 84px; height: 26px;
  background: rgba(227,169,56,.5);
  box-shadow: inset 0 0 0 100px rgba(240,206,134,.35);
}
.tape-tl { top: -12px; left: 22px; transform: rotate(-8deg); }
.tape-tr { top: -12px; right: 22px; transform: rotate(7deg); }

/* hero decor sparkles + hearts */
.hero-decor { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.spark {
  position: absolute; width: 60px; height: 60px;
  background:
    radial-gradient(circle, var(--gold) 0 8%, transparent 9%) center/100% 100%;
}
.spark::before, .spark::after {
  content:""; position:absolute; inset:0; margin:auto;
  background: var(--gold);
}
.spark::before { width: 4px; height: 100%; border-radius: 4px; }
.spark::after  { width: 100%; height: 4px; border-radius: 4px; }
.spark-1 { top: 14%; right: 12%; transform: rotate(15deg) scale(.7); opacity:.7; }
.spark-2 { bottom: 22%; left: 8%; transform: rotate(-10deg) scale(.5); opacity:.6; }
.spark-d1 { position:absolute; top: 8%; left: 12%; opacity:.55; }

.float-heart { position: absolute; color: var(--rose); opacity: .55; font-size: 1.6rem; animation: floaty 6s ease-in-out infinite; }
.fh-1 { top: 18%; left: 6%; }
.fh-2 { top: 60%; right: 6%; font-size: 2.2rem; animation-delay: 1.2s; color: var(--red); opacity:.4;}
.fh-3 { bottom: 14%; left: 40%; font-size: 1.2rem; animation-delay: 2.4s; }
@keyframes floaty { 0%,100%{ transform: translateY(0) rotate(-4deg);} 50%{ transform: translateY(-16px) rotate(4deg);} }

/* hero bottom wave divider */
.hero-wave {
  position: absolute; left: 0; right: 0; bottom: -1px; height: clamp(36px, 6vw, 60px);
  background:
    radial-gradient(40px 60px at 50% 0, transparent 0 39px, var(--cream) 40px) repeat-x;
  background-size: 80px 100%;
}

/* =====================================================================
   MISSION
   ===================================================================== */
.mission { background: var(--cream); }
.mission .lead { margin-bottom: 1.2rem; }
.value-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.4rem; margin-top: 2.6rem; }
.value-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.8rem 1.4rem;
  box-shadow: var(--shadow-sm); text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.value-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.value-ico { font-size: 2.4rem; display:block; margin-bottom: .5rem; }
.value-card h3 { font-family: var(--f-serif); font-size: 1.25rem; color: var(--ink); }
.value-card p { color: var(--ink-soft); margin: 0; font-size: .98rem; }

/* =====================================================================
   IMPACT (dark warm band)
   ===================================================================== */
.impact {
  background:
    radial-gradient(800px 300px at 80% 0, rgba(227,169,56,.20), transparent 60%),
    linear-gradient(135deg, #a83c34, #7d2820);
  color: var(--paper);
}
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.4rem; margin-top: 2.4rem; }
.stat {
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius); padding: 1.8rem 1rem; backdrop-filter: blur(4px);
}
.stat-num { display: block; font-family: var(--f-serif); font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.2rem); color: #fff; line-height: 1; }
.stat-label { display: block; margin-top: .6rem; font-weight: 700; font-size: .95rem; color: #fbeee6; }
.impact-foot { margin-top: 1.8rem; color: #fbeee6; opacity: .85; font-size: .9rem; }

/* =====================================================================
   WHAT WE DO
   ===================================================================== */
.what-we-do { background: var(--cream-2); }
.do-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.4rem; margin-top: 2.8rem; }
.do-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.9rem 1.4rem; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.do-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.do-ico { font-size: 2.2rem; display:block; margin-bottom: .6rem; }
.do-card h3 { font-family: var(--f-serif); font-size: 1.3rem; color: var(--ink); }
.do-card p { color: var(--ink-soft); margin: 0; font-size: .96rem; }

/* =====================================================================
   THE ISSUE
   ===================================================================== */
.issue { background: var(--cream); }
.issue-card {
  position: relative; width: 100%; max-width: 760px; margin-inline: auto; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 2.6rem clamp(1.4rem, 4vw, 3rem); box-shadow: var(--shadow);
  transform: rotate(-.6deg);
}
.issue-title { font-size: clamp(2rem, 5vw, 2.8rem); color: var(--red-deep); margin-bottom: .5rem; }
.fact-list { list-style: none; padding: 0; margin: 1.2rem 0 1.6rem; display: flex; flex-direction: column; gap: .9rem; }
.fact-list li { position: relative; padding-left: 2.3rem; color: var(--ink); overflow-wrap: anywhere; }
.fact-list .check {
  position: absolute; left: 0; top: 1px;
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--mint); color: #2f4a40; display: grid; place-items: center;
  font-weight: 900; font-size: .9rem;
}

/* =====================================================================
   WHERE FUNDS GO (dark teal-rose band)
   ===================================================================== */
.funds {
  background:
    radial-gradient(700px 280px at 12% 8%, rgba(168,213,196,.22), transparent 60%),
    linear-gradient(135deg, #543a42, #6b414b);
  color: var(--paper);
}
.funds-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; margin: 2.6rem 0; }
.fund-card {
  background: rgba(255,253,248,.96); color: var(--ink);
  border-radius: var(--radius-lg); padding: 2.2rem; box-shadow: var(--shadow);
  border-top: 6px solid var(--gold);
  transition: transform .2s ease;
}
.fund-card:hover { transform: translateY(-5px); }
.fund-ico { font-size: 2.8rem; display:block; margin-bottom: .6rem; }
.fund-card h3 { font-family: var(--f-serif); font-size: 1.5rem; color: var(--red-deep); }
.fund-card p { color: var(--ink-soft); margin: 0; }
.funds-pledge {
  display: flex; gap: 1.6rem; align-items: center; justify-content: center;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-lg); padding: 1.8rem 2rem; max-width: 760px; margin: 0 auto;
}
.pledge-num { font-family: var(--f-serif); font-weight: 700; font-size: clamp(3rem,8vw,4.5rem);
  color: var(--gold-soft); line-height: 1; flex: none; }
.funds-pledge p { margin: 0; color: #fbeee6; font-size: 1.05rem; }

/* =====================================================================
   SHOP
   ===================================================================== */
.shop { background: var(--cream-2); }
.shop-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; margin-top: 2.8rem; }
.product {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.product:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.product-img {
  position: relative; aspect-ratio: 1/1; display: grid; place-items: center;
  font-size: 3.4rem;
  background: repeating-linear-gradient(45deg, var(--blush) 0 12px, var(--blush-2) 12px 24px);
}
.product-img .tag {
  position: absolute; top: 10px; left: 10px; font-size: .7rem; font-weight: 800;
  background: var(--gold); color: #4a3410; padding: .25rem .6rem; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .05em;
}
.product-body { padding: 1.2rem; display: flex; flex-direction: column; flex: 1; }
.product-body h3 { font-family: var(--f-serif); font-size: 1.2rem; color: var(--ink); margin-bottom: .3rem; }
.product-body p { color: var(--ink-soft); font-size: .92rem; flex: 1; }
.product-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-top: .8rem; gap: .6rem; }
.product-body h3, .member-name, .fund-card h3, .cl-name, .value-card h3, .do-card h3 { overflow-wrap: break-word; }
.price { font-family: var(--f-serif); font-weight: 700; font-size: 1.4rem; color: var(--red-deep); }
.btn-add { padding: .55rem 1.1rem; font-size: .9rem; }
.shop-note { text-align: center; margin-top: 1.8rem; color: var(--ink-soft); font-size: .92rem; }

/* =====================================================================
   TEAM
   ===================================================================== */
.team { background: var(--cream); }
.team-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; margin-top: 2.8rem; }
.member {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem 1.2rem; text-align: center; box-shadow: var(--shadow-sm);
  transition: transform .2s ease;
}
.member:hover { transform: translateY(-5px); }
.member-photo {
  width: 110px; height: 110px; margin: 0 auto 1rem; border-radius: 50%;
  background: linear-gradient(135deg, var(--blush), var(--gold-soft));
  display: grid; place-items: center; font-size: 3rem;
  border: 4px solid var(--paper); box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.member-photo img { width: 100%; height: 100%; object-fit: cover; }
.member-name { font-family: var(--f-serif); font-size: 1.25rem; color: var(--ink); margin-bottom: .15rem; }
.member-role { color: var(--accent); font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .6rem; }
.member-bio { color: var(--ink-soft); font-size: .92rem; margin: 0; }

/* =====================================================================
   VOLUNTEER
   ===================================================================== */
.volunteer { background: var(--cream-2); }
.volunteer-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2.5rem; align-items: center; }
.volunteer-art { display: grid; place-items: center; }
.volunteer-art .art-card { transform: rotate(-3deg); }

/* =====================================================================
   DONATE
   ===================================================================== */
.donate {
  position: relative;
  background:
    radial-gradient(700px 300px at 50% 120%, rgba(227,169,56,.26), transparent 60%),
    linear-gradient(135deg, #ad3a31, #872a22);
  color: var(--paper); overflow: hidden;
}
.donate-inner { position: relative; z-index: 2; }
.amount-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin: 1.6rem 0; }
.amount-chip {
  background: rgba(255,255,255,.14); color:#fff; border: 2px solid rgba(255,255,255,.4);
  border-radius: 999px; padding: .7rem 1.5rem; font-weight: 800; font-size: 1.05rem;
  cursor: pointer; transition: .2s; font-family: var(--f-sans);
}
.amount-chip:hover { background: rgba(255,255,255,.25); }
.amount-chip.active { background: #fff; color: var(--red); border-color: #fff; transform: translateY(-2px); }
.donate-foot { margin-top: 1.2rem; font-size: .95rem; }
.inline-link { color:#fff; text-decoration: underline; font-weight: 700; }
.inline-link:hover { color: var(--gold-soft); }

/* =====================================================================
   CONTACT
   ===================================================================== */
.contact { background: var(--cream); }
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 2.6rem; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 1.2rem 0 0; display: flex; flex-direction: column; gap: .9rem; }
.contact-list li { display: flex; align-items: center; gap: .7rem; font-weight: 700; color: var(--ink); min-width: 0; }
.contact-list a { color: var(--ink); overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--red); }
.c-ico { font-size: 1.3rem; }
.contact-form {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 2rem; box-shadow: var(--shadow);
}
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 800; font-size: .9rem; margin-bottom: .35rem; color: var(--ink); }
.field input, .field textarea {
  width: 100%; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: 12px;
  font-family: var(--f-sans); font-size: 1rem; background: var(--cream); color: var(--ink);
  transition: border .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px rgba(217,139,139,.25); background:#fff;
}
.form-hint { margin: .8rem 0 0; font-weight: 700; font-size: .92rem; color: var(--rose-deep); }

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer { background: #2f2420; color: #e9ddd4; padding: 3rem 0 1.4rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.footer-brand .brand-name { font-size: 2rem; color: #fff; display: block; }
.footer-brand p { margin: .3rem 0; color: #e9ddd4; }
.footer-brand .muted { color: #b6a79d; font-size: .88rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; }
.footer-nav a { color: #e9ddd4; font-weight: 700; }
.footer-nav a:hover { color: var(--gold-soft); }
.footer-bottom { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.12); }
.footer-bottom p { margin: 0; color: #b6a79d; font-size: .88rem; }

/* =====================================================================
   CART
   ===================================================================== */
.cart-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  background: var(--red); color: #fff; border: 0; cursor: pointer;
  width: 60px; height: 60px; border-radius: 50%; font-size: 1.4rem;
  box-shadow: 0 10px 26px rgba(194,69,58,.42); transition: transform .2s;
}
.cart-fab:hover { transform: translateY(-3px) scale(1.05); }
body.cart-open .cart-fab { display: none; }
.cart-count {
  position: absolute; top: -4px; right: -4px; background: var(--gold); color:#4a3410;
  font-size: .8rem; font-weight: 900; min-width: 22px; height: 22px; border-radius: 999px;
  display: grid; place-items: center; padding: 0 5px; border: 2px solid var(--cream);
}
.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(380px, 90vw); z-index: 110;
  background: var(--paper); box-shadow: -10px 0 40px rgba(0,0,0,.2);
  transform: translateX(105%); transition: transform .3s ease;
  display: flex; flex-direction: column;
}
/* Off-screen when closed; the `inert` attribute (managed in JS) removes it
   from the tab order so its controls aren't keyboard-reachable while hidden. */
.cart-drawer.open { transform: translateX(0); }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 1.3rem 1.4rem; border-bottom: 1px solid var(--line); }
.cart-head h3 { margin: 0; font-family: var(--f-serif); font-size: 1.4rem; }
.cart-close { background: none; border: 0; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--ink-soft); }
.cart-items { flex: 1; overflow-y: auto; padding: 1rem 1.4rem; }
.cart-empty { color: var(--ink-soft); text-align: center; margin-top: 2rem; }
.cart-line { display: flex; align-items: center; gap: .8rem; padding: .8rem 0; border-bottom: 1px dashed var(--line); }
.cart-line .cl-name { flex: 1; font-weight: 700; font-size: .95rem; }
.cart-line .cl-price { font-weight: 800; color: var(--red-deep); }
.qty { display: flex; align-items: center; gap: .4rem; }
.qty button { width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--cream); cursor: pointer; font-weight: 900; color: var(--ink); }
.qty span { min-width: 18px; text-align: center; font-weight: 800; }
.cart-foot { padding: 1.3rem 1.4rem; border-top: 1px solid var(--line); }
.cart-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 1.2rem; margin-bottom: 1rem; }
.cart-note { font-size: .82rem; color: var(--ink-soft); text-align: center; margin: .7rem 0 0; }
.overlay { position: fixed; inset: 0; background: rgba(48,30,26,.45); z-index: 105; }

/* =====================================================================
   SCROLL REVEAL
   ===================================================================== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 960px) {
  .stat-grid, .do-grid, .shop-grid, .team-grid { grid-template-columns: repeat(2,1fr); }
  .value-row { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .funds-grid, .volunteer-inner, .contact-inner { grid-template-columns: 1fr; }
  .volunteer-art { order: -1; }
}
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 0 20px; box-shadow: var(--shadow);
    max-height: 0; overflow: hidden; visibility: hidden;
    transition: max-height .3s ease, visibility .3s ease, padding .3s ease;
  }
  .main-nav.open { max-height: 80vh; overflow-y: auto; visibility: visible; padding: .5rem 20px 1rem; }
  .main-nav a { padding: .8rem .2rem; border-bottom: 1px solid var(--line); }
  .nav-donate { margin-top: .6rem; text-align: center; border: 0; }
}
@media (max-width: 520px) {
  .stat-grid, .do-grid, .shop-grid, .team-grid { grid-template-columns: 1fr; }
  body { font-size: 16px; }
  .funds-pledge { flex-direction: column; text-align: center; gap: .6rem; }
  .brand-name { font-size: 1.3rem; }
}

/* =====================================================================
   AMBIENT FLOATING HEARTS (discreet, site-wide) + INTERACTIONS
   ===================================================================== */
/* Hearts live INSIDE each section (scroll with the page, behind the content)
   and gently bob in place — embedded decoration, not a screen-fixed overlay. */
.section > .container { position: relative; z-index: 1; }
.section-hearts { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.embed-heart {
  position: absolute; will-change: transform;
  animation: heartBob var(--d, 7s) ease-in-out infinite;
}
.embed-heart svg { width: 100%; height: 100%; display: block; }
@keyframes heartBob {
  0%, 100% { transform: translateY(0) rotate(-7deg); }
  50%      { transform: translateY(-12px) rotate(7deg); }
}

/* =====================================================================
   INTRO — butterfly swarm reveal (non-interactive, plays once on load)
   ===================================================================== */
.intro { position: fixed; inset: 0; z-index: 9999; display: none; }
html.has-js .intro {
  display: grid; place-items: center;
  /* Failsafe: if main.js never finishes, lift the cover after 6s so the
     site is never left hidden. JS normally removes this element first. */
  animation: introFailsafe .8s ease 6s forwards;
}
/* Once the reveal starts: stop blocking the page and cancel the failsafe so
   the butterflies can keep flying off over the live site. */
html.has-js .intro.revealing { pointer-events: none; animation: none; }
@keyframes introFailsafe { to { opacity: 0; visibility: hidden; } }

/* Cream backdrop — the only opaque layer; fades out on reveal to hand off
   to the real site underneath (the butterflies are NOT inside it, so they
   keep flying after the backdrop is gone). */
.intro-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(900px 520px at 50% 40%, var(--blush) 0%, transparent 62%),
    var(--cream);
}
.intro.revealing .intro-bg { opacity: 0; transition: opacity .8s ease; }

/* Swarm fills the viewport, above the backdrop and below the name. */
.intro-swarm { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

.intro-name {
  position: relative; z-index: 2; /* always above the swarm, so it stays readable */
  margin: 0; font-family: var(--f-script); font-weight: 700; color: var(--ink);
  font-size: clamp(3rem, 11vw, 6.5rem); line-height: 1; text-align: center;
  text-shadow: 0 2px 16px var(--cream), 2px 3px 0 rgba(217,139,139,.25);
  opacity: 0; transform: scale(.92);
  animation: introNameIn .8s cubic-bezier(.2,.8,.25,1) .35s forwards;
}
/* The name's exit is JS-driven: it physically slides to the hero title's spot
   (a FLIP move) and hands off to the real title for visual continuity. */
@keyframes introNameIn {
  0%   { opacity: 0; transform: scale(.92) translateY(8px); filter: blur(6px); }
  100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

/* Butterflies — positioned (left/top) at a resting spot near the name. */
.intro-bf {
  position: absolute; opacity: 0; will-change: transform, opacity;
  animation: bfIn .95s cubic-bezier(.2,.7,.3,1) forwards; animation-delay: var(--in, 0s);
}
/* On reveal they fly all the way off-screen (--ex/--ey set large in JS), and
   only fade near the very end so you watch them leave naturally. */
.intro.revealing .intro-bf {
  animation: bfOut var(--out, 2s) cubic-bezier(.33,.12,.28,1) var(--outd, 0s) forwards;
}
.intro-bf svg { width: 100%; height: 100%; display: block; overflow: visible; }
.intro-bf .bf-l, .intro-bf .bf-r { transform-box: fill-box; animation: flap var(--flap, .34s) ease-in-out infinite; }
.intro-bf .bf-l { transform-origin: 100% 50%; }
.intro-bf .bf-r { transform-origin: 0% 50%; }
.bf-up, .bf-lo { fill: currentColor; }
.bf-body { fill: rgba(58,40,30,.6); }
.bf-monarch .bf-up, .bf-monarch .bf-lo { fill: #E8821E; stroke: #2E2018; stroke-width: 1.3; paint-order: stroke; }
.bf-monarch .bf-body { fill: #241A12; }
.bf-monarch .bf-dot { fill: #FFF6E9; }

@keyframes bfIn {
  0%   { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(.2) rotate(var(--sr)); }
  55%  { opacity: 1; }
  100% { opacity: .92; transform: translate(0, 0) scale(1) rotate(0deg); }
}
@keyframes bfOut {
  0%   { opacity: .92; transform: translate(0, 0) scale(1) rotate(0deg); }
  72%  { opacity: .85; }
  100% { opacity: 0; transform: translate(var(--ex), var(--ey)) scale(.8) rotate(var(--er)); }
}
@keyframes flap { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.32); } }

/* Hover butterflies — hidden UNDER the element (z-index:0 sits behind the page
   content, which is z-index >= 1), then revealed as they slip out from beneath
   its edges and dissipate, like lifting a sheet of paper. */
.fly-bf {
  position: fixed; z-index: 0; pointer-events: none; opacity: 0;
  will-change: transform, opacity;
  animation: flyBf var(--fd, 1.2s) cubic-bezier(.3,.5,.3,1) forwards;
}
.fly-bf svg { width: 100%; height: 100%; display: block; overflow: visible; }
.fly-bf .bf-l, .fly-bf .bf-r { transform-box: fill-box; animation: flap var(--flap, .28s) ease-in-out infinite; }
.fly-bf .bf-l { transform-origin: 100% 50%; }
.fly-bf .bf-r { transform-origin: 0% 50%; }
@keyframes flyBf {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.5) rotate(0deg); }
  30%  { opacity: 1; }
  75%  { opacity: .92; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--fx)), calc(-50% + var(--fy))) scale(1) rotate(var(--fr)); }
}

/* Heart pop on "add to cart" / interactions */
.pop-heart { position: fixed; z-index: 120; pointer-events: none; color: var(--red); }
.pop-heart svg { width: 100%; height: 100%; display: block; }
@keyframes popUp {
  0%   { transform: translate(-50%, -50%) scale(.4); opacity: 0; }
  25%  { transform: translate(-50%, -95%) scale(1);  opacity: 1; }
  100% { transform: translate(-50%, -240%) scale(.6); opacity: 0; }
}
.pop-heart { animation: popUp .9s ease-out forwards; }

/* Hero entrance — staggered, plays AS the intro lifts so the page settles in
   gracefully (not all at once). Hidden only while the intro is actively playing;
   visible by default otherwise, so it degrades fine without JS. */
body.intro-playing #hero .eyebrow, body.intro-playing #hero .hero-art,
body.intro-playing #hero .hero-title, body.intro-playing #hero .hero-tagline,
body.intro-playing #hero .hero-sub, body.intro-playing #hero .hero-cta,
body.intro-playing #hero .hero-note { opacity: 0; }

body.revealed #hero .eyebrow      { animation: introIn .7s ease both 0s; }
body.revealed #hero .hero-art     { animation: introIn .9s ease both .12s; }
/* .hero-title is intentionally NOT animated here — the intro name slides into
   its place and hands off (see slideNameIntoHero in main.js). */
body.revealed #hero .hero-tagline { animation: introIn .7s ease both .30s; }
body.revealed #hero .hero-sub     { animation: introIn .7s ease both .42s; }
body.revealed #hero .hero-cta     { animation: introIn .7s ease both .54s; }
body.revealed #hero .hero-note    { animation: introIn .7s ease both .66s; }
@keyframes introIn  { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes introPop { 0% { opacity: 0; transform: translateY(18px) scale(.94); } 100% { opacity: 1; transform: none; } }
/* Safety: once the intro is fully done, force the hero visible no matter what
   (covers the rare case of throttled/paused entrance animations). */
body.intro-done #hero .eyebrow, body.intro-done #hero .hero-art,
body.intro-done #hero .hero-title, body.intro-done #hero .hero-tagline,
body.intro-done #hero .hero-sub, body.intro-done #hero .hero-cta,
body.intro-done #hero .hero-note { animation: none !important; opacity: 1 !important; transform: none !important; }

/* Heartbeat on the header logo */
.brand:hover .brand-mark svg { animation: beat .85s ease-in-out infinite; }
@keyframes beat { 0%,100% { transform: scale(1); } 22% { transform: scale(1.22); } 38% { transform: scale(1.04); } 56% { transform: scale(1.16); } }

/* Gentle lift on the hero art card */
.hero-art .art-card { transition: transform .35s ease; }
.hero-art:hover .art-card { transform: rotate(1deg) translateY(-6px) scale(1.02); }

/* =====================================================================
   ACCESSIBILITY — reduced motion
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .section-hearts, .intro, .pop-heart { display: none !important; }
  #hero .eyebrow, #hero .hero-art, #hero .hero-title,
  #hero .hero-tagline, #hero .hero-sub, #hero .hero-cta,
  #hero .hero-note { opacity: 1 !important; transform: none !important; }
}
