:root {
    /* Keep header height and fade duration in one place */
    --header-h: 80px;
    --fade-ms: 2000ms;
    /* change this to 3000ms, 1500ms, etc. */
}

/* html {
    padding-inline-start: 0px;
} */

body {
    margin: 0;
    background-color: black;
    font-size: 1rem;
}

.section {
    padding: 0 20px;
}


/* ---------------------
HEADER SECTION
---------------------  */

.header {
    /* position: fixed;
    top: 0;
    left: 0;
    width: 100%; */
    height: 80px;
    /* background: #152d64; */
    background: rgb(145, 0, 0);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.nav-links {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding-inline-start: 0px;
    color: white;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-size: 1.1rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #64748B;
    transition: width .3s;
    position: absolute;
    bottom: -4px;
    left: 0;
}

.nav-links a:hover::after {
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #d1bf1a;
    /* Accent */
}

/* ---------------------
HERO SECTION
---------------------  */

.hero{
    width: 100%;
    height: 100%;
    position: relative;
    /* margin-top: 80px; same as header height */
    overflow: hidden;
}

.hero video,
.hero img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fade-overlay {
    position: absolute;
    /* border: solid blue 1px; */
    bottom: 0%;
    left: 0;
    width: 100%;
    height: 40%;
    /* adjust how tall the fade is */
    background: linear-gradient(to top,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 0.7) 40%,
            rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
    /* doesn’t block clicks */
}

/* Tagline wrapper with gradient fade */
.tagline-wrapper {
    position: absolute;
    /* border: solid red 1px; */
    bottom: 10%;
    width: 100%;
    text-align: center;
    padding: 2rem;
}

.tagline {
    color: white;
    font-size: 2.5rem;
    font-weight: 500;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.4;
}

.temp {
    height: 200px;
    background-color: red;
}

.bg-white {
    background-color: white;
}

.bg-blue {
    background-color: #152d64;
}

.bg-red {
   background-color: rgb(145, 0, 0);
}

.color-white {
    color: white;
}

.section-title {
    height: 100px;
    text-align: center;
    font-size: 3.5rem;
}

.section-text-block {
    max-width: 900px;
    margin: 0 auto 40px auto;
    line-height: 1.7;
}

/* Two-column layout */
.image-text-block {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-bottom: 40px;
}

.image-text-block.reverse {
    flex-direction: row-reverse;
}

.image-text-block-image {
    flex: 1;
}

.image-text-block-image img {
    width: 100%;
    height: auto;
    display: block;
}

.image-text-block-text {
    flex: 1;
    line-height: 1.7;
}

/* ---------------------
FROM MOMENT TO MEMORY SECTION
---------------------  */

/* #preservation h2 {
    color: white;
} */


/* ---------------------
ABOUT SECTION
---------------------  */




/* ---------------------
PORTFOLIO SECTION
---------------------  */

.portfolio-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.portfolio-item {
    text-decoration: none;
    color: white;
    flex: 1 1 calc(50% - 3px);
    display: flex;
    flex-direction: column;
}

.image-wrapper {
    position: relative;
    overflow: hidden;
}


.image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease;
}


.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.40);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.overlay h3 {
    margin: 0;
    font-size: 1.4rem;
    letter-spacing: 1px;
    text-align: center;
}

.overlay h4 {
    margin: 0;
    font-size: 1rem;
    letter-spacing: 1px;
    text-align: center;
}

.portfolio-item:hover .overlay {
    opacity: 1;
}

/* MOBILE Overlay (hidden on desktop) */
.mobile-overlay {
    display: none;
}







/* MOBILE TITLE (hidden on desktop) */
.mobile-title {
    display: none;
    margin-top: 15px;
    font-size: 1.2rem;
    color: white;
}



/* MEDIA QUERIES - UNTESTED */


@media (max-width: 1024px) {
    .portfolio-item {
        flex: 1 1 calc(50% - 40px);
    }
}

@media (max-width: 640px) {

    .section {
        padding: 0;
    }

    .portfolio-item {
        flex: 1 1 100%;
    }

    /* Remove hover zoom on mobile */
    .portfolio-item:hover img {
        transform: none;
    }

    .overlay {
        inset: auto; /* cancel full cover */
        bottom: 0;
        left: 0;
        right: 0;

        height: auto;
        padding: 20px 15px;

        opacity: 1; /* always visible */

        background: linear-gradient(to top,
                rgba(0, 0, 0, 0.85),
                rgba(0, 0, 0, 0.5),
                rgba(0, 0, 0, 0.0));

        align-items: flex-start;
        /* left aligned looks cleaner on mobile */
        justify-content: flex-end;
        text-align: left;
    }

    /* Show title below image */
    .mobile-title {
        display: block;
    }
}

/* ELEGANT FADE INS - UNTESTED */

/* .portfolio-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.portfolio-item.visible {
    opacity: 1;
    transform: translateY(0);
} */



/* 
not used - only hero video for now 
----------------------------------------------
*/
.hero-slider img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;

    opacity: 0;
    transition: opacity var(--fade-ms) ease-in-out;

    /* Smooth GPU-accelerated opacity transitions */
    will-change: opacity;
    backface-visibility: hidden;
    pointer-events: none;
    user-select: none;
}

.hero-slider img.active {
    opacity: 1;
    z-index: 2;
    /* ensure the fading-in image is on top */
}

.hero-slider img.prev {
    z-index: 1;
    /* the one fading out */
}

/* Respect user motion preference */
@media (prefers-reduced-motion: reduce) {
    .hero-slider img {
        transition: none;
    }
}
/* ----------------------------------------- */

/* .hero-slider img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 2s ease;
}

.hero-slider img.active {
    opacity: 1;
} */

/* .slideshow {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.slide.active {
    opacity: 1;
} */



/* .slideshow {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 100px;
    left: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
} */


/* CSS ONLY solution for cycling through 3 images */
/* .hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

.slideshow {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: fade 9s infinite;
}

.slide:nth-child(1) {
    animation-delay: 0s;
}

.slide:nth-child(2) {
    animation-delay: 3s;
}

.slide:nth-child(3) {
    animation-delay: 6s;
}

@keyframes fade {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    30% {
        opacity: 1;
    }

    40% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
} */