/* School Charity Challenge — static rebuild of the Squarespace site.
   Palette and type lifted from the live site, not invented:
   black sections, white sections, mint #74E7C2 accent, orange #FF6A13 pill
   buttons with black label, Montserrat throughout. */

:root {
  --black: #000000;
  --white: #ffffff;
  --mint: #74E7C2;
  --orange: #FF6A13;
  --gold: #FAB607;
  --paper: #F4F4F3;
  --ink: #111111;
  --muted: rgba(0, 0, 0, 0.68);
  --muted-on-dark: rgba(255, 255, 255, 0.78);
  --maxw: 1180px;
  --pill: 999px;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Montserrat, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--black);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; display: flex; flex-direction: column; }
main > section:last-child { flex: 1 0 auto; }

h1, h2, h3, h4 {
  font-family: Montserrat, sans-serif;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}
h1 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
h3 { font-size: clamp(1.15rem, 1.7vw, 1.45rem); }
p { margin: 0 0 1rem; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(22px, 4vw, 44px); }

/* ---------- Header ---------- */
.site-header { background: var(--black); position: sticky; top: 0; z-index: 60; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; }
.brand img { height: 46px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.nav-links a {
  color: var(--white); text-decoration: none; font-size: 0.92rem; font-weight: 500;
  white-space: nowrap; opacity: 0.9;
}
.nav-links a:hover, .nav-links a.active { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }

.nav-toggle { display: none; width: 40px; height: 34px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; z-index: 120; }
.nav-toggle span { display: block; height: 2px; width: 30px; margin: 0 auto; background: var(--white); border-radius: 2px; transition: transform 0.22s ease; }
.nav-toggle span + span { margin-top: 8px; }
body.menu-open .nav-toggle span:first-child { transform: translateY(5px) rotate(45deg); }
body.menu-open .nav-toggle span:last-child { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer; border: 0;
  font-family: Montserrat, sans-serif; font-weight: 600; font-size: 0.98rem;
  padding: 14px 34px; border-radius: var(--pill);
  background: var(--orange); color: var(--black);
  transition: transform 0.12s ease, filter 0.15s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn-mint { background: var(--mint); color: var(--black); }
.btn-ghost { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.6); }

/* ---------- Sections ---------- */
section { padding: clamp(52px, 7vw, 88px) 0; }
.section-dark { background: var(--black); color: var(--white); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark p { color: var(--muted-on-dark); }
.section-light { background: var(--white); color: var(--ink); }
.section-paper { background: var(--paper); color: var(--ink); }
.section-mint { background: var(--mint); color: var(--black); }
.center { text-align: center; }
.lead { font-size: clamp(1.02rem, 1.4vw, 1.2rem); max-width: 64ch; }
.center .lead { margin-left: auto; margin-right: auto; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.76rem; font-weight: 600; color: var(--orange); margin-bottom: 12px; }

/* ---------- Hero ---------- */
.hero { background: var(--black); color: var(--white); padding: clamp(60px, 8vw, 110px) 0; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); letter-spacing: 0.02em; }
.hero .lead { color: var(--muted-on-dark); margin-top: 16px; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.center .cta-row { justify-content: center; }

/* ---------- Home ---------- */
.home-hero {
  position: relative; color: var(--white);
  min-height: clamp(420px, 62vh, 660px);
  display: flex; align-items: center;
  background: #000 url('/assets/groupphoto.webp') center 66% / cover no-repeat;
}
/* The live site puts a 35% black wash over the photo so the type stays legible. */
.home-hero::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.35); }
.home-hero-inner { position: relative; z-index: 1; }
.hero-dates {
  color: #FE8103; font-weight: 700; margin: 0;
  font-size: clamp(2rem, 6vw, 4.2rem); line-height: 1.05; letter-spacing: 0.01em;
}
.home-hero h1 {
  color: #FEFCFA; font-weight: 700; margin: 0.35em 0 0;
  font-size: clamp(1.6rem, 3.6vw, 2.8rem); letter-spacing: 0.04em;
}
.strapline {
  font-weight: 700; font-size: clamp(1.05rem, 1.9vw, 1.55rem);
  max-width: 60ch; margin: 0 auto; color: var(--white);
}
.strapline em { font-style: italic; color: var(--white); }

.step { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 48px); align-items: center; margin: 34px 0; }
.step-copy p { font-size: clamp(1rem, 1.3vw, 1.12rem); margin: 0; }
.step-media img { border-radius: 14px; }
.step-media.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: end; }
.step-media.shots img { border-radius: 16px; }
.step-closing { margin-top: 34px; font-size: clamp(1rem, 1.3vw, 1.12rem); }

.section-quote { background: var(--paper); color: var(--ink); padding: clamp(52px, 7vw, 88px) 0; }
.section-quote blockquote { margin: 0; max-width: 74ch; }
.section-quote blockquote p { font-size: clamp(1rem, 1.35vw, 1.15rem); }
.quote-author { display: flex; align-items: center; gap: 18px; margin-top: 26px; }
.quote-author img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; }
.quote-author .name { font-weight: 700; margin: 0; }
.quote-author .role { margin: 0; color: var(--muted); font-size: 0.92rem; }

@media (max-width: 820px) {
  .step { grid-template-columns: 1fr; }
  .quote-author { flex-direction: column; align-items: flex-start; text-align: left; }
}

/* ---------- Generic grids ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card { background: var(--white); color: var(--ink); border-radius: var(--radius); padding: 26px; }
.section-dark .card { background: #141414; color: var(--white); }
.card img { border-radius: 10px; margin-bottom: 14px; }

/* People (organizers) */
.person { text-align: center; }
.person img { width: 160px; height: 160px; object-fit: cover; border-radius: 50%; margin: 0 auto 14px; }
.person .role { color: var(--muted); font-size: 0.92rem; }
.section-dark .person .role { color: var(--muted-on-dark); }

