/* Import Fonts: Added Noto Serif TC for a modern, elegant look */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;700&family=Noto+Serif+TC:wght@400;700&family=Playfair+Display:wght@400;700&display=swap');

:root {
    --bg-color: #050505;
    --text-color: #f0f0f0;
    --accent-color: #ffffff;
    --secondary-text: #a0a0a0;
    --nav-bg: rgba(5, 5, 5, 0.35);
    --transition-speed: 0.6s;
    /* Font Variables */
    --font-heading: 'Playfair Display', 'Noto Serif TC', serif;
    --font-body: 'Noto Sans TC', sans-serif;
    --overlay-dark: rgba(5, 5, 5, 0.6);
    --font-weight-bold: 700;
    --font-weight-light: 300;
    /* Standardized darkness and transparency */
    --overlay-light: rgba(5, 5, 5, 0.4);
    --nav-bg: rgba(5, 5, 5, 0.2);
    /* Match original JS value for dark mode */
    --transition-speed: 0.4s;

    /* Toggle Button Colors */
    --toggle-text: #a0a0a0;
    --toggle-hover: #ffffff;
}

/* Light Theme Variables */
body.light-theme {
    --bg-color: #f5f5f5;
    /* Light Gray/White Background */
    --text-color: #1a1a1a;
    /* Dark Text */
    --accent-color: #000000;
    /* Black Accent */
    --secondary-text: #555555;
    /* Dark Gray Secondary */
    --nav-bg: rgba(255, 255, 255, 0.85);
    /* Whiter Nav Background */

    --overlay-dark: rgba(255, 255, 255, 0.7);
    /* Light overlay instead of dark */
    --overlay-light: rgba(255, 255, 255, 0.5);

    --toggle-text: #555555;
    --toggle-hover: #000000;
}

body.light-theme .global-parallax {
    filter: invert(1) hue-rotate(180deg) brightness(1.2);
    /* Invert dark background to light */
    opacity: 0.5;
    /* Soften it */
}

