/* Local Fonts */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('../fonts/playfair-display-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Playfair Display';
    src: url('../fonts/playfair-display-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('../fonts/outfit-300.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    src: url('../fonts/outfit-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    src: url('../fonts/outfit-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    src: url('../fonts/outfit-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    src: url('../fonts/outfit-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Color Palette */
    --primary: #00584c;
    --primary-light: #007a6a;
    --bg: #fffcf9;   /* Warmer, cleaner white */
    --bg-dark: #f9f4ee; /* Soft sand instead of grey-beige */
    --accent: #d4af37;
    --accent-hover: #b8972e;
    --text: #1a1a1a;
    --text-muted: #4a4a4a;
    --white: #ffffff;
    
    /* Effects */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Layout */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
}

/* Glassmorphism utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

/* Soft UI utility */
.soft-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 15px 15px 40px rgba(0, 0, 0, 0.05),
                -15px -15px 40px rgba(255, 255, 255, 0.8);
    padding: 2rem;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.02);
}

.soft-card:hover {
    transform: translateY(-5px);
    box-shadow: 25px 25px 70px #c3c1b6,
                -25px -25px 70px #ffffff;
}

/* Layout Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 5rem 0;
}

#mission {
    padding: 10rem 0;
    background-color: var(--bg);
    position: relative;
    overflow: hidden;
}

/* Background detail */
#mission::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 10% 20%, rgba(0, 88, 76, 0.03) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(212, 175, 55, 0.03) 0%, transparent 40%);
    pointer-events: none;
}

.mission-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.tagline {
    display: inline-block;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

#mission h2 {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    color: var(--primary);
    line-height: 1.1;
}

.mission-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--accent), transparent);
    margin: 0 auto 3rem;
}

.mission-lead {
    font-size: 1.4rem;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 2rem;
    font-weight: 400;
}

.mission-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
}

/* Scroll Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section Alternatives */
.section-alt {
    background-color: var(--bg-dark);
    padding: 10rem 0;
}

/* Reenactment Section */
.reenactment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.reenactment-text {
    text-align: left;
}

.reenactment-text h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.reenactment-image {
    position: relative;
}

.image-frame {
    position: relative;
    padding: 1rem;
    background: var(--white);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}

.image-frame::after {
    content: '';
    position: absolute;
    top: -15px;
    right: -15px;
    width: 100px;
    height: 100px;
    border-top: 4px solid var(--accent);
    border-right: 4px solid var(--accent);
    border-radius: 0 24px 0 0;
    pointer-events: none;
}

.image-frame img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    display: block;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: 'Outfit', sans-serif;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background-color: var(--accent);
    color: var(--white);
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(0,0,0,0.15);
}

.btn-outline:hover {
    background: rgba(0,0,0,0.05);
    transform: translateY(-1px);
}

/* Navigation */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: var(--shadow-sm);
}

#main-nav.scrolled {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    height: 70px;
    box-shadow: var(--shadow-sm);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

#main-nav .logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: #00584c !important;
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: color 0.4s ease, transform 0.3s ease;
}

#main-nav.scrolled .logo {
    color: #00584c !important;
}

.nav-links {
    display: flex;
    gap: 2.2rem;
    list-style: none;
    align-items: center;
}

#main-nav .nav-links a {
    text-decoration: none;
    color: #1a1a1a !important;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.4s ease;
    position: relative;
    padding: 0.5rem 0;
}

#main-nav .nav-links a.btn {
    color: #ffffff !important;
}

#main-nav .nav-links a.btn:hover {
    color: #ffffff !important;
}

#main-nav.scrolled .nav-links a {
    color: #1a1a1a !important;
}

#main-nav .nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #00584c;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s ease;
}

#main-nav.scrolled .nav-links a::after {
    background-color: #00584c;
}

#main-nav .nav-links a:hover {
    color: #00584c !important;
}

#main-nav.scrolled .nav-links a:hover {
    color: #00584c !important;
}

#main-nav .nav-links a.active {
    color: #00584c !important;
    font-weight: 700;
}

#main-nav.scrolled .nav-links a.active {
    color: #00584c !important;
}

