/* ==========================================================================
   Andre De Grasse Family Foundation — Unified Stylesheet
   REVISED FOR FULL RESPONSIVENESS
   ========================================================================== */

/* ---------------- */
/* VARIABLES        */
/* ---------------- */
:root {
  --red: #AF1E23;
  --red-bright: #EC1113;
  --lime: #E9FFB1;
  --light: #F5F5F5;
  --dark: #1C1E22;
  --grey: #6D7176;
  --container: 1200px;
}

/* ---------------- */
/* RESET & GLOBAL   */
/* ---------------- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--dark);
  line-height: 1.6;
  background: #fff;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.section { padding-block: clamp(2rem, 5vw, 5rem); }

/* Visually hide for screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Skip link */
.skip-link { position: absolute; left: -999px; }
.skip-link:focus {
  left: 1rem; top: 1rem;
  background: #fff; color: #000;
  padding: .5rem .75rem; border: 2px solid #000;
  z-index: 9999;
}

/* ========================================================================== */
/* HEADER & NAV                                                               */
/* ========================================================================== */
.site-header {
  background: var(--light);
  border-bottom: 1px solid #ddd;
  position: relative;
  z-index: 1000; /* Increased z-index */
}
.nav__inner {
  display: flex;
  justify-content: space-between; /* Changed for mobile */
  align-items: center;
  padding: 1rem 0;
  gap: 2rem;
}
.brand {
  margin-right: auto; /* Pushes nav to the right */
  position: relative;
  z-index: 10;
}
.brand img { width: 120px; }

/* MOBILE NAVIGATION TOGGLE (HAMBURGER) */
.mobile-nav-toggle {
  display: none; /* Hidden on desktop */
}

