/* =============================================================================
   me-hero.css — Full-bleed hero component
   Version: 1.0

   USAGE
   -----
   Root:       <section class="me-hero [me-hero--compact]">
   Elements:   me-hero-image      — <div> wrapping a <picture><img>
               me-hero-overlay    — gradient overlay <div>
               me-hero-content    — positions the text block
               me-hero-text       — max-width text + CTA wrapper
               me-hero-eyebrow    — small label above the heading
               me-hero-logo       — optional logo <img> (above h1)
               me-hero-subtitle   — lead paragraph below h1
               me-hero-cta        — button group <div>
               me-hero-scroll     — animated scroll indicator (hidden on --compact)

   VARIANTS
   --------
   (default)        100vh tall — use for primary landing heroes
   me-hero--compact  50vh tall — use for interior/sub-page heroes

   THEMING
   -------
   --me-hero-bg            Background colour shown before image loads  (#000)
   --me-hero-img-opacity   Image opacity (0–1)                         (0.7)
   --me-hero-logo-width    Width of me-hero-logo img                   (auto)

   Override on the element or any ancestor:
       .my-section { --me-hero-img-opacity: 0.5; }

   ============================================================================= */


/* ============================================
   Variables
   ============================================ */
:root {
    --me-hero-bg:           #000;
    --me-hero-img-opacity:  0.7;
    --me-hero-logo-width:   auto;
}


/* ============================================
   Root
   ============================================ */
.me-hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: var(--me-hero-bg);
}



/* Constrained shell: reduce hero height */
#ecPageShell.constrained .me-hero {
    min-height: 70vh;
    align-items: flex-end;
}
#ecPageShell.constrained .me-hero--compact {
    min-height: 50vh;
}
#ecPageShell.constrained .me-hero-content {
    padding: 60px 0;
}
#ecPageShell.constrained .me-hero-text {
    padding-left: 4rem;
}


/* ---- Background image ---- */
.me-hero-image {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.me-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: var(--me-hero-img-opacity);
}


/* ---- Gradient overlay ---- */
.me-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        to right,
        rgba(0,0,0,0.70) 0%,
        rgba(0,0,0,0.50) 40%,
        rgba(0,0,0,0.15) 60%,
        rgba(0,0,0,0.00) 80%
    );
}


@media (max-width: 767.98px) {
    .me-hero-overlay {
        background: linear-gradient(
            to top,
            rgba(0,0,0,0.90) 0%,
            rgba(0,0,0,0.60) 50%,
            rgba(0,0,0,0.20) 80%,
            rgba(0,0,0,0.00) 100%
        );
    }
}


/* ---- Content wrapper ---- */
.me-hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    padding: 140px 0 100px;
}


/* ---- Text block ---- */
.me-hero-text {
    max-width: 720px;
    padding-left: 40px;
}


/* ---- Eyebrow ---- */
.me-hero-eyebrow {
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #fff;
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}


/* ---- Logo ---- */
.me-hero-logo {
    display: block;
    width: var(--me-hero-logo-width);
    margin-bottom: 1.5rem;
}


/* ---- Heading ---- */
.me-hero h1 {
    margin-bottom: 1.5rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
}


/* ---- Subtitle ---- */
.me-hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    margin: 1.5rem 0 2rem;
    opacity: 0.95;
    font-weight: 300;
    color: #E9E9E9;
}


/* ---- CTA group ---- */
.me-hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}


/* ---- Scroll indicator ---- */
.me-hero-scroll {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}
.me-hero-scroll a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
}
.me-hero-scroll span {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
    animation: me-hero-scroll-pulse 2s ease-in-out infinite;
}

@keyframes me-hero-scroll-pulse {
    0%, 100% { transform: scaleY(1);   opacity: 0.5; }
    50%       { transform: scaleY(0.5); opacity: 1;   }
}


/* ============================================
   Variant: --compact (50vh)
   ============================================ */
.me-hero--compact {
    min-height: 65vh;
}
.me-hero--compact .me-hero-content {
    padding: 100px 0 60px;
}
.me-hero--compact h1 {
    font-size: clamp(2rem, 5vw, 3rem);
}
.me-hero--compact .me-hero-subtitle {
    font-size: 1.125rem;
    max-width: 600px;
}
.me-hero--compact .me-hero-scroll {
    display: none;
}


/* ============================================
   Responsive
   ============================================ */

/* Tablet (768–991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .me-hero-content {
        padding: 100px 0 60px;
    }
    .me-hero-text {
        padding-left: 2rem;
    }
}

/* Mobile (<768px) */
@media (max-width: 767.98px) {
    .me-hero {
        min-height: 85vh;
    }
    .me-hero-image img {
        object-position: 69%;
    }
    .me-hero-content {
        padding: 80px 0 3rem;
    }
    .me-hero-text {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .me-hero-eyebrow {
        font-size: 0.7rem;
        margin-bottom: 1rem;
    }
    .me-hero-logo {
        margin-bottom: 1rem;
    }
    .me-hero h1 {
        font-size: 2.5rem;
        line-height: 1.1;
        margin-bottom: 1rem;
    }
    .me-hero-subtitle {
        font-size: 1rem;
        margin: 1rem 0 2rem;
        line-height: 1.5;
    }
    .me-hero-cta {
        flex-direction: column;
        gap: 0.75rem;
    }
    .me-hero-scroll {
        display: none;
    }

    /* Compact variant mobile */
    .me-hero--compact {
        min-height: auto;
    }
    .me-hero--compact .me-hero-content {
        padding: 80px 0 40px;
    }
    .me-hero--compact h1 {
        font-size: 1.75rem;
    }
    .me-hero--compact .me-hero-subtitle {
        font-size: 0.9375rem;
    }

    #ecPageShell.constrained .me-hero-text {
    padding-left: 1rem;
}
}

/* XS (<576px) */
@media (max-width: 575.98px) {
    .me-hero h1 {
        font-size: 3rem;
    }
}
