/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Commissioner, sans-serif;
    background-color: #FBF7F0;
    color: #3A3D50;
    line-height: 1.8;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' result='noise' /%3E%3C/filter%3E%3Crect width='100' height='100' fill='%23FBF7F0' /%3E%3Crect width='100' height='100' fill='%23000000' filter='url(%23noise)' opacity='0.03' /%3E%3C/svg%3E");
    background-attachment: fixed;
    overflow-x: hidden;
}

/* Google Fonts: Commissioner and Caveat */
/* Commissioner variable font (weight 300-800) */
/* Caveat handwritten accent font (weight 400) */

/* Bubble Container */
#bubble-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
}

@keyframes bubble-drift {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0.4;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-100vh) translateX(0);
        opacity: 0;
    }
}

@keyframes bubble-sway {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(15px);
    }
}

/* Section Base Styles */
section {
    position: relative;
    z-index: 2;
}

/* Masthead Section */
.masthead {
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FBF7F0;
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(179, 176, 160, 0.2);
}

.masthead-content {
    max-width: 800px;
    animation: fade-in 0.6s ease-out 0.2s both;
}

.masthead-title {
    font-family: Commissioner, sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    color: #2D3047;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.masthead-underline {
    height: 20px;
    width: 100%;
    max-width: 400px;
    margin: 0.5rem auto 1rem;
    display: block;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: draw-line 0.4s ease-out 0.8s forwards;
}

@keyframes draw-line {
    to {
        stroke-dashoffset: 0;
    }
}