/* DESKTOP NAVIGATION */
.primary-nav__list {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav__list a {
  text-transform: uppercase;
  font-family: Oswald, sans-serif;
}
.primary-nav__list a[aria-current="page"] {
  border-bottom: 3px solid var(--red-bright);
  color: var(--red-bright);
}

/* MEDIA QUERY FOR MOBILE NAVIGATION */
@media (max-width: 900px) {
  .primary-nav {
    position: fixed;
    inset: 0 0 0 30%; /* Slide in from the right */
    background: hsla(0, 0%, 100%, 0.9);
    backdrop-filter: blur(1rem);
    flex-direction: column;
    padding: min(20vh, 10rem) 2rem;
    margin: 0;
    transform: translateX(100%);
    transition: transform 350ms ease-out;
  }
  
  .primary-nav[data-visible="true"] {
    transform: translateX(0%);
  }
  
  .primary-nav__list {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .primary-nav__list a {
    font-size: 1.25rem;
  }

  .mobile-nav-toggle {
    display: block;
    position: absolute;
    z-index: 9999;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgb(28, 30, 34)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    width: 2rem;
    height: 2rem;
    top: 1.25rem;
    right: 1rem;
    border: 0;
    cursor: pointer;
  }

  .mobile-nav-toggle[aria-expanded="true"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgb(28, 30, 34)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M6 6l18 18M24 6L6 24'/%3e%3c/svg%3e");
  }
  
  .nav__inner > .btn {
    display: none; /* Hide original donate button */
  }
}

/* MEDIA QUERY FOR DESKTOP LAYOUT RESTORE */
@media (min-width: 901px) {
  .nav__inner {
      justify-content: flex-end;
  }
  .brand {
      position: absolute;
      top: 0;
      left: 5rem;
      transform: translateY(5%);
  }
  .brand img { width: 160px; }
}

.btn {
  padding: .5rem 1.5rem;
  border-radius: 999px;
  text-transform: uppercase;
  font-family: Oswald, sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}
.btn--outline-red { border: 2px solid var(--red-bright); color: var(--red-bright); }
.btn--outline-red:hover { background: var(--red-bright); color: #fff; }
.btn--outline-dark { border: 2px solid var(--dark); color: var(--dark); }
.btn--outline-dark:hover { background: var(--dark); color: #fff; }
.btn--hero { color: #fff; border: 2px solid #fff; }
.btn--hero:hover { background: #fff; color: var(--red); }

/* ========================================================================== */
/* HERO                                                                       */
/* ========================================================================== */
.hero {
  background: linear-gradient(rgba(175, 30, 35, 0.0), rgba(175, 30, 35, 0.0)), url("assets/adg_ff_img_6.jpg");
  background-size: cover;
  background-position: center 30%;
  color: #fff;
  padding-block: 6rem;
  min-height: 60vh;
  position: relative;
  display: flex;
  align-items: center;
}
.hero .container {
  display: flex;
  justify-content: flex-end;
}
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  text-transform: uppercase;
  font-family: Oswald, sans-serif;
  margin: 0 0 1.5rem 0;
  text-align: left;
  line-height: 1.1;
}
.hero span { display: block; }
.hero__content { max-width: 50%; }

@media (max-width: 900px) {
  .hero .container { justify-content: flex-start; }
  .hero__content { max-width: 100%; text-align: center; }
  .hero h1 { text-align: center; }
}

/* ========================================================================== */
/* INNER HERO (FOR INTERIOR PAGES)                                            */
/* ========================================================================== */
.inner-hero {
  background-color: var(--red);
  color: #fff;
  padding: 6rem 0 1.5rem;
  text-align: left;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: 220px;
}
.inner-hero::before {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: auto;
  right: -150px;
  width: 600px;
  height: 600px;
  background-image: url("assets/adgff-favicon.png");
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}
.inner-hero h1 {
  font-family: Oswald, sans-serif;
  text-transform: uppercase;
  color: #fff;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin: 0;
  position: relative;
  z-index: 1;
}

/* new rule to move the title down */
.inner-hero h1 {
  position: relative;
  bottom: -2.8rem; 
}

/* ========================================================================== */
/* UTILITIES / COMPONENTS                                                     */
/* ========================================================================== */
.eyebrow {
  text-transform: uppercase;
  font-size: .95rem;
  color: var(--red-bright);
  font-family: Oswald, sans-serif;
  font-weight: 700;
}

/* Split intro grid */
.split__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}
.split__content p { margin-bottom: 1rem; }
.split__media img { width: 100%; border-radius: 4px; }
@media (max-width: 900px) { 
  .split__grid { grid-template-columns: 1fr; }
  .split__media { order: -1; } /* Image on top for story page */
}

/* Split-band quote */
.split-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 350px;
  max-height: 350px;
  overflow: hidden;
}
.split-band__media { margin: 0; }
.split-band__media img { width: 100%; height: 100%; object-fit: cover; }
.split-band__quote {
  background: var(--lime);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 5rem 3rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: 0;
}
.split-band__quote::before {
  content: '“';
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  font-family: serif;
  font-size: 14rem;
  color: var(--dark);
  opacity: 0.08;
  z-index: 0;
  line-height: 1;
}
.split-band__quote p {
  font-size: 1.25rem;
  font-style: italic;
  max-width: 40ch;
  margin: 0;
  position: relative;
  z-index: 1;
}
.split-band__quote footer {
  margin-top: .5rem;
  font-weight: 600;
  position: relative;
  z-index: 1;
}
@media (max-width: 900px) {
  .split-band {
    grid-template-columns: 1fr;
    max-height: none;
    min-height: auto;
  }
  .split-band__quote {
    justify-content: center;
    padding: 3rem 1.5rem;
  }
}

/* CTA bar */
.cta {
  background: var(--lime);
  padding-block: 2rem;
}
.cta__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  text-align: center;
}
.cta h3 { margin: 0; font-size: 1.3rem; }
@media (max-width: 600px) {
  .cta__inner { justify-content: center; }
}


/* ========================================================================== */
/* FOOTER                                                                     */
/* ========================================================================== */
.site-footer { color: #fff; position: relative; overflow: hidden; }
.footer-main {
  background: var(--red);
  padding: 3rem 0;
  position: relative;
}
.footer-main::after {
  content: "";
  position: absolute;
  right: -8%;
  bottom: -20%;
  width: 420px;
  height: 420px;
  background: url("assets/adgff-favicon.png") no-repeat center;
  background-size: contain;
  opacity: .1;
  pointer-events: none;
}
.footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  align-items: start;
}
.footer__logo { width: 180px; }
.footer__nav, .footer__ext, .footer__social {
  list-style: none; padding: 0; margin: 0;
}
.footer__nav a {
  color: #fff;
  text-transform: uppercase;
  font-family: Oswald, sans-serif;
  transition: color .2s ease-in-out;
}
.footer__nav a:hover {
  color: var(--lime);
}

.footer__ext {
  display: flex; flex-direction: column; gap: 0.2rem;
}
.footer__ext a {
  color: #fff;
  font-family: Oswald, sans-serif;
  position: relative;
  transition: color .2s ease-in-out;
}
.footer__ext a:hover {
  color: var(--lime);
}
.footer__ext a::after { content: "➔"; margin-left: .5rem; font-size: .85rem; }
.footer__social { display: flex; gap: 2.4rem; }
.footer__social svg, .footer__social img { 
  width: 24px; 
  height: 24px;
  transition: opacity .2s ease-in-out;
}
.footer__social a:hover svg,
.footer__social a:hover img {
  opacity: .7;
}

.footer-legal {
  background: var(--red);
  border-top: 1px solid rgba(236,17,19,.4);
  padding: 1rem 0;
  font-size: .75rem;
}
.footer-legal__inner {
  display: flex; 
  justify-content: space-between; 
  flex-wrap: wrap;
  gap: 0.5rem;
}
@media (max-width: 900px) { 
  .footer__grid { grid-template-columns: 1fr 1fr; } 
  .footer__logo { grid-column: 1 / -1; }
}
@media (max-width: 600px) { 
  .footer__grid { grid-template-columns: 1fr; gap: 2.5rem; text-align: center; }
  .footer__logo { margin-inline: auto; }
  .footer__nav, .footer__ext { align-items: center; }
  .footer__social { justify-content: center; }
  .footer-legal__inner { justify-content: center; text-align: center; }
}

.footer__ext a {
  display: inline-flex;
  align-items: center;
  gap: 6px; /* space between text and icon */
}

.footer__ext a::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'><path d='M2.11024 15.8125C1.64809 15.8125 1.25246 15.6479 0.92335 15.3188C0.594242 14.9897 0.429688 14.5941 0.429688 14.1319V2.36805C0.429688 1.9059 0.594242 1.51027 0.92335 1.18116C1.25246 0.852054 1.64809 0.6875 2.11024 0.6875H7.99217V2.36805H2.11024V14.1319H13.8741V8.24998H15.5547V14.1319C15.5547 14.5941 15.3901 14.9897 15.061 15.3188C14.7319 15.6479 14.3363 15.8125 13.8741 15.8125H2.11024ZM6.05954 11.359L4.88315 10.1826L12.6977 2.36805H9.67272V0.6875H15.5547V6.56943H13.8741V3.54444L6.05954 11.359Z' fill='white'/></svg>") no-repeat center;
  background-size: contain;
}


/* ========================================================================== */
/* HOME PAGE                                                                  */
/* ========================================================================== */
.purpose__grid {
  display: grid;
  grid-template-columns: minmax(160px,220px) 1fr;
  gap: 2rem;
  align-items: start;
}
.purpose__content p {
  font-size: clamp(1.1rem, 1.2vw + 1rem, 1.8rem);
  line-height: 1.5;
  font-weight: 300;
}
@media (max-width: 900px) {
  .purpose__grid { grid-template-columns: 1fr; }
}

.how__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.how__item h3 { margin-top: 0; font-size: 1.3rem; }
.how__list { margin: .5rem 0 .5rem 1.2rem; }
.how__item a {
  color: var(--red-bright);
  font-weight: 600;
}
.how__item a:hover {
  text-decoration: underline;
}

/* On-scroll animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(2rem);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) { .how__grid { grid-template-columns: 1fr; gap: 2rem; } }

.impact {
  background-color: var(--light);
  padding-block: 3rem;
}
.impact__grid-big {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
  gap: 2rem;
  text-align: center;
}
.impact__grid-big .number {
  font-family: Oswald, sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--red-bright);
}
.impact__grid-big .label { font-size: 1.1rem; color: var(--grey); }
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
  gap: 1rem;
}
.gallery__grid img { width: 100%; height: 100%; object-fit: cover; }
.tagline { text-align: center; margin-block: 3rem; }
.tagline h2,
.tagline p {
  font-family: Oswald, sans-serif;
  text-transform: uppercase;
  font-weight: 700;
}
.tagline h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin: 0;
  color: var(--grey);
}
.tagline .red {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--red-bright);
  margin: .5rem 0 0;
}
.tagline .fade {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-top: -0.25rem;
  background: linear-gradient(0deg, rgba(236,17,19,0) 30%, rgba(236,17,19,.5) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Tagline ticker */
.ticker {
  position: relative;
  height: 4.5em; /* matches font size area */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ticker p {
  margin: 0;
  position: absolute;
  width: 100%;
  opacity: 0;
  filter: blur(4px);            /* reduced blur */
  transform: translateY(20%);   /* start slightly below */
  transition: opacity 1.5s ease, transform 1.5s ease, filter 1.5s ease;
  font-family: Oswald, sans-serif;
  text-transform: uppercase;
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--red-bright);
  text-align: center;
  line-height: 1.2;             /* ensures letters have room */
}

.ticker p.active {
  opacity: 1;
  filter: blur(0);                /* sharpen to clear */
  transform: translateY(0);       /* settle in place */
}


/* ========================================================================== */
/* OUR IMPACT PAGE                                                            */
/* ========================================================================== */
.impact-intro p {
  font-size: clamp(1.2rem,2vw,2rem);
  font-weight: 300;
  line-height: 1.5;
}

/* Split layout sections */
.impact-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 500px;
}

