/* css/landing.css
 *
 * Landing-page hero overlay shown on top of the full-screen map on
 * every index.html (both sites; see AGENTS.md for the full
 * rationale): a hero shown as real static HTML (crawlable, no client-side
 * injection) that sits on top of the map (within .page-content) while the
 * map preloads underneath, and is dismissed via templates/page.hbs's inline
 * script when the visitor clicks the primary CTA - no page navigation, no
 * second HTTP round-trip.
 *
 * Kept in its own stylesheet (rather than folded into css/style.css) since
 * it's landing-page-only markup, not part of the map UI itself.
 *
 * Reuses the --brand-dark-blue/--brand-light-blue custom properties
 * css/chrome.css defines (and body.site-solar overrides for the solar
 * site), so the hero automatically matches each site's brand color without
 * duplicating the theme switch here. The persistent .site-header/.site-footer
 * below this hero are also styled by css/chrome.css now, not this file - see
 * that file's header comment.
 */

/* Content section below the landing hero (inside #landing-hero-overlay).
   Hides with the hero when the visitor switches to map view. */
.landing-content {
    flex: 0 0 auto;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 24px 48px;
    box-sizing: border-box;
    border-top: 1px solid #e0e0e0;
    font-family: sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

.landing-content h1,
.landing-content h2 {
    color: #1a1a1a;
}

.landing-content h1 {
    font-size: 1.5rem;
    margin: 0 0 12px 0;
}

.landing-content h2 {
    font-size: 1.1rem;
    margin: 24px 0 8px 0;
}

.landing-content p {
    margin: 0 0 12px 0;
}

.landing-content nav {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.landing-content a,
.landing-secondary-link a {
    color: var(--brand-dark-blue);
    text-decoration: none;
    font-weight: 550;
}

.landing-content a:hover,
.landing-secondary-link a:hover {
    text-decoration: underline;
}

.landing-cross-promo {
    display: block;
    margin: 0 0 24px 0;
    padding: 12px 16px;
    border: 1px solid rgba(12, 60, 96, 0.12);
    border-radius: 8px;
    background: rgba(238, 245, 251, 0.9);
    color: var(--brand-dark-blue);
    line-height: 1.5;
    text-decoration: none;
}

.landing-cross-promo:hover {
    text-decoration: none;
    opacity: 0.96;
}

.landing-cross-promo-intro {
    display: block;
    margin-bottom: 4px;
    font-weight: 400;
}

.landing-cross-promo-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    vertical-align: -2px;
    object-fit: contain;
}

.landing-cross-promo-link {
    text-decoration: underline;
    font-weight: 600;
}

body.site-solar .landing-cross-promo {
    border-color: rgba(220, 151, 60, 0.16);
    background: rgba(255, 245, 234, 0.92);
    color: var(--brand-dark-blue);
}

/* ---- Hero ---- */

.landing-hero {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 40px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: clamp(20px, 7vh, 72px) 24px 48px;
    box-sizing: border-box;
    font-family: sans-serif;
}

.landing-hero-text h1 {
    font-size: 2.1rem;
    line-height: 1.2;
    margin: 0 0 16px 0;
    color: #1a1a1a;
}

.landing-hero-text p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #333;
    margin: 0 0 24px 0;
}

.landing-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--brand-dark-blue);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 14px 28px;
    cursor: pointer;
    text-decoration: none;
}

.landing-cta-icon {
    width: 1.15em;
    height: 1.15em;
    flex: 0 0 auto;
    object-fit: contain;
}

.landing-cta:hover {
    background-color: var(--brand-dark-blue-hover);
}

.landing-secondary-link {
    display: block;
    margin-top: 16px;
    font-size: 0.95rem;
}

.landing-secondary-link a {
    font-weight: 500;
}

.landing-hero-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #d9e0e8;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.landing-hero-visual {
    align-self: start;
}

/* ---- Responsive: stack hero on narrow/mobile screens ---- */

@media (max-width: 760px) {
    .landing-hero {
        display: flex;
        flex-direction: column;
        padding: 32px 20px;
        gap: 16px;
    }

    .landing-hero-text {
        display: contents;
    }

    .landing-hero-text h1 {
        order: 1;
        margin-bottom: 0;
    }

    .landing-hero-visual {
        order: 2;
        align-self: stretch;
    }

    .landing-hero-text p {
        order: 3;
        margin-bottom: 0;
    }

    .landing-cta {
        order: 4;
        align-self: flex-start;
    }

    .landing-secondary-link {
        order: 5;
        margin-top: 0;
    }
}

/* ---- Persistent site header/footer sizing note ----
 *
 * .site-header, .site-header-title, .site-header-nav, .app-switcher (plus
 * its :hover/:focus-visible/-icon variants), .site-footer and its mobile
 * breakpoint now all live in css/chrome.css (loaded alongside this file -
 * see templates/page.hbs) since they're shared byte-for-byte with the
 * FAQ/legal pages' css/static.css. Only landing-page-only layout stays
 * here.
 */

/* Holds both the map (always rendered/sized, preloading underneath - see
   css/style.css's `.page-content > #map` override of the generic `#map`
   rule) and the landing hero overlay stacked on top of it - toggling the
   hero's visibility never resizes or moves the header/footer above/below. */
.page-content {
    flex: 1 1 auto;
    position: relative;
    min-height: 0;
}

#landing-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 9999;
    overflow-y: auto;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
}

@media (max-width: 760px) {
    #landing-hero-overlay {
        align-items: flex-start;
    }
}
