/* ==========================================================================
   Ypsi CAN - Ypsilanti Community Action Network
   Built on Bootstrap 5. Design tokens sampled from the approved comps.
   ========================================================================== */

:root {
  --ycan-purple:        #4E205B;
  --ycan-purple-mid:    #6F2D81;
  --ycan-purple-light:  #8A4A9C;
  --ycan-yellow:        #FFDE0A;
  --ycan-yellow-dark:   #E8C800;
  --ycan-yellow-soft:   #FFFBE6;
  --ycan-yellow-circle: #FFF8CE;

  --ycan-ink:           #3A1745;
  --ycan-body:          #6E5C78;
  --ycan-muted:         #8A7B93;

  --ycan-lav-50:        #FBF9FB;
  --ycan-lav-100:       #F6F2F8;
  --ycan-lav-200:       #EDE8EE;
  --ycan-lav-300:       #E0CFE5;
  --ycan-border:        #EAE3EE;

  --ycan-radius:        10px;
  --ycan-radius-lg:     14px;
  --ycan-shadow:        0 1px 2px rgba(78, 32, 91, .04), 0 8px 24px rgba(78, 32, 91, .05);
  --ycan-shadow-hover:  0 4px 10px rgba(78, 32, 91, .08), 0 16px 40px rgba(78, 32, 91, .10);
}

/* --------------------------------------------------------- base */

html { scroll-behavior: smooth; }

body {
  font-family: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ycan-body);
  background: #fff;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* The .h1-.h6 utilities are included deliberately: Bootstrap sets a lighter
   font-weight on them, and a class beats a bare element selector. */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: "Nunito", "Nunito Sans", system-ui, sans-serif;
  color: var(--ycan-purple);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

a { color: var(--ycan-purple-mid); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--ycan-purple); }

::selection { background: var(--ycan-yellow); color: var(--ycan-purple); }

:focus-visible {
  outline: 3px solid var(--ycan-purple-light);
  outline-offset: 2px;
  border-radius: 4px;
}

.ycan-skip {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--ycan-purple); color: #fff; padding: .75rem 1.25rem;
  border-radius: 0 0 var(--ycan-radius) 0;
}
.ycan-skip:focus { left: 0; color: #fff; }

/* --------------------------------------------------------- layout helpers */

.ycan-section { padding: 5rem 0; }
.ycan-section-sm { padding: 3.5rem 0; }

.ycan-section-head { max-width: 680px; margin: 0 auto 3rem; text-align: center; }
.ycan-section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); margin-bottom: .85rem; }
.ycan-section-head p { color: var(--ycan-body); margin-bottom: 0; }

/* --------------------------------------------------------- buttons */

.btn-ycan-yellow,
.btn-ycan-purple,
.btn-ycan-outline,
.btn-ycan-ghost {
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  border-radius: 6px;
  padding: .7rem 1.6rem;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
}

.btn-ycan-yellow { background: var(--ycan-yellow); color: var(--ycan-purple); }
.btn-ycan-yellow:hover { background: var(--ycan-yellow-dark); color: var(--ycan-purple); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(255, 222, 10, .35); }

