/* ============================
   Rally Foundation — Site Styles
   Brand: Rally Navy #163A6C / Sky Blue #8FC1E3 / Ink Black #101820 / White #FFFFFF
   Type: Bricolage Grotesque
   ============================ */

:root {
  --navy: #163A6C;
  --navy-deep: #0f2a4f;
  --sky: #8FC1E3;
  --ink: #101820;
  --white: #FFFFFF;
  --off-white: #F5F5F4;
  --line: #E3E1DC;
  --text-muted: #5B6472;
  --radius: 14px;
  --max-width: 1120px;
  --shadow: 0 12px 32px rgba(16, 24, 32, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 16px; color: var(--text-muted); }

.eyebrow {
  display: inline-block;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 14px;
}

.eyebrow.dark { color: var(--navy); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--sky); color: var(--ink); }
.btn-primary:hover { box-shadow: 0 8px 20px rgba(143,193,227,0.5); }

.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); }
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }

.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { box-shadow: 0 8px 20px rgba(22,58,108,0.35); }

.btn-ghost-navy { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost-navy:hover { background: var(--navy); color: var(--white); }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Logo ---------- */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-word {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo-word .r-name {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}
.logo-word .r-sub {
  font-weight: 600;
  font-size: 0.55rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin-top: 2px;
}
.logo.on-light .r-name { color: var(--ink); }
.logo.on-light .r-sub { color: var(--navy); }
.logo.on-dark .r-name { color: var(--white); }
.logo.on-dark .r-sub { color: var(--sky); }

/* ---------- Header / Nav ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.nav-links a:hover, .nav-links a.active { border-color: var(--sky); color: var(--navy); }
.nav-cta { display: flex; align-items: center; gap: 16px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; }

@media (max-width: 860px) {
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; background: var(--white); flex-direction: column; gap: 0; border-bottom: 1px solid var(--line); display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 16px 24px; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
  .nav-cta .btn-navy { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--navy);
  color: var(--white);
  padding: 90px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero .wrap { position: relative; z-index: 2; }
.hero p.lede { color: rgba(255,255,255,0.82); font-size: 1.15rem; max-width: 620px; }
.hero-emblem {
  position: absolute;
  right: -60px;
  top: -40px;
  opacity: 0.14;
  width: 420px;
  z-index: 1;
}

.page-hero {
  background: var(--navy);
  color: var(--white);
  padding: 64px 0 70px;
}
.page-hero p.lede { color: rgba(255,255,255,0.82); max-width: 640px; font-size: 1.05rem; }

/* ---------- Sections ---------- */
section { padding: 84px 0; }
section.tight { padding: 60px 0; }
.section-off { background: var(--off-white); }

.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Model steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 26px;
  position: relative;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--sky);
  color: var(--ink);
  font-weight: 800;
  margin-bottom: 18px;
}

/* ---------- Cards / Grid ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

/* ---------- Stats ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.stat-num {
  font-weight: 800;
  font-size: 2.4rem;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

/* ---------- Events ---------- */
.event-card {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 24px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
}
.event-date {
  background: var(--off-white);
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
}
.event-date .day { font-weight: 800; font-size: 1.8rem; color: var(--navy); line-height: 1; }
.event-date .mon { font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
.event-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.85rem; color: var(--text-muted); margin-top: 6px; }
.event-meta span { display: inline-flex; align-items: center; gap: 6px; }
.tag {
  display: inline-block;
  background: var(--sky);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.tag.raised { background: var(--off-white); border: 1px solid var(--line); }

.past-event-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 700px) {
  .event-card { grid-template-columns: 90px 1fr; }
  .event-card .btn { grid-column: 1 / -1; justify-self: start; }
}

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.team-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.avatar {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 3rem;
  color: var(--white);
}
.team-body { padding: 24px; }
.team-role {
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 8px;
}

/* ---------- Impact / Charity list ---------- */
.charity-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  gap: 16px;
  flex-wrap: wrap;
}
.charity-amount { font-weight: 800; color: var(--navy); font-size: 1.2rem; white-space: nowrap; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--sky);
  border-radius: 20px;
  padding: 56px;
  text-align: center;
}
.cta-band h2 { margin-bottom: 10px; }
.cta-band p { color: rgba(16,24,32,0.7); max-width: 500px; margin-left: auto; margin-right: auto; }

/* ---------- Forms ---------- */
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
input[type="email"], input[type="text"], textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 13px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  flex: 1;
  min-width: 220px;
  background: var(--white);
  color: var(--ink);
}
textarea { border-radius: 16px; min-height: 120px; width: 100%; resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--sky); }

.social-links { display: flex; gap: 14px; margin-top: 6px; }
.social-links a {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.social-links a:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ---------- Footer ---------- */
footer {
  background: var(--ink);
  color: rgba(255,255,255,0.75);
  padding: 56px 0 30px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.footer-cols { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-col h4 { color: var(--white); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px; }
.footer-col a, .footer-col p { display: block; margin-bottom: 10px; color: rgba(255,255,255,0.65); font-size: 0.92rem; }
.footer-col a:hover { color: var(--sky); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .steps, .grid-3, .team-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 30px 20px; }
  .cta-band { padding: 36px 24px; }
  .footer-top { flex-direction: column; }
}
