/* =============================================
   bada.news - Cottagecore Slow Journalism
   ============================================= */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: #FAF6F0;
    color: #4A3F35;
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: clamp(1rem, 1.2vw + 0.5rem, 1.15rem);
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Fixed Navigation Bar --- */
#nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 1000;
    background-color: rgba(250, 246, 240, 0.9);
    backdrop-filter: blur(8px);
    transition: opacity 0.4s ease;
}

#nav-site-name {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: #8B7D6B;
    letter-spacing: 0.02em;
}

#nav-hamburger {
    background: none;
    border: none;
    color: #8B7D6B;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 400ms cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

#nav-hamburger:hover {
    transform: scale(1.05);
}

#nav-hamburger svg {
    width: 22px;
    height: 22px;
}

/* --- Scroll Progress Vine --- */
#scroll-progress {
    position: fixed;
    left: 12px;
    top: 60px;
    bottom: 20px;
    width: 20px;
    z-index: 999;
    pointer-events: none;
    opacity: 0.5;
}

#scroll-vine {
    width: 100%;
    height: 100%;
}

#vine-path {
    stroke: #D4C5B2;
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 2800;
    stroke-dashoffset: 2800;
    transition: stroke-dashoffset 0.1s ease-out;
}

/* --- Masthead --- */
#masthead {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(6rem, 15vh, 10rem) 2rem;
    overflow: hidden;
}

.masthead-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 42rem;
    margin-left: auto;
    margin-right: calc(50% - 21rem + 2rem);
}

@media (max-width: 48rem) {
    .masthead-content {
        margin-left: auto;
        margin-right: auto;
    }
}

