/* ============================================================
   GAZZA.NEWS — Styles
   Editorial broadsheet aesthetic, gold-black-luxury palette
   ============================================================ */

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

html {
    background-color: #0A0A0A;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: #0A0A0A;
    color: #E8DCC8;
    font-family: 'Source Serif 4', 'Georgia', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.75;
    letter-spacing: 0.005em;
    overflow-x: hidden;
}

/* ---- TYPOGRAPHY ---- */

/* Playfair Display — masthead, display, drop caps */
.masthead-title,
.colophon-title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* Cormorant Garamond — headlines, subtitles, pull-quotes, folio numbers */
.masthead-subtitle,
.colophon-subtitle,
.story-headline,
.pull-quote-overlay blockquote p,
.interstitial-quote blockquote p,
.folio-number,
.folio-roman,
.nav-link {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
}

/* Source Serif 4 — body text */
.story-body,
.colophon-text,
.masthead-dateline {
    font-family: 'Source Serif 4', 'Georgia', serif;
}

/* Alegreya Sans — utility, bylines, metadata */
.story-byline,
.colophon-details,
.colophon-line {
    font-family: 'Alegreya Sans', 'Helvetica Neue', sans-serif;
}

/* ---- STICKY GOLD RULE ---- */
.sticky-rule {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #C5A258;
    z-index: 1000;
    opacity: 0;
    transition: opacity 600ms ease-out;
    pointer-events: none;
}

.sticky-rule.visible {
    opacity: 1;
}

/* ---- FOLIO BASE ---- */
.folio {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ---- FOLIO ROMAN NUMERAL (upper-right) ---- */
.folio-roman {
    position: absolute;
    top: 32px;
    right: 80px;
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(0.875rem, 1.1vw, 1rem);
    color: #A69882;
    letter-spacing: 0.02em;
    z-index: 5;
}

/* ---- FOLIO EDGE (page-turn divider) ---- */
.folio-edge {
    width: 100%;
    height: 48px;
    background-color: rgba(197, 162, 88, 0.15);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 80px;
}

.folio-number {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 0.875rem;
    color: #8B7340;
    letter-spacing: 0.02em;
}

/* ============================================================
   FOLIO 0: MASTHEAD
   ============================================================ */
.folio-masthead {
    background-color: #0A0A0A;
    flex-direction: column;
    text-align: center;
}

.masthead-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.masthead-title {
    font-size: clamp(3rem, 8vw, 7rem);
    color: #C5A258;
    line-height: 1;
    opacity: 0;
    transition: opacity 2s ease-out;
}

.masthead-title.revealed {
    opacity: 1;
}

.masthead-subtitle {
    font-weight: 600;
    font-variant: small-caps;
    font-size: clamp(1.2rem, 3vw, 2.4rem);
    color: #C5A258;
    letter-spacing: 1.2em;
    margin-top: 0.5rem;
    padding-left: 1.2em;
    opacity: 0;
    transition: opacity 1.2s ease-out;
}

.masthead-subtitle.revealed {
    opacity: 1;
}

.masthead-rule {
    width: 0;
    height: 1px;
    background-color: #C5A258;
    margin-top: 2rem;
    margin-bottom: 2rem;
    transition: width 1.2s ease-out;
}

.masthead-rule.revealed {
    width: 40%;
}

.masthead-dateline {
    font-family: 'Alegreya Sans', 'Helvetica Neue', sans-serif;
    font-weight: 500;
    font-size: clamp(0.75rem, 1vw, 0.875rem);
    color: #A69882;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 1s ease-out;
}

.masthead-dateline.revealed {
    opacity: 1;
}

.dateline-separator {
    margin: 0 0.75em;
    color: #8B7340;
}

/* ============================================================
   FOLIO STORY LAYOUTS
   ============================================================ */
.folio-story {
    background-color: #0A0A0A;
    padding: 80px;
    align-items: flex-start;
}

.folio-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 32px;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    min-height: calc(100vh - 160px);
    align-items: start;
}

/* Left-image layout: image cols 1-5, text cols 6-12 */
.folio-left-image .folio-image-column {
    grid-column: 1 / 6;
    position: relative;
}

.folio-left-image .folio-text-column {
    grid-column: 6 / 12;
    padding-top: 40px;
}

/* Right-image layout: text cols 1-7, image cols 7-12 */
.folio-right-image .folio-text-column {
    grid-column: 1 / 7;
    padding-top: 40px;
}

