@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800&display=swap');

/* Global Reset & Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
    /* Restored for smoother snap settling */
}

/* Only enable snapping on the Animations page when user starts scrolling */
html.snap-enabled {
    scroll-snap-type: y mandatory;
}

body.animations-page {
    /* Large padding at the top of the stream so it doesn't snap immediately */
    scroll-padding-top: 100px;
}

body {
    background-color: #121212;
    background-image:
        radial-gradient(circle at 50% 50%, rgba(255, 177, 159, 0.05) 0%, transparent 50%),
        linear-gradient(to bottom, #121212, #0d0d0d);
    background-attachment: fixed;
    color: #e0e0e0;
    line-height: 1.6;
    animation: bg-pulse 10s ease-in-out infinite;
}

@keyframes bg-pulse {
    0% {
        background-position: 50% 0%;
    }

    50% {
        background-position: 50% 20px;
    }

    /* Subtle vertical shift */
    100% {
        background-position: 50% 0%;
    }
}

a {
    text-decoration: none;
    color: inherit;
}

/* ---------------- NAVBAR (Preserved from original) ---------------- */
.navbar {
    background: url(images/Background_Cover.PNG) top/cover no-repeat;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.15rem;
    position: sticky;
    top: 0;
    z-index: 999;
}

.navbar__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 50px;
}

#navbar__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

#navbar__logo span {
    background-image: linear-gradient(to top, #ffffff 0%, #ffffff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.8rem;
    /* Slightly bigger */
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    /* Geometric font */
}

.logo-img {
    height: 40px;
    width: auto;
}

.navbar__menu {
    display: flex;
    align-items: center;
    list-style: none;
}

.navbar__item {
    height: 80px;
}

.navbar__links {
    color: azure;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem;
    height: 100%;
    font-weight: 400;
    /* Reverted from bold */
    font-size: 1.4rem;
    /* Increased size */
    font-family: 'Outfit', sans-serif;
    /* Geometric font */
    transition: color 0.3s ease;
}

.navbar__links:hover {
    color: #ffb19f;
}

.navbar__toggle .bar {
    display: none;
    /* Hidden on desktop */
}

/* ---------------- HERO / PAGE HEADER ---------------- */
.page-header {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url(images/Cover_Header_Design.png) center/cover no-repeat;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 30px;
    /* Increased to keep header visible on load */
    scroll-snap-align: start;
    /* Snap to header */
}

.page-title {
    font-size: 4rem;
    /* Increased size */
    font-weight: 800;
    /* Extra Bold */
    font-family: 'Outfit', sans-serif;
    /* Geometric font */
    margin-bottom: 0;
    background-image: linear-gradient(to right, #ff2d08, #ffb19f);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.page-subtitle {
    font-size: 1.2rem;
    color: #ccc;
    max-width: 800px;
    margin: 0 auto;
}

/* ---------------- LAYOUT UTILITIES ---------------- */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ---------------- ABOUT PAGE STYLES ---------------- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    /* 1/3 Image, 2/3 Text */
    gap: 40px;
    align-items: start;
    background: #1e1e1e;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #ffb19f;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.contact-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #2a2a2a;
    padding: 10px 20px;
    border-radius: 50px;
    transition: transform 0.2s, background 0.2s;
}

.social-btn:hover {
    transform: translateY(-3px);
    background: #3a3a3a;
}

.social-btn img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* ---------------- ART GALLERY STYLES ---------------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
    z-index: 2;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.3s ease;
}

/* ---------------- MOBILE RESPONSIVENESS ---------------- */
@media screen and (max-width: 960px) {
    .navbar__menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 80px;
        left: 0;
        background: #111;
        /* Fallback */
        background: url(images/Background_Cover.PNG) center/cover no-repeat;
    }

    .navbar__menu.active {
        display: flex;
    }

    .navbar__item {
        width: 100%;
        text-align: center;
        height: auto;
    }

    .navbar__links {
        padding: 2rem;
        width: 100%;
        display: table;
    }

    .navbar__toggle .bar {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px auto;
        background: #fff;
        transition: all 0.3s ease-in-out;
    }

    button#mobile-menu {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
    }

    #mobile-menu.is-active .bar:nth-child(2) {
        opacity: 0;
    }

    #mobile-menu.is-active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    #mobile-menu.is-active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 2.5rem;
    }
}

