/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Open+Sans:wght@400;700&display=swap');

/* CSS Variables */
:root {
    --primary-color: #4A90E2;
    --secondary-color: #F5A623;
    --background-color: #0A0A0A;
    --text-color: #FFFFFF;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --section-padding: 100px 0;
    --section-padding-mobile: 60px 0;
    --vignette-color: rgba(0, 0, 0, 0.7);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden; /* Prevent horizontal scrollbar */
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    margin-bottom: 20px;
    line-height: 1.3;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.8rem; }
h3 { font-size: 2rem; }

p {
    margin-bottom: 20px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

.section {
    position: relative;
    padding: var(--section-padding);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh; /* Ensure sections have some height */
}

.section:nth-child(even) { /* Alternating background slightly if needed, but sticking to background-color */ }

.section-header {
    text-align: center;
    margin-bottom: 60px;
    width: 100%;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
}

.section-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    text-align: center;
}

/* Special CSS Effect: Vignette and Fade-in */
.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 60%, var(--vignette-color) 100%);
    opacity: 0;
    transition: opacity 1s ease-out;
    z-index: 1;
}

.section.is-visible::before {
    opacity: 1;
}

.section-content-wrapper, .filmstrip-caption, .digital-window-content {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.section.is-visible .section-content-wrapper,
.section.is-visible .filmstrip-caption,
.section.is-visible .digital-window-content {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Section */
#hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    text-align: center;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: 0;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.brand-name {
    font-size: 4rem;
    margin-bottom: 10px;
    color: var(--text-color);
    text-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.tagline {
    font-size: 1.5rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.4);
}

.cta-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(245, 166, 35, 0.5);
}

/* Navigation */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    transition: background-color 0.3s ease;
}

#main-nav.scrolled {
    background-color: rgba(10, 10, 10, 0.95);
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

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

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 2rem;
    cursor: pointer;
}

/* Filmstrip Cinema Layout */
.filmstrip-cinema-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 90vh; /* Adjust as needed */
}

.filmstrip-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1000px; /* Constrain width for cinematic feel */
    margin: 0 auto;
    position: relative;
    background: linear-gradient(to bottom, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.filmstrip-image-container {
    width: 100%;
    aspect-ratio: 16 / 9; /* Cinematic aspect ratio */
    position: relative;
    overflow: hidden;
}

.filmstrip-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.05); /* Slight zoom for parallax */
    transition: transform 1s ease-out;
}

.section.is-visible .filmstrip-image {
    transform: scale(1);
}

.filmstrip-caption {
    padding: 30px;
    text-align: left;
    width: 100%;
    background-color: rgba(10, 10, 10, 0.8);
    transform: translateY(0); /* Initial position for fade-in */
}

.filmstrip-caption h2.section-title {
    text-align: left;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.filmstrip-caption p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 700px; /* Limit caption width */
    margin: 0 auto 20px auto; /* Center if needed */
}

.journal-cta {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.journal-cta:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
}

/* Peaks of Courage - Featured Expeditions */
#peaks-of-courage .section-header {
    margin-bottom: 0;
}

.filmstrip-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 40px; /* Space for scrollbar */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--background-color);
}

.filmstrip-container::-webkit-scrollbar {
    height: 8px;
}

.filmstrip-container::-webkit-scrollbar-track {
    background: var(--background-color);
}

.filmstrip-container::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 4px;
}

.filmstrip-item {
    flex: 0 0 450px; /* Width of each item */
    scroll-snap-align: start;
    margin-right: 30px;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.1);
    background-color: rgba(255,255,255,0.03);
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.filmstrip-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}

.filmstrip-item-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.filmstrip-item-details {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allow details to fill remaining space */
    justify-content: space-between;
}

.filmstrip-item-details h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.filmstrip-item-details p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.expedition-link {
    display: inline-block;
    margin-top: auto; /* Push to bottom */
    padding: 10px 20px;
    border: 2px solid var(--secondary-color);
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    align-self: flex-start; /* Align link to left */
}

.expedition-link:hover {
    background-color: var(--secondary-color);
    color: var(--background-color);
}