body.light-theme .hero-title {
    background: linear-gradient(to bottom, #1a1a1a 0%, #4a4a4a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: none;
    /* Remove dark mode drop shadow or adjust it */
    text-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
}

body.light-theme .hero-verse {
    color: #333333;
}

body.light-theme .cta-button {
    border-color: rgba(0, 0, 0, 0.3);
    color: #1a1a1a;
}

body.light-theme .cta-button:hover {
    background: #000000;
    color: #ffffff;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
}

body.light-theme .mv-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

body.light-theme .mv-card:hover {
    border-color: rgba(0, 0, 0, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

body.light-theme .mv-info h4 {
    color: #000000;
}

body.light-theme .navbar {
    /* Ensure nav text colors update correctly via variables, but force overrides if needed */
}

body.light-theme .nav-logo {
    filter: invert(1);
    opacity: 0.8;
    /* Slightly reduce opacity to match text softness if needed, or keep 1 */
}

/* Navbar Scrolled State */
.navbar.scrolled {
    background: var(--nav-bg);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 1rem 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--bg-color);
    /* Just a fallback color */
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.05em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.mobile-break {
    display: none;
    /* Hidden on desktop */
}

.global-parallax {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* Make the height taller than the screen so there is room to move */
    height: 120vh;
    background-image: url('assets/hero_background.png');
    background-size: cover;
    background-position: center;
    z-index: -1;
    /* Keeps it behind all sections */
    will-change: transform;
    /* Helps with performance */
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem 3rem;
    /* Slightly more padding at the top for a "breathing" look */
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Initial State: Fully Transparent */
    background: transparent;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    border-bottom: 1px solid transparent;

    z-index: 1000;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure the logo is visible against the background image */
.nav-logo {
    height: 40px;
}

/* Nav Left Container (Logo + Socials) */
.nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
    /* Space between logo and icons */
}

/* Social Icons in Navbar */
.nav-socials {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.social-icon {
    width: 20px;
    height: 20px;
    color: var(--secondary-text);
    transition: all 0.3s ease;
    opacity: 0.8;
}

.nav-socials a:hover .social-icon {
    color: var(--accent-color);
    opacity: 1;
    transform: translateY(-2px);
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--toggle-text);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    color: var(--toggle-hover);
    transform: rotate(15deg);
}

.theme-icon {
    width: 20px;
    height: 20px;
}

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

.nav-links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--secondary-text);
}

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

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    /* Background is now handled by body */
    background: transparent;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient fade at bottom to blend into next section smoother */
    background: linear-gradient(to bottom, transparent, var(--overlay-dark));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 2rem;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    /* Responsive font size */
    font-weight: 700;

    /* Use a smaller, manageable spacing */
    letter-spacing: 2rem;
    /* Matches letter-spacing to center */
    text-indent: 2rem;

    text-transform: uppercase;
    margin-bottom: 1rem;
    display: block;
    width: 100%;
    text-align: center;

    /* Visuals */
    background: linear-gradient(to bottom, #ffffff 0%, #d1d1d1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0px 4px 15px rgba(0, 0, 0, 0.4));

    opacity: 0;
    animation: fadeInUp 1.2s ease forwards 0.5s;
}

.hero-subtitle {
    font-size: 1.8rem;
    font-weight: var(--font-weight-light);
    /* Thin weight for contrast */
    letter-spacing: 0.4em;
    /* Very wide spacing for "Echo" theme */
    color: var(--secondary-text);
    margin-bottom: 2.5rem;
    text-transform: uppercase;

    opacity: 0;
    animation: fadeInUp 1.2s ease forwards 0.8s;
}

/* Bible Verse Container */
.hero-verse {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-style: italic;
    /* Italics applied ONLY to the quote now */
    color: #e0e0e0;
    max-width: 700px;
    margin: 0 auto 3.5rem auto;
    line-height: 2;
    opacity: 0;
    animation: fadeInUp 1.2s ease forwards 1.1s;
}

/* Verse Source: Distinct non-italic style */
.verse-source {
    display: block;
    /* Moves source to a new line */
    font-style: normal;
    /* Removes italics from the source */
    font-size: 0.9rem;
    font-family: var(--font-body);
    /* Uses Sans-Serif for a modern contrast */
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 1rem;
    color: var(--secondary-text);
}

.cta-button {
    display: inline-block;
    padding: 1rem 3.5rem;
    /* Wider padding for a more elegant shape */
    border: 1px solid rgba(255, 255, 255, 0.3);
    /* Softer initial border */
    background: transparent;
    color: #ffffff;
    text-transform: uppercase;

    /* Matching the header aesthetic */
    font-size: 0.8rem;
    letter-spacing: 0.4em;
    text-indent: 0.4em;
    /* Centering fix for letter-spacing */
    font-weight: 300;

    /* Smooth transition for all properties */
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;

    /* Animation settings */
    opacity: 0;
    animation: fadeInUp 1.2s ease forwards 1.4s;
}

.cta-button:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    letter-spacing: 0.5em;
    /* Slight expansion on hover */
    text-indent: 0.5em;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
    /* Subtle glow */
    transform: translateY(-3px);
    /* Lifts the button slightly */
}

/* Optional: Add a subtle 'shimmer' effect */
.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    transition: all 0.6s;
}

.cta-button:hover::before {
    left: 100%;
}

/* Sections General */
section {
    padding: 6rem 2rem;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
}

/* Mission Section */
.mission-section {
    /* Semi-transparent dark background to reveal image behind */
    background-color: var(--overlay-dark);
}

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

.mission-content h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.mission-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--secondary-text);
}

/* Music Section */
.music-section {
    /* Slightly darker transparency for music section */
    background-color: var(--overlay-dark);
}

/* Streaming Embeds */
.streaming-embeds {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* Prevent stretching to max height */
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

.embed-container {
    flex: 1;
    min-width: 300px;
    max-width: 450px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.embed-container iframe {
    display: block;
    /* Removes bottom whitespace from inline behavior */
    width: 100%;
    border: none;
}

.embed-container:hover {
    transform: translateY(-5px);
}

/* Horizontal Scroll Section */
.horizontal-scroll-section {
    height: 400vh;
    /* Reduced from 300vh for faster scroll */
    position: relative;
    /* Context for sticky */
}

.sticky-wrapper {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    /* No local scrollbars */
    display: flex;
    align-items: center;
    /* Vertically center the track */
}

/* MV Grid: Now acts as the moving track */
.mv-grid {
    display: flex;
    gap: 4rem;
    width: max-content;
    will-change: transform;

    /* Center the first and last items */
    /* Card width is 60vw. Remaining space is 40vw. Half is 20vw. */
    padding-left: 20vw;
    padding-right: 20vw;

    margin-top: 0;
}

/* Hide scrollbar styles are no longer needed for mv-grid itself 
   as it won't scroll internally */

/* MV Card: Glassmorphism Container */
.mv-card {
    width: 60vw;
    /* Fixed width for impact */
    max-width: 60vw;
    /* prevent stretching */
    min-width: 0;
    /* remove min constraint */
    flex: 0 0 auto;
    /* Don't shrink */
    scroll-snap-align: center;
    /* Snap to center */

    white-space: normal;
    /* force text wrap */

    background: rgba(255, 255, 255, 0.03);
    /* Extremely subtle white tint */
    backdrop-filter: blur(12px);
    /* Strong blur to distinguish from background */
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    /* More rounded for a modern look */
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Thin, soft border */
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Hover Effect: Soft Glow & Expansion */
.mv-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.4);
    /* Border brightens on hover */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 255, 255, 0.05);
    /* Internal glow */
}

