/* Building the Ravenel Bridge — site styles (on top of Bootstrap 5.3) */
:root {
  --rb-ink: #14212d;
  --rb-harbor: #0f2a3d;
  --rb-steel: #5b6b78;
  --rb-paper: #f7f5f0;
  --rb-line: #e3ded3;
  --rb-accent: #c8742a;
  --rb-accent-dark: #a65d1d;
  --bs-body-bg: var(--rb-paper);
  --bs-body-color: var(--rb-ink);
  --bs-link-color: #1d5f8a;
  --bs-link-color-rgb: 29, 95, 138;
  --bs-link-hover-color: #123e5b;
  --bs-link-hover-color-rgb: 18, 62, 91;
  --bs-border-color: var(--rb-line);
  --bs-primary: var(--rb-accent);
  --bs-primary-rgb: 200, 116, 42;
  --rb-serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
}

body { background: var(--rb-paper); color: var(--rb-ink); }
h1, h2, h3, .display-5, .navbar-brand, .section-title, .year-heading { font-family: var(--rb-serif); font-weight: 600; letter-spacing: -0.01em; }

.btn-primary { --bs-btn-bg: var(--rb-accent); --bs-btn-border-color: var(--rb-accent); --bs-btn-hover-bg: var(--rb-accent-dark); --bs-btn-hover-border-color: var(--rb-accent-dark); --bs-btn-active-bg: var(--rb-accent-dark); }

