/* 
  BagoNew - Luxury Editorial CSS
  Archetype: Editorial / High Fashion
  Protocol: New Rules Fix (Phase 2, 3, 6)
*/

:root {
    --primary: #1C1917;
    /* Luxury Black */
    --accent: #D4AF37;
    /* Metallic Gold */
    --bg-color: #FAFAF9;
    /* Warm Paper */
    --text-main: #292524;
    --text-light: #78716C;
    --white: #FFFFFF;

    --font-head: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;

    --max-width: 1400px;
    /* Wider for Editorial feel */
    --header-height: 90px;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    /* Subtle grain or mesh gradient for premium feel */
    background-image: linear-gradient(to bottom right, #FAFAF9, #F5F5F4);
    color: var(--text-main);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-head);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--primary);
}

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

img {
    max-width: 100%;
    display: block;
    height: auto;
}

ul {
    list-style: none;
}

/* Components */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

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

.btn:hover {
    background: transparent;
    color: var(--primary);
    transform: translateY(-3px);
}

/* Header (Phase 3 Spec) */
.site-header {
    height: var(--header-height);
    background: rgba(250, 250, 249, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
}

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

.logo {
    font-family: var(--font-head);
    font-size: 2rem;
    font-style: italic;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Mobile Menu Logic (Strict Phase 3) */
#mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary);
}

@media (max-width: 768px) {
    #mobile-menu-toggle {
        display: block !important;
    }
}


@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        padding: 2rem;
    }

    .nav-menu.active {
        display: block;
        animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .nav-menu ul {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }

    .nav-menu a {
        font-family: var(--font-head);
        font-size: 1.5rem;
    }

    #mobile-menu-toggle {
        display: block;
    }
}

@media (min-width: 769px) {
    .nav-menu {
        display: block;
        position: static;
        box-shadow: none;
    }

    .nav-menu ul {
        display: flex;
        gap: 3rem;
    }

    .nav-menu a {
        font-size: 0.9rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        position: relative;
    }

    .nav-menu a::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 0;
        width: 0%;
        height: 1px;
        background: var(--primary);
        transition: 0.3s;
    }

    .nav-menu a:hover::after {
        width: 100%;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Hero Editorial */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
}

.hero-content {
    padding: 6rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-content h1 {
    font-size: 5rem;
    line-height: 1;
    margin-bottom: 2rem;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 400px;
}

.hero-image {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

@media(max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding: 4rem 2rem;
        order: 2;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }

    .hero-image {
        height: 50vh;
        order: 1;
    }
}

/* Article Grid (Bentoish) */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.article-card {
    display: block;
}

.article-card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    margin-bottom: 1.5rem;
    filter: brightness(0.95);
    transition: 0.5s;
}

.article-card:hover img {
    filter: brightness(1.05);
    transform: scale(0.99);
}

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

/* Editorial Fallback Cards (When Image is missing) */
.typo-card {
    background: #E5E5E5;
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    transition: 0.5s;
    position: relative;
    overflow: hidden;
}

.typo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.05) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.05) 50%, rgba(0, 0, 0, 0.05) 75%, transparent 75%, transparent);
    background-size: 20px 20px;
    opacity: 0.3;
}

.typo-card h3 {
    font-family: var(--font-head);
    font-size: 2rem;
    font-style: italic;
    color: #1c1917;
    z-index: 1;
}

.typo-card .meta {
    z-index: 1;
    color: #57534e;
}

/* =========================================
   EDITORIAL FALLBACK PATTERNS (Vogue Style)
   ========================================= */

.editorial-pattern {
    width: 100%;
    height: 400px;
    margin-top: 3rem;
    border-radius: 4px;
    border: 1px solid #E5E7EB;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-color: #F9FAFB;
}

.editorial-pattern::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.1;
    background-image: repeating-linear-gradient(45deg, #000 0, #000 1px, transparent 0, transparent 50%);
    background-size: 20px 20px;
}

.editorial-pattern h2 {
    font-family: var(--font-head);
    font-size: 5rem;
    color: rgba(0, 0, 0, 0.05);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    z-index: 0;
    pointer-events: none;
}

/* Specific Pattern Variations */
.pattern-tote {
    background: #FDF2F8;
    /* Pink Tint */
}

.pattern-tote::after {
    content: 'VOLUME';
    font-family: var(--font-head);
    font-size: 8rem;
    color: rgba(190, 24, 93, 0.1);
    position: absolute;
}

.pattern-sustainable {
    background: #ECFCCB;
    /* Lime Tint */
}

.pattern-sustainable::after {
    content: 'BIO';
    font-family: var(--font-head);
    font-size: 8rem;
    color: rgba(61, 124, 15, 0.1);
    position: absolute;
}

.pattern-auth {
    background: #E0F2FE;
    /* Blue Tint */
}

