/* =========================================================
   DIGITAL HERITAGE GUYANA
   MV BARIMA MEMORIAL HERO
   ========================================================= */

/* Page and content reset */

body.memorial-home {
    margin: 0;
    overflow-x: hidden;
    background: #07100c;
}

body.memorial-home #content,
body.memorial-home .site-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

/* Hide the Omeka page title on the memorial homepage */

body.memorial-home #content > h1,
body.memorial-home .page-title,
body.memorial-home .site-page > h1 {
    display: none !important;
}

/* Accessible skip link */

#skipnav {
    position: absolute;
    top: auto;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

#skipnav:focus {
    top: 18px;
    left: 18px;
    width: auto;
    height: auto;
    padding: 10px 14px;
    color: #111;
    background: #fff;
    z-index: 10000;
}

/* =========================================================
   HERO
   ========================================================= */

.barima-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 760px;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    background: #101915;
}

.barima-hero-image {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    object-fit: cover;
    object-position: center;
    animation: barima-background-zoom 22s ease-in-out infinite alternate;
}

/* Dark overlay */

.barima-dark-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.12) 0%,
            rgba(0, 0, 0, 0.24) 45%,
            rgba(0, 0, 0, 0.66) 100%
        ),
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.03) 0%,
            rgba(0, 0, 0, 0.12) 45%,
            rgba(0, 0, 0, 0.28) 100%
        );
}

/* Local illumination over the Indigenous family */

.barima-family-light {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(
            ellipse at 20% 67%,
            rgba(232, 174, 99, 0.27) 0%,
            rgba(232, 174, 99, 0.12) 25%,
            transparent 52%
        );
}

/* =========================================================
   MAIN TEXT
   ========================================================= */

.barima-hero-text {
    position: absolute;
    top: 38%;
    left: 50%;
    z-index: 4;
    width: min(920px, calc(100% - 44px));
    transform: translate(-50%, -50%);
    text-align: center;
}

.barima-presented {
    margin: 0 0 18px;
    color: #f1d391;
    font-size: clamp(1rem, 1.7vw, 1.35rem);
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75);
    opacity: 0;
    animation: barima-fade-up 1s ease forwards 0.4s;
}

.barima-title {
    margin: 0;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(4rem, 8.5vw, 7rem);
    font-weight: 400;
    line-height: 0.94;
    letter-spacing: -0.045em;
    text-transform: uppercase;
    text-shadow: 0 5px 28px rgba(0, 0, 0, 0.82);
    opacity: 0;
    animation: barima-fade-up 1.2s ease forwards 1.1s;
}

.barima-subtitle {
    margin: 25px 0 0;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.2rem, 2.3vw, 1.8rem);
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: 0.04em;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.75);
    opacity: 0;
    animation: barima-fade-up 1s ease forwards 1.9s;
}

.barima-tribute {
    max-width: 720px;
    margin: 23px auto 0;
    color: rgba(255, 255, 255, 0.96);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    line-height: 1.6;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.82);
    opacity: 0;
    animation: barima-fade-up 1s ease forwards 2.7s;
}

.barima-date {
    margin: 19px 0 0;
    color: #f1d391;
    font-size: clamp(0.82rem, 1.25vw, 1rem);
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.27em;
    text-transform: uppercase;
    text-shadow: 0 2px 11px rgba(0, 0, 0, 0.8);
    opacity: 0;
    animation: barima-fade-up 1s ease forwards 3.4s;
}

/* =========================================================
   HERITAGE PILLARS
   ========================================================= */

.barima-pillars {
    position: absolute;
    bottom: 92px;
    left: 50%;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(24px, 5vw, 82px);
    width: min(1080px, calc(100% - 70px));
    transform: translateX(-50%);
    text-align: center;
}

.barima-pillar {
    position: relative;
    min-width: 0;
    color: #fff;
    opacity: 0;
}

.barima-pillar-one {
    animation: barima-pillar-reveal 0.9s ease forwards 4.2s;
}

.barima-pillar-two {
    animation: barima-pillar-reveal 0.9s ease forwards 4.7s;
}

.barima-pillar-three {
    animation: barima-pillar-reveal 0.9s ease forwards 5.2s;
}

.barima-pillar:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 16%;
    right: calc(-0.5 * clamp(24px, 5vw, 82px));
    width: 1px;
    height: 70%;
    background: rgba(241, 211, 145, 0.34);
}

