/* =========================================================
   gabs.report — Vintage Newspaper Layout
   Palette:
     #f5efe3  Newsprint Cream (background)
     #2c2620  Ink Brown (primary text + Fold dark bg)
     #c4b8a0  Column Rule (borders/rules)
     #a0845c  Pull-Quote Ochre (accent)
     #6b6054  Marginalia Gray (sidebar text)
     #8b3a2a  Seal Red (colophon seal)
   Fonts:
     Playfair Display SC, Crimson Pro, Source Sans 3, Cormorant SC
   ========================================================= */

:root {
    --c-cream:    #f5efe3;
    --c-ink:      #2c2620;
    --c-rule:     #c4b8a0;
    --c-ochre:    #a0845c;
    --c-fold:     #2c2620;
    --c-margin:   #6b6054;
    --c-seal:     #8b3a2a;

    --rule-soft:  rgba(196, 184, 160, 0.4);
    --rule-mid:   rgba(196, 184, 160, 0.6);
    --rule-light: rgba(245, 239, 227, 0.2);

    --f-display:  "Playfair Display SC", "Playfair Display", Georgia, serif;
    --f-body:     "Crimson Pro", "Crimson Text", Georgia, serif;
    --f-sans:     "Source Sans 3", "Source Sans Pro", system-ui, sans-serif;
    --f-section:  "Cormorant SC", "Cormorant Garamond", Georgia, serif;

    --topbar-h:   54px;
}

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

html {
    background-color: var(--c-cream);
    color: var(--c-ink);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    hyphens: auto;
    -webkit-hyphens: auto;
    text-rendering: optimizeLegibility;
}

body {
    background-color: var(--c-cream);
    color: var(--c-ink);
    font-family: var(--f-body);
    font-size: clamp(0.95rem, 1.1vw, 1.08rem);
    line-height: 1.75;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(160, 132, 92, 0.025) 0, transparent 60%),
        radial-gradient(circle at 80% 70%, rgba(107, 96, 84, 0.025) 0, transparent 60%);
}

/* ---------- Top Navigation Bar ---------- */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    background-color: rgba(245, 239, 227, 0.95);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-bottom: 2px solid var(--c-ink);
    z-index: 100;
}

.topbar-inner {
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 4vw;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar-title {
    font-family: var(--f-display);
    font-weight: 900;
    font-size: 1.05rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--c-ink);
}

.topbar-sections {
    list-style: none;
    display: flex;
    gap: 2.4em;
}

.topbar-sections a {
    font-family: var(--f-section);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.20em;
    color: var(--c-ink);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: border-color 220ms ease;
}

.topbar-sections a.is-active,
.topbar-sections a:hover {
    border-bottom-color: var(--c-ochre);
}

/* ---------- Universal Rules ---------- */
.rule {
    border: 0;
    background-color: var(--c-rule);
    color: var(--c-rule);
    margin: 0;
    width: 100%;
}

.rule-hair  { height: 1px;   opacity: 0.55; margin-top: 6px; }
.rule-thin  { height: 1px;   opacity: 0.85; }
.rule-thick { height: 2px;   background-color: var(--c-ink); opacity: 1; }
.rule-invert { background-color: rgba(245, 239, 227, 0.55); }

/* ---------- Section Headers ---------- */
.section-header {
    padding-top: 8vh;
    padding-bottom: 3vh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6em;
}

.section-header .rule {
    margin-top: 1.2em;
}

.section-number {
    font-family: var(--f-section);
    font-weight: 600;
    font-size: 1.4rem;
    letter-spacing: 0.20em;
    color: var(--c-ochre);
}

.section-title {
    font-family: var(--f-display);
    font-weight: 900;
    font-size: clamp(2rem, 4.5vw, 3.6rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--c-ink);
    line-height: 1.1;
}

.section-kicker {
    font-family: var(--f-body);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--c-margin);
    line-height: 1.5;
    max-width: 56ch;
}

.section-header-dark .section-number { color: var(--c-rule); }
.section-header-dark .section-title  { color: var(--c-cream); }
.section-header-dark .section-kicker { color: var(--c-rule); }

/* =========================================================
   I.  THE MASTHEAD
   ========================================================= */
.masthead {
    min-height: 100vh;
    padding: calc(var(--topbar-h) + 4vh) 6vw 6vh;
    background-color: var(--c-cream);
    display: grid;
    grid-template-rows: auto auto auto auto auto 1fr auto;
    row-gap: 1.4vh;
    position: relative;
}

.masthead-meta {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: end;
    font-family: var(--f-sans);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--c-margin);
    padding-bottom: 0.4em;
}

.masthead-meta .meta-center { text-align: center; }
.masthead-meta .meta-right  { text-align: right; }

