/* matchoomnews.com - Cottagecore Morning Edition Styles */
/* Jewel Tones on Linen */

/* ===== CSS Custom Properties ===== */
:root {
    --amethyst-plum: #6b3a6b;
    --forest-emerald: #2d6a4f;
    --sapphire-gold: #b8860b;
    --linen-cream: #f5ede3;
    --parchment-light: #faf6ef;
    --charcoal-ink: #2c2118;
    --warm-gray: #6b5e52;
    --ruby-berry: #8b2252;
    --spring-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--linen-cream);
    color: var(--charcoal-ink);
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* ===== Morphing Blob Background ===== */
.blob-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.blob {
    fill: rgba(107, 58, 107, 0.07);
}

.blob-1 {
    fill: rgba(107, 58, 107, 0.07);
    animation: blobMorph1 10s ease-in-out infinite alternate;
}

.blob-2 {
    fill: rgba(45, 106, 79, 0.05);
    animation: blobMorph2 14s ease-in-out infinite alternate;
}

.blob-3 {
    fill: rgba(184, 134, 11, 0.04);
    animation: blobMorph3 18s ease-in-out infinite alternate;
}

@keyframes blobMorph1 {
    0% { d: path('M400,100 C500,80 600,150 580,250 C560,350 500,400 400,380 C300,360 220,300 240,200 C260,120 300,120 400,100Z'); }
    50% { d: path('M410,90 C510,95 590,160 570,260 C550,340 510,410 390,390 C290,370 230,290 250,190 C270,110 310,110 410,90Z'); }
    100% { d: path('M395,105 C490,75 610,140 590,240 C570,360 490,395 405,375 C310,355 225,310 235,210 C255,125 295,125 395,105Z'); }
}

@keyframes blobMorph2 {
    0% { d: path('M300,200 C380,160 480,200 500,280 C520,360 460,420 380,400 C300,380 240,340 230,280 C220,220 240,220 300,200Z'); }
    50% { d: path('M310,190 C390,170 470,210 490,290 C510,350 470,410 390,390 C310,370 250,330 240,270 C230,210 250,210 310,190Z'); }
    100% { d: path('M295,205 C375,155 485,195 505,275 C525,365 455,425 375,405 C295,385 235,345 225,285 C215,225 235,225 295,205Z'); }
}

@keyframes blobMorph3 {
    0% { d: path('M500,150 C560,130 620,180 610,250 C600,320 560,360 500,350 C440,340 400,300 410,240 C420,180 450,170 500,150Z'); }
    50% { d: path('M505,145 C565,125 625,175 615,245 C605,315 565,355 505,345 C445,335 405,295 415,235 C425,175 455,165 505,145Z'); }
    100% { d: path('M495,155 C555,135 615,185 605,255 C595,325 555,365 495,355 C435,345 395,305 405,245 C415,185 445,175 495,155Z'); }
}

/* ===== Header ===== */
.site-header {
    position: relative;
    z-index: 10;
    padding: 1.5rem clamp(1.2rem, 5vw, 3rem);
    background: linear-gradient(180deg, var(--parchment-light) 0%, transparent 100%);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== Wax Seal ===== */
.wax-seal {
    width: 52px;
    height: 52px;
    background-color: var(--ruby-berry);
    border-radius: 47% 53% 46% 54% / 52% 48% 53% 47%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(139, 34, 82, 0.3);
    flex-shrink: 0;
    transition: transform 0.4s var(--spring-ease);
}

.wax-seal:hover {
    transform: scale(1.08) rotate(-3deg);
}

.wax-seal.small {
    width: 36px;
    height: 36px;
}

.seal-letter {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    color: var(--parchment-light);
    font-size: 1.4rem;
    line-height: 1;
}

.wax-seal.small .seal-letter {
    font-size: 1rem;
}

/* ===== Navigation ===== */
.main-nav {
    flex: 1;
}

.nav-list {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    flex-wrap: wrap;
}

.nav-item {
    opacity: 0;
    transform: translateX(-12px);
    animation: navEnter 0.5s var(--spring-ease) forwards;
}

.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.15s; }
.nav-item:nth-child(3) { animation-delay: 0.2s; }
.nav-item:nth-child(4) { animation-delay: 0.25s; }
.nav-item:nth-child(5) { animation-delay: 0.3s; }

@keyframes navEnter {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.nav-link {
    display: inline-block;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: clamp(0.75rem, 1.2vw, 0.9rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--warm-gray);
    padding: 0.4rem 0.8rem;
    border-radius: 2px;
    border-bottom: 3px solid transparent;
    position: relative;
    transition: color 0.3s var(--spring-ease), border-color 0.3s var(--spring-ease), transform 0.3s var(--spring-ease);
}

.nav-link::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-right: 0;
    vertical-align: middle;
}