/* Logos (schools / charities) */
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; }
.logo-card { background: var(--white); border-radius: var(--radius); min-height: 140px; padding: 22px; display: flex; align-items: center; justify-content: center; }
.logo-card img { max-height: 84px; width: auto; object-fit: contain; }
.logo-card a { display: flex; align-items: center; justify-content: center; width: 100%; }

/* App screenshots */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: end; }
.shots img { border-radius: 18px; }
.store-badges { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.store-badges img { height: 48px; width: auto; }

/* Prose (legal, news posts, charity profiles) */
.prose { max-width: 74ch; }
.center .prose { margin: 0 auto; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.45em; }

/* Donor tiers on /whopledged. Rebuild of the Squarespace accordion: dividers top
   and bottom, one panel open at a time (the `name` attribute on <details> does
   that natively), chevron on the right. The tier titles carry the source's own
   runs of spaces, so the label must not collapse whitespace. */
.tiers { border-top: 1px solid rgba(0,0,0,0.15); margin: 22px 0; }
.tiers details { border-bottom: 1px solid rgba(0,0,0,0.15); }
.tiers summary {
  list-style: none; cursor: pointer; padding: 15px 34px 15px 2px; position: relative;
  font-weight: 600; display: flex; align-items: center;
}
.tiers summary::-webkit-details-marker { display: none; }
.tiers summary span { white-space: pre-wrap; }
.tiers summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-70%) rotate(45deg); transition: transform 0.18s ease;
}
.tiers details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.tiers summary:focus-visible { outline: 2px solid var(--black); outline-offset: -2px; }

.tiers .donors { margin: 0 0 16px; padding: 0 2px; display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; }
.tiers .donors dt { font-weight: 600; margin: 0; }
.tiers .donors dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.tiers .tier-empty { margin: 0 0 16px; padding: 0 2px; color: var(--muted); font-size: 0.92rem; }

/* Sponsor marquee (site-wide, data-driven).
   The track holds the same run of names twice, so translating it by -50% lands
   on an identical frame and the loop has no visible seam. Without the scroll
   the strip would simply clip everything past the first few names. */
.sponsors { background: var(--mint); color: var(--black); padding: 14px 0; overflow: hidden; }
.sponsors a { color: inherit; text-decoration: none; display: block; }
.sponsors .track { display: flex; width: max-content; animation: sponsors-scroll 65s linear infinite; }
.sponsors:hover .track, .sponsors:focus-within .track { animation-play-state: paused; }
.sponsors .run { display: flex; gap: 36px; padding-right: 36px; white-space: nowrap; font-weight: 600; font-size: 0.95rem; }

@keyframes sponsors-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* No motion: drop the duplicate run and let the strip scroll by hand instead. */
@media (prefers-reduced-motion: reduce) {
  .sponsors { overflow-x: auto; }
  .sponsors .track { animation: none; }
  .sponsors .run[aria-hidden="true"] { display: none; }
}

/* Forms */
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid rgba(0,0,0,0.22); border-radius: 10px;
  font-family: inherit; font-size: 1rem; background: var(--white); color: var(--ink);
}
.form-field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: 0.88rem; color: var(--muted); }

.scc-form { max-width: 620px; }
.scc-form fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.scc-form legend { font-weight: 600; font-size: 0.98rem; padding: 0; margin-bottom: 8px; }
.scc-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.scc-form .field-row label { display: block; font-size: 0.9rem; font-weight: 500; }
.scc-form .field-row input { margin-top: 6px; }
.scc-form .radio { display: block; font-weight: 400; margin: 6px 0; }
.scc-form .radio input { width: auto; margin-right: 8px; }
.scc-form .amounts { display: flex; gap: 16px; flex-wrap: wrap; }
.scc-form .amounts .radio { margin: 0; }
.scc-form .req { font-weight: 400; font-size: 0.84rem; color: var(--muted); }
.scc-form hr { border: 0; border-top: 1px solid rgba(0,0,0,0.15); margin: 26px 0; }
.scc-form button { margin-top: 8px; }

/* Shown while the form endpoint is not wired, so nobody thinks a pledge was sent. */
.form-pending {
  border: 2px solid var(--orange); border-radius: var(--radius);
  padding: 20px 22px; background: #FFF6EF;
}
.form-pending p { margin: 0; }

@media (max-width: 560px) { .scc-form .field-row { grid-template-columns: 1fr; } }

/* News list */
.post-list { display: grid; gap: 22px; }
.post { border-bottom: 1px solid rgba(0,0,0,0.12); padding-bottom: 20px; }
.section-dark .post { border-color: rgba(255,255,255,0.18); }
.post .meta { font-size: 0.86rem; color: var(--muted); margin-bottom: 6px; }
.section-dark .post .meta { color: var(--muted-on-dark); }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: var(--white); padding: 44px 0; flex-shrink: 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--muted-on-dark); text-decoration: none; font-size: 0.92rem; }
.footer-links a:hover { color: var(--white); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 0; z-index: 110;
    display: none; flex-direction: column; align-items: center; justify-content: center;
    gap: 22px; background: var(--black);
  }
  body.menu-open { overflow: hidden; }
  body.menu-open .nav-links { display: flex; animation: menuIn 0.18s ease-out; }
  @keyframes menuIn { from { opacity: 0 } to { opacity: 1 } }
  .nav-links a { font-size: clamp(1.4rem, 6vw, 2rem); }
}
@media (max-width: 640px) {
  .shots { gap: 10px; }
  .person img { width: 130px; height: 130px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
