:root {
    --parchment: #F5F0E8;
    --walnut: #3E2723;
    --sienna: #A0522D;
    --umber: #6D4C41;
    --mahogany: #4E342E;
    --gold: #B8860B;
    --amber: #FFD54F;
    --copper: #8D6E63;
}

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

body {
    background-color: var(--parchment);
    color: var(--walnut);
    font-family: 'Crimson Text', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.75;
    overflow-x: hidden;
}

/* Paper texture */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(62,39,35,0.3) 0%, transparent 1%),
        radial-gradient(circle at 60% 70%, rgba(62,39,35,0.2) 0%, transparent 0.8%),
        radial-gradient(circle at 80% 20%, rgba(62,39,35,0.25) 0%, transparent 1.2%);
}

/* Broadsheet container */
.broadsheet {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 40px 60px;
    position: relative;
    z-index: 1;
    border-left: 2px solid rgba(160,82,45,0.15);
    border-right: 2px solid rgba(160,82,45,0.15);
}

/* Wax Seal */
.seal-container {
    text-align: center;
    padding: 30px 0;
    position: relative;
}

.wax-seal {
    width: 80px;
    height: 80px;
    transition: opacity 0.8s ease;
}

.seal-container.broken .wax-seal {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Masthead */
.masthead {
    text-align: center;
    margin-bottom: 40px;
    opacity: 0;
    transition: opacity 1s ease;
}

.masthead.visible {
    opacity: 1;
}

.flourish-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.flourish {
    width: 120px;
    height: 30px;
    flex-shrink: 0;
}

.flourish-path {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    transition: stroke-dashoffset 1.5s ease-in-out;
}

.masthead.visible .flourish-path {
    stroke-dashoffset: 0;
}

.masthead-title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    color: var(--sienna);
    letter-spacing: 0.02em;
}

.dateline {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 0.85rem;
    font-variant: small-caps;
    color: var(--umber);
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.8s ease 0.5s;
}

.masthead.visible .dateline {
    opacity: 1;
}

/* Decorative rule */
.decorative-rule {
    position: relative;
    margin: 20px 0;
    border-top: 1px solid var(--copper);
    border-bottom: 1px solid var(--copper);
    height: 6px;
}

.rule-diamond {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background-color: var(--gold);
}

/* Dispatch */
.dispatch {
    margin-bottom: 60px;
}

.dispatch-para {
    font-family: 'Crimson Text', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.75;
    color: var(--walnut);
    text-align: justify;
    hyphens: auto;
    margin-bottom: 20px;
}

/* Drop cap */
.drop-cap-para::first-letter {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 4.5em;
    float: left;
    line-height: 0.8;
    padding-right: 10px;
    padding-top: 4px;
    color: var(--mahogany);
    border-bottom: 2px solid var(--sienna);
}

/* Fleuron dividers */
.fleuron-divider {
    text-align: center;
    font-size: 1.5rem;
    color: var(--gold);
    margin: 30px 0;
    cursor: default;
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.fleuron-divider:hover {
    transform: rotate(15deg);
    text-shadow: 0 0 8px var(--amber);
}

/* Pull quote */
.pull-quote {
    margin: 30px 40px;
    position: relative;
    padding: 10px 0;
}

.quote-mark {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: 3rem;
    color: var(--gold);
    line-height: 1;
    position: absolute;
}

.quote-open {
    top: -10px;
    left: -30px;
}

.quote-close {
    bottom: -20px;
    right: -20px;
}

.quote-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--umber);
    text-align: center;
}

/* Fade-in */
[data-fade] {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-fade].visible {
    opacity: 1;
    transform: translateY(0);
}

/* Vignette */
.vignette {
    margin: 60px 0;
    text-align: center;
}

.botanical-svg {
    width: 100%;
    max-width: 700px;
    height: auto;
}

.botanical-path {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 3s ease;
}

.vignette.drawn .botanical-path {
    stroke-dashoffset: 0;
}

/* Colophon */
.colophon {
    text-align: center;
    padding-top: 20px;
}

.colophon-fleuron {
    margin-bottom: 16px;
}

.colophon-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-style: italic;
    font-size: 0.95rem;
    color: var(--umber);
    margin-bottom: 6px;
}

.colophon-sub {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--copper);
}

/* Mobile */
@media (max-width: 768px) {
    .broadsheet {
        padding: 30px 24px 40px;
    }

    .flourish {
        width: 80px;
    }

    .pull-quote {
        margin: 20px 10px;
    }

    .quote-open { left: -15px; }
    .quote-close { right: -10px; }
}
