/* Approved R.O.O.T.S. homepage direction: warm editorial header + illustrated hero. */
:root {
  --roots-hero-cream: #fffaf0;
  --roots-hero-paper: #fffdf8;
  --roots-hero-green: #07683f;
  --roots-hero-green-deep: #064f33;
  --roots-hero-gold: #e9a300;
  --roots-hero-gold-soft: #f5c64a;
  --roots-hero-rust: #a84e31;
  --roots-hero-ink: #17251e;
  --roots-hero-muted: #435149;
  --roots-hero-border: rgba(6, 79, 51, 0.16);
  --flw-shell: 1540px;
}

/* Header: cream, calm and brand-led, matching the approved mockup. */
.flw-announcement {
  display: none;
}

.flw-site-header {
  background: var(--roots-hero-cream);
  box-shadow: 0 1px 0 var(--roots-hero-border);
}

.flw-navbar {
  border-bottom: 2px solid rgba(6, 104, 63, 0.72);
  background: rgba(255, 250, 240, 0.98);
}

.flw-navbar-inner {
  min-height: 5.25rem;
  gap: 0.9rem;
}

.flw-brand-lockup {
  gap: 0;
  margin-right: clamp(0.65rem, 1.5vw, 1.5rem);
  padding-block: 0.25rem;
}

.flw-logo-flag {
  display: grid;
  width: 6.2rem;
  height: 4.6rem;
  flex: none;
  place-items: center;
  filter: none;
}

.flw-logo-flag::before {
  display: none;
}

.flw-nav-logo {
  width: 6.2rem;
  height: 4.6rem;
  padding: 0;
  border-radius: 0 !important;
  background: transparent;
  object-fit: contain;
  box-shadow: none;
  filter: none;
}

/* The supplied artwork already contains the full foundation name. */
.flw-brand-copy {
  display: none;
}

.flw-navbar .flw-primary-nav .nav-link {
  padding: 0.7rem 0.58rem;
  border-radius: 0.2rem !important;
  background: transparent;
  color: var(--roots-hero-ink);
  font-size: 0.83rem;
  font-weight: 650;
}

.flw-navbar .flw-primary-nav .nav-link:hover,
.flw-navbar .flw-primary-nav .nav-link:focus,
.flw-navbar .flw-primary-nav .nav-link.active {
  background: rgba(6, 104, 63, 0.07);
  color: var(--roots-hero-green);
}

.flw-navbar .dropdown-menu,
.flw-live-search .dropdown-menu {
  border: 1px solid var(--roots-hero-border);
  border-radius: 0.3rem !important;
  box-shadow: 0 18px 42px rgba(6, 79, 51, 0.12);
}

.flw-live-search {
  width: 7.5rem;
}

.flw-live-search:focus-within {
  width: 10.5rem;
}

.flw-live-search .input-group {
  border: 1px solid rgba(23, 37, 30, 0.24);
  border-radius: 0.35rem !important;
  background: transparent;
}

.flw-live-search .input-group-text,
.flw-live-search .form-control {
  background: transparent;
  color: var(--roots-hero-ink);
}

.flw-live-search .form-control::placeholder {
  color: rgba(23, 37, 30, 0.55);
}

.flw-account-link {
  border: 1px solid rgba(23, 37, 30, 0.22);
  border-radius: 0.35rem !important;
  color: var(--roots-hero-ink) !important;
}

.flw-account-link:hover,
.flw-account-link:focus {
  background: rgba(6, 104, 63, 0.07);
  color: var(--roots-hero-green) !important;
}

.flw-donate-link {
  min-width: 7rem;
  border: 1px solid var(--roots-hero-gold);
  border-radius: 0.35rem !important;
  background: var(--roots-hero-gold);
  color: white !important;
  box-shadow: none;
  clip-path: none;
}

.flw-donate-link:hover,
.flw-donate-link:focus {
  border-color: #f2b315;
  background: #f2b315;
  box-shadow: 0 8px 18px rgba(102, 73, 0, 0.12);
}

/* Hero: real HTML copy on the left, approved artwork as the visual field on the right. */
.flw-clean-hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(40rem, 70vh, 52rem);
  overflow: hidden;
  border-bottom: 0;
  background:
    radial-gradient(circle at 65% 12%, rgba(245, 198, 74, 0.17), transparent 27rem),
    linear-gradient(
      90deg,
      var(--roots-hero-cream) 0 42%,
      rgba(255, 250, 240, 0.98) 47%,
      rgba(255, 250, 240, 0.34) 62%,
      transparent 73%
    ),
    var(--roots-hero-cream);
}

