/* ========================================
   GAZZA.NEWS STYLESHEET
   European Gazette Aesthetic - 1664 Foundation
   ======================================== */

/* ROOT VARIABLES & RESETS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #F4EEE4;
    color: #2E2A26;
    font-family: 'Lora', serif;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.75;
    overflow-x: hidden;
}

.scroll-container {
    scroll-snap-type: y mandatory;
    height: 100vh;
    overflow-y: scroll;
}

/* ========================================
   SPREAD STRUCTURE
   ======================================== */

.spread {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    background-color: #F4EEE4;
    padding: 56px 0;
    position: relative;
    overflow: hidden;
}

.spread-grid {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 56px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    height: 100%;
    align-content: center;
}

/* ========================================
   SPREAD 1: MASTHEAD & LEDE
   ======================================== */

.spread-1 .spread-grid {
    grid-template-areas:
        "masthead masthead masthead masthead masthead masthead masthead masthead masthead masthead masthead masthead"
        "masthead masthead masthead masthead masthead masthead masthead masthead masthead masthead masthead masthead"
        ". lede lede lede lede lede . rule toc toc toc ."
        ". lede lede lede lede lede . rule toc toc toc .";
    gap: 20px;
}

.masthead-container {
    grid-area: masthead;
    margin-bottom: 40px;
}

.masthead {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(3.5rem, 12vw, 9rem);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #1B1916;
    line-height: 1;
    margin-bottom: 8px;
}

.masthead-underline {
    height: 2px;
    background-color: #C2A67D;
    width: 100%;
    margin: 20px 0;
}

.dateline {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #7A6F63;
}

.lede-column {
    grid-area: lede;
}

.lede-text::first-letter {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 5.5rem;
    color: #6B4226;
    float: left;
    line-height: 0.8;
    padding-right: 0.15em;
    margin-bottom: -10px;
    border-bottom: 0.5px solid #C2A67D;
}

.sidebar-toc {
    grid-area: toc;
}

.toc-list {
    list-style: none;
    padding: 0;
}

.toc-list li {
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.toc-list a {
    color: #2E2A26;
    text-decoration: none;
    border-bottom: 1px solid #C2A67D;
    transition: color 200ms ease;
}

.toc-list a:hover {
    color: #8C2F2F;
}

/* COLUMN RULE */
.sidebar-toc::before {
    content: '';
    position: absolute;
    left: calc(-50vw - 20px);
    width: 0.5px;
    height: calc(100vh - 112px);
    background: #3A3632;
    top: 56px;
    transition: background 600ms ease;
}

.sidebar-toc:hover::before {
    background: #C2A67D;
}

/* ========================================
   SPREAD 2: FEATURE ESSAY
   ======================================== */

.spread-2 .spread-grid {
    grid-template-columns: repeat(12, 1fr);
    grid-template-areas:
        ". essay essay essay essay essay . rule quote quote quote ."
        ". essay essay essay essay essay . rule quote quote quote ."
        ". essay essay essay essay essay . rule quote quote quote .";
}

.essay-column {
    grid-area: essay;
}

.article-headline {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    color: #1B1916;
    letter-spacing: 0.01em;
    line-height: 1.15;
    margin-bottom: 24px;
}

.kicker {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #7A6F63;
    font-variant: small-caps;
    margin-bottom: 12px;
    display: block;
}

.body-text {
    color: #2E2A26;
    margin-bottom: 20px;
    text-indent: 1.5em;
}

.body-text:first-of-type {
    text-indent: 0;
}

.pullquote-column {
    grid-area: quote;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.pullquote {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(2rem, 5vw, 4rem);
    color: #6B4226;
    line-height: 1.4;
    position: relative;
    text-align: center;
    margin-bottom: 40px;
}

.guillemet-open,
.guillemet-close {
    font-size: 200%;
    color: rgba(194, 166, 125, 0.2);
    position: absolute;
}

.guillemet-open {
    top: -0.3em;
    left: -0.2em;
}

.guillemet-close {
    bottom: -0.3em;
    right: -0.2em;
}

.marginal-annotations {
    padding-top: 28px;
    border-top: 0.5px solid #3A3632;
}

.annotation {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 300;
    font-size: 0.78rem;
    color: #8A7E72;
    line-height: 1.5;
    margin-bottom: 12px;
}

/* ========================================
   SPREAD 3: PHOTO ESSAY
   ======================================== */

.spread-3 {
    background-color: #1B1916;
    padding: 0;
}

.photo-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
}

.photo-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3A3632 0%, #2E2A26 100%);
    filter: grayscale(1) contrast(1.4) brightness(0.75);
}

.grain-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.06;
    mix-blend-mode: multiply;
    z-index: 2;
}

.photo-caption {
    position: relative;
    z-index: 3;
    grid-column: 2 / 7;
    background-color: rgba(27, 25, 22, 0.88);
    padding: 40px;
    margin: 56px;
    color: #F4EEE4;
}

.caption-text {
    font-family: 'Lora', serif;
    color: #F4EEE4;
    margin-bottom: 0;
}

.photo-caption .kicker {
    color: #C2A67D;
}

/* ========================================
   SPREAD 4: THREE-COLUMN ANALYSIS
   ======================================== */

