@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --maroon: #7A0019;
    --maroon-dark: #5a0012;
    --maroon-deep: #3d000d;
    --gold: #FFCC33;
    --gold-light: #FFE080;
    --gold-muted: #C8A400;
    --cream: #FDF8EE;
    --warm-white: #FEFCF8;
    --charcoal: #1C1C1C;
    --mid-gray: #6B6B6B;
    --dark-gray: #525252;
    --light-gray: #E8E4DC;
    --border: #D4CEC2;
    --primary-font: "Hanken Grotesk", sans-serif;
  }


main#main {
    height: auto; /* or simply remove height: 100% */
    min-height: 100%; /* If you want it to at least fill the screen */
}

.section-title {
    font-family: var(--primary-font);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--maroon);
    font-weight: 700;
}

/* ════════════════════════════
    HERO SECTION
════════════════════════════ */
#hero {
    min-height: 80vh;
    background: var(--maroon);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 100px 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero-pattern {
    position: absolute; inset: 0;
    background-image:
    repeating-linear-gradient(
    45deg,
    transparent,
    transparent 60px,
    rgba(255,204,51,0.0625) 60px,
    rgba(255,204,51,0.0625) 61px
    ),
    repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 60px,
    rgba(255,204,51,0.0625) 60px,
    rgba(255,204,51,0.0625) 61px
    );
}

  .hero-headline {
    font-family: var(--primary-font);
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 900; 
    line-height: 1.05;
    color: var(--warm-white);
    margin: 2.5rem 0 0;
  }

  .hero-headline em {
    font-style: italic; 
    color: var(--gold);
  }

  .hero-sub {
    font-size: 1.5rem; 
    color: var(--warm-white);
    margin-bottom: 1.5rem; 
    font-weight: 500; 
    line-height: 1.7;
  }


  .search-wrap {
    display: flex; width: 100%; max-width: 620px; margin: 0 auto 1.5rem;
    position: relative;
  }

  .search-input {
    flex: 1;
    padding: 1.1rem 1.5rem;
    font-size: 1rem; 
    font-family: var(--primary-font);
    border: none; 
    border-radius: 0;
    background: var(--warm-white);
    color: var(--charcoal);
    outline: none;
  }
  
  .search-input::placeholder { color: var(--mid-gray); }

  .search-btn {
    padding: 1.1rem 2rem;
    background:var(--maroon);
    color:  var(--gold); 
    border: none; cursor: pointer;
    font-family: var(--primary-font);
    font-weight: 700; font-size: 0.9rem;
    letter-spacing: 0.05em; text-transform: uppercase;
    transition: background 0.2s;
  }

  .search-btn:hover { 
    color: var(--warm-white);
    background: var(--maroon-dark); 
  }