.masthead-title {
    font-family: var(--f-display);
    font-weight: 900;
    font-size: clamp(2.5rem, 13vw, 9.5rem);
    letter-spacing: 0.10em;
    text-transform: uppercase;
    line-height: 0.95;
    color: var(--c-ink);
    text-align: center;
    padding: 0.18em 0 0.10em;
    font-feature-settings: "smcp" on;
}

.masthead-subtitle {
    font-family: var(--f-section);
    font-weight: 600;
    font-size: clamp(0.85rem, 1.3vw, 1.1rem);
    letter-spacing: 0.30em;
    text-transform: uppercase;
    text-align: center;
    color: var(--c-ink);
    padding: 0.4em 0 0.6em;
}

.masthead-abstract {
    max-width: 60ch;
    margin: 4vh auto 0;
    text-align: justify;
    text-justify: inter-word;
    hanging-punctuation: first last;
    -webkit-hanging-punctuation: first last;
}

.masthead-abstract .byline {
    margin-top: 1.4em;
    font-family: var(--f-sans);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--c-margin);
    text-align: center;
}

/* Drop cap — applied to every .section-lead opening paragraph */
p.section-lead::first-letter {
    float: left;
    font-family: var(--f-display);
    font-weight: 700;
    font-size: 4.5em;
    line-height: 0.8;
    margin-right: 0.10em;
    margin-top: 0.05em;
    padding: 0.04em 0.06em 0.05em 0;
    border-bottom: 2px solid var(--c-ochre);
    color: var(--c-ink);
}

.fold-body p.section-lead::first-letter {
    color: var(--c-cream);
    border-bottom-color: var(--c-ochre);
}

/* =========================================================
   II. THE LEAD COLUMN
   ========================================================= */
.lead-column {
    padding: 0 6vw 8vh;
    background-color: var(--c-cream);
    min-height: 180vh;
}

.lead-grid {
    display: grid;
    grid-template-columns: 58% 1px 34%;
    column-gap: 4%;
    align-items: start;
    margin-top: 4vh;
}

.lead-main {
    text-align: justify;
    text-justify: inter-word;
    hanging-punctuation: first last;
    -webkit-hanging-punctuation: first last;
    max-width: 38em;
}

.lead-main p {
    margin-bottom: 1.4em;
    line-height: 1.78;
}

.lead-main p + p {
    text-indent: 1.6em;
}

.lead-main p.section-lead {
    text-indent: 0;
}

.column-rule {
    width: 1px;
    height: 100%;
    background-color: var(--rule-soft);
    align-self: stretch;
}

.lead-sidebar {
    position: sticky;
    top: calc(var(--topbar-h) + 30px);
    align-self: start;
    font-family: var(--f-sans);
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--c-margin);
    display: flex;
    flex-direction: column;
    gap: 2.2em;
    padding-top: 0.4em;
    max-height: calc(100vh - var(--topbar-h) - 60px);
    overflow: hidden;
}

.margin-block .margin-label {
    font-family: var(--f-sans);
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--c-ink);
    margin-bottom: 0.4em;
    border-bottom: 1px solid var(--rule-mid);
    padding-bottom: 0.25em;
}

.margin-block .margin-body {
    font-family: var(--f-sans);
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--c-margin);
}

.pullquote {
    border-top: 1px solid var(--rule-mid);
    border-bottom: 1px solid var(--rule-mid);
    padding: 1em 0;
    margin: 0;
}

.pullquote p {
    font-family: var(--f-body);
    font-style: italic;
    font-weight: 400;
    font-size: 1.15rem;
    line-height: 1.45;
    color: var(--c-ochre);
    text-align: left;
}

/* =========================================================
   III. THE ANALYSIS FOLD
   ========================================================= */
.analysis-fold {
    background-color: var(--c-fold);
    color: var(--c-cream);
    padding: 0 6vw;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
}

.analysis-fold .rule-thick {
    background-color: var(--c-rule);
    height: 2px;
    opacity: 0.85;
}

.analysis-fold .section-header {
    padding-top: 8vh;
    padding-bottom: 3vh;
}

.fold-body {
    max-width: 65ch;
    margin: 4vh auto;
    padding: 0 0 8vh;
    color: var(--c-cream);
    text-align: justify;
    text-justify: inter-word;
    hanging-punctuation: first last;
    -webkit-hanging-punctuation: first last;
    line-height: 1.85;
    font-size: clamp(1rem, 1.15vw, 1.12rem);
}

.fold-body p {
    margin-bottom: 1.5em;
}

.fold-body p + p {
    text-indent: 1.6em;
}

.fold-body em {
    color: var(--c-ochre);
    font-style: italic;
}

