/* ==========================================================================
   Brave Like Bell — stylesheet
   See CLAUDE.md section 4 (design system) and 2a (accessibility rules).
   ========================================================================== */

:root {
  --color-cream:      #F5EEDD;
  --color-cream-deep: #EFE3C8;
  --color-purple:      #6B2FA0;
  --color-purple-deep: #4A1D73;
  --color-gold:         #F2A900;
  --color-gold-deep:   #C98600;
  --color-ink:           #2B2320;

  --color-white: #FFFFFF;

  --color-hero-bg-1: #3B1763;
  --color-hero-bg-2: #1C0B33;
  --color-hero-bg-3: #100620;
  --color-hero-text: #F5EEDD;
  --color-hero-text-dim: rgba(245, 238, 221, 0.82);

  --font-heading: 'Poppins', 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-script:  'Sacramento', cursive;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 6rem;

  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 1080px;

  --focus-ring: 3px solid var(--color-gold-deep);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-cream);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* Never disable pinch-zoom or lock body scroll site-wide */
html, body { overflow-x: hidden; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--color-purple-deep);
  line-height: 1.15;
  margin: 0 0 var(--space-2);
}

h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }

p { margin: 0 0 var(--space-2); }

.script-accent {
  font-family: var(--font-script);
  font-weight: 400;
  color: var(--color-gold-deep);
  line-height: 1;
}

/* Visible focus state everywhere — required by section 2a/9 */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link — keyboard users can jump past the hero straight to content */
.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -60px;
  background: var(--color-purple-deep);
  color: var(--color-white);
  padding: 0.75em 1.25em;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 700;
  z-index: 100;
  transition: top 0.15s ease;
}
.skip-link:focus { top: var(--space-2); }

/* ---- Layout ---- */
.section {
  padding: var(--space-6) var(--space-2);
}
.section--deep { background: var(--color-cream-deep); }

.section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section__heading {
  text-align: center;
  margin-bottom: var(--space-4);
}

/* Brush-stroke highlight bar behind section headings */
.brush-highlight {
  display: inline;
  background: linear-gradient(120deg, var(--color-gold) 0%, var(--color-gold) 100%);
  background-repeat: no-repeat;
  background-size: 100% 0.5em;
  background-position: 0 88%;
  padding: 0 0.15em;
  border-radius: 3px 8px 5px 10px / 6px 4px 9px 5px;
}

/* On dark sections the "highlighter pen" effect (partial-height bar) leaves the
   top of the glyphs sitting directly on the dark background, unreadable. Use a
   full-height badge instead so the purple-on-gold heading text stays legible. */
.section--dark .brush-highlight {
  background-size: 100% 100%;
  background-position: center;
  padding: 0.1em 0.35em;
  border-radius: var(--radius-sm);
}

.divider {
  display: block;
  width: 140px;
  height: 18px;
  margin: var(--space-3) auto;
}
.divider path { fill: var(--color-purple); opacity: 0.35; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 56px;
  padding: 0.9em 1.75em;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  min-width: 44px;
}
.btn:hover, .btn:focus-visible { transform: translateY(-2px); }

.btn--primary {
  background: var(--color-gold);
  color: var(--color-purple-deep);
  box-shadow: 0 4px 0 var(--color-gold-deep);
}
.btn--primary:hover, .btn--primary:focus-visible {
  background: var(--color-gold-deep);
  color: var(--color-white);
}

.btn--secondary {
  background: transparent;
  color: var(--color-purple-deep);
  border-color: var(--color-purple-deep);
}
.btn--secondary:hover, .btn--secondary:focus-visible {
  background: var(--color-purple-deep);
  color: var(--color-white);
}

.btn--block { width: 100%; }

/* ---- Header / Hero ---- */
.section--dark {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 15%, rgba(242,169,0,0.16), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(107,47,160,0.35), transparent 50%),
    linear-gradient(160deg, var(--color-hero-bg-1) 0%, var(--color-hero-bg-2) 55%, var(--color-hero-bg-3) 100%);
  color: var(--color-hero-text-dim);
}
.section--dark .section__heading p { color: var(--color-hero-text-dim); }

.hero {
  padding: var(--space-6) var(--space-2) var(--space-7);
  text-align: center;
}

.hero h1 {
  color: var(--color-hero-text);
  text-shadow: 0 2px 18px rgba(0,0,0,0.35);
}

.wordmark {
  display: block;
  width: min(360px, 70vw);
  height: auto;
  margin: 0 auto var(--space-4);
  filter: drop-shadow(0 6px 20px rgba(0,0,0,0.45));
}

.hero__photo-frame {
  width: min(280px, 60vw);
  aspect-ratio: 1 / 1;
  margin: 0 auto var(--space-3);
  border-radius: 50%;
  border: 6px solid var(--color-white);
  box-shadow: 0 0 0 4px var(--color-gold), 0 0 50px rgba(242,169,0,0.35);
  overflow: hidden;
  background: var(--color-cream-deep);
}
.hero__photo-frame img { width: 100%; height: 100%; object-fit: cover; }

.hero__summary {
  max-width: 640px;
  margin: 0 auto var(--space-4);
  font-size: 1.15rem;
  color: var(--color-hero-text-dim);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
}

.hero__actions .btn--secondary {
  color: var(--color-hero-text);
  border-color: var(--color-hero-text);
}
.hero__actions .btn--secondary:hover,
.hero__actions .btn--secondary:focus-visible {
  background: var(--color-cream);
  color: var(--color-purple-deep);
}

