
html {
    scroll-behavior: smooth; /* Ensure smooth scrolling is enabled */
    scroll-padding-top: 60px; /* Matches the header height */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Spectral', Arial, sans-serif;
    line-height: 1.6;
    background: #000000;
    color: #F5F5F5;
}

/* Header (appears on scroll) */
.header {
    position: fixed;
    top: -90px;
    left: 0;
    width: 100%;
    height: 90px;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    transition: top 0.3s, opacity 0.3s;
    z-index: 30;
}

.header.active {
    top: 0;
}

.header.hidden {
    opacity: 0;
    pointer-events: none;
}

.header-logo {
    width: 117px;
    height: auto;
}

/* Menu Toggle (Animated SVG) */
.menu-toggle {
    position: fixed;
    top: 30px;
    right: 20px;
    cursor: pointer;
    z-index: 40;
}

.ham {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 400ms;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.hamRotate.active {
    transform: rotate(45deg);
}

.line {
    fill: none;
    transition: stroke-dasharray 400ms, stroke-dashoffset 400ms;
    stroke: #F5F5F5;
    stroke-width: 5.5;
    stroke-linecap: round;
}

.ham1 .top {
    stroke-dasharray: 40 139;
}

.ham1 .bottom {
    stroke-dasharray: 40 180;
}

.ham1.active .top {
    stroke-dashoffset: -98px;
}

.ham1.active .bottom {
    stroke-dashoffset: -138px;
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
}

#webgl-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.logo-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10%;
    z-index: 1; /* Ensure logo is above WebGL background but below menu */
}

.hero-logo {
    width: 450px;
    height: auto;
}

/* Full Screen Menu */
.nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #862f0d; /* Nav Menu Color */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s; /* Fade-off delay */
    z-index: 10; /* Ensure menu is above logo and WebGL background */
}

.nav-menu.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear 0s; /* Fade-on immediate */
}

.nav-menu .nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.nav-menu a {
    color: #F5F5F5;
    text-decoration: none;
    font-size: 24px;
    margin: 20px 0;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #CCCCCC;
}

/* Menu Footer (Logo and Social Links) */
.nav-menu .menu-footer {
    text-align: center;
    padding-bottom: 40px;
}

.nav-menu .menu-logo {
    width: 200px;
    height: auto;
    margin-bottom: 20px;
}