#main-nav .nav-links a:hover::after,
#main-nav .nav-links a.active::after {
    width: 100%;
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1010;
}

.mobile-menu-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background-color: #1a1a1a;
    transition: var(--transition);
    border-radius: 2px;
}

nav.scrolled .mobile-menu-toggle span {
    background-color: #1a1a1a;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    color: var(--white);
    text-align: center;
    overflow: hidden;
    position: relative;
    background-color: var(--primary); /* Fallback */
}

.video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw; /* 16:9 aspect ratio */
    min-height: 100vh;
    min-width: 177.77vh; /* 16:9 aspect ratio */
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--primary); /* Deep teal fallback */
}

.video-background iframe {
    width: 100%;
    height: 100%;
    border: none;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.video-background.loaded iframe {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 88, 76, 0.75), rgba(0, 88, 76, 0.5));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

/* Video Overlays */
.video-overlay {
    cursor: pointer;
}

.soft-card:hover .video-overlay {
    opacity: 1 !important;
    background: rgba(0, 88, 76, 0.4) !important;
}

.soft-card:hover img {
    transform: scale(1.05);
}

.soft-card img {
    transition: var(--transition);
}

/* Page Heroes (Subpages) */
.page-hero {
    height: 60vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    background-color: var(--primary);
}

.page-hero .video-background {
    width: 100vw;
    height: 56.25vw;
    min-height: 60vh;
    min-width: 106.66vh;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 2rem;
}

/* Cinematic Grid System */
.cinematic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 4rem;
    margin-top: 5rem;
}

.video-card {
    padding: 0;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.video-thumb-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.video-thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-card-content {
    padding: 3rem;
    flex: 1;
}

/* Footer */
footer {
    background-color: var(--text);
    color: var(--bg);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
}

/* Cookie Banner */
#cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    max-width: 500px;
    z-index: 2000;
    padding: 1.5rem;
    display: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

#cookie-banner h4 {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
}

#cookie-banner p {
    font-size: 0.85rem;
    margin: 0.5rem 0 1rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.cookie-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.cookie-buttons .btn {
    padding: 0.45rem 1.2rem;
    font-size: 0.8rem;
}

.cookie-link {
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: underline;
    margin-left: auto;
}

/* YouTube Consent Placeholder */
.youtube-consent-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--white);
    text-align: center;
    padding: 2rem;
    min-height: 200px;
    border-radius: 12px;
}

.youtube-consent-placeholder p {
    font-size: 0.9rem;
    max-width: 400px;
    margin-bottom: 1rem;
    opacity: 0.85;
}

.youtube-consent-placeholder .btn {
    font-size: 0.85rem;
    padding: 0.6rem 1.5rem;
}

/* ==============================
   RESPONSIVE / MOBILE STYLES 
   ============================== */

@media (max-width: 768px) {
    /* Mobile Navigation */
    #main-nav, #main-nav.scrolled {
        height: 80px !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background-color: #ffffff !important;
    }

    #main-nav .logo {
        position: relative;
        z-index: 1010;
    }

    .mobile-menu-toggle {
        display: flex;
        position: relative;
        z-index: 1010;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 100vh;
        background-color: #f9f4ee !important;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 120px; /* Start below the 80px navbar */
        padding-bottom: 2rem;
        gap: 2rem;
        z-index: 1005;
        border-top: none;
        overflow-y: auto;
    }

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

    .nav-links a {
        font-size: 1.5rem !important;
        color: #00584c !important;
        font-weight: 600;
    }

    /* Hero */
    .hero-content h1 {
        font-size: 2.4rem;
    }

    .hero-content p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .cta-group {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    /* Grid adjustments */
    .cinematic-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 3rem;
    }

    .video-card-content {
        padding: 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Cookie Banner */
    #cookie-banner {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }

    /* Section padding */
    section {
        padding: 3rem 0;
    }

    .section-alt {
        padding: 4rem 0;
    }

    #mission {
        padding-top: 5rem;
    }

    .reenactment-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

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

    .reenactment-text .mission-divider {
        margin: 0 auto 2rem auto !important;
    }

    .image-frame::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .container {
        padding: 0 1rem;
    }
}
