/* 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 already has its own top padding (32px) providing the
   separation from whatever precedes it (hero CTA nav, or the ventodyne
   banner on wind pages) - so the first heading's usual 24px top margin
   would stack on top of that and leave an oversized gap. Applies on every
   site (wind/solar/battery), not just wind pages with the banner. */
.landing-content h2:first-child {
    margin-top: 0;
}

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

.landing-content-cta {
    margin: 12px 0 28px 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: 32px 0 0 0;
    padding: 16px 20px;
    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-link {
    text-decoration: underline;
}

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);
}

/* ---- ventodyne SCADA diagnostics/wake-steering feature card ----
 * Wind-site-only, high-contrast banner shown between the hero and
 * .landing-content (see templates/page.hbs's landing.ventodyneBanner
 * guard) - deliberately styled distinctly from .landing-cross-promo (a
 * light, low-emphasis box) since this promotes ventodyne's own commercial
 * services rather than the sibling free map. Translated for all 11
 * supported languages (see content/landing.json).
 */
.landing-ventodyne-banner {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto 24px;
    padding: 24px 28px;
    box-sizing: border-box;
    border: 1px solid rgba(12, 60, 96, 0.12);
    border-radius: 8px;
    background: rgba(238, 245, 251, 0.9);
    color: var(--brand-dark-blue);
    font-family: sans-serif;
    line-height: 1.6;
}

.landing-ventodyne-banner-eyebrow {
    margin: 0 0 8px 0;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: var(--brand-dark-blue);
}

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

.landing-ventodyne-banner-cta {
    display: inline-block;
    margin-top: 4px;
    color: var(--brand-dark-blue);
    font-weight: 600;
    text-decoration: underline;
}

.landing-ventodyne-banner-cta:hover {
    text-decoration: none;
}

/* The banner already visually separates itself from the hero above via its
   own background/border, so the .landing-content border-top divider
   directly below it would just be a redundant extra line. It also already
   has its own bottom margin (24px), so .landing-content's usual top padding
   would otherwise stack on top of that and leave an oversized gap before
   "About the World Wind Turbine Map" - collapsed to 0 here so only the
   banner's own margin remains. (The first heading's own top margin is
   already zeroed unconditionally by .landing-content h2:first-child above,
   since the same double-spacing issue applies on every site.) */
.landing-ventodyne-banner + .landing-content {
    border-top: none;
    padding-top: 0;
}

@media (max-width: 760px) {
    .landing-ventodyne-banner {
        margin: 0 20px 20px;
        width: auto;
        padding: 20px;
    }
}

/* ---- 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;
}

.landing-hero-visual-link {
    display: block;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

/* ---- 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;
    }
}
