/*
Theme Name: Muses & Prophets Magazine
Theme URI: http://musesandprophets.com/
Author: Giyon labs
Version: 3.3 - Editorial Premium (Mobile Optimized)
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Space+Mono&display=swap');

:root {
    --bg-color: #F9F9F7; 
    --text-color: #0A0A0A; 
    --accent-color: #9B7635; 
    --border-color: rgba(10, 10, 10, 0.12); 
    --mono-font: 'Space Mono', monospace;
    --serif-font: 'Cormorant Garamond', serif;
}

/* --- RESET & BASICS --- */
* { box-sizing: border-box; margin: 0; padding: 0; cursor: none; }

body {
    background-color: var(--bg-color); 
    color: var(--text-color);
    font-family: var(--serif-font); 
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a, button { text-decoration: none; color: inherit; cursor: none; outline: none; }
.mono { font-family: var(--mono-font); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; }
.italic { font-style: italic; }

/* --- PREMIUM BLEND-MODE CURSOR --- */
.cursor-dot, .cursor-outline { 
    position: fixed; top: 0; left: 0; border-radius: 50%; z-index: 9999; 
    pointer-events: none; transform: translate3d(-50%, -50%, 0); 
    will-change: transform; 
    mix-blend-mode: difference; 
}
.cursor-dot { width: 6px; height: 6px; background-color: #fff; margin: -3px 0 0 -3px; }
.cursor-outline { width: 45px; height: 45px; border: 1px solid rgba(255,255,255,0.5); transition: transform 0.15s ease-out, width 0.2s, height 0.2s; margin: -22.5px 0 0 -22.5px; }
a:hover ~ .cursor-outline, button:hover ~ .cursor-outline { width: 60px; height: 60px; border-color: #fff; margin: -30px 0 0 -30px; }

/* --- NAVIGATION --- */
nav { display: flex; justify-content: space-between; align-items: center; padding: 2rem 2.5rem; border-bottom: 1px solid var(--border-color); }
.nav-links { display: flex; gap: 2.5rem; flex-wrap: wrap; justify-content: center; align-items: center;}
.filter-btn { background: transparent; border: none; font-family: var(--mono-font); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-color); position: relative; padding-bottom: 4px; transition: color 0.4s ease; display: inline-block; }
.filter-btn::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0%; height: 1px; background: var(--text-color); transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1); }
.filter-btn:hover::after, .filter-btn.active::after { width: 100%; }
.filter-btn.active { color: var(--accent-color); }

/* --- HEADER & TICKER --- */
header { 
    padding: 2.5rem 2rem 0rem 2rem; /* Reduced top padding from 5rem to 2.5rem */
    text-align: center; 
    border-bottom: 1px solid var(--border-color); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}
header h1 { 
    font-size: clamp(3.5rem, 10vw, 11rem); 
    font-weight: 300; 
    line-height: 0.8; 
    letter-spacing: -0.04em; 
    text-transform: uppercase; 
    margin-bottom: 0.5rem; 
}
.header-sub { 
    margin-top: 0; 
    margin-bottom: 1.5rem; /* Reduced bottom gap from 4rem to 1.5rem */
    color: var(--accent-color); 
    font-weight: 500; 
}

.ticker-wrap {
    width: calc(100% + 4rem); margin-left: 0; 
    overflow: hidden; background: var(--text-color); color: var(--bg-color);
    padding: 14px 0; border-top: 1px solid var(--border-color);
}
.ticker { display: flex; white-space: nowrap; animation: marquee 25s linear infinite; }
.ticker-item { font-family: var(--mono-font); font-size: 0.75rem; text-transform: uppercase; padding: 0 40px; letter-spacing: 0.2em; opacity: 0.9; }

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- BULLETPROOF GRID SYSTEM --- */
.grid-container { 
    display: grid; 
    grid-template-columns: repeat(12, 1fr); 
    width: 100%; 
}

