/* 3D Marquee Styles */
.marquee-hero-container {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 800px;
    overflow: hidden;
    background-color: #000;
    /* Fallback */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 2rem 2rem;
}

/* Content Overlay */
.marquee-content {
    position: relative;
    z-index: 20;
    text-align: center;
    max-width: 800px;
    padding: 2rem;
    pointer-events: none;
    /* Let clicks pass through to background if needed, but buttons need pointer-events: auto */
}

.marquee-content h2 {
    color: white;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.marquee-highlight {
    position: relative;
    display: inline-block;
    background-color: rgba(59, 130, 246, 0.4);
    /* blue-500/40 */
    padding: 0.25em 0.5em;
    border-radius: 0.75rem;
    color: white;
    text-decoration: underline;
    text-decoration-color: #0ea5e9;
    /* sky-500 */
    text-decoration-thickness: 6px;
    text-underline-offset: 8px;
    backdrop-filter: blur(4px);
}

.marquee-content p {
    color: #e5e5e5;
    /* neutral-200 */
    font-size: 1rem;
    max-width: 42rem;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .marquee-content p {
        font-size: 1.125rem;
    }
}

.marquee-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    pointer-events: auto;
    /* Enable clicks */
}

.btn-sky {
    background-color: #0284c7;
    /* sky-600 */
    color: white;
    padding: 0.625rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
}

.btn-sky:hover {
    background-color: #0369a1;
    /* sky-700 */
}

.btn-glass {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.625rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
    transition: background-color 0.2s;
    cursor: pointer;
}

.btn-glass:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Background Overlay */
.marquee-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.dark .marquee-overlay {
    background: rgba(0, 0, 0, 0.4);
}

/* 3D Marquee Wrapper */
.marquee-3d-wrapper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    /* Adjust perspective origin if needed */
}

.marquee-3d-scene {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    /* Or handled by transform itself? The React code put it on the container */
}

/* The element that is rotated */
.marquee-3d-grid-container {
    width: 1720px;
    /* size-[1720px] */
    height: 1720px;
    flex-shrink: 0;
    /* scale-50 sm:scale-75 lg:scale-100 */
    transform: scale(0.5);
}

@media (min-width: 640px) {
    .marquee-3d-grid-container {
        transform: scale(0.75);
    }
}

@media (min-width: 1024px) {
    .marquee-3d-grid-container {
        transform: scale(1);
    }
}

.marquee-grid {
    position: relative;
    top: 24rem;
    right: 50%;
    width: 100%;
    height: 100%;
    transform-origin: top left;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;

    /* key transform from React code: transform: "rotateX(55deg) rotateY(0deg) rotateZ(-45deg)" */
    transform: rotateX(55deg) rotateY(0deg) rotateZ(-45deg);
    transform-style: preserve-3d;
}

.marquee-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    /* gap-8 */
    /* Animation applied here */
}

.marquee-image-wrapper {
    position: relative;
    width: 100%;
}

.marquee-img {
    width: 100%;
    aspect-ratio: 970/700;
    border-radius: 0.5rem;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(3, 7, 18, 0.05);
    /* ring-gray-950/5 */
    transition: transform 0.3s ease-in-out, box-shadow 0.3s;
}

/* Hover effect might be tricky with pointer-events: none on wrapper, but let's leave it */
.marquee-img:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Animations */
@keyframes marquee-osc-down {
    0% {
        transform: translateY(100px);
    }

    100% {
        transform: translateY(-100px);
    }
}

@keyframes marquee-osc-up {
    0% {
        transform: translateY(-100px);
    }

    100% {
        transform: translateY(100px);
    }
}

.animate-down {
    animation: marquee-osc-down 10s infinite alternate linear;
    /* repeatType: reverse -> alternate */
}

.animate-up {
    animation: marquee-osc-up 15s infinite alternate linear;
}

/* Grid Lines (simplified) */
/* Vertical Line */
.grid-line-vertical {
    position: absolute;
    top: -75px;
    /* offset/2 * -1 */
    left: -1rem;
    /* -left-4 */
    width: 1px;
    height: calc(100% + 150px);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2) 50%, transparent 0, transparent);
    background-size: 1px 5px;
    mask-image: linear-gradient(to top, white 90%, transparent), linear-gradient(to bottom, white 90%, transparent);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    z-index: 30;
}

.dark .grid-line-vertical {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2) 50%, transparent 0, transparent);
    background-size: 1px 5px;
}

/* Horizontal Line */
.grid-line-horizontal {
    position: absolute;
    left: -100px;
    /* offset/2 * -1 */
    top: -1rem;
    /* -top-4 */
    height: 1px;
    width: calc(100% + 200px);
    background: linear-gradient(to right, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2) 50%, transparent 0, transparent);
    background-size: 5px 1px;
    mask-image: linear-gradient(to left, white 90%, transparent), linear-gradient(to right, white 90%, transparent);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    z-index: 30;
}

.dark .grid-line-horizontal {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2) 50%, transparent 0, transparent);
    background-size: 5px 1px;
}