.ribbon {
  display: inline-block;
  width: 28px;
  height: 44px;
  vertical-align: middle;
}

/* ---- Story ---- */
.story__text { max-width: 680px; margin: 0 auto; font-size: 1.1rem; }

/* ---- Donate ---- */
.donate {
  text-align: center;
}
.donate__cta { margin-bottom: var(--space-4); }
.donate__widget-wrap {
  max-width: 480px;
  margin: 0 auto;
  border-radius: var(--radius);
  background: var(--color-white);
  color: var(--color-ink);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  padding: var(--space-4) var(--space-3);
}
.donate__progress-bar {
  width: 100%;
  height: 20px;
  border-radius: 999px;
  background: var(--color-cream-deep);
  overflow: hidden;
}
.donate__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-gold-deep), var(--color-gold));
  border-radius: 999px;
}
.donate__progress-figures {
  margin: var(--space-2) 0 0;
  font-size: 1.05rem;
}
.donate__progress-figures strong {
  color: var(--color-purple-deep);
  font-family: var(--font-heading);
}
.donate__fallback {
  padding: var(--space-3);
  font-size: 0.9rem;
  color: var(--color-hero-text-dim);
  opacity: 0.85;
}

/* ---- Cards grid (shop) ---- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

.shop-empty {
  text-align: center;
  opacity: 0.8;
}

.card {
  background: var(--color-white);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 4px 14px rgba(43,35,32,0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover, .card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(43,35,32,0.12);
  border-color: var(--color-gold);
}

.card--spotlight {
  border-color: var(--color-gold);
  box-shadow: 0 6px 20px rgba(242,169,0,0.3);
}
.card--spotlight:hover, .card--spotlight:focus-within {
  box-shadow: 0 12px 28px rgba(242,169,0,0.38);
}

.card__tag {
  align-self: flex-start;
  background: var(--color-purple);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3em 0.75em;
  border-radius: 999px;
  margin-bottom: var(--space-1);
}
.card__tag--spotlight {
  background: var(--color-gold);
  color: var(--color-purple-deep);
}

.card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-2);
  background: var(--color-cream-deep);
}
.card__image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-purple);
  opacity: 0.35;
}
.card__image--placeholder svg {
  width: 30%;
  height: 30%;
}

.card__name {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-purple-deep);
  font-size: 1.05rem;
  margin-bottom: 0.25em;
}

.card__desc {
  font-size: 0.98rem;
  margin-bottom: var(--space-1);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__date {
  font-size: 0.88rem;
  color: var(--color-purple-deep);
  opacity: 0.8;
  margin-bottom: var(--space-2);
}

.card__contact {
  font-size: 0.92rem;
  font-style: normal;
  margin-top: auto;
  padding-top: var(--space-1);
  border-top: 1px dashed var(--color-cream-deep);
}

.card__link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 44px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-purple-deep);
  text-decoration: none;
  padding-top: var(--space-1);
}
.card__link .arrow { transition: transform 0.15s ease; display: inline-block; }
.card:hover .card__link .arrow,
.card__link:focus-visible .arrow { transform: translateX(4px); }

.card__contact--extra {
  margin-top: 0.3em;
  padding-top: 0;
  border-top: none;
  font-size: 0.85rem;
  opacity: 0.75;
}

.card__progress {
  margin: 0.6em 0;
}
.card__progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: var(--color-cream-deep);
  overflow: hidden;
}
.card__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-gold-deep), var(--color-gold));
  border-radius: 999px;
}
.card__progress-figures {
  margin: 0.4em 0 0;
  font-size: 0.85rem;
}
.card__progress-figures strong {
  color: var(--color-purple-deep);
  font-family: var(--font-heading);
}

/* Entrance animation, capped stagger — see CLAUDE.md 6a.
   Scoped under .js (set by an inline script in <head>) so cards stay fully
   visible with JavaScript disabled instead of being stuck at opacity:0. */
.js .animate-in {
  opacity: 0;
  transform: translateY(14px);
}
.js .animate-in.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* ---- Follow along / share ---- */
.follow {
  text-align: center;
}

.hashtag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: var(--color-purple);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  padding: 0.5em 1.1em;
  border-radius: 999px;
  margin: var(--space-2) 0 var(--space-4);
}

.follow__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  margin-bottom: var(--space-2);
}

.follow__help {
  max-width: 520px;
  margin: 0 auto;
  font-size: 0.95rem;
  opacity: 0.85;
}

.share-status {
  margin-top: var(--space-2);
  font-weight: 700;
  color: var(--color-purple-deep);
  min-height: 1.5em;
}

/* ---- About DMG ---- */
.about-dmg { max-width: 680px; margin: 0 auto; text-align: center; }
.about-dmg__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  margin-top: var(--space-3);
}

/* ---- Footer ---- */
.site-footer {
  padding: var(--space-4) var(--space-2) var(--space-6);
  text-align: center;
  font-size: 0.95rem;
  background: var(--color-purple-deep);
  color: var(--color-cream);
}
.site-footer a { color: var(--color-gold); }
.site-footer p { margin: 0 0 0.5em; }

/* ---- Utility ---- */
.center { text-align: center; }

/* Respect reduced motion everywhere */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js .animate-in { opacity: 1; transform: none; }
  .card:hover, .btn:hover, .btn:focus-visible { transform: none; }
}