/* =========================================================
   IV. THE SUPPLEMENT
   ========================================================= */
.supplement {
    background-color: var(--c-cream);
    padding: 0 6vw 6vh;
    min-height: 80vh;
}

.supplement-grid {
    margin-top: 4vh;
    column-count: 3;
    column-gap: 4vw;
    column-rule: 1px solid var(--rule-soft);
    column-fill: balance;
}

.supp-item {
    break-inside: avoid;
    margin-bottom: 2.4em;
    text-align: justify;
    text-justify: inter-word;
}

.supp-headline {
    font-family: var(--f-display);
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--c-ink);
    line-height: 1.2;
    margin-bottom: 0.6em;
    border-bottom: 1px solid var(--c-ink);
    padding-bottom: 0.3em;
}

.supp-item p {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--c-ink);
}

.supp-ornament {
    break-inside: avoid;
    margin: 1.6em 0 2em;
}

/* =========================================================
   V. THE COLOPHON
   ========================================================= */
.colophon {
    background-color: var(--c-cream);
    padding: 4vh 6vw 6vh;
    min-height: 40vh;
}

.colophon-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6vw;
    align-items: center;
    margin-top: 4vh;
}

.colophon-text {
    font-family: var(--f-sans);
    font-size: 0.82rem;
    line-height: 1.65;
    color: var(--c-margin);
    max-width: 56ch;
}

.colophon-text p {
    margin-bottom: 1em;
    text-align: justify;
}

.colophon-imprint {
    font-family: var(--f-section);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--c-ink);
    text-align: left !important;
}

/* ---------- Publisher's Seal ---------- */
.seal-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.seal-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: seal-rotate 30s linear infinite;
    transform-origin: 50% 50%;
}

.seal-text {
    font-family: var(--f-section);
    font-weight: 600;
    font-size: 8.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    fill: var(--c-seal);
}

.seal-disc {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    transform: translate(-50%, -50%);
    border: 1.5px solid var(--c-seal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--c-cream);
}

.seal-character {
    font-family: var(--f-display);
    font-weight: 900;
    font-size: 28px;
    color: var(--c-seal);
    line-height: 1;
    transform: translateY(1px);
}

@keyframes seal-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* =========================================================
   PRINTER'S ORNAMENTS
   ========================================================= */
.ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9em;
    margin: 3em auto 3em;
    width: 100%;
}

.ornament-row {
    margin: 4vh auto 2vh;
}

.ornament-diamond {
    margin: 2.4em auto;
}

.ornament-stack {
    flex-direction: column;
    gap: 0.6em;
    margin: 1em auto 0;
}

.diamond {
    width: 6px;
    height: 6px;
    border: 1px solid var(--c-rule);
    background-color: transparent;
    transform: rotate(45deg);
    display: inline-block;
}

.ornament-diamond .diamond {
    width: 10px;
    height: 10px;
    border-color: var(--c-ochre);
}

.ornament-stack .rule-mini {
    width: 36px;
    height: 1px;
    background-color: var(--c-rule);
    display: inline-block;
}

/* =========================================================
   RESPONSIVE  (< 768px)
   ========================================================= */
@media (max-width: 768px) {
    .topbar-inner { padding: 0 5vw; }
    .topbar-title { font-size: 0.9rem; letter-spacing: 0.14em; }
    .topbar-sections { gap: 1.4em; }
    .topbar-sections a { font-size: 0.95rem; letter-spacing: 0.16em; }

    .masthead {
        padding: calc(var(--topbar-h) + 3vh) 5vw 5vh;
    }

    .masthead-meta {
        grid-template-columns: 1fr;
        text-align: center !important;
        gap: 0.4em;
        font-size: 0.7rem;
    }
    .masthead-meta .meta-right,
    .masthead-meta .meta-center { text-align: center; }

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

    .masthead-subtitle {
        letter-spacing: 0.20em;
    }

    .lead-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .column-rule {
        width: 100%;
        height: 1px;
        margin: 2.4em 0;
        background-color: var(--rule-mid);
    }

    .lead-sidebar {
        position: static;
        max-height: none;
        margin-top: 2.4em;
        padding-top: 2.4em;
        border-top: 1px solid var(--rule-mid);
    }

    .lead-main { max-width: none; }

    .supplement-grid {
        column-count: 1;
    }

    .supp-item {
        border-bottom: 1px solid var(--rule-mid);
        padding-bottom: 1.6em;
    }

    .colophon-inner {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .colophon-text { text-align: center; }
    .colophon-text p { text-align: center; }

    p.section-lead::first-letter {
        font-size: 3.6em;
    }

    .section-title {
        font-size: clamp(1.6rem, 8vw, 2.4rem);
    }
}