.nav-link:hover {
    color: var(--amethyst-plum);
    border-bottom-color: var(--amethyst-plum);
}

.nav-link[data-shape='diamond']:hover {
    border-bottom-color: var(--sapphire-gold);
    color: var(--sapphire-gold);
}

.nav-link[data-shape='hexagon']:hover {
    border-bottom-color: var(--forest-emerald);
    color: var(--forest-emerald);
}

.nav-link.active {
    color: var(--amethyst-plum);
    border-bottom-color: var(--amethyst-plum);
}

/* Garden Marker style: slightly uneven vertical placement */
.nav-item:nth-child(odd) {
    transform: translateY(-2px);
}

.nav-item:nth-child(even) {
    transform: translateY(2px);
}

.nav-item:nth-child(odd),
.nav-item:nth-child(even) {
    animation: navEnter 0.5s var(--spring-ease) forwards;
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    z-index: 1;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem clamp(1.2rem, 5vw, 3rem);
}

.hero-content {
    max-width: 700px;
}

.hero-title {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--amethyst-plum);
    letter-spacing: 0.02em;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(20px);
    animation: heroReveal 0.8s var(--spring-ease) 0.3s forwards;
}

.hero-subtitle {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: var(--warm-gray);
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(20px);
    animation: heroReveal 0.8s var(--spring-ease) 1.1s forwards;
}

.hero-botanical {
    margin-top: 2rem;
    opacity: 0;
    animation: heroReveal 0.8s var(--spring-ease) 1.9s forwards;
}

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

/* Lavender sprig stroke animation */
.lavender-sprig {
    width: 120px;
    height: 80px;
    margin: 0 auto;
    display: block;
}

.lavender-stem {
    stroke-dasharray: 80;
    stroke-dashoffset: 80;
    animation: drawStroke 1.2s ease-out 2.2s forwards;
}

.lavender-leaf {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation: drawStroke 0.8s ease-out 2.6s forwards;
}

.lavender-bloom {
    opacity: 0;
    animation: bloomFade 0.6s ease-out forwards;
}

.bloom-1 { animation-delay: 2.8s; }
.bloom-2 { animation-delay: 2.9s; }
.bloom-3 { animation-delay: 3.0s; }
.bloom-4 { animation-delay: 3.1s; }
.bloom-5 { animation-delay: 3.2s; }

@keyframes drawStroke {
    to { stroke-dashoffset: 0; }
}

@keyframes bloomFade {
    to { opacity: 1; }
}

/* ===== Floating Geometric Accents ===== */
.geo-accent {
    position: absolute;
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
}

.geo-circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--amethyst-plum);
    top: 20%;
    left: 15%;
    animation: geoFloat 20s ease-in-out infinite;
}

.geo-diamond {
    width: 10px;
    height: 10px;
    background-color: var(--sapphire-gold);
    transform: rotate(45deg);
    top: 30%;
    right: 18%;
    animation: geoFloat 20s ease-in-out 5s infinite;
}

.geo-hexagon {
    width: 12px;
    height: 12px;
    background-color: var(--forest-emerald);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    bottom: 25%;
    left: 22%;
    animation: geoFloat 20s ease-in-out 10s infinite;
}

@keyframes geoFloat {
    0%, 100% { transform: translateY(-8px); }
    50% { transform: translateY(8px); }
}

.geo-diamond {
    animation-name: geoFloatDiamond;
}

@keyframes geoFloatDiamond {
    0%, 100% { transform: rotate(45deg) translateY(-8px); }
    50% { transform: rotate(45deg) translateY(8px); }
}

/* ===== Main Content Layout ===== */
.main-content {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem clamp(1.2rem, 5vw, 3rem);
}

/* ===== Magazine Grid ===== */
.magazine-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 1.5rem;
}

/* ===== Article Cards ===== */
.article-card {
    background-color: var(--parchment-light);
    padding: 2rem;
    border-radius: 4px;
    position: relative;
    transition: transform 0.4s var(--spring-ease), box-shadow 0.4s var(--spring-ease);
    opacity: 0;
    transform: translateY(20px);
}

.article-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s var(--spring-ease), transform 0.6s var(--spring-ease);
}

.article-card:hover {
    transform: translateY(-4px) rotate(-0.3deg);
    box-shadow: 0 8px 24px rgba(44, 33, 24, 0.12);
}

.article-card.visible:hover {
    transform: translateY(-4px) rotate(-0.3deg);
}

/* Featured articles span 2 columns */
.article-card.featured {
    grid-column: span 4;
    padding: 2.5rem 3rem;
}

/* Small articles in cluster */
.article-card.small {
    grid-column: span 2;
}

/* Medium articles span 3 */
.article-card.medium {
    grid-column: span 4;
    max-width: 75%;
}