.pattern-auth::after {
    content: 'REAL';
    font-family: var(--font-head);
    font-size: 8rem;
    color: rgba(14, 165, 233, 0.1);
    position: absolute;
}

.pattern-trends {
    background: #FFF7ED;
    /* Orange Tint */
}

.pattern-trends::after {
    content: '2026';
    font-family: var(--font-head);
    font-size: 8rem;
    color: rgba(194, 65, 12, 0.15);
    position: absolute;
}

.pattern-quiet {
    background: #F5F5F4;
    /* Stone Tint */
}

.pattern-quiet::after {
    content: 'HUSH';
    font-family: var(--font-head);
    font-size: 8rem;
    color: rgba(87, 83, 78, 0.1);
    position: absolute;
}

.pattern-corporate {
    background: #F1F5F9;
    /* Slate Tint */
}

.pattern-corporate::after {
    content: 'WORK';
    font-family: var(--font-head);
    font-size: 8rem;
    color: rgba(71, 85, 105, 0.1);
    position: absolute;
}

.pattern-color {
    background: #FEF2F2;
    /* Red Tint */
    background-image:
        linear-gradient(45deg, rgba(254, 202, 202, 0.2) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(254, 202, 202, 0.2) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(254, 202, 202, 0.2) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(254, 202, 202, 0.2) 75%);
    background-size: 20px 20px;
}

.pattern-color::after {
    content: 'HUE';
    font-family: var(--font-head);
    font-size: 8rem;
    color: rgba(220, 38, 38, 0.1);
    position: absolute;
}

.pattern-mini {
    background: #F0FDFA;
    /* Teal Tint */
}

.pattern-mini::after {
    content: 'MICRO';
    font-family: var(--font-head);
    font-size: 8rem;
    color: rgba(13, 148, 136, 0.1);
    position: absolute;
}

.pattern-safe {
    background: #F3F4F6;
    /* Gray Tint */
}

/* =========================================
   MODERN UI / UX ENHANCEMENTS with VOGUE AESTHETIC
   ========================================= */

/* 1. Global Smoothness */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* 2. Fade In Up Animation for Sections */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

main>*,
article>* {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* 3. Refined Card Interactions */
.article-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    /* Ease-out-quart */
    border: 1px solid transparent;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
}

.article-card img {
    transition: transform 0.6s ease;
}

.article-card:hover img {
    transform: scale(1.03);
}

/* 4. Editorial Typography Tweaks */
h1,
h2,
h3 {
    letter-spacing: -0.02em;
    /* Tighter headings for modern look */
}

p {
    letter-spacing: 0.01em;
    /* Open tracking for body */
}

/* 5. Modern Button Hover */
.btn {
    position: relative;
    overflow: hidden;
    transition: color 0.3s;
    z-index: 1;
}

.btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: #111;
    transition: all 0.3s;
    z-index: -1;
}

.btn:hover {
    color: white;
}

.btn:hover::after {
    height: 100%;
}

/* 6. Navigation Link Animation */
.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* Improved Header Styling */
.site-header {
    height: var(--header-height);
    background: rgba(250, 250, 249, 0.98);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-menu a.active {
    color: var(--accent);
}

/* Premium Footer Styling (EEAT & SEO) */
.footer {
    background: #111111;
    color: #FFFFFF;
    padding: 8rem 0 4rem;
    font-family: var(--font-body);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 6rem;
}

.footer-column h4 {
    color: #FFFFFF;
    font-family: var(--font-head);
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-transform: capitalize;
    letter-spacing: 0.05em;
}

.footer-column p {
    color: #A8A29E;
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-column ul li {
    margin-bottom: 1rem;
}

.footer-column ul li a {
    color: #A8A29E;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: var(--accent);
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-form input {
    background: transparent;
    border: 1px solid #444;
    padding: 1rem;
    color: white;
    font-family: var(--font-body);
}

.newsletter-btn {
    background: var(--accent);
    color: #111;
    border: none;
    padding: 1rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.3s;
}

.newsletter-btn:hover {
    background: #FFFFFF;
}

.footer-bottom {
    border-top: 1px solid #222;
    padding-top: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #78716C;
    font-size: 0.8rem;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}

/* Trust Badges */
.trust-badges {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.trust-badge {
    border: 1px solid #333;
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #78716C;
}


/* Ad Slot Prep */
.ad-slot-sidebar {
    width: 100%;
    height: 300px;
    background: #E5E5E5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
    color: #999;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Fix for mobile navigation scroll prevent */
body.nav-open {
    overflow: hidden;
}

/* Accessibility: focus states */
a:focus,
button:focus {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

/* Smooth visual feedback for buttons */
.btn,
.newsletter-btn {
    position: relative;
    overflow: hidden;
}

.btn:active,
.newsletter-btn:active {
    transform: scale(0.98);
}