.masthead-botanical {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.rosemary-sprig {
    width: 50px;
    height: 80px;
    opacity: 0.7;
    transition: transform 500ms cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

.rosemary-sprig:hover {
    transform: scale(1.08);
}

.rosemary-sprig:hover path {
    stroke: #C4907A;
    transition: stroke 500ms ease;
}

.masthead-title {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    font-size: clamp(2.5rem, 6vw + 0.5rem, 5rem);
    color: #3B2F2F;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.masthead-tagline {
    font-family: 'Lora', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.1rem, 2vw + 0.4rem, 1.6rem);
    color: #5C4A3A;
    margin-bottom: 1.5rem;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

.masthead-date {
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: clamp(0.7rem, 0.8vw + 0.3rem, 0.85rem);
    color: #8B7D6B;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* --- Gradient Meshes --- */
.gradient-mesh {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
}

.gradient-mesh--masthead {
    background:
        radial-gradient(ellipse 60% 50% at 25% 30%, rgba(232, 223, 240, 0.5) 0%, transparent 70%),
        radial-gradient(ellipse 50% 60% at 75% 60%, rgba(255, 245, 225, 0.5) 0%, transparent 70%),
        radial-gradient(ellipse 80% 80% at 50% 50%, rgba(250, 246, 240, 0.3) 0%, transparent 70%);
    animation: meshBreathe 20s ease-in-out infinite;
}

.gradient-mesh--feature {
    background:
        radial-gradient(ellipse 55% 45% at 20% 25%, rgba(232, 223, 240, 0.45) 0%, transparent 65%),
        radial-gradient(ellipse 45% 55% at 80% 70%, rgba(255, 245, 225, 0.4) 0%, transparent 65%),
        radial-gradient(ellipse 70% 70% at 50% 50%, rgba(250, 246, 240, 0.25) 0%, transparent 60%);
    animation: meshBreathe 20s ease-in-out infinite;
}

.gradient-mesh--editorial {
    background:
        radial-gradient(ellipse 50% 50% at 30% 40%, rgba(196, 144, 122, 0.15) 0%, transparent 65%),
        radial-gradient(ellipse 60% 55% at 70% 30%, rgba(242, 230, 217, 0.5) 0%, transparent 65%),
        radial-gradient(ellipse 40% 60% at 50% 70%, rgba(122, 154, 109, 0.08) 0%, transparent 60%);
    animation: meshBreathe 20s ease-in-out infinite 5s;
}

.gradient-mesh--culture {
    background:
        radial-gradient(ellipse 50% 55% at 25% 35%, rgba(155, 127, 184, 0.18) 0%, transparent 65%),
        radial-gradient(ellipse 55% 50% at 75% 55%, rgba(250, 246, 240, 0.5) 0%, transparent 65%),
        radial-gradient(ellipse 65% 65% at 50% 50%, rgba(255, 245, 225, 0.3) 0%, transparent 60%);
    animation: meshBreathe 20s ease-in-out infinite 10s;
}

.gradient-mesh--feature-alt {
    background:
        radial-gradient(ellipse 60% 50% at 30% 20%, rgba(232, 223, 240, 0.4) 0%, transparent 65%),
        radial-gradient(ellipse 50% 60% at 65% 75%, rgba(255, 245, 225, 0.45) 0%, transparent 65%),
        radial-gradient(ellipse 75% 75% at 50% 50%, rgba(242, 230, 217, 0.25) 0%, transparent 60%);
    animation: meshBreathe 20s ease-in-out infinite 3s;
}

.gradient-mesh--note {
    background:
        radial-gradient(ellipse 55% 55% at 35% 30%, rgba(255, 245, 225, 0.5) 0%, transparent 65%),
        radial-gradient(ellipse 50% 50% at 70% 60%, rgba(242, 230, 217, 0.4) 0%, transparent 65%),
        radial-gradient(ellipse 60% 60% at 50% 50%, rgba(250, 246, 240, 0.3) 0%, transparent 60%);
    animation: meshBreathe 20s ease-in-out infinite 7s;
}

@keyframes meshBreathe {
    0%, 100% {
        background-position: 0% 0%, 0% 0%, 0% 0%;
    }
    25% {
        background-position: 3% -2%, -2% 3%, 1% 1%;
    }
    50% {
        background-position: -2% 3%, 3% -2%, -1% 2%;
    }
    75% {
        background-position: 2% 1%, -1% -3%, 2% -1%;
    }
}

/* --- Story Sections --- */
.story-section {
    position: relative;
    padding: 0;
    overflow: hidden;
}

.story-section--feature,
.story-section--feature-alt {
    background-color: #E8DFF0;
}

.story-section--editorial {
    background-color: #FFF5E1;
}

.story-section--culture {
    background-color: #F2E6D9;
}

.story-section--note {
    background-color: #FFF5E1;
}

.section-curve-top,
.section-curve-bottom {
    position: relative;
    z-index: 1;
    width: 100%;
    line-height: 0;
}

.section-curve-top svg,
.section-curve-bottom svg {
    display: block;
    width: 100%;
    height: 40px;
}

/* --- Story Content --- */
.story-content {
    position: relative;
    z-index: 2;
    max-width: 42rem;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 4rem) 1.5rem;
    padding-left: calc(50% - 21rem + 2rem);
    box-shadow: 0 4px 24px rgba(184, 169, 154, 0.15); /* Mushroom #B8A99A at 15% */
}

@media (max-width: 48rem) {
    .story-content {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* --- Story Tags --- */
.story-tag {
    display: inline-block;
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: clamp(0.65rem, 0.7vw + 0.25rem, 0.78rem);
    color: #FAF6F0;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25em 0.75em;
    border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%;
    margin-bottom: 1rem;
}

.story-tag--feature {
    background-color: #7A9A6D;
}

.story-tag--editorial {
    background-color: #9B7FB8;
}

.story-tag--culture {
    background-color: #C4907A;
}

/* --- Story Headlines --- */
.story-headline {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    font-size: clamp(1.75rem, 4vw + 0.5rem, 3.5rem);
    color: #3B2F2F;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.story-subhead {
    font-family: 'Lora', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.1rem, 2vw + 0.4rem, 1.6rem);
    color: #5C4A3A;
    line-height: 1.5;
    margin-bottom: 2rem;
}

/* --- Story Body --- */
.story-body p {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw + 0.5rem, 1.15rem);
    color: #4A3F35;
    line-height: 1.8;
    max-width: 65ch;
    margin-bottom: 1.5em;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
}

.story-body p.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Pull Quotes --- */
.pull-quote {
    margin: 3rem 0;
    padding: 2.5rem 2rem;
    background-color: rgba(155, 127, 184, 0.08);
    border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%;
    position: relative;
}

.pull-quote blockquote p {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    font-size: clamp(1.2rem, 2.5vw + 0.3rem, 1.8rem);
    color: #9B7FB8;
    line-height: 1.5;
    text-align: center;
    max-width: 50ch;
    margin: 0 auto;
    opacity: 1;
    transform: none;
}

/* --- Story Footer (Colophon) --- */
.story-footer {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    padding-top: 1.5rem;
    border-top: 1px solid #D4C5B2;
    margin-top: 2rem;
}

.story-meta {
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: clamp(0.7rem, 0.8vw + 0.3rem, 0.85rem);
    color: #8B7D6B;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* --- Story End Botanicals --- */
.story-end-botanical {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
    position: relative;
    z-index: 2;
    background-color: #FAF6F0;
}

.pressed-daisy {
    width: 28px;
    height: 28px;
    opacity: 0.5;
    transition: transform 500ms cubic-bezier(0.25, 0.1, 0.25, 1.0), opacity 500ms ease;
}

.pressed-daisy:hover {
    transform: scale(1.08);
    opacity: 0.8;
}

/* --- Botanical Dividers --- */
.botanical-divider {
    padding: clamp(3rem, 5vw, 5rem) 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #FAF6F0;
}

.divider-curve {
    width: 100%;
    max-width: 60rem;
    height: 60px;
    transition: transform 500ms cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

.divider-curve:hover {
    transform: scale(1.08);
}

.divider-curve:hover .curve-path {
    stroke: #C4907A;
    transition: stroke 500ms ease;
}

.curve-path {
    stroke: #D4C5B2;
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke 500ms ease, stroke-dashoffset 1.2s ease-in-out;
}

.curve-path.drawn {
    stroke-dashoffset: 0;
}

/* --- Footer --- */
#site-footer {
    background-color: #3B2F2F;
    padding: clamp(4rem, 8vw, 8rem) 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background-color: #FAF6F0;
    clip-path: ellipse(55% 100% at 50% 0%);
}

.footer-content {
    max-width: 42rem;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.footer-botanical {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.footer-wildflower {
    width: 40px;
    height: 55px;
    opacity: 0.5;
}

.footer-name {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    color: #FAF6F0;
    margin-bottom: 0.75rem;
}

.footer-philosophy {
    font-family: 'Lora', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.2vw + 0.3rem, 1.1rem);
    color: #D4C5B2;
    margin-bottom: 1.5rem;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}

.footer-copyright {
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: clamp(0.7rem, 0.8vw + 0.3rem, 0.85rem);
    color: #8B7D6B;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* --- Responsive --- */
@media (max-width: 48rem) {
    #scroll-progress {
        display: none;
    }

    .story-content {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .pull-quote {
        border-radius: 40% 60% 45% 55% / 55% 45% 55% 45%;
        padding: 2rem 1.5rem;
    }

    .story-footer {
        gap: 1rem;
    }

    .botanical-divider {
        padding: 2rem 0;
    }
}

@media (max-width: 30rem) {
    .masthead-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}

/* --- Selection Styling --- */
::selection {
    background-color: rgba(196, 144, 122, 0.25);
    color: #3B2F2F;
}