/* Card Corner Diamonds */
.card-corner {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--sapphire-gold);
    transform: rotate(45deg);
    opacity: 0.4;
}

.corner-tl { top: 8px; left: 8px; }
.corner-tr { top: 8px; right: 8px; }
.corner-bl { bottom: 8px; left: 8px; }
.corner-br { bottom: 8px; right: 8px; }

/* ===== Article Category ===== */
.article-category {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.category-shape {
    display: inline-block;
    width: 8px;
    height: 8px;
}

.category-shape.circle {
    border-radius: 50%;
    background-color: var(--amethyst-plum);
}

.category-shape.diamond {
    background-color: var(--sapphire-gold);
    transform: rotate(45deg);
    width: 7px;
    height: 7px;
}

.category-shape.hexagon {
    background-color: var(--forest-emerald);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    width: 9px;
    height: 9px;
}

.category-label {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: clamp(0.7rem, 1vw, 0.8rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--warm-gray);
}

/* ===== Article Typography ===== */
.article-title {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    color: var(--amethyst-plum);
    letter-spacing: 0.02em;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.article-body {
    color: var(--charcoal-ink);
    margin-bottom: 0.75rem;
}

.article-body.indent {
    text-indent: 1.5em;
}

.article-meta {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.75rem, 1.2vw, 0.9rem);
    color: var(--warm-gray);
    letter-spacing: 0.01em;
}

/* ===== Link Styles ===== */
a {
    color: var(--forest-emerald);
    text-decoration: none;
    background-image: linear-gradient(var(--forest-emerald), var(--forest-emerald));
    background-size: 0% 2px;
    background-position: center bottom;
    background-repeat: no-repeat;
    transition: background-size 0.4s var(--spring-ease);
}

a:hover {
    background-size: 100% 2px;
}

/* Override for nav links */
.nav-link {
    background-image: none;
}

/* ===== Botanical Dividers ===== */
.botanical-divider {
    grid-column: span 4;
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}

.divider-svg {
    width: 200px;
    height: 30px;
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.6s var(--spring-ease), opacity 0.6s ease;
}

.botanical-divider.visible .divider-svg {
    transform: scale(1);
    opacity: 1;
}

/* ===== Sidebar ===== */
.sidebar {
    width: 220px;
    flex-shrink: 0;
    background-color: var(--parchment-light);
    padding: 2rem 1.2rem;
    border-radius: 4px;
    align-self: flex-start;
    position: sticky;
    top: 2rem;
}

.sidebar-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(107, 58, 107, 0.1);
}

.sidebar-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-heading {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--amethyst-plum);
    letter-spacing: 0.02em;
    margin-bottom: 0.75rem;
}

.sidebar-quote {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--warm-gray);
    line-height: 1.6;
    padding-left: 0.8rem;
    border-left: 3px solid var(--sapphire-gold);
}

.sidebar-botanical {
    display: flex;
    justify-content: center;
}

.sidebar-botanical svg {
    width: 50px;
    height: auto;
    opacity: 0.7;
}

/* ===== Topic Tags ===== */
.topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.topic-tag {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 0.72rem;
    letter-spacing: 0.01em;
    color: var(--charcoal-ink);
    background-color: rgba(184, 134, 11, 0.12);
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.topic-tag:hover {
    background-color: rgba(184, 134, 11, 0.25);
    color: var(--amethyst-plum);
}

/* ===== Sidebar Micro List ===== */
.sidebar-micro-list {
    list-style: none;
}

.micro-item {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    color: var(--warm-gray);
    padding: 0.3rem 0;
    padding-left: 1rem;
    position: relative;
}

.micro-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--amethyst-plum);
    opacity: 0.5;
}

/* ===== Footer ===== */
.site-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 4rem clamp(1.2rem, 5vw, 3rem) 3rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(107, 58, 107, 0.1);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-seal {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.footer-tagline {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--warm-gray);
    margin-bottom: 0.5rem;
}

.footer-copy {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    color: var(--warm-gray);
    opacity: 0.7;
    letter-spacing: 0.02em;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 1rem;
        padding: 1.5rem;
    }

    .sidebar-section {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    .magazine-grid {
        grid-template-columns: 1fr 1fr;
    }

    .article-card.featured {
        grid-column: span 2;
    }

    .article-card.small {
        grid-column: span 1;
    }

    .article-card.medium {
        grid-column: span 2;
        max-width: 100%;
    }

    .botanical-divider {
        grid-column: span 2;
    }
}

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

    .article-card.featured,
    .article-card.small,
    .article-card.medium {
        grid-column: span 1;
    }

    .botanical-divider {
        grid-column: span 1;
    }

    .sidebar {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 60vh;
    }

    .nav-list {
        gap: 0.3rem;
    }

    .article-card {
        padding: 1.5rem;
    }

    .article-card.featured {
        padding: 1.5rem;
    }
}