.btn-ycan-purple { background: var(--ycan-purple); color: #fff; }
.btn-ycan-purple:hover { background: #3E1849; color: #fff; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(78, 32, 91, .28); }

.btn-ycan-outline { background: #fff; color: var(--ycan-purple); border-color: var(--ycan-border); }
.btn-ycan-outline:hover { background: var(--ycan-lav-100); color: var(--ycan-purple); border-color: var(--ycan-purple-light); transform: translateY(-1px); }

.btn-ycan-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-ycan-ghost:hover { background: #fff; color: var(--ycan-purple); }

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

/* --------------------------------------------------------- header */

.ycan-header {
  background: #fff;
  border-bottom: 1px solid var(--ycan-border);
  position: sticky; top: 0; z-index: 1030;
}

.ycan-header .navbar { padding-top: .6rem; padding-bottom: .6rem; }

.ycan-logo img { height: 46px; width: auto; display: block; }

.ycan-nav .nav-link {
  font-size: .95rem;
  color: var(--ycan-ink);
  padding: .4rem .95rem;
  position: relative;
  font-weight: 500;
}
.ycan-nav .nav-link:hover { color: var(--ycan-purple-mid); }
.ycan-nav .nav-link.active { color: var(--ycan-purple); font-weight: 700; }
.ycan-nav .nav-link.active::after {
  content: ""; position: absolute; left: .95rem; right: .95rem; bottom: .05rem;
  height: 2px; background: var(--ycan-purple); border-radius: 2px;
}

.navbar-toggler { border-color: var(--ycan-border); padding: .35rem .55rem; }
.navbar-toggler:focus { box-shadow: none; }

/* --------------------------------------------------------- page hero (inner pages) */

.ycan-pagehero {
  background: linear-gradient(115deg, #4B1D58 0%, #5D266D 45%, #7A3089 100%);
  color: #fff;
  padding: 4.5rem 0;
  text-align: center;
}
.ycan-pagehero h1 { color: #fff; font-size: clamp(2.1rem, 4.6vw, 3.4rem); margin-bottom: 1.1rem; }
.ycan-pagehero p {
  color: rgba(255,255,255,.88);
  font-size: 1.12rem; max-width: 780px; margin: 0 auto; line-height: 1.6;
}
.ycan-pagehero .btn-ycan-yellow { margin-top: 1.8rem; }

/* --------------------------------------------------------- home hero */

.ycan-hero {
  position: relative;
  min-height: 640px;
  display: flex; align-items: center;
  color: #fff;
  overflow: hidden;
}
.ycan-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.02);
}
.ycan-hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(58, 20, 70, .86) 0%, rgba(78, 32, 91, .74) 45%, rgba(122, 48, 137, .70) 100%);
}
.ycan-hero .container { position: relative; z-index: 2; }
.ycan-hero h1 {
  color: #fff;
  font-size: clamp(2.4rem, 5.6vw, 4.1rem);
  margin-bottom: 1.4rem;
  text-shadow: 0 2px 20px rgba(30, 5, 40, .35);
}
.ycan-hero h1 .ycan-hero-accent { color: var(--ycan-yellow); display: block; }
.ycan-hero p {
  font-size: 1.14rem;
  color: rgba(255,255,255,.93);
  max-width: 640px; margin: 0 auto 2rem;
  text-shadow: 0 1px 12px rgba(30, 5, 40, .4);
}
.ycan-hero-actions { display: flex; gap: .85rem; justify-content: center; flex-wrap: wrap; }

/* --------------------------------------------------------- cards */

.ycan-card {
  background: #fff;
  border: 1px solid var(--ycan-border);
  border-radius: var(--ycan-radius);
  box-shadow: var(--ycan-shadow);
  height: 100%;
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.ycan-card-hover:hover { transform: translateY(-4px); box-shadow: var(--ycan-shadow-hover); }
/* Card headings stay heading-coloured even when they are links. */
.ycan-card h2 a, .ycan-card h3 a { color: inherit; }
.ycan-card h2 a:hover, .ycan-card h3 a:hover { color: var(--ycan-purple-mid); }
.ycan-card-body { padding: 1.6rem; display: flex; flex-direction: column; flex: 1 1 auto; }
.ycan-card-foot { padding: 0 1.6rem 1.6rem; }

.ycan-card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ycan-lav-200); }
.ycan-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.ycan-card-hover:hover .ycan-card-media img { transform: scale(1.05); }

/* icon chips */
.ycan-icon {
  width: 42px; height: 42px; flex: 0 0 42px;
  border-radius: 50%;
  background: var(--ycan-lav-200);
  color: var(--ycan-purple);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
}
.ycan-icon-lg { width: 66px; height: 66px; flex-basis: 66px; font-size: 1.7rem; }
.ycan-icon-yellow { background: var(--ycan-yellow-circle); color: var(--ycan-purple); }

/* bullet list used on the pillar cards */
.ycan-bullets { list-style: none; padding: 0; margin: 0; }
.ycan-bullets li {
  position: relative; padding-left: 1.3rem; margin-bottom: .45rem;
  font-size: .92rem; color: var(--ycan-body);
}
.ycan-bullets li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--ycan-yellow);
}

/* soft yellow callout, e.g. "Impact: $100 = 4 tournament trophies" */
.ycan-note {
  background: var(--ycan-yellow-soft);
  border: 1px solid #F5E9B8;
  border-radius: 6px;
  padding: .6rem .9rem;
  font-size: .88rem;
  font-weight: 700;
  color: var(--ycan-purple);
}
.ycan-note-plain { background: var(--ycan-lav-100); border-color: var(--ycan-border); font-weight: 600; }

.ycan-badge {
  display: inline-block;
  background: var(--ycan-lav-200);
  color: var(--ycan-purple);
  border-radius: 999px;
  padding: .22rem .75rem;
  font-size: .76rem;
  font-weight: 700;
}
.ycan-badge-yellow { background: var(--ycan-yellow-circle); }

/* --------------------------------------------------------- pillars section */

.ycan-pillars {
  background: linear-gradient(180deg, var(--ycan-lav-50) 0%, var(--ycan-lav-100) 35%, var(--ycan-lav-300) 100%);
}

/* --------------------------------------------------------- impact band */