.nav-menu .social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.nav-menu .social-icon {
    color: #F5F5F5;
    font-size: 24px;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu .social-icon:hover {
    color: #CCCCCC;
}

/* Section Heading */
.section-heading {
    width: 100%;
    text-align: center;
    margin-bottom: 30px;
}

.section-heading h2 {
    font-size: 28px;
}
.big-type {
    font-size: 32px;
}

/* Content Section (Motion Pictures / SXSW) */
.content {
    padding: 50px 20px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}

/* Reverse the order of poster and text on desktop for sections with .content--reverse */
.content--reverse {
    flex-direction: row-reverse;
}

.poster {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.poster img {
    width: auto;
    height: auto;
    display: block;
    max-width: 500px;
    max-height: 750px;
    object-fit: cover;
}

.text-box {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 750px;
    max-width: 500px; /* Constrain the width to prevent overlap */
    margin: 0 auto; /* Center the text-box within its flex space */
}

.text-box h2 {
    text-align: center;
    font-size: 22px;
    line-height: 1.5;
    margin-bottom: 20px;
    width: 100%; /* Ensure the text takes the full constrained width */
}

.text-box .sxsw-logo {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Our Mission Section */
.about {
    padding: 50px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.about-content {
    text-align: center;
}

.about-content p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 40px;
}

/* Parallax Box */
.parallax-box {
    position: relative;
    width: 100%;
    max-width: 1300px;
    height: 500px;
    margin: 0 auto;
    overflow: hidden;
    background: #000000; /* Background color for the tunnel */
}

/* Infinite Tunnel (CSS Animation) */
.tunnel-scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    perspective: 1200px; /* Increased for deeper effect */
}

.tunnel-wrapper {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transform: rotateY(0deg) translateZ(300px);
}

.tunnel {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    transform-style: preserve-3d;
}

.frame {
    width: 100%;
    height: 100%;
    border: 2px solid #0032c6; /* Darker blue to match landscape geometry */
    box-shadow: 0 0 5px #0032c6, 0 0 10px #0032c6; /* Glow effect */
    position: absolute;
    transform-style: preserve-3d;
    animation: move 30s infinite linear;
    animation-delay: calc(1s * var(--i) - 30s); /* 30s / 30 frames = 1s per frame */
}

@keyframes move {
    0% {
        transform: translateZ(-3000px) scale(0.1); /* Start far away, small */
        opacity: 0; /* Fully invisible at the far end */
    }
    20% {
        transform: translateZ(-3000px) scale(0.1); /* Hold at far end to fade in */
        opacity: 0.3; /* Fade in */
    }
    100% {
        transform: translateZ(0) scale(1); /* Move to the front, full size */
        opacity: 0.7; /* Fully visible at the front */
    }
}

.parallax-box h3 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #F5F5F5;
    font-size: 28px;
    line-height: 1.4;
    text-align: center;
    width: 80%;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    z-index: 1;
}

/* Contact Section */
.contact {
    padding: 50px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-text {
    text-align: center;
}

.contact-text p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 40px;
}

.contact-addresses {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

.address {
    flex: 1;
    min-width: 300px;
    padding: 20px;
}

.address h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.address p {
    font-size: 18px;
    line-height: 1.8;
}

/* Subpage Logo */
.subpage-logo {
    text-align: center;
    padding: 50px 20px; /* Matches .about and .contact padding */
}

.subpage-logo .logo {
    width: 200px; /* Matches .menu-logo size */
    height: auto;
}

/* Subpage Content */
.subpage-content {
    padding: 50px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}

.subpage-content .headline {
    font-size: 32px; /* Slightly larger for main heading */
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase; /* Matches A24's uppercase style */
}

.subpage-content .big-type {
    font-size: 26px; /* Slightly larger to match A24's section headings */
    font-weight: 700;
    margin-top: 50px; /* Increased for more separation */
    margin-bottom: 25px; /* Slightly increased for better spacing */
}

.subpage-content p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 30px;
}

/* For paragraphs that need tighter spacing (e.g., "Effective Date") */
.subpage-content p.tight {
    margin-bottom: 10px;
}

/* Style for unordered lists */
.subpage-content ul {
    list-style: none;
    padding-left: 20px;
    margin-bottom: 30px;
}

.subpage-content li {
    position: relative;
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 15px;
    padding-left: 20px;
}

.subpage-content li:before {
    content: "•";
    position: absolute;
    left: 0;
    font-size: 24px;
    line-height: 1;
    color: #F5F5F5;
}

/* Subpage Hyperlinks */
.subpage-content a {
    color: #66e0ff; /* Base color: cyan, matches footer links */
    text-decoration: none; /* No underline */
    transition: color 0.3s;
}

.subpage-content a:hover,
.subpage-content a:focus {
    color: #99e6ff; /* Subtle cyan blue on hover/focus, matches footer links */
    text-decoration: none; /* No underline on hover/focus */
}


/* Footer */
.footer {
    background: #1A1A1A;
    color: #F5F5F5;
    text-align: center;
    padding: 20px;
    font-size: 14px;
}


/* Footer Hyperlinks */
.footer a {
    color: #66e0ff; /* Base color: cyan */
    text-decoration: none; /* No underline */
    transition: color 0.3s;
}

.footer a:hover,
.footer a:focus {
    color: #99e6ff; /* Subtle cyan blue on hover/focus */
    text-decoration: none; /* No underline on hover/focus */
}

/* Body Content Hyperlinks */
.content a,
.text-box a,
.about a,
.contact a {
    color: #66e0ff; /* Base color: cyan, matching the body text color */
    text-decoration: none; /* No underline */
    transition: color 0.3s;
}

.content a:hover,
.content a:focus,
.text-box a:hover,
.text-box a:focus,
.about a:hover,
.about a:focus,
.contact a:hover,
.contact a:focus {
    color: #99e6ff; /* Subtle cyan blue on hover/focus, matching the footer links */
    text-decoration: none; /* No underline on hover/focus */
}

/* Responsive Design */
@media (max-width: 768px) {
    .content {
        flex-direction: column;
        padding: 50px 45px; /* Updated padding to 50px 45px */
    }

    /* 1. Increase Padding for Hero Logo on Mobile */
    .logo-container {
        padding-top: 140px; /* Increased to 140px */
    }

    .hero-logo {
        width: 250px; /* Reduced from 300px to 250px */
        height: auto;
    }

    /* 2. Increase Header Logo Width to 140px on Mobile */
    .header-logo {
        width: 140px; /* Increased from 86px to 140px */
        height: auto;
    }

    /* 3. Center SXSW Poster Image on Mobile */
    .poster img {
        max-width: 300px;
        max-height: 450px;
        margin: 0 auto; /* Center the image */
    }

    /* Previous Mobile Tweaks */
    .menu-toggle svg {
        width: 48px; /* Increased from 36px to 48px */
    }

    .parallax-box h3 {
        font-size: 19px; /* Decreased from 20px to 19px */
        width: 90%;
    }

    .content {
        flex-direction: column;
    }
    .poster img {
        max-width: 300px;
        max-height: 450px;
    }
    .text-box {
        min-height: 450px;
    }
    .text-box h2 {
        font-size: 18px;
    }
    .text-box .sxsw-logo {
        max-width: 150px;
    }
    .contact-addresses {
        flex-direction: column;
    }
    .nav-menu a {
        font-size: 20px;
        margin: 15px 0;
    }
    .nav-menu .menu-logo {
        width: 150px;
    }
    .nav-menu .social-icon {
        font-size: 20px;
    }
    .nav-menu .menu-footer {
        padding-bottom: 30px;
    }
    .parallax-box {
        height: 300px;
    }

/* Responsive Design for Subpages */
@media (max-width: 768px) {
    .subpage-logo {
        padding: 30px 0;
    }

    .subpage-logo .logo {
        width: 150px; /* Matches .menu-logo on mobile */
    }

    .subpage-content {
        padding: 50px 45px; /* Matches .content on mobile */
    }

    .subpage-content .headline {
        font-size: 28px; /* Slightly smaller for mobile */
    }

    .subpage-content .big-type {
        font-size: 22px; /* Slightly smaller for mobile */
        margin-top: 40px; /* Slightly reduced for mobile */
        margin-bottom: 20px;
    }

    .subpage-content p {
        font-size: 16px; /* Slightly smaller for mobile */
    }

    .subpage-content li {
        font-size: 16px;
    }
}