/* Unique UI Element: Framed Digital Window */
.digital-window {
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px;
    margin-top: 20px;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.digital-window-header {
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.digital-window-content {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    opacity: 0; /* Initial state for fade-in */
    transform: translateY(20px); /* Initial state for fade-in */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.digital-window-content p {
    margin-bottom: 8px;
}

.digital-window-content p strong {
    color: var(--text-color);
}

/* Gallery Section */
#gallery-section .section-header {
    margin-bottom: 40px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 16 / 10; /* Slightly wider than 16:9 for variety */
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Unique UI Element: Altitude Dial */
.altitude-dial {
    margin-top: 30px;
    text-align: center;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.altitude-dial-container {
    width: 200px;
    height: 200px;
    border: 5px solid var(--primary-color);
    border-radius: 50%;
    margin: 20px auto;
    position: relative;
    cursor: grab;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0,0,0,0.5);
    box-shadow: 0 0 30px rgba(74, 144, 226, 0.3);
}

.altitude-dial-indicator {
    width: 15px;
    height: 15px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: 0 100%; /* Pivot from bottom center */
    transform: translate(-50%, -50%) rotate(0deg) translateX(75px); /* Start at the right */
    transition: transform 0.1s linear; /* Smoother but can be laggy on drag */
}

.altitude-dial-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    pointer-events: none; /* So drag works */
}

.altitude-dial-value {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    pointer-events: none;
}

.altitude-dial-tip {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 10px;
}

/* Gear & Grit - using filmstrip-cinema-section structure */
#gear-grit .filmstrip-image-container {
    background-image: url('https://images.pexels.com/photos/2601953/pexels-photo-2601953.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
#gear-grit .filmstrip-image {
    opacity: 0; /* Hide the original image, use background */
}

#gear-grit .filmstrip-caption p {
    max-width: 800px;
}


/* Join Expedition - Contact Form */
#join-expedition {
    background-color: rgba(255, 255, 255, 0.02); /* Slightly different background */
    padding: var(--section-padding);
}

#join-expedition .section-title {
    color: var(--primary-color);
}

.contact-form-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: flex-start;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.contact-form-description {
    flex: 1;
    min-width: 300px;
    max-width: 450px;
    text-align: left;
}

.contact-form-description p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
}

#expedition-inquiry-form {
    flex: 1;
    min-width: 350px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.3);
}

.submit-button {
    background-color: var(--secondary-color);
    color: var(--background-color);
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(245, 166, 35, 0.4);
}

.submit-button:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.5);
}

/* Footer */
#footer {
    background-color: var(--background-color);
    padding: 60px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    gap: 30px;
}

.footer-brand {
    flex-basis: 300px; /* Minimum width */
}

.footer-brand h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.footer-brand p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-links, .footer-social {
    flex-basis: 200px; /* Minimum width */
}

.footer-links h3, .footer-social h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-social a {
    display: inline-block;
    margin-right: 20px;
    transition: transform 0.3s ease;
    color: rgba(255, 255, 255, 0.7);
}

.footer-social a:hover {
    transform: scale(1.2);
    color: var(--secondary-color);
}

.footer-social svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }

    .section {
        padding: var(--section-padding-mobile);
    }

    .section-title {
        font-size: 2.2rem;
    }

    #main-nav {
        padding: 15px 20px;
    }

    .nav-logo {
        font-size: 1.5rem;
    }

    .nav-links {
        display: none; /* Hide links on mobile, show hamburger */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(10, 10, 10, 0.95);
        padding: 20px 0;
        box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 10px 20px;
        text-align: center;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .hamburger-menu {
        display: block;
    }

    .hero-content {
        padding: 20px;
    }

    .brand-name {
        font-size: 3rem;
    }

    .tagline {
        font-size: 1.2rem;
    }

    .cta-button {
        padding: 12px 25px;
        font-size: 1rem;
    }

    .filmstrip-frame {
        flex-direction: column;
    }

    .filmstrip-image-container {
        aspect-ratio: 16 / 9; /* Maintain ratio */
    }

    .filmstrip-caption {
        padding: 20px;
    }

    .filmstrip-caption h2.section-title {
        font-size: 2rem;
    }

    .filmstrip-item {
        flex: 0 0 85%; /* Full width on small screens */
        margin-right: 0;
        margin-bottom: 20px;
    }

    .filmstrip-container {
        padding-bottom: 20px;
        flex-wrap: wrap; /* Allow wrapping if needed */
        justify-content: center;
        overflow-x: hidden; /* Remove horizontal scroll */
    }

    .filmstrip-item:last-child {
        margin-bottom: 0;
    }

    .gallery-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
    }

    .contact-form-container {
        flex-direction: column;
        align-items: center;
    }

    .contact-form-description, #expedition-inquiry-form {
        flex-basis: 100%;
        max-width: 450px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .footer-social a {
        margin: 0 10px;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    .brand-name { font-size: 2.5rem; }
    .tagline { font-size: 1rem; }
    .section-title { font-size: 1.8rem; }
    .filmstrip-caption h2.section-title { font-size: 1.6rem; }

    .filmstrip-item-details {
        padding: 15px;
    }

    .filmstrip-item-details h3 {
        font-size: 1.4rem;
    }

    .filmstrip-item-details p {
        font-size: 0.9rem;
    }

    .altitude-dial-container {
        width: 150px;
        height: 150px;
    }
    .altitude-dial-indicator {
        transform-origin: 0 100%;
        transform: translate(-50%, -50%) rotate(0deg) translateX(60px);
    }
}