/* ════════════════════════════
     AREA TILES / BROWSE
  ════════════════════════════ */
  .area-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 200px 200px 200px;
    gap: 8px;
  }

  /* base tile */
  .area-tile {
    padding: 16px;
    display: flex; 
    flex-direction: column;
    justify-content: flex-end;
    cursor: pointer; 
    text-decoration: none;
    position: relative; 
    overflow: hidden;
    background: var(--warm-white);
    border: 1px solid var(--border);
  }
  
  .area-tile:hover { 
    background: var(--light-gray);
  }

  /* gold sweep bar */
  .area-tile-bar {
    position: absolute; 
    bottom: 0; 
    left: 0; 
    right: 0;
    height: 6px; 
    background: var(--gold);
    transform: scaleX(0); 
    transform-origin: left;
    transition: transform 0.3s ease;
  }
  .area-tile:hover .area-tile-bar { transform: scaleX(1); }

  /* featured tile spans 2×2 */
  .area-tile.featured {
    grid-column: span 2; grid-row: span 2;
    background: var(--maroon);
    border-color: var(--maroon);
    padding: 22px;
  }
  .area-tile.featured:hover { box-shadow: 0 8px 28px rgba(122,0,25,0.3); }

  /* featured label top-left */
  .area-tile-label {
    position: absolute; top: 16px; left: 16px;
    font-size: 0.75rem; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: rgba(255,204,51,1);
  }

  /* icon */
  .area-tile-icon {
    font-size: 1.4rem; color: var(--maroon);
    margin-bottom: 8px; display: block;
    transition: color 0.2s;
  }
  .area-tile.featured .area-tile-icon {
    font-size: 1.8rem;
    color: rgba(255,204,51,0.65);
    margin-bottom: 10px;
  }

  /* text */
  .area-tile-name {
    font-family: var(--primary-font);
    font-size: 1.065rem;
    font-weight: 900;
    color: var(--maroon);
    line-height: 1.25; 
    display: block;
  }
  .area-tile.featured .area-tile-name {
    font-size: 1.5rem; color: #fff;
  }
  .area-tile-description {
    font-family: var(--primary-font);
    font-size: 0.85rem; 
    font-weight: 500;
    font-style: italic;
    color: var(--charcoal); 
    line-height: 1.25; 
    display: block;
    text-wrap: pretty;
  }

    .area-tile.featured .area-tile-description{
    font-size: 1.125rem; color: #fff;
  }

  .area-tile-link {
    font-size: 0.95rem; 
    font-weight: 600; text-decoration: underline;
    color: var(--maroon);
    margin-top: 20px; 
    display: block;
  }
  .area-tile.featured .area-tile-link {
    color: rgba(255,255,255,0.45); font-size: 0.72rem;
  }

  .fill__maroon {
    fill: var(--maroon);
  }

  /* chip on featured */
  .area-tile-chip {
    display: inline-block; margin-top: 8px;
    font-size: 0.75rem; font-weight: 700;
    background: rgba(255,204,51,0.15); 
    color: var(--gold);
    padding: 3px 10px; border-radius: 20px; letter-spacing: 0.06em;
  }

  /* hover CTA on featured */
  .area-tile-cta {
    display: inline-flex; 
    align-items: center; 
    gap: 4px;
    font-size: 0.85rem; 
    font-weight: 700;
    text-transform: uppercase;
    color: var(--gold);
    margin-top: 10px;
    opacity: 0; 
    transform: translateY(4px);
    transition: opacity 0.2s, transform 0.2s;
  }
  .area-tile.featured:hover .area-tile-cta { opacity: 1; transform: none; }

  /* shared SVG icon style */
    .tile-svg-new {
      margin-bottom: 8px; 
    }
  .tile-svg {
    display: block; 
    width: 22px; 
    height: 22px;
    fill: none; 
    stroke: var(--maroon);
    stroke-width: 1.5; 
    stroke-linecap: round; 
    stroke-linejoin: round;
    margin-bottom: 8px; 
    transition: stroke 0.2s;
  }
  .area-tile.featured .tile-svg {
    width: 28px; 
    height: 28px;
    stroke: rgba(255,204,51,1); 
    margin-bottom: 0;
  }


  /* ════════════════════════════
     COMBINED HERO + BROWSE
  ════════════════════════════ */
  #hero-browse {
    background: var(--maroon);
    padding: 6rem 2rem 4.5rem;
    position: relative; 
    overflow: hidden;
  }

  #hero-browse::before {
    content: ''; 
    position: absolute; 
    inset: 0;
    background-image: repeating-linear-gradient(
      45deg, transparent, transparent 60px,
      rgba(255,204,51,0.03) 60px, rgba(255,204,51,0.03) 61px
    );
    pointer-events: none;
  }

  .hb-inner { 
    max-width: 1100px; 
    margin: 3rem auto; 
    position: relative; 
    z-index: 1; 
  }

 .search-tile {
    grid-column: span 2; 
    grid-row: span 2;
    background: var(--gold);
    border: none;
    justify-content: space-between;
    padding: 22px; 
    cursor: default;
  }

   .search-tile:hover { 
    background:  var(--gold);
  }

  .search-tile-label {
    font-size: 0.75rem; 
    font-weight: 700; 
    letter-spacing: 0.16em;
    text-transform: uppercase; 
    color: var(--gray-dark);
    margin-bottom: 2.75rem; 
    display: block;
  }
  .search-tile-heading {
    font-family: var(--primary-font);
    font-size: 2.25rem; 
    font-weight: 700;
    color: var(--maroon); 
    line-height: 1.1; 
    margin-bottom: 0.4rem;
    margin-top: 30%;
  }
  .search-tile-sub {
    font-size: 0.95rem; 
    color: var(--maroon-dark);
    font-weight: 400; 
    line-height: 1.5; 
    margin-bottom: 1.25rem;
  }
  .search-tile-input-wrap {
    display: flex;
    border: 1.5px solid rgba(122,0,25,0.25);
    border-radius: 4px; overflow: hidden;
    background: rgba(255,255,255,0.55);
    transition: border-color 0.2s, background 0.2s;
  }
  .search-tile-input-wrap:focus-within { border-color: var(--maroon); background: #fff; }
  .search-tile-input {
    flex: 1; padding: 0.7rem 1rem;
    background: transparent; border: none; outline: none;
    font-family: var(--primary-font);
    font-size: 0.85rem; color: var(--maroon);
  }
  .search-tile-input::placeholder { color: rgba(122,0,25,0.4); }
  .search-tile-btn {
    padding: 0.7rem 1rem;
    background: var(--maroon); color: var(--gold);
    border: none; cursor: pointer;
    display: flex; align-items: center; transition: background 0.2s;
  }
  .search-tile-btn:hover { background: var(--maroon-dark); }
  .search-tile-btn svg { width: 15px; height: 15px; stroke: var(--gold); fill: none; stroke-width: 2.5; stroke-linecap: round; }


  @media (max-width: 860px) {
    .search-tile { 
        grid-column: span 2; 
        grid-row: span 1; 
        min-height: 160px; 
    }
  }
  @media (max-width: 560px) {
    #hero-browse { 
        padding: 2.5rem 1.25rem 2rem; 
    }
    .search-tile { 
        grid-column: span 1; 
    }
  }