/* Thumbnail Styling */
.mv-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Info Section Typography */
.mv-info {
    padding: 1.8rem;
}

.mv-info h4 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 0.8rem;
    color: #ffffff;
}

.mv-info p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--secondary-text);
    font-weight: 300;
    letter-spacing: 0.05em;
}

/* Footer & Contact */
.footer {
    padding: 4rem 2rem;
    background-color: var(--overlay-dark);
}

/* Form Container */
.form-container {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    width: 100%;
}

.form-container iframe {
    max-width: 640px;
    width: 100%;
    /* Ensure it doesn't break out on small screens */
    background: transparent;
    border-radius: 12px;
}

/* Footer Social Icons */
.footer-socials {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-icon {
    width: 24px;
    height: 24px;
    color: var(--secondary-text);
    transition: all 0.3s ease;
    opacity: 0.8;
}

.footer-socials a:hover .footer-icon {
    color: var(--accent-color);
    opacity: 1;
    transform: translateY(-3px) scale(1.1);
}

.copyright {
    color: var(--secondary-text);
    font-size: 0.8rem;
    margin-top: 1rem;
    text-align: center;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease;
}

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

/* Responsive */
@media (max-width: 768px) {

    .mobile-break {
        display: block;
        /* Forces the line break on mobile */
        margin-bottom: 0.5rem;
        /* Optional: Adds a little space between the lines */
    }

    .navbar {
        padding: 1rem 1rem;
        /* Reduce padding */
        flex-direction: row;
        /* Keep in row */
        flex-wrap: nowrap;
        /* Prevent wrapping */
        justify-content: space-between;
        gap: 0.5rem;
        /* Minimize gap */
    }

    .nav-left {
        gap: 0.8rem;
        /* Reduce gap between logo and socials */
    }

    .logo-container {
        flex-shrink: 0;
    }

    .nav-logo {
        height: 32px;
        /* Slightly smaller logo */
    }

    .nav-socials {
        display: none;
        /* Hide social icons on mobile to save space if needed, OR keep them but make them smaller. User said "icons and buttons separated into 2 lines", so space is tight. Let's keep them but small first. */
        gap: 0.8rem;
    }

    /* Re-enabling nav-socials for now but controlling size */
    .nav-socials {
        display: flex;
    }

    .social-icon {
        width: 18px;
        height: 18px;
    }

    .nav-links {
        display: flex;
        gap: 0.8rem;
        background: transparent;
        /* Ensure no weird background */
    }

    .nav-links a {
        font-size: 0.75rem;
        /* legible but compact */
        padding: 0.2rem;
    }

    /* MV Scroll - Mobile Native Scroll */
    .horizontal-scroll-section {
        height: auto !important;
        /* Override JS height */
    }

    .sticky-wrapper {
        position: relative;
        /* Remove sticky */
        height: auto;
        overflow: visible;
        top: 0;
    }

    .mv-grid {
        display: flex;
        gap: 1rem;
        width: 100%;
        /* Full width */
        overflow-x: auto;
        /* Enable native scroll */
        scroll-snap-type: x mandatory;
        padding: 0 1rem;
        /* Standard padding */
        margin-top: 0;
        transform: none !important;
        /* Override JS transform */

        /* Hide scrollbar */
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE 10+ */
    }

    .mv-grid::-webkit-scrollbar {
        display: none;
        /* Safari and Chrome */
    }

    .mv-card {
        width: 75vw;
        /* strict width */
        max-width: 75vw;
        /* strict max-width */
        min-width: 0;
        /* Override any min-width */
        flex: 0 0 auto;
        scroll-snap-align: center;
        margin-right: 0;
        white-space: normal;
        /* Ensure text wraps */
    }
}