/* ─── Imports ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Lora:ital,wght@0,400;0,500;1,400&family=Inter:wght@300;400;500&display=swap');

/* ─── Reset & Base ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --parchment:   #f5ede0;
    --parchment-dark: #ede0ce;
    --ink:         #1a1a1a;
    --ink-light:   #3d3630;
    --gold:        #b8860b;
    --gold-light:  #d4a017;
    --blue-grey:   #2d4a5c;
    --terracotta:  #8b3a2e;
    --rule:        rgba(184, 134, 11, 0.35);
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body:    'Lora', Georgia, serif;
    --font-label:   'Inter', Arial, sans-serif;
}

html { scroll-behavior: smooth; }

/* Kill default link blue — body copy should inherit text colour */
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

body {
    background: var(--parchment);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Grain texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1000;
    opacity: 0.4;
}

/* ─── Museum Header ───────────────────────────────────────────────────── */
.museum-header {
    background: var(--blue-grey);
    color: var(--parchment);
    padding: 12px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--gold);
}

.museum-wordmark {
    font-family: var(--font-label);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    opacity: 0.85;
}

.museum-nav {
    display: flex;
    gap: 28px;
    list-style: none;
}

.museum-nav a {
    font-family: var(--font-label);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--parchment);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.museum-nav a:hover { opacity: 1; }

/* ─── Exhibition Banner ───────────────────────────────────────────────── */
.exhibition-banner {
    background: var(--parchment-dark);
    border-bottom: 1px solid var(--rule);
    padding: 8px 40px;
    text-align: center;
}

.exhibition-label {
    font-family: var(--font-label);
    font-size: 9.5px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold);
}

/* ─── Hero ────────────────────────────────────────────────────────────── */
.hero {
    position: relative;
    height: 92vh;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    filter: sepia(20%) contrast(1.05);
}

.hero-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(26,26,26,0.15) 0%,
        rgba(26,26,26,0.0) 30%,
        rgba(26,26,26,0.55) 70%,
        rgba(26,26,26,0.88) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 60px 80px;
    max-width: 820px;
    color: var(--parchment);
}

.hero-eyebrow {
    font-family: var(--font-label);
    font-size: 10px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold-light);
    margin-bottom: 16px;
    display: block;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(48px, 7vw, 90px);
    font-weight: 300;
    line-height: 1.0;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-family: var(--font-display);
    font-size: clamp(16px, 2.2vw, 22px);
    font-weight: 300;
    font-style: italic;
    line-height: 1.5;
    opacity: 0.9;
    max-width: 560px;
    margin-bottom: 28px;
    text-decoration: none;
}

.hero-tombstone {
    display: inline-block;
    border-top: 1px solid rgba(245,237,224,0.35);
    padding: 14px 12px 10px;
    margin-top: 4px;
    font-family: var(--font-label);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.85;
    background: rgba(26,26,26,0.35);
    border-radius: 1px;
}

/* ─── Layout Containers ───────────────────────────────────────────────── */
.section {
    padding: 80px 0;
    border-bottom: 1px solid var(--rule);
}

.section:last-of-type { border-bottom: none; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 60px;
}

.container-narrow {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 60px;
}

/* ─── Section Headers ─────────────────────────────────────────────────── */
.section-numeral {
    font-family: var(--font-label);
    font-size: 9px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--gold);
    display: block;
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 400;
    line-height: 1.1;
    color: var(--ink);
    margin-bottom: 8px;
}

.section-rule {
    width: 48px;
    height: 1px;
    background: var(--gold);
    margin: 20px 0 32px;
}

/* ─── Body Copy ───────────────────────────────────────────────────────── */
.body-copy {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.75;
    color: var(--ink-light);
    margin-bottom: 1.4em;
}

.body-copy:last-child { margin-bottom: 0; }

.drop-cap::first-letter {
    font-family: var(--font-display);
    font-size: 4.8em;
    font-weight: 400;
    line-height: 0.8;
    float: left;
    margin: 0.08em 0.1em 0 0;
    color: var(--gold);
}

/* ─── Curator Label ───────────────────────────────────────────────────── */
.curator-label {
    font-family: var(--font-label);
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--blue-grey);
    margin-bottom: 6px;
    display: block;
}

/* ─── Tombstone Metadata ──────────────────────────────────────────────── */
.tombstone {
    display: inline-block;
    border: 1px solid var(--rule);
    padding: 16px 22px;
    margin: 24px 0;
    background: var(--parchment-dark);
}

.tombstone-title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 500;
    margin-bottom: 6px;
}