.spread-4 .spread-grid {
    grid-template-columns: repeat(12, 1fr);
    grid-template-areas:
        ". col1 col1 col1 . col2 col2 col2 . col3 col3 ."
        ". col1 col1 col1 . col2 col2 col2 . col3 col3 ."
        ". col1 col1 col1 . col2 col2 col2 . col3 col3 .";
}

.analysis-column {
    position: relative;
}

.analysis-col-1 {
    grid-area: col1;
}

.analysis-col-2 {
    grid-area: col2;
}

.analysis-col-3 {
    grid-area: col3;
}

.analysis-column::after {
    content: '';
    position: absolute;
    width: 0.5px;
    height: calc(100vh - 112px);
    background: #3A3632;
    right: -10px;
    top: 28px;
    transition: background 600ms ease;
}

.analysis-column:hover::after {
    background: #C2A67D;
}

.analysis-col-3::after {
    display: none;
}

/* ========================================
   SPREAD 5: COLOPHON & ENDNOTE
   ======================================== */

.spread-5 .spread-grid {
    grid-template-columns: repeat(12, 1fr);
    grid-template-areas:
        ". . colophon colophon colophon colophon colophon colophon colophon colophon . ."
        ". . colophon colophon colophon colophon colophon colophon colophon colophon . ."
        ". . colophon colophon colophon colophon colophon colophon colophon colophon . .";
}

.colophon-container {
    grid-area: colophon;
    text-align: center;
}

.colophon-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(2.5rem, 8vw, 5rem);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #1B1916;
    margin-bottom: 20px;
}

.colophon-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #2E2A26;
    margin-bottom: 28px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.colophon-contact {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    color: #8A7E72;
    letter-spacing: 0.05em;
    margin-bottom: 40px;
}

.tailpiece {
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.tailpiece-rule {
    width: 0;
    height: 0.5px;
    background: #8C2F2F;
    animation: expandRule 1500ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
}

@keyframes expandRule {
    0% {
        width: 0;
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        width: 60%;
        opacity: 1;
    }
}

.tailpiece-diamond {
    width: 8px;
    height: 8px;
    background: #8C2F2F;
    transform: rotate(45deg);
    opacity: 0;
    animation: fadeInDiamond 800ms ease-out 1200ms forwards;
}

@keyframes fadeInDiamond {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* ========================================
   ANIMATIONS & INTERACTIONS
   ======================================== */

.spread {
    opacity: 0;
    animation: fadeIn 800ms ease-out forwards;
}

.spread[data-revealed="true"] * {
    animation: slideReveal 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    clip-path: inset(0 100% 0 0);
}

@keyframes slideReveal {
    0% {
        clip-path: inset(0 100% 0 0);
    }
    100% {
        clip-path: inset(0 0 0 0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.spread-3[data-revealed="true"] .photo-placeholder {
    animation: photoReveal 1200ms ease-out forwards;
    clip-path: inset(50% 0 50% 0);
}

@keyframes photoReveal {
    0% {
        clip-path: inset(50% 0 50% 0);
    }
    100% {
        clip-path: inset(0);
    }
}

/* STAGGERED REVEALS */
.masthead {
    animation-delay: 0ms;
}

.dateline {
    animation-delay: 150ms;
}

.article-headline {
    animation-delay: 300ms;
}

.body-text {
    animation-delay: 450ms;
}

.essay-column {
    animation-delay: 300ms;
}

.pullquote-column {
    animation-delay: 600ms;
}

.annotation {
    animation-delay: 750ms;
}

.lede-column {
    animation-delay: 300ms;
}

.sidebar-toc {
    animation-delay: 600ms;
}

.analysis-column {
    animation-delay: 300ms;
}

.photo-caption {
    animation-delay: 800ms;
}

.colophon-title {
    animation-delay: 300ms;
}

.colophon-text {
    animation-delay: 450ms;
}

.colophon-contact {
    animation-delay: 600ms;
}

/* ========================================
   RESPONSIVE & UTILITY
   ======================================== */

@media (max-width: 768px) {
    .spread-1 .spread-grid {
        grid-template-areas:
            "masthead masthead masthead masthead masthead masthead masthead masthead masthead masthead masthead masthead"
            ". lede lede lede lede lede lede lede lede lede . ."
            ". lede lede lede lede lede lede lede lede lede . ."
            ". toc toc toc toc toc toc toc toc toc . .";
    }

    .sidebar-toc::before {
        display: none;
    }

    .spread-2 .spread-grid {
        grid-template-areas:
            ". essay essay essay essay essay essay essay essay essay . ."
            ". essay essay essay essay essay essay essay essay essay . ."
            ". essay essay essay essay essay essay essay essay essay . .";
    }

    .pullquote-column {
        display: none;
    }

    .spread-4 .spread-grid {
        grid-template-areas:
            ". col1 col1 col1 col1 col1 col1 col1 col1 col1 . ."
            ". col2 col2 col2 col2 col2 col2 col2 col2 col2 . ."
            ". col3 col3 col3 col3 col3 col3 col3 col3 col3 . .";
    }

    .analysis-column::after {
        display: none;
    }
}

/* NO ACCESSIBILITY STYLES - SKIP FOCUS, ARIA STYLING */