.ycan-impact { background: var(--ycan-purple); color: #fff; padding: 4.5rem 0; }
.ycan-impact h2 { color: #fff; }
.ycan-impact .ycan-section-head p { color: rgba(255,255,255,.82); }
.ycan-impact-item { text-align: center; }
.ycan-impact-icon {
  width: 54px; height: 54px; margin: 0 auto 1.1rem;
  border-radius: 50%;
  background: rgba(255,255,255,.10);
  color: var(--ycan-yellow);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.ycan-impact-num {
  font-family: "Nunito", sans-serif;
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  font-weight: 800; color: #fff; line-height: 1.1; margin-bottom: .5rem;
}
.ycan-impact-label { font-size: .88rem; color: rgba(255,255,255,.78); line-height: 1.45; margin: 0 auto; max-width: 15rem; }

/* --------------------------------------------------------- programs page rows */

.ycan-program-row + .ycan-program-row { margin-top: 4.5rem; }
.ycan-program-title { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.1rem; }
.ycan-program-title h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0; }

.ycan-feature { display: flex; gap: .8rem; margin-bottom: 1rem; }
.ycan-feature > i { color: var(--ycan-yellow-dark); font-size: 1.05rem; line-height: 1.5; }
.ycan-feature strong { display: block; color: var(--ycan-purple); font-size: .95rem; }
.ycan-feature span { font-size: .9rem; color: var(--ycan-body); }

.ycan-photo-stack img,
.ycan-photo-grid img {
  width: 100%; border-radius: var(--ycan-radius); object-fit: cover; display: block;
}
.ycan-photo-stack > img { aspect-ratio: 16 / 9; margin-bottom: 1rem; }
.ycan-photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.ycan-photo-grid img { aspect-ratio: 1 / 1; }

/* --------------------------------------------------------- events */

.ycan-event-meta { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.ycan-event-meta li {
  display: flex; align-items: flex-start; gap: .6rem;
  font-size: .9rem; color: var(--ycan-body); margin-bottom: .4rem;
}
.ycan-event-meta i { color: var(--ycan-purple-light); font-size: .95rem; line-height: 1.55; }

.ycan-event-date { font-size: .85rem; color: var(--ycan-muted); margin-bottom: .9rem; display: flex; align-items: center; gap: .45rem; }

/* --------------------------------------------------------- gallery */

.ycan-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.ycan-gallery figure { margin: 0; border-radius: var(--ycan-radius); overflow: hidden; background: var(--ycan-lav-200); }
.ycan-gallery img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block;
  transition: transform .5s ease;
}
.ycan-gallery figure:hover img { transform: scale(1.05); }

/* --------------------------------------------------------- newsletter band */

.ycan-newsletter {
  background: linear-gradient(100deg, #4E205B 0%, #5E2F58 38%, #B99A22 78%, var(--ycan-yellow) 100%);
  color: #fff;
  padding: 4.5rem 0;
  text-align: center;
}
.ycan-newsletter h2 { color: #fff; font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
.ycan-newsletter p { color: rgba(255,255,255,.9); max-width: 560px; margin: 0 auto 1.8rem; }
.ycan-newsletter-box {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--ycan-radius);
  padding: 1.5rem;
  max-width: 560px; margin: 0 auto;
}
.ycan-newsletter-note { font-size: .8rem; color: rgba(255,255,255,.85); margin: .9rem 0 0; }

/* --------------------------------------------------------- forms */

.form-label { font-weight: 700; font-size: .88rem; color: var(--ycan-purple); margin-bottom: .35rem; }
.form-label .req { color: #C0392B; }

.form-control, .form-select {
  border-color: var(--ycan-border);
  border-radius: 6px;
  padding: .6rem .85rem;
  font-size: .95rem;
  color: var(--ycan-ink);
}
.form-control:focus, .form-select:focus {
  border-color: var(--ycan-purple-light);
  box-shadow: 0 0 0 .2rem rgba(138, 74, 156, .16);
}
.form-control::placeholder { color: #A99BB1; }

.form-check-input:checked { background-color: var(--ycan-purple); border-color: var(--ycan-purple); }
.form-check-input:focus { border-color: var(--ycan-purple-light); box-shadow: 0 0 0 .2rem rgba(138, 74, 156, .16); }
.form-check-label { font-size: .93rem; color: var(--ycan-body); }

.ycan-formcard { background: #fff; border: 1px solid var(--ycan-border); border-radius: var(--ycan-radius); box-shadow: var(--ycan-shadow); padding: 2rem; }

/* honeypot - visually hidden but not display:none, so bots still fill it */
.ycan-hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

/* --------------------------------------------------------- donate */

.ycan-amount { text-align: center; }
.ycan-amount .ycan-amount-value { font-family: "Nunito", sans-serif; font-size: 2rem; font-weight: 800; color: var(--ycan-purple); line-height: 1.1; }
.ycan-amount .ycan-badge { margin: .6rem 0 .8rem; }
.ycan-amount p { font-size: .9rem; margin: 0; }

.ycan-pay { text-align: center; }
.ycan-pay .ycan-pay-icon { font-size: 1.7rem; color: var(--ycan-yellow-dark); margin-bottom: .6rem; display: block; }
.ycan-pay h3 { font-size: 1.05rem; color: var(--ycan-yellow-dark); margin-bottom: .5rem; }
.ycan-pay p { font-size: .9rem; margin-bottom: 1rem; }
.ycan-pay .btn-ycan-yellow { align-self: center; }
.ycan-pay-recommended { border-color: var(--ycan-yellow); box-shadow: 0 0 0 1px var(--ycan-yellow), var(--ycan-shadow); }

/* --------------------------------------------------------- rich text */

.ycan-rte { color: var(--ycan-body); }
.ycan-rte p { margin-bottom: 1.25rem; }
.ycan-rte p:last-child { margin-bottom: 0; }
.ycan-rte h2, .ycan-rte h3 { margin: 2rem 0 .85rem; }
.ycan-rte ul, .ycan-rte ol { padding-left: 1.15rem; margin-bottom: 1.25rem; }
.ycan-rte li { margin-bottom: .55rem; }
.ycan-rte a { text-decoration: underline; }
.ycan-rte img { max-width: 100%; height: auto; border-radius: var(--ycan-radius); }

/* core-values style list - bulleted with no indent shift */
.ycan-rte-values ul { list-style: none; padding: 0; margin-bottom: 0; }
.ycan-rte-values li { position: relative; padding-left: 1rem; }
.ycan-rte-values li::before { content: "\2022"; position: absolute; left: 0; color: var(--ycan-purple-light); }

/* --------------------------------------------------------- footer */

.ycan-footer { background: var(--ycan-purple); color: rgba(255,255,255,.78); padding: 3.5rem 0 1.75rem; font-size: .93rem; }
.ycan-footer h2, .ycan-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.ycan-footer a { color: rgba(255,255,255,.78); }
.ycan-footer a:hover { color: var(--ycan-yellow); }
.ycan-footer-brand { display: flex; align-items: center; gap: .85rem; margin-bottom: 1.1rem; }
.ycan-footer-brand img { width: 46px; height: 46px; border-radius: 8px; background: #fff; object-fit: contain; padding: 3px; }
.ycan-footer-brand .name { font-family: "Nunito", sans-serif; font-weight: 800; color: #fff; font-size: 1.15rem; line-height: 1.2; }
.ycan-footer-brand .sub { font-size: .82rem; color: rgba(255,255,255,.7); }
.ycan-footer-links { list-style: none; padding: 0; margin: 0; }
.ycan-footer-links li { margin-bottom: .55rem; }
.ycan-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  margin-top: 2.75rem; padding-top: 1.5rem;
  font-size: .83rem; color: rgba(255,255,255,.62);
}

/* --------------------------------------------------------- alerts */

.ycan-alert {
  border-radius: var(--ycan-radius); padding: .9rem 1.15rem; font-size: .93rem;
  border: 1px solid var(--ycan-border); background: var(--ycan-lav-100); color: var(--ycan-purple);
}
.ycan-alert-success { background: #EDF7EE; border-color: #CBE7CE; color: #256029; }
.ycan-alert-error { background: #FDEDEC; border-color: #F5C6C2; color: #922B21; }

/* --------------------------------------------------------- responsive */

@media (max-width: 991.98px) {
  .ycan-section { padding: 3.5rem 0; }
  .ycan-hero { min-height: 520px; }
  .ycan-pagehero { padding: 3.25rem 0; }
  .ycan-gallery { grid-template-columns: repeat(3, 1fr); }
  .ycan-nav { padding: .75rem 0 .25rem; }
  .ycan-nav .nav-link { padding: .5rem 0; }
  .ycan-nav .nav-link.active::after { left: 0; right: auto; width: 28px; }
  .ycan-program-row + .ycan-program-row { margin-top: 3rem; }
  .ycan-photo-stack { margin-top: 1.75rem; }
}

@media (max-width: 575.98px) {
  .ycan-gallery { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .ycan-card-body { padding: 1.25rem; }
  .ycan-card-foot { padding: 0 1.25rem 1.25rem; }
  .ycan-formcard { padding: 1.35rem; }
  .ycan-hero-actions .btn-ycan-yellow,
  .ycan-hero-actions .btn-ycan-ghost { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  .ycan-header, .ycan-footer, .ycan-newsletter { display: none; }
  body { color: #000; }
}