/* ════════════════════════════
    STATISTICS SECTION
════════════════════════════ */

#statistics {
  background: #2f2f2f;
  padding: 5rem 0;
  color: var(--cream);
}

.stat-content {
  max-width: 1100px;
  margin: 0 auto;
}

.stat-content .section-title {
  color: var(--cream);
}

.stat-row {
  display: flex; 
  gap: 3rem; 
  justify-content: center;
  margin: 2rem 0 0;
  padding: 0;
}

.stat { 
  text-align: center; 
  margin: 0;
}

.stat-num {
  font-family: var(--primary-font);
  font-size: 3.75rem; 
  font-weight: 700; 
  color: var(--gold-light);
  margin: 0;
}
.stat-label {
  font-size: 1.125rem; 
  color: #ffffff;
  margin: 0.2rem 0 0;
  text-wrap: pretty;
}



  /* ════════════════════════════
     FEATURED FUNDS
  ════════════════════════════ */
  #featured {
    background: var(--cream);
    padding: 6rem 2rem;
    border-top: 1px solid var(--border);
  }

  .featured-inner { max-width: 1100px; margin: 0 auto; }

  .fund-filter-tabs {
    display: flex; gap: 0.5rem;
    margin-bottom: 2.5rem; flex-wrap: wrap;
  }

  .filter-tab {
    padding: 0.5rem 1.25rem;
    border: 2px solid var(--border);
    background: transparent; cursor: pointer;
    font-family: var(--primary-font);
    font-size: 0.85rem; font-weight: 600;
    color: var(--dark-gray);
    transition: all 0.2s;
    display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--light-gray);
  }

  .filter-tab:hover { border-color: var(--maroon); color: var(--maroon); }
  .filter-tab.active {
    border-color: var(--maroon);
    background: var(--maroon); color: var(--warm-white);
  }

  .fund-filter-subhead {
    margin-bottom: 1.75rem;
    color: var(--dark-gray);
    font-size: 1.5rem;
    line-height: 1.6;
    max-width: 760px;
    font-weight: 700;
  }

  .fund-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
  }

  .fund-card {
    background: var(--warm-white);
    border: 1px solid var(--border);
    padding: 1.75rem;
    position: relative;
    transition: box-shadow 0.2s;
  }

  .fund-card:hover { box-shadow: 0 4px 20px rgba(122,0,25,0.1); }
  .fund-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: max-content;
    padding: 0.2rem 0.7rem;
    font-size: 0.8rem; 
    font-weight: 700;
    /* letter-spacing: 0.1em; 
    text-transform: uppercase; */
    margin-bottom: 1rem;
    border-radius: 20px;
  }

  .badge-trending { background: #FAC775; color: #412402; }
  .badge-urgent   { background: #F7C1C1; color: #501313; }
  .badge-crowfund    { background: #B5D4F4; color: #042C53; }
  .badge-impact   { background: #C0DD97; color: #173404; }

  .fund-name {
    font-family: var(--primary-font);
    font-size: 1.15rem; font-weight: 700;
    color: var(--charcoal); margin-bottom: 0.5rem;
    line-height: 1.3;
  }

  .fund-desc {
    font-size: 0.875rem; color: var(--mid-gray);
    line-height: 1.6; margin-bottom: 1.25rem;
  }

  button.fund-cta, button.fund-cta:visited  {
    display: block; width: 100%;
    padding: 0.75rem;
    background: var(--maroon); color: var(--warm-white);
    border: none; cursor: pointer; text-align: center;
    font-family: var(--primary-font);
    font-weight: 700; font-size: 0.85rem;
    letter-spacing: 0.06em; text-transform: uppercase;
    text-decoration: none;
    transition: background 0.2s;
  }

  button.fund-cta:hover { background: var(--maroon-dark); }

  .crowdfund-cta:link, .crowdfund-cta:visited {
    display: block; 
    width: 100%;
    padding: 0.75rem;
    color:  var(--maroon); 
    border: none; 
    cursor: pointer; 
    text-align: center;
    font-family: var(--primary-font);
    font-weight: 700; 
    font-size: 0.85rem;
    letter-spacing: 0.06em; 
    text-transform: uppercase;
    text-decoration:underline;
    transition: background 0.2s;
  }
  
  .crowdfund-cta:hover { text-decoration: none; }


    /* ─── Responsive elements ─── */
  @media (max-width: 900px) {
    .area-grid {
      grid-template-columns: repeat(2, 1fr);
      grid-template-rows: auto;
    }
    .search-tile {
      grid-column: span 2;
      grid-row: span 1;
      min-height: 200px;
    }
  }

  @media (max-width: 600px) {
    .area-grid {
      grid-template-columns: 1fr;
    }
    .search-tile {
      grid-column: span 1;
    }
  }