.tombstone-meta {
    font-family: var(--font-label);
    font-size: 10.5px;
    letter-spacing: 0.12em;
    color: var(--ink-light);
    opacity: 0.75;
}

.tombstone-meta span + span::before {
    content: ' · ';
}

/* ─── Pull Quote ──────────────────────────────────────────────────────── */
.pull-quote {
    margin: 44px 0;
    padding: 0 0 0 28px;
    border-left: 3px solid var(--gold);
}

.pull-quote-text {
    font-family: var(--font-display);
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 300;
    font-style: italic;
    line-height: 1.4;
    color: var(--blue-grey);
    margin-bottom: 12px;
}

.pull-quote-source {
    font-family: var(--font-label);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
}

/* ─── Two-Column Layout ───────────────────────────────────────────────── */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.two-col-wide {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 60px;
    align-items: start;
}

/* ─── Figures & Images ────────────────────────────────────────────────── */
.exhibit-figure {
    margin: 0;
}

.exhibit-figure img {
    width: 100%;
    height: auto;
    display: block;
    filter: sepia(10%) contrast(1.04);
    border: 1px solid rgba(184,134,11,0.2);
}

.exhibit-figure figcaption {
    font-family: var(--font-label);
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--ink-light);
    opacity: 0.65;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--rule);
    line-height: 1.5;
}

.figure-full {
    margin: 52px 0;
}

.figure-full img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    filter: sepia(12%) contrast(1.05);
    border: 1px solid rgba(184,134,11,0.2);
}

.figure-portrait {
    float: right;
    width: 340px;
    margin: 0 0 32px 48px;
    shape-outside: inset(0 round 2px);
}

.figure-portrait img {
    width: 100%;
    filter: sepia(25%) contrast(1.1) brightness(0.95);
}

/* ─── Ornamental Divider ──────────────────────────────────────────────── */
.ornament {
    text-align: center;
    margin: 48px 0;
    color: var(--gold);
    font-size: 14px;
    letter-spacing: 0.5em;
    opacity: 0.6;
    user-select: none;
}

/* ─── Timeline Strip ──────────────────────────────────────────────────── */
.timeline {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    margin: 44px 0;
}

.timeline-item {
    background: var(--parchment);
    padding: 20px 18px;
}

.timeline-date {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 500;
    color: var(--gold);
    display: block;
    margin-bottom: 6px;
}

.timeline-event {
    font-family: var(--font-label);
    font-size: 11px;
    letter-spacing: 0.06em;
    line-height: 1.4;
    color: var(--ink-light);
}

/* ─── Feature Cards ───────────────────────────────────────────────────── */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: var(--rule);
    border: 1px solid var(--rule);
    margin: 44px 0;
}

.feature-card {
    background: var(--parchment);
    padding: 28px 24px;
}

.feature-card-label {
    font-family: var(--font-label);
    font-size: 9px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 10px;
    display: block;
}

.feature-card-heading {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--blue-grey);
}

.feature-card-body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.65;
    color: var(--ink-light);
}

/* ─── Tester Footer ───────────────────────────────────────────────────── */
.tester-bar {
    background: var(--blue-grey);
    color: var(--parchment);
    padding: 28px 60px;
    text-align: center;
    border-top: 2px solid var(--gold);
}

.tester-bar-instruction {
    font-family: var(--font-body);
    font-size: 16px;
    font-style: italic;
    opacity: 0.9;
    margin-bottom: 8px;
}

.tester-bar-small {
    font-family: var(--font-label);
    font-size: 10px;
    letter-spacing: 0.15em;
    opacity: 0.55;
}

/* ─── Attribution Block ───────────────────────────────────────────────── */
.attribution {
    background: var(--parchment-dark);
    border-top: 1px solid var(--rule);
    padding: 40px 60px;
    font-family: var(--font-label);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--ink-light);
    opacity: 0.7;
    text-align: center;
}

/* ─── Edit mode highlight (overridden by edit.js) ─────────────────────── */
[data-edit-id]:focus {
    outline: 2px dashed var(--gold);
    outline-offset: 3px;
}

/* ─── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .container, .container-narrow { padding: 0 24px; }
    .hero-content { padding: 40px 24px; }
    .two-col, .two-col-wide { grid-template-columns: 1fr; gap: 36px; }
    .timeline { grid-template-columns: 1fr 1fr; }
    .feature-grid { grid-template-columns: 1fr; }
    .museum-header { padding: 12px 24px; }
    .figure-portrait { float: none; width: 100%; margin: 0 0 24px 0; }
    .figure-full img { height: 320px; }
    .museum-nav { display: none; }
}
