/* =========================================================================
   Shared marketing hero — base + left layout. Every page applies the
   `hero--left` modifier class on `.hero-section` and supplies its own photo
   via the `--hero-image` custom property set in that page's scoped .razor.css.
   ========================================================================= */

/* ---- Base structure ---- */
.hero-section {
    position: relative;
    min-height: 100vh;
    background: var(--hero-image) center / cover no-repeat;
    display: flex;
    padding: 0 1.5rem;
}

.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    display: flex;
}

.hero-card {
    background: transparent;
    border-radius: 0;
    padding: 0;
    max-width: 760px;
    width: 100%;
    box-shadow: none;
    display: flex;
    flex-direction: column;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text-inverse);
    margin-bottom: 1.25rem;
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-optical-sizing: auto;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-on-dark);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 580px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.hero-benefits {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding: 1.25rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-inverse);
    font-weight: 600;
}

.benefit-item i {
    font-size: 1.25rem;
    color: var(--text-inverse);
    flex-shrink: 0;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons — both naming sets (Home uses .btn-hero-*, sub-pages use .btn-*).
   The bottom-CTA band reuses the same dark-on-light treatment as the hero. */
.btn-hero-primary,
.btn-hero-secondary,
.hero-actions .btn-primary,
.hero-actions .btn-secondary,
.bottom-cta-actions .btn-primary,
.bottom-cta-actions .btn-secondary {
    padding: 0.9rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.5;
    white-space: nowrap;
    min-width: 180px;
}

.btn-hero-primary,
.hero-actions .btn-primary,
.bottom-cta-actions .btn-primary {
    background: var(--surface-raised);
    color: var(--text-primary);
    border: 1.5px solid var(--surface-raised);
}

.btn-hero-primary:hover,
.hero-actions .btn-primary:hover,
.bottom-cta-actions .btn-primary:hover {
    background: var(--background-light);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.btn-hero-secondary,
.hero-actions .btn-secondary,
.bottom-cta-actions .btn-secondary {
    background: transparent;
    color: var(--text-inverse);
    border: 1.5px solid rgba(255, 255, 255, 0.85);
}

.btn-hero-secondary:hover,
.hero-actions .btn-secondary:hover,
.bottom-cta-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-inverse);
    transform: translateY(-1px);
    border-color: var(--text-inverse);
}

/* Photo caption — rendered only by the editorial variant */
.hero-caption {
    position: absolute;
    z-index: 2;
    display: none;
    flex-direction: column;
    color: var(--text-inverse);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.hero-caption-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.hero-caption-location {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
    opacity: 0.85;
}

/* =========================================================================
   Hero layout — content on the left edge, vertically centered. No caption.
   ========================================================================= */
.hero-section.hero--left {
    align-items: center;
    justify-content: flex-start;
}

.hero--left .hero-content {
    justify-content: flex-start;
}

.hero--left .hero-card {
    align-items: flex-start;
    text-align: left;
}

.hero--left .hero-title {
    font-size: clamp(2.5rem, 6.5vw, 4.75rem);
}

.hero--left .hero-benefits {
    justify-content: flex-start;
}

.hero--left .hero-actions {
    justify-content: flex-start;
}

.hero--left .hero-overlay {
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0) 120px),
        linear-gradient(to right, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.2) 40%, rgba(0, 0, 0, 0) 70%);
}

/* =========================================================================
   Desktop: header is always position:sticky (never fixed), so the hero must
   pull itself up behind the transparent header with a negative margin-top.
   min-height compensates so the photo still fills the full viewport and the
   IntersectionObserver fires only after the hero is entirely scrolled away.
   ========================================================================= */
@media (min-width: 992px) {
    .hero-section {
        margin-top: -4.5rem; /* --public-chrome-height desktop value */
        min-height: calc(100vh + 4.5rem);
    }
}

/* =========================================================================
   Responsive — collapse anchored variants toward a comfortable mobile layout.
   ========================================================================= */
@media (max-width: 991px) {
    /* Hero starts below the sticky header — size to content, not full viewport. */
    .hero-section {
        min-height: auto;
        height: auto;
        padding: 2rem 1.25rem 2.5rem;
        align-items: flex-end;
    }

    .hero--left .hero-content {
        align-items: stretch;
    }

    .hero-card {
        max-width: 100%;
    }

    .content-section,
    .how-it-works-section {
        position: relative;
        z-index: 1;
    }
}

@media (max-width: 768px) {
    .hero-actions {
        width: 100%;
    }

    .btn-hero-primary,
    .btn-hero-secondary,
    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        flex: 1 1 auto;
    }
}
