/* graphers.dev -- Swiss Rationalist / Mid-Century Exhibition Design */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: #F5F0E8;
    color: #2E2E38;
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 28px;
    letter-spacing: 0.003em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== F-PATTERN MARKER ===== */
#f-pattern-marker {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 100;
    opacity: 1;
    transition: opacity 600ms ease;
}

#f-pattern-marker.faded {
    opacity: 0.3;
}

/* ===== ZONE A: MASTHEAD ===== */
#masthead {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.masthead-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 120px;
    position: relative;
}

.wordmark {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 600;
    font-size: 20px;
    color: #0B2341;
    letter-spacing: 0;
}

.masthead-nav {
    display: flex;
    gap: 28px;
}

.masthead-nav a {
    font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5A5A6E;
    text-decoration: none;
    transition: color 250ms ease;
}

.masthead-nav a:hover {
    color: #0B2341;
}

.masthead-rule {
    height: 1px;
    background-color: #D8D0C4;
    width: 100%;
}

/* Grid-corner ornaments */
.corner-mark {
    position: absolute;
    bottom: 0;
}

.corner-mark-left {
    left: 0;
}

.corner-mark-right {
    right: 0;
}

/* ===== GRID CONTAINER ===== */
.grid-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== CONTENT SECTIONS (12-column grid) ===== */
.content-section {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0 24px;
    margin-bottom: 0;
}

.reading-column {
    grid-column: 1 / 9;
}

.reference-column {
    grid-column: 9 / 13;
    padding-top: 12px;
}

/* ===== ZONE B: BANNER ===== */
#banner {
    padding: 60px 0 40px 0;
}

#banner h1 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 700;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #0B2341;
    margin-bottom: 40px;
}

.section-terminators {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.section-terminators svg {
    width: 8px;
    height: 8px;
}

/* ===== ZONE C: CONTENT ===== */
.content-section h2 {
    font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8B1A3A;
    margin-bottom: 20px;
    padding-top: 64px;
}

.content-section p {
    margin-bottom: 20px;
}

.content-section p:last-child {
    margin-bottom: 0;
}

.content-section p strong {
    font-weight: 600;
    color: #0B2341;
}

.content-section p em {
    font-style: italic;
}

/* Reference column styles */
.reference-column blockquote {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: 15px;
    line-height: 24px;
    color: #5A5A6E;
    padding-top: 64px;
    border-left: 2px solid #D8D0C4;
    padding-left: 16px;
}

.reference-column .attribution {
    display: block;
    margin-top: 8px;
    font-style: normal;
    font-size: 12px;
}

.reference-column .annotation {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: 15px;
    line-height: 24px;
    color: #5A5A6E;
    padding-top: 64px;
    border-left: 2px solid #D8D0C4;
    padding-left: 16px;
}

/* Links */
.content-section a {
    color: #1B6B4A;
    text-decoration: none;
    border-bottom: 1px solid #D8D0C4;
    transition: border-color 250ms ease;
}

.content-section a:hover {
    border-bottom-color: #1B6B4A;
}

/* Section divider (diamond) */
.section-divider {
    display: flex;
    justify-content: center;
    padding: 32px 0 0 0;
    max-width: 1200px;
}

.section-divider svg {
    width: 12px;
    height: 12px;
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal-section {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-annotation {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 200ms,
                transform 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 200ms;
}

.reveal-annotation.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== ZONE D: ARCHIVE GRID ===== */
.archive-section {
    padding-top: 32px;
    padding-bottom: 40px;
}

.archive-section h2 {
    font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8B1A3A;
    margin-bottom: 28px;
    padding-top: 64px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.card {
    background: #FFFFFF;
    border: 1px solid #D8D0C4;
    overflow: hidden;
    transition: box-shadow 250ms ease;
}

.card:hover {
    box-shadow: 0 2px 8px rgba(11, 35, 65, 0.08);
}

.card-bar {
    height: 4px;
    width: 100%;
}

.card-title {
    font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.01em;
    color: #0B2341;
    padding: 16px 16px 8px;
}

.card-desc {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 14px;
    line-height: 20px;
    color: #5A5A6E;
    padding: 0 16px 16px;
}

/* Hidden cards (progressive disclosure) */
.hidden-card {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    border: none;
    padding: 0;
    transition: max-height 600ms ease, opacity 400ms ease-out 200ms;
}

.hidden-card.expanded {
    max-height: 300px;
    opacity: 1;
    border: 1px solid #D8D0C4;
}

/* Reveal bracket */
.reveal-bracket {
    display: flex;
    justify-content: center;
    padding-top: 24px;
    cursor: pointer;
}

.reveal-bracket svg {
    transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal-bracket:hover svg polyline {
    transform-origin: 12px 8px;
}

.reveal-bracket:hover .bracket-left {
    transform: translateY(-2px);
}

.reveal-bracket:hover .bracket-right {
    transform: translateY(-2px);
}

.reveal-bracket.open svg {
    transform: rotate(180deg);
}

/* ===== ZONE E: COLOPHON ===== */
#colophon {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 48px;
}

.colophon-rule {
    height: 1px;
    background-color: #D8D0C4;
    margin-bottom: 24px;
}

.colophon-text {
    font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.02em;
    color: #5A5A6E;
    text-align: center;
}

/* ===== RESPONSIVE: < 960px ===== */
@media (max-width: 960px) {
    .content-section {
        display: block;
    }

    .reading-column {
        grid-column: 1 / -1;
    }

    .reference-column {
        grid-column: 1 / -1;
        padding-top: 24px;
        margin-top: 24px;
        border-left: none;
    }

    .reference-column blockquote {
        padding-top: 0;
    }

    .reference-column .annotation {
        padding-top: 0;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #banner h1 {
        font-size: clamp(1.6rem, 4vw, 2.6rem);
    }

    .masthead-nav {
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .card-grid {
        grid-template-columns: 1fr;
    }

    .masthead-inner {
        flex-direction: column;
        height: auto;
        padding: 24px 0;
        gap: 12px;
    }

    .masthead-nav {
        gap: 12px;
    }

    .corner-mark {
        display: none;
    }
}