.masthead-dateline {
    font-family: Commissioner, sans-serif;
    font-size: 0.9rem;
    font-weight: 300;
    color: #6B7094;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 1rem;
    animation: fade-in 0.4s ease-out 1.4s both;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Lead Story Section */
.lead-story {
    min-height: 150vh;
    padding: 4rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lead-story-container {
    max-width: 1000px;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    align-items: start;
}

.lead-headline-wrapper {
    grid-column: 1;
    padding-right: 2rem;
}

.lead-headline {
    font-family: Commissioner, sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #2D3047;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 2rem;
    word-spacing: 0.1em;
}

.lead-headline span {
    display: inline-block;
    opacity: 0;
    transform: translateY(4px);
    animation: typewriter 0.4s ease-out forwards;
}

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

.lead-illustration {
    grid-row: 1 / 3;
    grid-column: 2;
    width: 240px;
    height: 240px;
    flex-shrink: 0;
    margin-top: -40px;
}

.lead-illustration svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(4px 6px 8px rgba(0, 0, 0, 0.1));
}

.lead-body {
    grid-column: 1;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    color: #3A3D50;
    line-height: 1.8;
}

.lead-body p {
    margin-bottom: 1.5rem;
}

.lead-body p:last-child {
    margin-bottom: 0;
}

/* Bulletin Board Section */
.bulletin-board {
    min-height: 200vh;
    padding: 6rem 2rem;
    background-color: #FBF7F0;
}

.section-title {
    font-family: Commissioner, sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #2D3047;
    text-align: center;
    margin-bottom: 4rem;
    letter-spacing: -0.01em;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.story-card {
    background-color: #F5F0E4;
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: card-appear 0.5s ease-out forwards;
    box-shadow: 4px 6px 0px #D4CFC2;
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: transform 0.3s ease;
}

.story-card:hover {
    transform: translateY(-4px);
}

.card-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon svg {
    width: 100%;
    height: 100%;
    color: #2D3047;
}

.card-headline {
    font-family: Commissioner, sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    font-weight: 600;
    color: #2D3047;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.card-text {
    font-family: Commissioner, sans-serif;
    font-size: 0.95rem;
    font-weight: 300;
    color: #3A3D50;
    line-height: 1.6;
}

@keyframes card-appear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Editorial Section */
.editorial {
    min-height: 100vh;
    padding: 6rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FBF7F0;
}

.editorial-content {
    max-width: 600px;
    margin: 0 auto;
}

.editorial-title {
    font-family: Commissioner, sans-serif;
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 700;
    color: #2D3047;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

.editorial-content p {
    font-family: Commissioner, sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: #3A3D50;
    line-height: 1.8;
    margin-bottom: 2rem;
    text-align: justify;
}

.pull-quote {
    position: relative;
    padding: 0 0 0 1.5rem;
    margin: 3rem 0;
    border-left: 4px solid #FFD1DC;
    font-family: Commissioner, sans-serif;
    font-size: 1.4rem;
    font-weight: 300;
    font-style: italic;
    color: #E8A87C;
    line-height: 1.6;
    animation: quote-border-animate 0.8s ease-out forwards;
}

.pull-quote p {
    margin: 0;
    font-size: 1.4rem;
}

@keyframes quote-border-animate {
    from {
        border-left-width: 0;
    }
    to {
        border-left-width: 4px;
    }
}

/* Font Family References - Primary Fonts */
/* Commissioner: Primary variable font from Google Fonts */
@font-feature-settings: normal;

.commissioner {
    font-family: Commissioner, sans-serif;
    font-weight: 300;
}

.commissioner-bold {
    font-family: Commissioner, sans-serif;
    font-weight: 700;
}

/* Caveat: Accent handwritten font from Google Fonts */
.caveat {
    font-family: Caveat, cursive;
    font-weight: 400;
}

/* Color Palette Reference (for compliance) */
:root {
    --color-paper-bg: #FBF7F0;
    --color-card-bg: #F5F0E4;
    --color-card-shadow: #D4CFC2;
    --color-primary-text: #2D3047;
    --color-body-text: #3A3D50;
    --color-muted-text: #6B7094;
    --color-accent-coral: #E8A87C;
    --color-pastel-pink: #FFD1DC;
    --color-pastel-sage: #C5E0DC;
    --color-pastel-honey: #E8D5B7;
    --color-pastel-lavender: #D4C5E2;
    --color-hand-drawn-border: #B8B0A0;
    --color-accent-font: #8A7E6A;
    --color-white: #FFFFFF;
}

/* Closing Section */
.closing {
    height: 60vh;
    padding: 4rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FBF7F0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.closing-content {
    position: relative;
    z-index: 3;
    max-width: 600px;
    animation: fade-in 0.6s ease-out forwards;
}

.closing-illustration {
    width: 140px;
    height: 180px;
    margin: 0 auto 2rem;
    animation: float-up 3s ease-in-out infinite;
}

.closing-illustration svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.1));
}

@keyframes float-up {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.closing-text {
    font-family: Commissioner, sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    font-style: italic;
    color: #6B7094;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lead-story-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .lead-headline-wrapper {
        grid-column: 1;
        padding-right: 0;
    }

    .lead-illustration {
        grid-row: auto;
        grid-column: 1;
        width: 180px;
        height: 180px;
        margin: 0 auto 1.5rem;
    }

    .lead-body {
        grid-column: 1;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .story-card {
        box-shadow: 3px 4px 0px #D4CFC2;
    }

    .lead-headline span {
        animation-duration: 0.25s;
    }

    .closing-illustration {
        width: 100px;
        height: 130px;
    }
}

@media (max-width: 480px) {
    .masthead {
        height: auto;
        padding: 2rem 1rem;
        min-height: 35vh;
    }

    .masthead-title {
        font-size: clamp(2rem, 6vw, 3rem);
        margin-bottom: 0.3rem;
    }

    .lead-story {
        min-height: auto;
        padding: 3rem 1rem;
    }

    .lead-headline {
        font-size: clamp(1.5rem, 4vw, 2.2rem);
        margin-bottom: 1.5rem;
    }

    .lead-headline span {
        animation-duration: 0.25s;
    }

    .lead-illustration {
        width: 140px;
        height: 140px;
        margin: 0 auto 1rem;
    }

    .lead-body {
        font-size: 0.95rem;
    }

    .bulletin-board {
        min-height: auto;
        padding: 4rem 1rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .story-card {
        padding: 1rem;
        box-shadow: 2px 3px 0px #D4CFC2;
    }

    .editorial {
        min-height: auto;
        padding: 3rem 1rem;
    }

    .editorial-content p {
        font-size: 1rem;
        text-align: left;
    }

    .pull-quote {
        font-size: 1.1rem;
        padding: 0 0 0 1rem;
    }

    .pull-quote p {
        font-size: 1.1rem;
    }

    .closing {
        height: auto;
        min-height: 50vh;
        padding: 3rem 1rem;
    }

    .closing-illustration {
        width: 80px;
        height: 100px;
        margin: 0 auto 1.5rem;
    }

    .closing-text {
        font-size: 1rem;
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
