/*
Theme Name: Afro x Buddha
Theme URI: https://afroxbuddha.com
Author: Afro x Buddha Team
Description: "The Temple Magazine" - Cinema Animation.
Version: 21.0.0
Text Domain: afroxbuddha
*/

/* =========================================
   1. VARIABLES & PALETTE (Temple Magazine)
   ========================================= */
:root {
    /* PALETTE */
    --color-bg: #1A1A1A;
    /* Deep Charcoal (85% Black) */
    --color-text: #F5F5DC;
    /* Warm Cream (Beige) */
    --color-accent: #D4AF37;
    /* Weathered Gold */
    --color-header-bg: rgba(26, 26, 26, 0.85);
    /* Glassmorphism Charcoal */

    --color-card-bg: #222;
    --color-border: rgba(212, 175, 55, 0.3);
    /* Gold Tint */

    /* Typography */
    --font-heading: 'Cinzel', serif;
    --font-body: 'Jost', sans-serif;

    --spacing-container: 1400px;
    --spacing-monastic: 160px;
    /* Monastic Space */
}

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

/* Global Image Safety */
img {
    max-width: 100%;
    height: auto;
    display: block;
    /* Removes bottom gap */
}

html,
body {
    width: 100%;
    min-height: 100%;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    overflow-x: hidden;
    scroll-behavior: smooth;
    line-height: 1.7;
    font-weight: 300;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    color: #fff;
    font-weight: 400;
    letter-spacing: -0.01em;
}

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

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

/* =========================================
   2. GLOBAL TEXTURE (Paper Grain)
   ========================================= */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 500;
}

.container {
    max-width: var(--spacing-container);
    margin: 0 auto;
    padding: 0 3rem;
}

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

.section-monastic {
    padding: var(--spacing-monastic) 0;
}

.btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    border: 1px solid var(--color-text);
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.4s ease;
    background: transparent;
}

.btn-gold {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.btn-gold:hover {
    background: var(--color-accent);
    color: #1A1A1A;
}

/* =========================================
   3. CURTAIN PARALLAX (The Split Effect)
   ========================================= */
.curtain-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 2000;
    pointer-events: none;
}

.curtain-panel {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    /* True Split Logic */
    background-size: 200% 100%;
    background-color: #000;
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
    background-repeat: no-repeat;
}

/* Left Panel: Show Left half of image */
.curtain-left {
    left: 0;
    background-position: 0% 50%;
    border-right: 1px solid rgba(0, 0, 0, 0.5);
}

/* Right Panel: Show Right half of image */
.curtain-right {
    right: 0;
    background-position: 100% 50%;
    border-left: 1px solid rgba(0, 0, 0, 0.5);
}

.curtain-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    pointer-events: none;
}


/* =========================================
   4. HERO: PAPER GRAIN & BUTTON
   ========================================= */
.hero-cinematic {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.6) sepia(0.1);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2005;
    /* Lifted above Curtain (2000) */
    opacity: 0;
    transform: translateY(30px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 2s ease-out, transform 2s ease-out;
}

.hero-title {
    font-size: 5rem;
    margin-bottom: 2rem;
    text-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    color: var(--color-text);
}

.hero-btn {
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    margin-top: 2rem;
    pointer-events: auto;
}

.hero-btn:hover {
    background-color: var(--color-accent);
    color: #000;
}


/* =========================================
   5. TEXTURED MODULES (Journal, Cinema, Shala)
   ========================================= */
.journal-textured,
.video-section,
.shala-sanctuary {
    position: relative;
    background-color: #1A1A1A;
    background-image: url('assets/images/thai-pattern-texture.png');
    background-blend-mode: multiply;
    background-size: 300px;
    background-repeat: repeat;
}

.journal-textured .container,
.video-section .container,
.shala-sanctuary .container {
    position: relative;
    z-index: 2;
}

/* GRID SYSTEM (Symmetrical) */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.masonry-item {
    margin-bottom: 0;
    background: transparent;
}

.journal-thumb {
    width: 100%;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border-radius: 30px;
    /* Rounded Corners */
}

.journal-thumb img {
    width: 100%;
    height: 400px;
    /* Force Symmetry */
    object-fit: cover;
    transition: transform 0.6s;
}

.masonry-item:hover .journal-thumb img {
    transform: scale(1.05);
}