/* ---------------- VIDEO GRID STYLES ---------------- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.video-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
}

/* ---------------- LIGHTBOX MODAL (Art Gallery) ---------------- */
.lightbox-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 2000;
    /* Above navbar */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    /* Very dark background */
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    border: 2px solid #333;
    border-radius: 4px;
}

.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    user-select: none;
}

.lightbox-close:hover {
    color: #ffb19f;
}

/* Prevent scrolling when lightbox is open */
body.modal-open {
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---------------- CARD NAVIGATION STYLES (for ODL) ---------------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    justify-content: center;
    padding: 40px 0;
}

.card {
    background: #1e1e1e;
    border-radius: 16px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.card-image-container {
    width: 100%;
    height: 250px;
    /* Fixed height for consistency */
    overflow: hidden;
}

.card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-image-container img {
    transform: scale(1.1);
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.card-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 10px;
    background-image: linear-gradient(to right, #ff2d08, #ffb19f);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---------------- ANIMATIONS PAGE "STREAM" LAYOUT ---------------- */
.video-stream {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 100px;
    /* Space for the arrow between videos */
    padding: 60px 0 100px;
}

.video-stream .video-wrapper {
    width: 100%;
    max-width: 1300px;
    /* Cinematic width */
    opacity: 0.3;
    /* Dimmed when not focused */
    transition: opacity 0.5s ease, transform 0.5s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    z-index: 1;
    position: relative;
    padding-bottom: 56.25%;
    /* Reverted to 16:9 Aspect Ratio */
    height: 0;
    overflow: visible;
    /* Allow arrow to show */
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

/* Focused State (Centered) */
.video-stream .video-wrapper.visible {
    opacity: 1;
    transform: scale(1);
}

/* ---------------- SCROLL ARROW (Between Videos) ---------------- */
.scroll-arrow {
    position: absolute;
    bottom: -70px;
    /* Positioned between this video and the next */
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    color: #ffb19f;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: arrow-bounce-vertical 2s infinite;
    cursor: pointer;
    z-index: 100;
    pointer-events: auto;
    user-select: none;
}

/* Only show arrow when the user is actively scrolling */
body.user-is-scrolling .scroll-arrow {
    opacity: 0.8;
}

/* Also show/stay visible on hover */
.scroll-arrow:hover {
    opacity: 1 !important;
}

@keyframes arrow-bounce-vertical {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ---------------- VIDEO DOT INDICATOR (Animations Page) ---------------- */
.video-dot-nav {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 900;
    opacity: 1;
    /* Always visible so users know more videos exist */
    transition: opacity 0.4s ease;
}


.video-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ffb19f;
    opacity: 0.2;
    /* Inactive state */
    transition: opacity 0.4s ease, transform 0.4s ease;
    cursor: pointer;
}

/* Active dot: outline only (hollow), fully visible */
.video-dot.active {
    opacity: 1;
    background-color: transparent;
    border: 2px solid #ffb19f;
    transform: scale(1.3);
}

/* ---------------- GROVE CENTER BRAND OVERRIDES ---------------- */
/* Page title on the Grove Center page uses their brand green instead of the red gradient */
.grove-center-page .page-title {
    background-image: none;
    -webkit-text-fill-color: #4a7729;
    color: #4a7729;
}

/* Card titles (Demos, 3D Models, Animations cards) */
.grove-center-page .card-title {
    background-image: none;
    -webkit-text-fill-color: #4a7729;
    color: #4a7729;
}

/* Section headings (Videos, Animated Concepts, etc.) */
.grove-center-page h2 {
    color: #4a7729 !important;
}