.impact-split figure {
  margin: 0;
  height: 100%;
}
.impact-split figure img {
  width: 100%;
  height: 100%;              /* stretch to match text */
  object-fit: cover;
  border-radius: 0;          /* flush edges */
}
.impact-split .content {
  background: var(--light);
  padding: clamp(1.5rem, 5vw, 3rem);
  display: flex;
  align-items: center;
}
.impact-split .content h2 { font-size: 1.5rem; margin-top: 0; }
.impact-split .content p { line-height: 1.6; }

/* Parallax effect only for figures with .parallax-img */
.impact-split .parallax-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  border-radius: 0;
}

@media (max-width: 900px) {
  .impact-split {
    grid-template-columns: 1fr;
    min-height: unset;
  }
  .impact-split.reverse figure { order: -1; }
  .impact-split .parallax-img { background-attachment: scroll; }
}

/* Success Story (keep small icon!) */
.impact-success { 
  background: var(--lime); 
  padding-block: 3rem; 
}
.impact-success__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.impact-success__icon {
  width: clamp(80px, 15vw, 120px);
  height: auto;
  color: var(--dark);
  opacity: 0.15;
}
.impact-success h2 { margin-top: 0; }
.impact-success p { max-width: 65ch; margin-bottom: 0; }
@media (max-width: 600px) {
  .impact-success__inner { grid-template-columns: 1fr; text-align: center; }
  .impact-success__icon { margin-inline: auto; }
}


