/*
Theme Name: Muses & Prophets Magazine
Theme URI: http://musesandprophets.com/
Author: Giyon labs
Version: 3.1 - Editorial Premium
*/

@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 {
    /* Slightly off-white for a physical 'paper' feel */
    --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; /* Inverts colors underneath */
}
.cursor-dot { width: 6px; height: 6px; background-color: #fff; }
.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; }
/* Expand cursor slightly when hovering over links */
a:hover ~ .cursor-outline, button:hover ~ .cursor-outline { width: 60px; height: 60px; border-color: #fff; }

/* --- 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: 5rem 2rem 0rem 2rem; text-align: center; border-bottom: 1px solid var(--border-color); display: flex; flex-direction: column; align-items: center; }
/* Fluid Typography for main title */
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: 1rem; }
.header-sub { margin-top: 1.5rem; margin-bottom: 4rem; 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%; 
}

/* --- FEATURED CARD (FULL WIDTH) --- */
.featured-card { 
    grid-column: span 12; 
    display: flex; flex-direction: column; align-items: center;
    padding: 6rem 2rem; border-bottom: 1px solid var(--border-color); text-align: center;
    min-width: 0; /* Prevents grid blowout */
}
.featured-card .img-wrapper { 
    width: 100%; max-width: 900px; height: 50vh; min-height: 400px;
    overflow: hidden; margin-bottom: 3rem; 
}
.featured-card .card-title { font-size: clamp(2.5rem, 5vw, 4.5rem); max-width: 900px; margin-bottom: 1.5rem; letter-spacing: -0.02em; }

/* --- STANDARD CARDS (HALF & THIRD) --- */
.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; /* Prevents grid blowout in Firefox */
    position: relative;
}
.card:hover { background-color: #FFFFFF; } /* Brightens slightly on hover */

/* Explicit sizing logic */
.half-card { grid-column: span 6; }
.half-card:nth-child(2n) { border-right: none; }

.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; 
    /* Starts high-contrast B&W */
    filter: grayscale(100%) contrast(1.1); 
    transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1), filter 0.8s ease; 
}
.card:hover .card-img { 
    transform: scale(1.05); 
    /* Blooms into color on hover */
    filter: grayscale(0%) contrast(1); 
}

/* --- 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; }

/* --- FOOTER & MISC --- */
.footer-section { 
    grid-column: span 12; 
    padding: 6rem 4rem; 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 4rem;
    border-top: 1px solid var(--border-color); 
    background-color: var(--bg-color);
}
.newsletter-box h2 { 
    font-size: clamp(2rem, 3vw, 2.5rem); 
    margin-bottom: 1rem; 
    font-weight: 400; 
}
.social-box { 
    display: flex; 
    flex-direction: column; 
    align-items: flex-end; 
    justify-content: center; 
    gap: 0.5rem;
}

/* --- RESPONSIVE MOBILE BREAKPOINTS --- */
@media (max-width: 1024px) {
    .third-card { grid-column: span 6; } 
    /* Adjust borders for 2-column layout on tablets */
    .third-card:nth-child(3n) { border-right: 1px solid var(--border-color); } 
    .third-card:nth-child(2n) { border-right: none; }
    
    .img-wrapper { height: 280px; }
}

@media (max-width: 768px) {
    .grid-container { display: flex; flex-direction: column; } /* Drops CSS Grid entirely on mobile for safety */
    .card, .half-card, .third-card, .featured-card { 
        width: 100%; border-right: none; padding: 2.5rem 1.5rem; 
    }
    nav { flex-direction: column; gap: 1rem; padding: 1.5rem; }
    .featured-card .img-wrapper { height: 30vh; min-height: 250px; }
    header { padding-top: 3rem; }
    .ticker-item { font-size: 0.65rem; }

    /* Fix footer stacking on mobile */
    .footer-section { display: flex; flex-direction: column; padding: 4rem 2rem; gap: 2rem; }
    .social-box { align-items: flex-start; text-align: left; }
}