/* Home (coded) — Hero section styles
   Uses tokens/utilities from system.css
*/

/* Section */
.home-hero.section {
  position: relative;
  background: var(--brand-white);
}
/* Defaults for hero art controls (desktop) */
.home-hero {
  --art-left: 75%;      /* center of right half by default */
  --art-height: 92vh;   /* 92% of viewport height (15% increase) */
}
.home-hero.section--fullvh {
  display: grid;
  align-items: center;
}

/* Inner layout */
.home-hero .hero-grid {
  display: grid;
  gap: clamp(20px, 3vw, 40px);
}

/* Left content */
.home-hero .hero-copy {
  max-width: 58ch;
}
.home-hero .hero-eyebrow {
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text-muted);
  margin: 0 0 8px 0;
}

/* Title */
.home-hero .hero-title {
  font-family: var(--font-heading);
  font-weight: 500; /* medium (Gotham-Medium) */
  margin: 0;
  line-height: 1.08;
  /* allow two fixed lines on desktop; mobile can wrap */
  max-width: none;
  font-size: clamp(25px, min(9.38vw, 4dvh), 39px);
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Title emphasis and accent styles */
.home-hero .hero-title .hc-strong { font-weight: 600; }
.home-hero .hero-title .hc-accent { font-weight: 600; color: var(--brand-green); }
.home-hero .hero-title sup { font-size: 0.55em; line-height: 0; position: relative; top: -0.4em; }

/* Body */
.home-hero .hero-text {
  color: var(--text-muted);
  font-size: 15px; /* +1px as requested */
  line-height: 1.6;
  margin: 16px 0 0 0;
  max-width: 60ch;
}

/* Buttons */
.home-hero .btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* Banner */
.home-hero .banner {
  margin-top: clamp(32px, 4vw, 48px);
}
.home-hero .banner .banner-link {
  display: inline-block;
  border-radius: 16px;
  /* Darker outline */
  border: 1px solid rgba(0,0,0,.18);
  overflow: hidden;
  transform: translateY(0);
  transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 0 0 rgba(0,0,0,0);
}
.home-hero .banner .banner-link:hover {
  /* Half the upward movement */
  transform: translateY(-2px);
  /* Half the length and intensity of the shadow */
  box-shadow: 0 7px 20px rgba(0,0,0,.06);
}
.home-hero .banner .banner-link img {
  display: block;
  width: 100%;
  height: auto;
}

/* Right visual (section image) */
.home-hero .hero-visual {
  /* default placeholder; image set via CSS var --hero-img */
  background-image: var(--hero-img, none);
  background-position: center right;
  background-repeat: no-repeat;
  background-size: contain;
  inline-size: min(100%, 560px);
  block-size: min(40vh, 380px);
  margin-inline: auto;
}

/* Absolute art (desktop only) placed independently of the grid */
.home-hero .hero-art {
  position: absolute;
  display: none; /* show on desktop only */
  bottom: 0;
  right: var(--gutter);
  pointer-events: none; /* non-interactive art; toggle if you need clicks */
  z-index: 0;
}
.home-hero .hero-art img {
  display: block;
  position: static;
  max-height: 100%;
  height: 100%;
  width: auto;
}
.home-hero .hero-art video {
  display: block;
  position: static;
  max-height: 100%;
  height: 100%;
  width: auto;
  object-fit: contain;
}

/* Desktop layout: split copy/visual and center vertically */
@media (min-width: 981px) {
  .home-hero .hero-grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
  /* lock two-line behavior via nowrap on each span */
  .home-hero .hero-title span {
    white-space: nowrap;
  }
  /* Desktop: prevent awkward splits within words/numbers */
  .home-hero .hero-title {
    overflow-wrap: normal;
    word-break: normal;
  }
  /* Desktop: enlarge hero title by ~50% */
  .home-hero .hero-title {
    font-size: clamp(30px, min(11.25vw, 4.8dvh), 46.5px);
  }
  /* bring body width back to earlier, narrower feel */
  .home-hero .hero-text {
    max-width: 48ch;
  }
  /* bring banner back to earlier visual size */
  .home-hero .banner .banner-link {
    max-width: 520px;
    width: 100%;
  }
  /* Desktop: absolute art anchored to the section for reliable sizing/position */
  .home-hero .hero-visual { display: none; }
  .home-hero .hero-art {
    display: flex;
    align-items: flex-end;   /* bottom-align content inside the art box */
    justify-content: center; /* center horizontally on the left anchor */
    position: absolute;
    bottom: 0;
    left: var(--art-left, 75%);
    transform: translateX(-50%);
    height: var(--art-height, 80%);
    right: auto;
    pointer-events: none;
  }
}

/* Discover section */
.home-discover.section { background: #f5f5f5; padding-top: clamp(24px, 4vw, 64px); padding-bottom: clamp(24px, 4vw, 64px); }
.home-discover {
  --card-radius: 50px;
  --card-padding: clamp(24px, 4vw, 43px);
  --card-gap: clamp(16px, 3vw, 32px);
}
.home-discover .section-title {
  font-family: var(--font-heading);
  font-weight: 500;
  text-align: center;
  margin: clamp(24px, 3vw, 40px) 0;
  font-size: clamp(20px, 1.6vw + 9px, 31px);
}
.home-discover .discover-card {
  width: 50vw;               /* 50% of total width */
  max-width: 980px;          /* safety cap */
  margin: 0 auto;            /* no bottom margin; vertical gap handled by stats row */
  background: #fff;
  border-radius: var(--card-radius);
}
.home-discover .discover-grid {
  display: grid;
  grid-template-columns: 3fr 1fr; /* 75% copy / 25% image */
  gap: var(--card-gap);
  align-items: center;       /* vertical centering for the image */
  padding: var(--card-padding);
}
.home-discover .discover-copy h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 600;
}
.home-discover .discover-copy p {
  margin: 8px 0 16px 0;
  color: var(--text-muted);
  font-size: 15px;   /* match hero body copy */
  line-height: 1.6;  /* match hero body copy */
}
/* Normalize edges so padding is the only edge spacing */
.home-discover .discover-copy > :first-child { margin-top: 0; }
.home-discover .discover-copy > :last-child { margin-bottom: 0; }
.home-discover .discover-copy .btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.home-discover .discover-media {
  display: grid;
  place-items: center; /* center image within the right 25% column */
}
.home-discover .discover-media img {
  display: block;
  width: 67%;        /* ~33% larger than previous 50% */
  max-width: 100%;
  height: auto;
}
.home-discover .discover-media video {
  display: block;
  width: 67%;
  max-width: 100%;
  height: auto;
}

/* Stats row under the main card */
.home-discover .discover-stats {
  width: 50vw;               /* match main card total width */
  max-width: 980px;          /* keep same cap */
  margin: var(--card-gap) auto 0; /* top gap equals column gap */
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--card-gap);      /* same spacing horizontally as vertical gap above */
}