.journal-title {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.journal-title a {
    color: var(--color-text);
    /* Force Cream */
    text-decoration: none;
}

.journal-title a:hover {
    color: var(--color-accent);
}

.journal-date {
    display: block;
    font-size: 0.75rem;
    color: #777;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.read-more-link {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 1px solid var(--color-accent);
    color: var(--color-text);
    text-decoration: none;
}

.read-more-link:hover {
    color: var(--color-accent);
}

.journal-excerpt {
    font-size: 0.95rem;
    color: #bbb;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}


/* =========================================
   6. ASYMMETRIC VIDEO (70/30)
   ========================================= */
.asymmetric-split {
    display: flex;
    align-items: center;
    gap: 5rem;
}

.split-content {
    flex: 0 0 30%;
}

.split-visual {
    flex: 0 0 70%;
}

.eyebrow-text {
    display: block;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.section-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.section-desc {
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.video-wrapper {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    /* Rounded Corners */
}

.video-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s;
}

.video-wrapper:hover .video-bg-img {
    transform: scale(1.03);
}

.video-overlay-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    transition: background 0.4s;
}

.video-overlay-content:hover {
    background: rgba(0, 0, 0, 0.4);
}

.play-icon {
    font-size: 4rem;
    color: #fff;
    opacity: 0.9;
}

/* ANIMATION: Slide In From Left */
.reveal-slide-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-slide-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* =========================================
   7. SHALA SANCTUARY (Immersive)
   ========================================= */
.shala-sanctuary {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 10rem 0;
    overflow: hidden;
}

/* Floating Card */
.shala-bg {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1100px;
    height: 85%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    filter: brightness(0.4);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 40px;
    /* Rounded Corners */
    pointer-events: none;
}

/* WIDENED WRAPPER (700px -> 1200px) */
.shala-content-wrapper {
    position: relative;
    z-index: 5;
    max-width: 1200px;
    /* Essential for 3-column row */
    margin: 0 auto;
}

.shala-title {
    font-size: 4rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.shala-divider-gold {
    width: 80px;
    height: 2px;
    background: var(--color-accent);
    margin: 0 auto 3rem;
}

/* Shala Grid (3 Squares) */
.shala-track-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.shala-card-square {
    width: 280px;
    height: 280px;
    background: rgba(255, 255, 255, 0.05);
    /* Stronger Glass */
    backdrop-filter: blur(15px);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 30px;
    /* Rounded Corners */
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
}

.shala-card-square:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(0, 0, 0, 0.6);
    border-color: var(--color-accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.shala-card-square h3 {
    font-size: 1.4rem;
    margin: 1rem 0 0.5rem;
    color: #fff;
}

.shala-card-square .track-meta {
    font-size: 0.75rem;
    color: #aaa;
    margin-bottom: 1.5rem;
    display: block;
}

.shala-card-square .btn-play-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    border-width: 2px;
}

/* =========================================
   8. MODAL (Join the Inquiry)
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    border: 1px solid var(--color-accent);
    background: #111;
    padding: 4rem;
    max-width: 500px;
    position: relative;
    box-shadow: 0 50px 100px #000;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: #fff;
    background: transparent;
    border: none;
    cursor: pointer;
}


/* HEADER */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 3000;
    /* Stick on top of all */
    background: var(--color-header-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem 0;
    opacity: 0;
    /* JS fades this in */
    transition: opacity 0.5s ease;
}

.site-title {
    font-size: 1.4rem;
    letter-spacing: 1px;
    color: var(--color-text);
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #aaa;
    transition: 0.3s;
}

.main-navigation a:hover {
    color: var(--color-accent);
}

@media (max-width: 900px) {

    /* 1. Global Readability (iPhone Fixes) */
    body {
        font-size: 19px;
        /* Even larger base */
        line-height: 1.8;
        font-weight: 400;
        /* 300 is too thin on Retina/iPhone */
        -webkit-font-smoothing: antialiased;
        /* Sharpen text */
    }

    .container {
        padding: 0 2rem;
    }

    /* Fix 100vh issue on iOS Safari */
    .hero-cinematic,
    .curtain-container {
        height: 100svh;
        /* Small Viewport Height ignores address bar */
        min-height: -webkit-fill-available;
    }

    /* 2. Hero Adjustments */
    .hero-title {
        font-size: 2.8rem;
        padding: 0 1rem;
        line-height: 1.2;
        font-weight: 500;
        /* Bolder header */
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
        /* Stronger shadow */
    }

    .hero-btn {
        margin-top: 1.5rem;
        padding: 1.2rem 2.5rem;
        background-color: rgba(0, 0, 0, 0.6);
        /* Darker backer for contrast */
        font-weight: 500;
    }

    /* 3. Stacked Layouts */
    .asymmetric-split {
        flex-direction: column;
        gap: 3rem;
    }

    .split-content {
        order: 1;
        text-align: center;
        margin-bottom: 2rem;
        /* Add subtle backer for readability over texture */
        background: rgba(0, 0, 0, 0.3);
        padding: 2rem;
        border-radius: 20px;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .split-visual {
        order: 2;
    }

    /* 4. Grid Adjustments */
    .masonry-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    /* 5. Shala Sanctuary Mobile */
    .shala-track-grid {
        flex-direction: column;
        gap: 3rem;
    }

    .shala-card-square {
        width: 100%;
        max-width: 340px;
        background: rgba(26, 26, 26, 0.85);
        /* Darker solid bg, less glass */
    }

    .shala-title {
        font-size: 3rem;
    }

    /* 6. Navigation Mobile */
    .main-navigation ul {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .main-navigation a {
        font-size: 0.9rem;
        font-weight: 500;
        padding: 0.5rem;
    }
}