/* navigation */
.site-nav { background: var(--rb-harbor); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.site-nav .navbar-brand { font-size: 1.15rem; display: flex; align-items: center; gap: .6rem; }
.brand-mark { width: 22px; height: 22px; display: inline-block; background:
  linear-gradient(60deg, transparent 46%, var(--rb-accent) 47% 53%, transparent 54%),
  linear-gradient(-60deg, transparent 46%, var(--rb-accent) 47% 53%, transparent 54%); }
.site-nav .nav-link { color: rgba(255,255,255,.75); }
.site-nav .nav-link:hover, .site-nav .nav-link.active { color: #fff; }
.site-nav .nav-link.active { box-shadow: inset 0 -2px 0 var(--rb-accent); }

/* hero */
.hero { background: linear-gradient(160deg, var(--rb-harbor) 0%, #1c4560 100%); color: #e9eef2; padding: 3.5rem 0 2.5rem; }
.hero .eyebrow { color: #f0b67f; }
.hero h1 { color: #fff; }
.hero a { color: #9fd0f0; }
.hero-text { font-size: 1.02rem; line-height: 1.7; }
.hero-text pre { color: #f3e7d6; background: rgba(255,255,255,.06); border-left: 3px solid var(--rb-accent); padding: .75rem 1rem; border-radius: .25rem; font-family: var(--rb-serif); font-style: italic; white-space: pre-wrap; }
.hero-photo { box-shadow: 0 20px 45px rgba(0,0,0,.35); }
.topic-strip { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.15); }
.topic-strip .btn { --bs-btn-color: #dfe8ee; --bs-btn-border-color: rgba(255,255,255,.3); --bs-btn-hover-bg: rgba(255,255,255,.12); --bs-btn-hover-border-color: rgba(255,255,255,.5); --bs-btn-hover-color: #fff; }

/* curator's note on the home page */
.curator-note { margin: 2rem auto 0; max-width: 60rem; background: #fff; border: 1px solid var(--rb-line); border-left: 6px solid var(--rb-accent);
  border-radius: .6rem; padding: 1.5rem 1.75rem; box-shadow: 0 8px 24px rgba(20,33,45,.08); font-size: 1.02rem; line-height: 1.7; }
.curator-wrap { background: var(--rb-paper); padding: 1.5rem 0; }
.curator-wrap .curator-note { margin: 0 auto; }
.curator-note h2 { font-size: 1.35rem; margin: 0 0 .75rem; color: var(--rb-harbor); }
.curator-note p:last-child { margin-bottom: 0; }
.curator-note .signature { font-style: italic; }
@media (max-width: 575.98px) { .curator-note { padding: 1.1rem 1.1rem; } }

/* page header */
.page-header { background: #fff; border-bottom: 1px solid var(--rb-line); padding: 2rem 0 1.5rem; }
.page-header h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 0; max-width: 46rem; }
.page-header .lead { margin: .75rem 0 0; color: var(--rb-steel); max-width: 46rem; }
.breadcrumb { font-size: .85rem; margin-bottom: .75rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 600; color: var(--rb-accent-dark); margin-bottom: .4rem; }

.content-wrap { padding-top: 2rem; padding-bottom: 3.5rem; }
.section-title { font-size: 1.5rem; margin-bottom: 1rem; }

/* cards */
.story-card { border: 1px solid var(--rb-line); border-radius: .6rem; overflow: hidden; text-decoration: none; color: inherit; background: #fff; transition: transform .15s ease, box-shadow .15s ease; position: relative; }
a.story-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20,33,45,.12); color: inherit; }
.card-thumb { aspect-ratio: 4 / 3; background: #e9e5dc; overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-missing { width: 100%; height: 100%; background: repeating-linear-gradient(135deg, #ece8df 0 10px, #e4dfd4 10px 20px); }
.story-card .card-body { padding: .75rem .85rem .9rem; }
.card-date { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--rb-steel); margin: 0 0 .25rem; }
.card-title { font-size: .95rem; line-height: 1.35; margin: 0; font-weight: 500; }
.story-card.is-missing { opacity: .7; }
.missing-badge { position: absolute; top: .5rem; left: .5rem; font-weight: 500; }

/* timeline */
.year-toc { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.5rem; position: sticky; top: 56px; z-index: 5; background: var(--rb-paper); padding: .6rem 0; }
.year-section { margin-bottom: 2.5rem; scroll-margin-top: 110px; }
.year-heading { font-size: 2rem; border-bottom: 2px solid var(--rb-accent); display: inline-block; padding-bottom: .2rem; margin-bottom: 1.25rem; }

/* story / article body */
.prose { max-width: 60rem; margin: 0 auto; font-size: 1.05rem; line-height: 1.75; overflow-wrap: anywhere; }
.list-group-item { overflow-wrap: anywhere; }
.prose h2, .prose h3, .prose h4 { margin: 2rem 0 .75rem; line-height: 1.3; }
.prose h3 { font-size: 1.35rem; }
.prose h4 { font-size: 1.1rem; }
.prose p { margin-bottom: 1rem; }
.prose pre { white-space: pre-wrap; font-family: var(--rb-serif); font-style: italic; background: #fff; border-left: 3px solid var(--rb-accent); padding: .75rem 1rem; border-radius: .25rem; }
.prose figure.photo { margin: 1.25rem 0; text-align: center; }
.prose figure.photo img { max-height: 80vh; }
.prose .photo-row { margin-top: .75rem; margin-bottom: .75rem; }
.prose .photo-row img { width: 100%; height: 100%; object-fit: cover; }
.prose .photo-row .col > a, .prose .photo-row .col > img { display: block; height: 100%; }
.prose .layout-grid .col-sm { min-width: 0; }
.prose .layout-grid img { max-width: 100%; }
.prose blockquote { border-left: 3px solid var(--rb-line); padding-left: 1rem; color: var(--rb-steel); }
.prose .posted { display: block; font-size: .8rem; color: var(--rb-steel); margin: .5rem 0 2rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
a.lightbox { cursor: zoom-in; display: inline-block; }

.photo-missing { display: flex; align-items: center; justify-content: center; min-height: 140px; aspect-ratio: 4 / 3; width: 100%; max-width: 420px; margin: 0 auto;
  background: repeating-linear-gradient(135deg, #efebe3 0 10px, #e7e2d7 10px 20px); border: 1px dashed #cfc7b8; border-radius: .5rem; color: #8a8173; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
.photo-row .photo-missing { max-width: none; height: 100%; }

.topic-pills { max-width: 60rem; margin: 0 auto 1.5rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.topic-pill { background: #fff; color: var(--rb-harbor); border: 1px solid var(--rb-line); font-weight: 500; text-decoration: none; padding: .45em .8em; }
.topic-pill:hover { border-color: var(--rb-accent); color: var(--rb-accent-dark); }

.story-pager { max-width: 60rem; margin: 3rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--rb-line); }
.pager-link { display: block; text-decoration: none; padding: .9rem 1rem; border: 1px solid var(--rb-line); border-radius: .6rem; background: #fff; color: inherit; height: 100%; }
.pager-link:hover { border-color: var(--rb-accent); color: inherit; }
.pager-label { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--rb-accent-dark); }
.pager-title { display: block; font-weight: 500; }
.pager-date { display: block; font-size: .8rem; color: var(--rb-steel); }

/* albums */
.album-item { margin: 0; }
.album-item a.lightbox { display: block; }
.album-item img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.album-item .photo-missing { max-width: none; min-height: 0; }
.album-item figcaption { font-size: .75rem; color: var(--rb-steel); margin-top: .3rem; word-break: break-all; }
.blog-date { min-width: 9.5rem; font-size: .9rem; }

/* lightbox */
#lightbox .modal-content { background: #0b0f13; border: 0; position: relative; }
#lightbox img { max-width: 100%; max-height: 85vh; margin: 0 auto; display: block; }
#lightbox .btn-close { position: absolute; top: .75rem; right: .75rem; z-index: 3; }
#lightbox .lb-caption { color: #c9d1d8; text-align: center; padding: .5rem 1rem .75rem; font-size: .9rem; min-height: 1.5rem; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; border: 0; background: rgba(0,0,0,.35); color: #fff; font-size: 2.5rem; line-height: 1; width: 3rem; height: 4rem; border-radius: .4rem; }
.lb-nav:hover { background: rgba(0,0,0,.6); }
.lb-prev { left: .5rem; } .lb-next { right: .5rem; }

/* footer */
.site-footer { background: var(--rb-harbor); color: #c5d0d8; padding: 2.5rem 0 2rem; font-size: .9rem; }
.site-footer a { color: #fff; }
.archive-note { margin: 1.5rem 0 0; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .8rem; color: #8fa1ae; }

@media (max-width: 575.98px) {
  .site-nav .navbar-brand { font-size: 1rem; white-space: normal; max-width: calc(100% - 64px); }
  .hero { padding-top: 2rem; }
  .prose { font-size: 1rem; }
  .year-toc { top: 56px; }
}
