/* ==========================================================================
   Page Sections — Hero, About, Stats, NCHMA, Services, Team
   ========================================================================== */

/* --- Hero — full-viewport banner with parallax background --- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;  /* prevents collapse on short viewports */
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../images/hero.jpg');
    background-attachment: fixed;  /* parallax effect on scroll */
    background-size: cover;
    background-position: center;
}
/* Semi-transparent green tint over the hero image */
.hero__overlay { position: absolute; inset: 0; background-color: rgba(0, 83, 55, 0.4); z-index: 1; }
/* Content sits above the overlay */
.hero__content { position: relative; z-index: 2; text-align: center; padding: 0 var(--space-lg); max-width: 900px; }
.hero__heading {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 5rem;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 11px;
    line-height: 1.7;
    text-shadow: 0.08em 0.08em 0.08em #003a25;  /* depth against varied backgrounds */
}


/* --- About — three service-category cards in a row --- */
.about { padding: 2vw var(--space-lg); background-color: var(--color-bg); }
.about__grid { max-width: var(--container-max); margin: 0 auto 75px; display: flex; gap: var(--space-xl); }
.about__card { flex: 1; text-align: center; padding: var(--space-lg); }
.about__card-icon { display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-lg); }
.about__card-icon svg { width: 96px; height: 96px; color: var(--color-primary); fill: currentColor; }
.about__card-title { font-weight: 900; font-size: 25px; color: var(--color-text-heading); margin-bottom: var(--space-md); text-transform: uppercase; letter-spacing: 1px; line-height: 1.4; }
.about__card-text { font-size: 16px; line-height: 1.6; color: #898f99; }


/* --- Stats / Map — interactive map showing VSI project locations --- */
.stats { padding: 0 var(--space-lg) var(--space-2xl); background-color: var(--color-bg); }
.stats__inner { max-width: var(--container-max); margin: 0 auto; text-align: center; }
.stats__heading {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 38px;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
    letter-spacing: 1px;
    line-height: 1.3;
}
.stats__subtext { font-size: 1.125rem; color: var(--color-text-body); margin-bottom: var(--space-xl); }
/* Aspect-ratio container for the embedded map iframe */
.stats__map-container {
    position: relative;
    width: 100%;
    padding-bottom: 80%;  /* creates ~5:4 aspect ratio */
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: var(--space-xl);
}
/* Iframe stretches to fill the aspect-ratio box */
.stats__map { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }


/* --- NCHMA — National Council of Housing Market Analysts badge --- */
.nchma { padding: var(--space-xl) var(--space-lg) var(--space-2xl); background-color: var(--color-bg); text-align: center; }
.nchma__inner { max-width: 285px; margin: 0 auto; }  /* narrow container to center the seal */
.nchma__heading { font-family: var(--font-heading); font-weight: 900; font-size: 2rem; color: var(--color-secondary); margin-bottom: var(--space-md); }
.nchma__logo { max-width: 285px; margin: 0 auto var(--space-md); }
.nchma__link { font-size: 1.125rem; color: var(--color-accent); font-weight: 700; text-decoration: underline; }
.nchma__link:hover { color: var(--color-accent-hover); }


/* --- Services Checklist — split layout: background image left, checklist right --- */
.services {
    position: relative;
    padding: 6vw 0;
    /* Gradient masks the left 45% of the bg image to white on the right */
    background-image: linear-gradient(90deg, rgba(29, 29, 29, 0) 45%, #ffffff 45%),
                      url('../images/services-bg.jpg');
    background-size: cover;
    background-position: center;
}
.services__content {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
}
.services__spacer { flex: 1; }  /* invisible left column that sits over the bg image */
.services__right { flex: 1; padding: 0 var(--space-lg); }
/* "VSI" brand label above the heading */
.services__brand {
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
}
.services__main-heading {
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
    text-align: center;
    line-height: 1.4;
}
.services__desc { font-size: 20px; font-weight: 600; color: #003a25; line-height: 1.8; text-align: center; }
/* Two-column checklist layout */
.services__columns { display: flex; gap: var(--space-xl); margin-bottom: var(--space-lg); padding: var(--space-lg) 0; }
.services__list { flex: 1; }
.services__list li {
    position: relative;
    padding: 0.75rem 0 0.75rem 2.25rem;  /* left padding makes room for the house icon */
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 20px;
    color: #003a25;
    line-height: 1.8;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.services__list li:last-child { border-bottom: none; }
/* House icon bullet — uses CSS mask with inline SVG for easy color control */
.services__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1rem;
    width: 1.5rem;
    height: 1.5rem;
    background-color: #003658;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 3L2 12h3v8h6v-6h2v6h6v-8h3L12 3z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 3L2 12h3v8h6v-6h2v6h6v-8h3L12 3z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}


/* --- Service Details — dark blue section with alternating text/image rows --- */
.services-detail {
    position: relative;
    padding: 2vw var(--space-lg);
    background-color: #003658;
    background-image: url('../images/services-detail-bg.jpg');
    background-blend-mode: overlay;  /* tints the photo with the navy base color */
    background-attachment: fixed;  /* parallax effect */
    background-size: cover;
    background-position: center;
}
.services-detail__inner { max-width: var(--container-max); margin: 0 auto; }
/* Each row is a text + image pair; --reverse flips the order */
.services-detail__row { display: flex; align-items: center; gap: var(--space-xl); margin-top: 50px; }
.services-detail__row--reverse { flex-direction: row-reverse; }
/* 3:2 ratio gives text more space than the illustration */
.services-detail__text-col { flex: 3; }
.services-detail__img-col { flex: 2; text-align: center; }
.services-detail__img { max-width: 100%; height: 250px; width: auto; object-fit: contain; }
.services-detail__heading { font-family: var(--font-heading); font-weight: 700; font-size: 1.75rem; color: var(--color-white); margin-bottom: var(--space-sm); }
.services-detail__subheading { font-family: var(--font-heading); font-weight: 700; font-size: 1.25rem; color: var(--color-white); margin-bottom: var(--space-md); }
.services-detail__desc { font-size: 1rem; line-height: 1.8; color: rgba(255, 255, 255, 0.85); }


/* --- Team Transition — gradient banner bridging services and team sections --- */
.team-transition {
    height: 200px;
    background-image: linear-gradient(180deg, rgba(39, 63, 50, 0.67) 0%, #003a25 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.team-transition__heading {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 3.5rem;
    color: var(--color-white);
    text-transform: uppercase;
    text-align: center;
}


/* --- Team Grid — staff photos with names, grouped by department --- */
.team {
    padding: 2vw var(--space-lg);
    background-image: url('../images/team-bg.jpg');
    background-color: rgba(0, 0, 0, 0.6);  /* dark overlay via blend mode */
    background-blend-mode: overlay;
    background-attachment: fixed;  /* parallax effect */
    background-size: cover;
    background-position: center;
    min-height: 800px;
}
.team__inner { max-width: var(--container-max); margin: 0 auto; text-align: center; }
.team__main-heading { display: none; }  /* hidden; section title is in team-transition instead */
/* Department group headings (e.g. "Analysts", "Support Staff") */
.team__group-heading {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 5rem;
    color: var(--color-white);
    margin-bottom: var(--space-xl);
    margin-top: 50px;
    padding-bottom: 10px;
}
/* Flex grid with wrap — column count controlled by modifier classes */
.team__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-xl); margin-bottom: var(--space-xl); }
.team__grid--cols-3 .team__member { flex: 0 1 calc(33.333% - var(--space-xl)); }
.team__grid--cols-4 .team__member { flex: 0 1 calc(25% - var(--space-xl)); }
.team__member { display: flex; flex-direction: column; align-items: center; }
/* Rounded-square photo frame with hover zoom */
.team__photo-wrap {
    width: 180px; height: 180px;
    border-radius: 50px;  /* large radius on square = squircle shape */
    overflow: hidden;
    margin-bottom: var(--space-md);
    transition: transform var(--transition-med);
}
.team__photo-wrap:hover { transform: scale(1.08); }
.team__photo { width: 100%; height: 100%; object-fit: cover; }
/* Placeholder shown when no headshot is available — displays initials */
.team__photo--placeholder {
    display: flex; align-items: center; justify-content: center;
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--color-white);
    font-size: 3rem; font-weight: 700;
}
.team__name { font-family: var(--font-heading); font-weight: 700; font-size: 1.125rem; color: var(--color-white); text-transform: uppercase; letter-spacing: 1px; margin-bottom: var(--space-xs); }
.team__email { font-size: 0.875rem; color: #2ea3f2; }
.team__email:hover { color: var(--color-white); }
