/* ---------- ANIMATED HERO BLOCK ---------- */
.animated-hero-block {
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    height: 80vh;
    min-height: 600px;
    background: var(--ink);
    overflow: hidden;
}

.ah-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s;
    display: flex;
    align-items: center;
}

.ah-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 5;
}

.ah-bg-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.ah-overlay {
    position: absolute;
    inset: 0;
    background: rgba(14,27,42,0.85); /* Cemetrix Ink Overlay */
    z-index: 2;
}

.ah-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
}

.ah-anim-title {
    font-size: clamp(32px, 4vw, 54px);
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 25px;
}

/* --- ANIMATION KEYFRAMES --- */

/* 1. Typewriter Cursor */
.ah-anim-eyebrow::after {
    content: '|';
    animation: ahCursorBlink 0.8s step-start infinite;
    margin-left: 2px;
}
@keyframes ahCursorBlink { 50% { opacity: 0; } }
.ah-anim-eyebrow.typing-done::after { display: none; }

/* 2. Title Zoom & Bounce */
.ah-anim-title.do-bounce {
    animation: ahHeroZoomBounce 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes ahHeroZoomBounce {
    0% { opacity: 0; transform: scale(0.5) translateY(40px); }
    50% { opacity: 1; transform: scale(1.05) translateY(-10px); }
    75% { transform: scale(0.97) translateY(5px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* 3. Description Word Fading */
.ah-desc-word {
    opacity: 0;
    display: inline-block;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.ah-desc-word.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Strip unwanted margins from WYSIWYG paragraph tags in the title */
.ah-anim-title p {
    margin: 0;
    display: inline;
}