.flw-clean-hero::before {
  content: "";
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  height: 0.28rem;
  background: linear-gradient(90deg, var(--roots-hero-green), var(--roots-hero-gold));
}

.flw-hero-visuals {
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(78vw, 90rem);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.52) 7%, #000 16%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.52) 7%, #000 16%, #000 100%);
}

.flw-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-repeat: no-repeat;
  background-position: right center;
  background-size: contain;
  transition: opacity 1s ease-in-out;
  will-change: opacity;
}

.flw-hero-slide.is-active {
  opacity: 1;
}

.flw-hero-slide-existing {
  background-image: url("../images/index-hero.png");
}

.flw-hero-slide-graffiti {
  background-image: url("../images/roots-home-graffiti-youth.webp");
}

.flw-hero-slide-puzzle {
  background-image: url("../images/roots-future-leaders-puzzle.webp");
}

.flw-clean-hero-layout {
  position: relative;
  z-index: 2;
  display: block;
  min-height: clamp(40rem, 70vh, 52rem);
  padding-block: clamp(4.2rem, 7vw, 6.8rem);
}

.flw-clean-hero-copy {
  width: min(43%, 42rem);
  max-width: none;
}

.flw-clean-hero .flw-hero-label {
  display: block;
  width: fit-content;
  margin: 0 0 1.25rem;
  padding: 0 0 0.72rem;
  border-bottom: 2px solid var(--roots-hero-gold);
  border-radius: 0 !important;
  background: transparent;
  color: var(--roots-hero-green);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.flw-clean-hero h1 {
  max-width: 12ch;
  margin: 0;
  color: var(--roots-hero-green-deep);
  font-size: clamp(3.55rem, 5.4vw, 6.15rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.96;
  text-transform: uppercase;
}

.flw-clean-hero h1 span {
  display: block;
  margin-top: 0.06em;
  color: var(--roots-hero-gold);
}

.flw-clean-hero .flw-hero-summary {
  max-width: 32rem;
  margin: 1.35rem 0 0;
  padding: 0;
  background: transparent;
  color: #314038;
  font-size: clamp(1rem, 1.15vw, 1.12rem);
  font-weight: 500;
  line-height: 1.62;
}

.flw-clean-hero .flw-hero-actions {
  gap: 0.75rem;
  margin-top: 1.55rem;
}

.flw-clean-hero .flw-button {
  min-height: 3.35rem;
  padding: 0.9rem 1.35rem;
  border-radius: 0.3rem !important;
  box-shadow: none;
  clip-path: none;
}

/* Existing first CTA is named “gold”; visually it is the green primary action here. */
.flw-clean-hero .flw-hero-actions .flw-button-gold {
  border-color: var(--roots-hero-green-deep);
  background: var(--roots-hero-green-deep);
  color: white !important;
}

.flw-clean-hero .flw-hero-actions .flw-button-gold:hover,
.flw-clean-hero .flw-hero-actions .flw-button-gold:focus {
  border-color: var(--roots-hero-green);
  background: var(--roots-hero-green);
}

.flw-clean-hero .flw-hero-actions .flw-button-glass {
  border-color: var(--roots-hero-gold);
  background: var(--roots-hero-gold);
  color: white !important;
  backdrop-filter: none;
}

.flw-clean-hero .flw-hero-actions .flw-button-glass:hover,
.flw-clean-hero .flw-hero-actions .flw-button-glass:focus {
  border-color: #f2b315;
  background: #f2b315;
  color: white !important;
}

/* The old standalone creed card is redundant with the visual story in the artwork. */
.flw-clean-hero .flw-hero-creed {
  display: none;
}

/* Location treatment from the approved mockup without duplicating page structure. */
.flw-clean-hero-copy::after {
  content: "ROOTED IN JANE–FINCH, TORONTO\A Building stronger communities from the ground up.";
  display: block;
  margin-top: 2rem;
  padding-left: 1rem;
  border-left: 2px solid var(--roots-hero-gold);
  color: var(--roots-hero-green-deep);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  line-height: 1.65;
  white-space: pre-line;
}

/* Carry the illustration palette into the existing homepage sections. */
.flw-intro-band {
  position: relative;
  padding-block: clamp(3.8rem, 5.5vw, 5.5rem);
  background:
    radial-gradient(circle at 92% 8%, rgba(233, 163, 0, 0.1), transparent 22rem),
    white;
}

.flw-intro-band::after {
  content: "";
  position: absolute;
  top: 0;
  right: 5vw;
  width: 8rem;
  height: 0.24rem;
  background: var(--roots-hero-gold);
}

.flw-intro-copy h2,
.flw-band-heading h2 {
  color: var(--roots-hero-green-deep);
}

.flw-work-band,
.flw-stories-band {
  background: var(--roots-hero-paper);
}

.flw-work-card {
  border: 1px solid var(--roots-hero-border);
  border-top-width: 0.35rem;
  border-radius: 0.35rem !important;
  box-shadow: 0 14px 35px rgba(6, 79, 51, 0.07);
}

.flw-work-card:nth-child(1) {
  border-top-color: var(--roots-hero-green);
}

.flw-work-card:nth-child(2) {
  border-top-color: var(--roots-hero-gold);
}

.flw-work-card:nth-child(3) {
  border-top-color: var(--roots-hero-rust);
}

.flw-work-media-programs {
  background:
    radial-gradient(circle at 70% 20%, rgba(233, 163, 0, 0.22), transparent 8rem),
    #f0f4e9;
}

.flw-work-media-leaders {
  background:
    radial-gradient(circle at 50% 45%, rgba(233, 163, 0, 0.22), transparent 35%),
    linear-gradient(135deg, #063c2b, #087451);
}

.flw-work-media-community {
  background:
    radial-gradient(circle at 25% 25%, rgba(233, 163, 0, 0.17), transparent 10rem),
    #ecf2ea;
}

.flw-impact-band {
  background:
    radial-gradient(circle at 88% 8%, rgba(233, 163, 0, 0.16), transparent 24rem),
    #062b20;
}

.flw-newsletter-band {
  background:
    radial-gradient(circle at 90% 0%, rgba(233, 163, 0, 0.14), transparent 20rem),
    #f4eddf;
}

.flw-final-band {
  border-top-color: var(--roots-hero-gold);
  background:
    radial-gradient(circle at 85% 5%, rgba(233, 163, 0, 0.14), transparent 18rem),
    #041c14;
}

@media (max-width: 1199.98px) {
  .flw-navbar-inner {
    min-height: 6.5rem;
  }

  .flw-logo-flag,
  .flw-nav-logo {
    width: 7.8rem;
    height: 5.9rem;
  }

  .flw-navbar .navbar-collapse {
    margin-top: 0.6rem;
    padding: 1rem;
    border: 1px solid var(--roots-hero-border);
    background: #fffdf8;
  }

  .flw-header-actions {
    border-top: 1px solid var(--roots-hero-border);
    padding-top: 0.85rem;
  }

  .flw-clean-hero-copy {
    width: min(47%, 39rem);
  }

  .flw-hero-visuals {
    width: 74vw;
  }
}

@media (max-width: 960px) {
  .flw-clean-hero {
    min-height: 0;
    background: var(--roots-hero-cream);
  }

  .flw-clean-hero-layout {
    min-height: 0;
    padding-top: 3.3rem;
    padding-bottom: clamp(31rem, 70vw, 39rem);
  }

  .flw-clean-hero-copy {
    width: min(100%, 43rem);
  }

  .flw-clean-hero h1 {
    max-width: 12ch;
    font-size: clamp(3.2rem, 8vw, 5.3rem);
  }

  .flw-hero-visuals {
    top: auto;
    bottom: 0.28rem;
    width: 100%;
    height: clamp(29rem, 67vw, 38rem);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 100%);
  }

  .flw-hero-slide {
    background-position: center bottom;
  }
}

@media (max-width: 680px) {
  .flw-navbar-inner {
    min-height: 5.2rem;
  }

  .flw-logo-flag,
  .flw-nav-logo {
    width: 5.7rem;
    height: 4.6rem;
  }

  .flw-navbar .navbar-toggler {
    border-color: var(--roots-hero-gold);
    background: var(--roots-hero-gold);
  }

  .flw-clean-hero-layout {
    padding-top: 2.6rem;
    padding-bottom: 22rem;
  }

  .flw-clean-hero h1 {
    font-size: clamp(2.7rem, 12.1vw, 4.2rem);
  }

  .flw-clean-hero .flw-hero-summary {
    font-size: 0.94rem;
  }

  .flw-clean-hero .flw-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .flw-clean-hero .flw-button {
    width: 100%;
  }

  .flw-clean-hero-copy::after {
    margin-top: 1.4rem;
    font-size: 0.7rem;
  }

  .flw-hero-visuals {
    height: 21rem;
  }

  .flw-hero-slide {
    background-position: 55% bottom;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flw-hero-slide {
    transition: none;
  }
}