/* --- TOP SPLIT SECTION & SIDEBAR (DESKTOP) --- */
.top-section-wrapper {
    grid-column: span 12;
    display: grid;
    grid-template-columns: 2fr 1fr; 
    border-bottom: 1px solid var(--border-color);
}

.featured-card-split {
    display: flex; flex-direction: column; padding: 5rem 4rem;
    border-right: 1px solid var(--border-color); position: relative;
    transition: background-color 0.5s ease;
}
.featured-card-split:hover { background-color: #FFFFFF; }
.featured-card-split .img-wrapper { height: auto; max-height: 500px; margin-bottom: 3rem; }
.featured-card-split .card-title { font-size: clamp(2.5rem, 4vw, 3.5rem); font-weight: 400; line-height: 1.1; margin-bottom: 1.5rem; letter-spacing: -0.02em; }
.featured-card-split .card-excerpt { font-size: 1.2rem; font-style: italic; color: #444; margin-bottom: 2rem; line-height: 1.6; }

.card-meta-bottom { display: flex; align-items: center; gap: 2rem; margin-top: auto; font-size: 0.8rem; }
.card-meta-bottom .badge { border: 1px solid var(--text-color); padding: 5px 15px; border-radius: 20px; }

/* Magazine Sidebar */
.print-magazine-sidebar { padding: 2rem 4rem 5rem 4rem; display: flex; flex-direction: column; justify-content: flex-start; }
.print-magazine-sidebar .print-label { font-weight: 700; margin-bottom: 1.5rem; font-size: 1rem; letter-spacing: 0.1em; }
.print-magazine-sidebar .print-cover { box-shadow: 0 15px 40px rgba(0,0,0,0.1); transition: transform 0.4s ease; margin-bottom: 2.5rem; width: 100%; height: auto; }
.print-magazine-sidebar .print-cover:hover { transform: translateY(-8px); }
.btn-buy-sidebar { display: block; width: 100%; background-color: #000; color: #fff; text-align: center; padding: 1.2rem; font-weight: 500; letter-spacing: 0.1em; transition: background 0.3s ease; }
.btn-buy-sidebar:hover { background-color: #333; }

/* --- STANDARD CARDS (PERFECT 3-COLUMN) --- */
.card { 
    display: flex; flex-direction: column; padding: 3rem; 
    border-right: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); 
    transition: background-color 0.5s ease; 
    min-width: 0; 
    position: relative;
}
.card:hover { background-color: #FFFFFF; } 

.third-card { grid-column: span 4; } 
.third-card:nth-child(3n) { border-right: none; } 

/* --- IMAGES & HOVER EFFECTS --- */
.img-wrapper { width: 100%; height: 350px; overflow: hidden; margin-bottom: 2rem; background: #EAEAEA; }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1); }
.card:hover .card-img { transform: scale(1.05); }

/* --- CARD TEXT --- */
.card-meta { display: flex; justify-content: space-between; margin-bottom: 1.5rem; opacity: 0.7; }
.card-title { font-size: clamp(1.8rem, 2.5vw, 2.2rem); font-weight: 400; line-height: 1.1; margin-bottom: 1.5rem; transition: color 0.3s ease; }
.card-excerpt { font-family: var(--mono-font); font-size: 0.8rem; line-height: 1.6; color: #666; margin-top: auto; }

/* =========================================
   NEW FOOTER SECTIONS
   ========================================= */

/* Archive Bridge */
.archive-bridge { text-align: center; padding: 5rem 20px; }
.archive-bridge .btn-outline { display: inline-block; padding: 1.2rem 2.5rem; border: 1px solid var(--text-color); color: var(--text-color); letter-spacing: 0.05em; transition: all 0.3s ease; }
.archive-bridge .btn-outline:hover { background: var(--text-color); color: var(--bg-color); }

/* Centered Dark Footer */
.black-footer { background-color: #000; color: #fff; padding-top: 1rem; overflow: hidden; }
.black-footer *, .newsletter-form-dark * { cursor: auto; } 

.footer-ticker-wrap { width: 100%; overflow: hidden; white-space: nowrap; border-bottom: 1px solid #333; padding-bottom: 1.5rem; padding-top: 0.5rem; }
.footer-ticker { display: inline-block; animation: scrollTicker 30s linear infinite; }
.footer-ticker span { font-weight: 700; font-size: 1.2rem; margin-right: 2rem; }

.footer-main-grid-centered { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; padding: 6rem 5%; align-items: center; }
.footer-brand h1 { font-size: clamp(3rem, 6vw, 5rem); line-height: 1.1; margin: 0; font-weight: 400; font-family: var(--serif-font); }
.newsletter-form-dark { display: flex; width: 100%; max-width: 450px; }
.newsletter-form-dark input { flex: 1; padding: 1.2rem; border: none; outline: none; font-family: var(--serif-font); font-size: 1.2rem; }
.newsletter-form-dark button { background: #fff; color: #000; border: none; padding: 0 2rem; font-family: var(--mono-font); font-size: 0.8rem; text-transform: uppercase; cursor: pointer; letter-spacing: 0.05em; }

/* Bottom Lines */
.footer-bottom-lines { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2rem; padding: 0 5% 1.5rem 5%; }
.footer-bottom-lines hr { border: 0; border-top: 1px solid #333; width: 100%; }

/* Footer Social Links */
.footer-socials { display: flex; justify-content: space-between; padding: 0 5% 4rem 5%; font-size: 0.75rem; color: #fff; opacity: 0.6; }
.footer-socials a { transition: opacity 0.3s ease, color 0.3s ease; text-decoration: none; }
.footer-socials a:hover { opacity: 1; color: var(--accent-color); }

/* =========================================
   RESPONSIVE ADJUSTMENTS (MOBILE & TABLET)
   ========================================= */

@media (max-width: 1024px) {
    /* Tablet fixes */
    .top-section-wrapper { grid-template-columns: 1fr; }
    .featured-card-split { border-right: none; border-bottom: 1px solid var(--border-color); padding: 4rem 2rem; }
    .print-magazine-sidebar { padding: 4rem 2rem; align-items: center; text-align: center; }
    .print-magazine-sidebar .print-cover { max-width: 400px; }
    .footer-main-grid-centered { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .footer-subscribe { justify-content: center; margin: 0 auto; }
    
    /* Make the 3-column grid a 2-column grid on tablets */
    .third-card { grid-column: span 6; }
    /* Fix border patterns for 2 columns */
    .third-card:nth-child(3n) { border-right: 1px solid var(--border-color); }
    .third-card:nth-child(even) { border-right: none; }
}

@media (max-width: 768px) {
    /* 1. Fix the Squishing (Forces a single vertical column) */
    .grid-container { display: flex; flex-direction: column; width: 100%; }
    .card, .third-card, .featured-card-split { 
        width: 100% !important; 
        border-right: none !important; 
        padding: 3rem 1.5rem; 
    }
    .img-wrapper { height: auto; min-height: 250px; }
    .card-meta-bottom { flex-wrap: wrap; gap: 1rem; }

    /* 2. The Magazine "Drop to Bottom" Magic */
    .top-section-wrapper { display: contents; } /* Visually un-groups the top section */
    
    .featured-card-split { order: 1; } /* Keeps Featured Article at top */
    .third-card { order: 2; }          /* Keeps regular articles in the middle */
    
    .print-magazine-sidebar {
        order: 3; /* Forces the Magazine to the absolute bottom! */
        width: 100%;
        padding: 4rem 1.5rem;
        border-top: 1px solid var(--border-color);
    }

    /* Nav Mobile Fixes */
    nav { flex-direction: column; gap: 1rem; padding: 1.5rem; text-align: center; }
    .nav-links { justify-content: center; }

    /* Header Mobile Fixes */
    header { padding-top: 3rem; }
    .ticker-item { font-size: 0.65rem; }

    /* Footer Mobile Fixes */
    .footer-bottom-lines { grid-template-columns: 1fr; gap: 1rem; }
    .footer-socials { flex-direction: column; align-items: center; gap: 1rem; padding-bottom: 3rem; }
}