/* ========================================================================== */
/* OUR STORY PAGE                                                             */
/* ========================================================================== */
.story-intro .lead {
  font-size: clamp(1.5rem,2vw,2rem);
  font-weight: 300;
  line-height: 1.5;
}
.community { 
  background: var(--light); 
  padding: 4rem 0 2rem; 
}
.community__eyebrow {
  font-family: Oswald, sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 1rem;
}
.community__heading {
  font-family: Oswald, sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  color: var(--grey);
  text-transform: uppercase;
  margin: 0;
  line-height: 1.2;
  font-weight: 700;
}
.community__heading .red-text {
  color: var(--red-bright);
}

.cta-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
}
.cta-split figure { margin: 0; }
.cta-split img { width: 100%; height: 100%; object-fit: cover; }
.cta-split .content {
  background: var(--lime);
  padding: 3rem 7rem 3rem 5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
}
.cta-split .content h3 { margin: 0; font-size: 1.5rem; }
.cta-split .btn {
  align-self: flex-start;
}
@media (max-width: 900px) { 
  .cta-split { grid-template-columns: 1fr; min-height: unset; }
  .cta-split figure { order: -1; }
  .cta-split .content { padding: 3rem 1.5rem; }
}

/* ========================================================================== */
/* OUR TEAM PAGE                                                              */
/* ========================================================================== */
.team-layout-grid,
.partners-layout-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: flex-start;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.team-member {
  background: var(--light);
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
}
.team-member img {
  width: 100%; 
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  margin-inline: auto;
  margin-bottom: .75rem;
  background-color: #e0e0e0;
}
.team-member h3 { margin: .5rem 0 .25rem; font-size: 1.05rem; }
.team-member p { margin: 0; color: var(--grey); font-size: .95rem; }