.home-discover .stat-card {
  background: #fff;
  border-radius: var(--card-radius);
  padding: var(--card-padding);
  text-align: center;
}

.home-discover .stat-card .stat-number {
  font-family: var(--font-heading);
  font-weight: 500;                     /* same weight as section title */
  font-size: clamp(20px, 1.6vw + 9px, 31px); /* same size as section title */
  margin: 0;
}

.home-discover .stat-card .stat-label {
  margin: 8px 0 0 0;
  font-size: 15px;                      /* same as body */
  line-height: 1.6;
  color: var(--text-muted);
}

/* CTA row below stats */
.home-discover .discover-cta {
  width: 50vw;               /* match main card and stats width */
  max-width: 980px;
  margin: clamp(21px, 4vw, 42px) auto 0; /* ~+30% over previous 16/3vw/32, rounded */
  display: flex;
  justify-content: center;
  gap: 12px;                 /* same button gap as used elsewhere */
}

/* Benefits section */
.home-benefits.section { background: #ffffff; padding-top: clamp(24px, 4vw, 64px); padding-bottom: clamp(24px, 4vw, 64px); }
.home-benefits {
  /* Hard-set tokens so cards render as separate rounded blocks with proper gaps */
  --card-radius: 50px;
  --card-padding: clamp(24px, 4vw, 43px);
  --card-gap: clamp(16px, 3vw, 32px);
}
.home-benefits .benefits-title {
  font-family: var(--font-heading);
  font-weight: 500;                                   /* same as Discover title */
  text-align: center;
  margin: clamp(24px, 3vw, 40px) 0;                   /* same top spacing as Discover */
  font-size: clamp(20px, 1.6vw + 9px, 31px);          /* same size as Discover title */
}
.home-benefits .benefits-rows {
  width: 60vw;                                        /* total row width = 60% screen */
  max-width: 980px;                                   /* keep a safety cap */
  margin: 0 auto;
  display: grid;
  gap: var(--card-gap);                               /* vertical gap between rows */
}
.home-benefits .benefit-row {
  display: grid;
  grid-template-columns: 1fr 1fr;                     /* 2-up */
  gap: var(--card-gap);                               /* horizontal gap same as previous section */
}
.home-benefits .benefit-card {
  background: #f5f5f5;                                /* grey cards */
  border-radius: var(--card-radius);                  /* same rounded corners */
  padding: var(--card-padding);                       /* same internal padding */
  display: grid;
  grid-template-columns: 2fr 1fr;                     /* left text, right image */
  gap: var(--card-gap);
  align-items: center;
}
.home-benefits .benefit-copy h3 {
  margin: 0 0 8px 0;
  font-size: 20px;                                    /* match Discover h3 */
  font-weight: 600;
  text-align: left;
}
.home-benefits .benefit-copy p {
  margin: 0;                                          /* tight lines per spec */
  color: var(--text-muted);
  font-size: 15px;                                    /* match body */
  line-height: 1.6;
  text-align: left;
}
.home-benefits .benefit-media {
  display: grid;
  place-items: center;                                 /* center image in its area */
}
.home-benefits .benefit-media img {
  display: block;
  width: 60%;                                         /* balanced default; adjusts with container */
  max-width: 100%;
  height: auto;
}

@media (min-width: 981px) {
  /* Unified desktop spacing for sections 2 (Discover) and 3 (Benefits) */
  .home-discover.section,
  .home-benefits.section,
  .home-supporters.section {
    padding-top: 80px;
    padding-bottom: 80px;
  }
  /* Prevent double spacing: remove extra title top margin on desktop */
  .home-discover .section-title,
  .home-benefits .benefits-title,
  .home-supporters .supporters-title {
    margin-top: 0;
  }

  /* Double image size in benefits cards; remove image impact on card height */
  .home-benefits .benefit-card { overflow: visible; }
  .home-benefits .benefit-media { position: relative; }
  .home-benefits .benefit-media img {
    width: 120%;
    max-width: none;
    height: auto;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
  }
}

/* Supporters section */
.home-supporters.section { background: var(--brand-gray-100); padding-top: clamp(24px, 4vw, 64px); padding-bottom: clamp(24px, 4vw, 64px); }
.home-supporters {
  --logo-gap: clamp(24px, 4vw, 48px);
  --logo-height: 32px;
  --scroll-speed: 40s;
}
.home-supporters .supporters-title {
  font-family: var(--font-heading);
  font-weight: 500;
  text-align: center;
  margin: 0 0 clamp(24px, 3vw, 40px);
  font-size: clamp(20px, 1.6vw + 9px, 31px);
}
.home-supporters .marquee {
  width: 100dvw;           /* full-bleed using device viewport */
  max-width: none;
  margin-left: calc(50% - 50dvw);
  margin-right: calc(50% - 50dvw);
  overflow: hidden;
}
.home-supporters .marquee-track {
  display: flex;
  align-items: center;
  will-change: transform;
  transform: translate3d(0,0,0);
  backface-visibility: hidden;
}
.home-supporters .marquee img {
  display: block;
  height: var(--logo-height);
  width: auto;
  margin: 0 calc(var(--logo-gap) / 2);
  filter: none;           /* keep original black */
  opacity: 1;
}


/* Ensure desktop spacing override applies after base block */
@media (min-width: 981px) {
  .home-supporters.section {
    padding-top: 80px;
    padding-bottom: 80px;
  }
}

@media (min-width: 981px) {
  /* Center hero content within the space below the fixed header */
  .home-hero.section--fullvh {
    box-sizing: border-box;
    padding-top: var(--header-bottom);
    min-height: 100vh;
  }
}

/* Optional helpers for fine-tuning later (not used yet) */
.home-hero.is-light { background: var(--brand-white); }
.home-hero.is-gray { background: var(--brand-gray-100); }

@media (max-width: 980px) {
  /* Mobile-only: hero should hug content on Home New */
  .home-hero.section.section--fullvh {
    min-height: auto !important; /* override system.css 100svh */
    display: block;
    align-items: initial;
  }
  .home-hero.section {
    /* match normal sections */
    padding-top: clamp(48px, 8vw, 128px);
    padding-bottom: clamp(48px, 8vw, 128px);
  }

  /* Hide Discover media (video) on mobile */
  .home-discover .discover-media { display: none !important; }
  /* Hide Build media (video) on mobile */
  .home-build .build-media { display: none !important; }
}