.folio-right-image .folio-image-column {
    grid-column: 7 / 13;
    position: relative;
}

/* ---- GILT FRAME ---- */
.gilt-frame {
    border: 1px solid #8B7340;
    padding: 8px;
    transition: border-color 600ms ease-out;
}

.gilt-frame:hover {
    border-color: #C5A258;
}

/* ---- STORY IMAGES ---- */
.story-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #0A0A0A;
}

.story-image svg {
    display: block;
    width: 100%;
    height: auto;
}

.image-gold-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #C5A258;
    mix-blend-mode: multiply;
    opacity: 0.08;
    pointer-events: none;
}

/* ---- PULL QUOTES ---- */
/* Parchment Cream #F2E8D5 available for caption backgrounds */
.pull-quote-overlay {
    position: relative;
    margin-top: -60px;
    margin-right: -40px;
    z-index: 2;
    padding: 24px 32px;
    background-color: rgba(10, 10, 10, 0.85);
    border-left: 2px solid #F2E8D5;
}

.pull-quote-overlay blockquote p {
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.1rem, 1.8vw, 1.5rem);
    color: #C5A258;
    line-height: 1.6;
    letter-spacing: 0.01em;
}

.pull-quote-right {
    margin-left: -40px;
    margin-right: 0;
    margin-top: -60px;
}

/* ---- BYLINE ---- */
.story-byline {
    font-weight: 500;
    font-size: clamp(0.75rem, 1vw, 0.875rem);
    color: #A69882;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.byline-separator {
    margin: 0 0.5em;
    color: #8B7340;
}

/* ---- HEADLINES ---- */
.story-headline {
    font-weight: 600;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    color: #E8DCC8;
    line-height: 1.2;
    letter-spacing: 0.01em;
    margin-bottom: 2rem;
}

/* ---- STORY BODY ---- */
.story-body p {
    font-family: 'Source Serif 4', 'Georgia', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.75;
    letter-spacing: 0.005em;
    color: #E8DCC8;
    margin-bottom: 0;
}

.story-body p + p {
    text-indent: 2em;
}

.story-body p.drop-cap {
    text-indent: 0;
}

/* ---- DROP CAP ---- */
.story-body p.drop-cap::first-letter {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-weight: 700;
    float: left;
    font-size: 4.5em;
    line-height: 0.8;
    padding-right: 0.08em;
    padding-top: 0.05em;
    color: #C5A258;
    text-shadow: 0 0 20px rgba(197, 162, 88, 0.3);
}

/* ---- PILCROW MARGINALIA ---- */
.pilcrow {
    position: absolute;
    left: -32px;
    color: #C5A258;
    font-family: 'Source Serif 4', 'Georgia', serif;
    font-size: 0.875rem;
    opacity: 0.5;
    user-select: none;
}

.story-body p {
    position: relative;
}

/* ---- WAX SEAL ---- */
.wax-seal {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
}

.wax-seal svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.wax-seal svg circle:first-child {
    fill: #5C1A2A;
}

/* ============================================================
   FOLIO INTERSTITIAL
   ============================================================ */
.folio-interstitial {
    background-color: #0A0A0A;
    position: relative;
}

.interstitial-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.interstitial-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.interstitial-image svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.interstitial-quote {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 720px;
    padding: 40px;
}

.interstitial-quote blockquote p {
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    color: #C5A258;
    line-height: 1.4;
    letter-spacing: 0.01em;
    margin-bottom: 1rem;
}

.interstitial-quote blockquote cite {
    font-family: 'Alegreya Sans', 'Helvetica Neue', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: clamp(0.75rem, 1vw, 0.875rem);
    color: #A69882;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ---- FLEURON DIVIDER ---- */
.fleuron-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 24px 0;
}

.fleuron-line {
    display: block;
    width: 80px;
    height: 1px;
    background-color: #C5A258;
    opacity: 0.4;
}

.fleuron-glyph {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* ============================================================
   FOLIO COLOPHON (FOOTER)
   ============================================================ */
.folio-colophon {
    background-color: #0A0A0A;
    flex-direction: column;
    text-align: center;
    padding: 80px 40px;
}

.colophon-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    max-width: 600px;
}