.barima-pillar-icon {
    min-height: 38px;
    margin-bottom: 10px;
    color: #f1d391;
    font-size: clamp(1.6rem, 2.5vw, 2.15rem);
    line-height: 1;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.barima-pillar h2 {
    margin: 0 0 6px;
    color: #f1d391;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(0.98rem, 1.45vw, 1.18rem);
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: 0.03em;
}

.barima-pillar p {
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(0.78rem, 1.1vw, 0.92rem);
    line-height: 1.45;
}

/* =========================================================
   SCROLL PROMPT
   ========================================================= */

.barima-scroll {
    position: absolute;
    bottom: 25px;
    left: 50%;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #fff;
    text-decoration: none;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transform: translateX(-50%);
    opacity: 0;
    animation:
        barima-centered-fade 0.9s ease forwards 6s,
        barima-scroll-float 2s ease-in-out infinite 7s;
}

.barima-scroll-arrow {
    color: #f1d391;
    font-size: 1.2rem;
    line-height: 1;
}

/* =========================================================
   BRAND
   ========================================================= */

.barima-brand {
    position: absolute;
    right: 22px;
    bottom: 15px;
    z-index: 5;
    color: #fff;
    text-align: right;
    text-transform: uppercase;
    opacity: 0;
    animation: barima-fade-in 1s ease forwards 6.4s;
}

.barima-brand strong {
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.12em;
}

.barima-brand span {
    display: block;
    margin-top: 4px;
    color: #f1d391;
    font-size: 0.54rem;
    letter-spacing: 0.12em;
}

/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes barima-background-zoom {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.065);
    }
}

@keyframes barima-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes barima-fade-up {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes barima-pillar-reveal {
    from {
        opacity: 0;
        transform: translateY(34px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes barima-centered-fade {
    from {
        opacity: 0;
        transform: translate(-50%, 18px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes barima-scroll-float {
    0%,
    100% {
        transform: translate(-50%, 0);
    }

    50% {
        transform: translate(-50%, 7px);
    }
}

/* =========================================================
   TABLET
   ========================================================= */

@media screen and (max-width: 900px) {
    .barima-hero {
        height: auto;
        min-height: 960px;
    }

    .barima-hero-text {
        top: 31%;
    }

    .barima-pillars {
        bottom: 105px;
        grid-template-columns: 1fr;
        gap: 12px;
        width: min(560px, calc(100% - 38px));
    }

    .barima-pillar {
        padding: 9px 15px;
        border: 1px solid rgba(241, 211, 145, 0.25);
        background: rgba(5, 16, 12, 0.4);
        backdrop-filter: blur(3px);
    }

    .barima-pillar:not(:last-child)::after {
        display: none;
    }

    .barima-pillar-icon {
        min-height: 24px;
        margin-bottom: 3px;
        font-size: 1.35rem;
    }

    .barima-brand {
        right: 14px;
        bottom: 10px;
    }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media screen and (max-width: 600px) {
    .barima-hero {
        min-height: 900px;
    }

    .barima-hero-image {
        object-position: 58% center;
    }

    .barima-hero-text {
        top: 28%;
        width: calc(100% - 26px);
    }

    .barima-presented {
        font-size: 0.72rem;
        letter-spacing: 0.16em;
    }

    .barima-title {
        font-size: clamp(3rem, 16vw, 4.6rem);
    }

    .barima-subtitle {
        margin-top: 16px;
        font-size: 1.05rem;
    }

    .barima-tribute {
        margin-top: 15px;
        font-size: 0.88rem;
    }

    .barima-date {
        margin-top: 13px;
        font-size: 0.7rem;
        letter-spacing: 0.16em;
    }

    .barima-pillars {
        bottom: 100px;
        width: calc(100% - 24px);
    }

    .barima-pillar {
        padding: 7px 10px;
    }

    .barima-pillar h2 {
        font-size: 0.88rem;
    }

    .barima-pillar p {
        font-size: 0.72rem;
    }

    .barima-brand {
        right: auto;
        bottom: 7px;
        left: 50%;
        width: calc(100% - 24px);
        text-align: center;
        transform: translateX(-50%);
    }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .barima-hero-image,
    .barima-presented,
    .barima-title,
    .barima-subtitle,
    .barima-tribute,
    .barima-date,
    .barima-pillar,
    .barima-scroll,
    .barima-brand {
        animation: none !important;
        opacity: 1 !important;
        transform: none;
    }

    .barima-scroll {
        transform: translateX(-50%);
    }
}

/* Hero exit transition */

.barima-hero {
    transition:
        opacity 1.2s ease,
        transform 1.2s ease,
        filter 1.2s ease;
}

.barima-hero-exit {
    opacity: 0;
    transform: scale(1.035);
    filter: brightness(0.45);
    pointer-events: none;
}

/* =========================================================
   HERO EXIT + COMPLETE COLLAPSE
   ========================================================= */

#barima-memorial {
    transition:
        opacity 1.2s ease,
        transform 1.2s ease,
        filter 1.2s ease;
}

#barima-memorial.barima-hero-exit {
    opacity: 0 !important;
    transform: scale(1.025);
    filter: brightness(0.35);
    pointer-events: none;
}

/*
 * Critical:
 * remove the faded hero from document flow.
 */
#barima-memorial.barima-hero-collapsed {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}