.partners-section { 
  padding-block: 3rem; 
  border-top: 1px solid #eee;
  margin-top: 3rem;
}
.partners-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
}
.partner {
  background: var(--light);
  border-radius: 50%;
  width: 120px;
  height: 120px;
}

@media (max-width: 900px) {
  .team-layout-grid,
  .partners-layout-grid {
    grid-template-columns: 1fr;
  }
  .team-grid {
    grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
  }
  .partners-grid {
    justify-content: center;
  }
}

/* ========================================================================== */
/* CONTACT PAGE                                                               */
/* ========================================================================== */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(160px,220px) 1fr;
  gap: 2rem;
  align-items: start;
}
.contact__intro { margin: 0 0 1rem; }
.contact__form { display: grid; gap: 1.5rem; }
.contact__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.field { display: flex; flex-direction: column; gap: .25rem; }
.contact__form label { font-size: .9rem; color: var(--grey); }
.contact__form input, .contact__form textarea {
  background: var(--light);
  border: none;
  border-bottom: 2px solid var(--red);
  padding: .75rem;
  font-size: 1rem;
  border-radius: 0;
}
.contact__form input:focus, .contact__form textarea:focus {
  outline: none;
  border-bottom-color: var(--red-bright);
}

.contact__form textarea { min-height: 140px; }
.contact__form button { justify-self: start; }
@media (max-width: 900px) {
  .contact__grid { grid-template-columns: 1fr; }
  .contact__row { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ========================================================================== */
/* DONATE PAGE                                                                */
/* ========================================================================== */
.donate-intro-section {
  padding-bottom: 0;
}
.donate-intro {

  font-size: clamp(1.2rem,2vw,2rem);
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: 2rem;
}
.donate-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.donate-split img { width: 100%; height: auto; border-radius: 4px; }
@media (max-width: 900px) { 
  .donate-split { grid-template-columns: 1fr; } 
  .donate-split figure { order: -1; }
}
.donate-form {
  display: grid;
  gap: 1.5rem;
  background: var(--light);
  padding: 2rem;
  border-radius: 6px;
}
.donate-form .field { display: flex; flex-direction: column; gap: .5rem; }
.donate-form input, .donate-form textarea {
  background: #fff;
  border: 1px solid #ccc;
  padding: .75rem;
  font-size: 1rem;
  border-radius: 4px;
}
.donate-form button { justify-self: start; }