.colophon-masthead {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.colophon-title {
    font-size: clamp(2rem, 5vw, 4rem);
    color: #C5A258;
    line-height: 1;
    letter-spacing: 0.04em;
}

.colophon-subtitle {
    font-weight: 600;
    font-variant: small-caps;
    font-size: clamp(0.9rem, 1.8vw, 1.4rem);
    color: #C5A258;
    letter-spacing: 1.2em;
    padding-left: 1.2em;
    margin-top: 0.25rem;
}

.colophon-text {
    font-family: 'Source Serif 4', 'Georgia', serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    color: #A69882;
    line-height: 1.75;
    max-width: 500px;
}

.colophon-details {
    margin-top: 1rem;
}

.colophon-line {
    font-weight: 500;
    font-size: clamp(0.75rem, 1vw, 0.875rem);
    color: #8B7340;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 2;
}

.colophon-seal {
    margin-top: 1rem;
}

.colophon-seal svg {
    width: 72px;
    height: 72px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

/* ============================================================
   NAVIGATION DOT
   ============================================================ */
.nav-dot {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.nav-dot-circle {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #C5A258;
    cursor: pointer;
    animation: dotPulse 3s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.nav-dot-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 600ms ease-out, visibility 600ms ease-out, transform 600ms ease-out;
    padding-bottom: 4px;
}

.nav-dot.active .nav-dot-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-link {
    font-style: italic;
    font-weight: 300;
    font-size: 0.875rem;
    color: #A69882;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 600ms ease-out;
    white-space: nowrap;
}

.nav-link:hover {
    color: #C5A258;
}

/* ============================================================
   FADE-REVEAL ANIMATION
   ============================================================ */
.fade-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1000ms ease-out, transform 1000ms ease-out;
}

.fade-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Headline specific — also has horizontal translate */
.story-headline.fade-reveal {
    transform: translateX(40px);
    opacity: 0;
    transition: opacity 900ms ease-out, transform 900ms ease-out;
}

.story-headline.fade-reveal.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger for body paragraphs */
.story-body p.fade-reveal:nth-child(2) { transition-delay: 150ms; }
.story-body p.fade-reveal:nth-child(3) { transition-delay: 300ms; }
.story-body p.fade-reveal:nth-child(4) { transition-delay: 450ms; }
.story-body p.fade-reveal:nth-child(5) { transition-delay: 600ms; }

/* ============================================================
   RESPONSIVE — TABLET
   ============================================================ */
@media (max-width: 1024px) {
    .folio-story {
        padding: 48px;
    }

    .folio-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 24px;
    }

    .folio-left-image .folio-image-column {
        grid-column: 1 / 4;
    }

    .folio-left-image .folio-text-column {
        grid-column: 4 / 9;
    }

    .folio-right-image .folio-text-column {
        grid-column: 1 / 5;
    }

    .folio-right-image .folio-image-column {
        grid-column: 5 / 9;
    }

    .folio-edge {
        padding-right: 48px;
    }

    .folio-roman {
        right: 48px;
    }

    .pull-quote-overlay {
        margin-right: -20px;
    }

    .pull-quote-right {
        margin-left: -20px;
        margin-right: 0;
    }

    .pilcrow {
        display: none;
    }
}

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 640px) {
    .folio-story {
        padding: 24px;
    }

    .folio-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    .folio-left-image .folio-image-column,
    .folio-left-image .folio-text-column,
    .folio-right-image .folio-text-column,
    .folio-right-image .folio-image-column {
        grid-column: 1 / -1;
    }

    /* On mobile, always show image first then text */
    .folio-right-image .folio-text-column {
        order: 2;
    }

    .folio-right-image .folio-image-column {
        order: 1;
    }

    .folio-edge {
        padding-right: 24px;
    }

    .folio-roman {
        right: 24px;
        top: 16px;
    }

    .pull-quote-overlay,
    .pull-quote-right {
        margin-left: 0;
        margin-right: 0;
        margin-top: -30px;
    }

    .pilcrow {
        display: none;
    }

    .masthead-title {
        font-size: clamp(2.5rem, 12vw, 5rem);
    }

    .masthead-subtitle {
        letter-spacing: 0.6em;
        padding-left: 0.6em;
        font-size: clamp(0.9rem, 2.5vw, 1.4rem);
    }

    .story-headline {
        font-size: clamp(1.5rem, 6vw, 2.2rem);
    }

    .interstitial-quote blockquote p {
        font-size: clamp(1.2rem, 5vw, 1.8rem);
    }

    .wax-seal {
        bottom: 20px;
    }

    .nav-dot {
        bottom: 20px;
        right: 20px;
    }
}
