/* =========================================================
   ELDER LABORATORIES — SHARED INNER-PAGE HERO (LUXE)
   Used by: Certifications, Organization, Privacy Policy
   Same look as the "Who We Are" hero: photo + navy overlay,
   floating molecule, gold hand-drawn underline, animated waves.
   Palette: navy #0a1b33 / brand #234e86 / blue #0d4f8b / gold #c9a24b
   Loaded from Views/Shared/_PageHero.cshtml (after pages-luxe.css).
   ========================================================= */

:root {
    --eh-gold: #c9a24b;
    --eh-gold-soft: #e8cf8e;
    --eh-canvas: #f7f9fd;          /* must match the page canvas below the hero */
    --eh-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- HERO SHELL ---------- */
.elderHero {
    position: relative;
    min-height: 480px;
    overflow: hidden;
    background: #072a4d;
    color: #fff;
    border: 0;
}

/* ---------- BACKGROUND IMAGE (slow Ken-Burns zoom) ---------- */
.elderHeroBackground {
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center 42%;
    z-index: 0;
    transform-origin: 60% 50%;
    animation: ehKenBurns 22s ease-in-out infinite alternate;
}
@keyframes ehKenBurns {
    from { transform: scale(1); }
    to   { transform: scale(1.08); }
}

/* ---------- NAVY OVERLAY (text stays readable on the left) ---------- */
.elderHeroOverlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(95deg,
        rgba(6, 28, 56, .96) 0%,
        rgba(10, 45, 86, .88) 32%,
        rgba(13, 79, 139, .52) 66%,
        rgba(13, 79, 139, .22) 100%);
}

/* ---------- FLOATING MOLECULE (right side) ---------- */
.elderHero::after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 55%;
    background: url("/images/about/about-molecule.svg") right 4% center / contain no-repeat;
    opacity: .9;
    z-index: 2;
    pointer-events: none;
    animation: ehFloat 9s ease-in-out infinite;
}
@keyframes ehFloat { 50% { transform: translateY(-12px); } }

/* ---------- CONTENT ---------- */
.elderHeroContent {
    position: relative;
    z-index: 10;
    min-height: 480px;
    max-width: 760px;
    padding: 70px 0 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: ehFadeUp .8s ease both;
}
@keyframes ehFadeUp {
    from { opacity: 0; transform: translateY(25px); }
    to   { opacity: 1; transform: translateY(0); }
}

.elderHeroEyebrow {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding-left: 44px;
    color: var(--eh-gold-soft);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
}
.elderHeroEyebrow::before {
    content: "";
    position: absolute;
    left: 0; top: 50%;
    width: 26px; height: 2px;
    background: var(--eh-gold);
    transform: translateY(-50%);
}

.elderHeroTitle {
    margin: 14px 0 12px;
    color: #fff;
    font-size: clamp(40px, 5vw, 66px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -1px;
    text-shadow: 0 8px 25px rgba(0, 0, 0, .14);
}
.elderHeroTitle span { color: var(--eh-gold-soft); }

/* hand-drawn gold underline — draws itself once */
.elderHeroTitle::after {
    content: "";
    display: block;
    width: 190px;
    height: 14px;
    margin-top: 12px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 190 14'%3E%3Cpath d='M3 9 C35 2 62 12 95 6 S160 3 187 8' fill='none' stroke='%23c9a24b' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat / 100% 100%;
    animation: ehDraw 1.2s .5s var(--eh-ease) both;
}
@keyframes ehDraw {
    from { clip-path: inset(0 100% 0 0); }
    to   { clip-path: inset(0 0 0 0); }
}

.elderHeroSubtitle {
    margin: 0;
    max-width: 620px;
    color: #E8F2FB;
    font-size: 19px;
    font-weight: 500;
    line-height: 1.6;
    letter-spacing: .3px;
}

/* ---------- ANIMATED WAVES ---------- */
.elderHeroWave {
    position: absolute;
    left: 0; right: 0;
    bottom: -1px;
    height: 96px;
    z-index: 30;
    overflow: hidden;
    pointer-events: none;
    line-height: 0;
}
.elderWave {
    position: absolute;
    left: 0; bottom: 0;
    width: 200%;               /* two full loops; we slide by exactly one */
    height: 100%;
    display: block;
    will-change: transform;
}
.elderWaveBack  { animation: ehWaveSlide 22s linear infinite; }
.elderWaveFront { animation: ehWaveSlide 32s linear infinite reverse; }
@keyframes ehWaveSlide {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.elderWaveBack path  { fill: #d6e9fb; }
.elderWaveFront .elderWaveFill { fill: var(--eh-canvas); }
.elderWaveFront .elderWaveLine {
    fill: none;
    stroke: rgba(201, 162, 75, .9);
    stroke-width: 2px;
    vector-effect: non-scaling-stroke;
}

/* ---------- LOGO FIX (same as About: logo fits inside the header bar) ---------- */
body:has(.elderHero) .brand-area {
    height: 85px !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    overflow: visible !important;
}
body:has(.elderHero) .brand-logo {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    width: auto !important;
    height: 100% !important;
}
body:has(.elderHero) .brand-logo-image {
    position: static !important;
    width: auto !important;
    height: 68px !important;
    max-width: 190px !important;
    object-fit: contain !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    z-index: 1003 !important;
}
body:has(.elderHero) .brand-tagline { display: none !important; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1000px) {
    .elderHero { min-height: 450px; }
    .elderHeroContent { min-height: 450px; }
    .elderHero::after { width: 70%; opacity: .45; }
}
@media (max-width: 768px) {
    .elderHero { min-height: 420px; }
    .elderHeroContent { min-height: 420px; padding: 55px 0 85px; }
    .elderHeroTitle { font-size: 38px; }
    .elderHeroTitle::after { width: 140px; }
    .elderHeroSubtitle { font-size: 15px; }
    .elderHeroWave { height: 64px; }
    .elderHero::after { width: 100%; opacity: .25; background-position: center; }
    body:has(.elderHero) .brand-logo-image { height: 56px !important; }
}
@media (max-width: 480px) {
    .elderHero { min-height: 390px; }
    .elderHeroContent { min-height: 390px; }
    .elderHeroTitle { font-size: 33px; }
    .elderHeroWave { height: 52px; }
}

/* ---------- ACCESSIBILITY ---------- */
@media (prefers-reduced-motion: reduce) {
    .elderHeroBackground,
    .elderHero::after,
    .elderHeroContent,
    .elderHeroTitle::after,
    .elderWaveBack,
    .elderWaveFront { animation: none !important; }
}
