/* ============================================
   HISTORICAL VAULT
   vault/vault.css — loaded after ../styles.css
   ============================================ */

/* Override absolute nav to sticky for the vault's scrollable layout */
.nav {
  position: sticky;
  top: 0;
  background: rgba(5, 4, 3, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

/* ============================================
   ENTRY ADVISORY OVERLAY
   ============================================ */
.vault-advisory {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.5s ease;
  overflow-y: auto;
}
.vault-advisory.va-dismissing {
  opacity: 0;
  pointer-events: none;
}
.vault-advisory.va-dismissed {
  display: none;
}
.va-card {
  position: relative;
  max-width: 580px;
  width: 100%;
  padding: 52px 48px;
  background: #070605;
  border: 1px solid var(--border-strong);
  margin: auto;
}
.va-card::before,
.va-card::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  border: 1px solid var(--gold);
  pointer-events: none;
}
.va-card::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.va-card::after  { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.va-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.38em;
  color: var(--gold);
  margin-bottom: 22px;
}
.va-headline {
  font-family: var(--f-display);
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 22px;
}
.va-body {
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-soft);
  margin-bottom: 20px;
}
.va-confirm {
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-mute);
  padding-top: 20px;
  margin-bottom: 32px;
  border-top: 1px solid var(--border);
}
.va-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.va-link-secondary {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  transition: color 0.3s ease;
}
.va-link-secondary:hover { color: var(--gold); }

/* ============================================
   VAULT HERO
   ============================================ */
.vh-hero {
  position: relative;
  padding: 100px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
/* Background image layer */
.vh-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.vh-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* Dark overlay — radial vignette + top/bottom fade for centered content */
.vh-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 75% at center, rgba(0,0,0,0.42) 0%, rgba(0,0,0,0.88) 100%),
    linear-gradient(0deg, rgba(0,0,0,0.65) 0%, transparent 35%, transparent 65%, rgba(0,0,0,0.52) 100%);
}
.vh-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 740px;
  width: 100%;
  text-align: center;
}
.vh-hero-inner .eyebrow {
  margin-bottom: 36px;
}
.vh-headline {
  font-family: var(--f-display);
  font-size: clamp(56px, 8vw, 104px);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin-bottom: 32px;
}
.vh-headline em {
  font-style: italic;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 55%, var(--gold-dim) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.vh-subhead {
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 520px;
  margin: 0 auto 52px;
}
/* Search bar (visual only — RAG pipeline not wired yet) */
.vh-search-wrap {
  position: relative;
  max-width: 480px;
  margin: 0 auto 22px;
}
.vh-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--ink-mute);
  pointer-events: none;
}
.vh-search-input {
  width: 100%;
  padding: 16px 20px 16px 48px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-mute);
  font-family: var(--f-body);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.04em;
  outline: none;
  cursor: default;
}
.vh-search-input::placeholder { color: var(--ink-mute); opacity: 0.6; }
.vh-search-input:disabled { opacity: 0.5; cursor: default; }
/* Live document count */
.vh-stat {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.34em;
  color: var(--ink-mute);
  min-height: 1.2em;
  transition: opacity 0.5s ease;
  text-transform: uppercase;
}
.vh-stat.vh-loading { animation: pulse 1.4s ease-in-out infinite; opacity: 0.45; }

/* ============================================
   FEATURED EXHIBIT SLIDESHOW
   ============================================ */
.vh-featured {
  padding: 80px var(--gutter) 100px;
  border-bottom: 1px solid var(--border);
}
.vh-featured-inner {
  max-width: 900px;
  margin: 0 auto;
}
.vh-section-head {
  margin-bottom: 44px;
}
.vh-section-head .eyebrow {
  margin-bottom: 14px;
}
.vh-section-title {
  font-family: var(--f-display);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.vh-section-title em {
  font-style: italic;
  color: var(--gold);
}
/* Slide card */
.vh-slide {
  position: relative;
  padding: 52px 56px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #090807 0%, #050403 100%);
}
.vh-slide::before,
.vh-slide::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border: 1px solid var(--gold);
  pointer-events: none;
}
.vh-slide::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.vh-slide::after  { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.vh-slide-era {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.34em;
  color: var(--gold-dim);
  margin-bottom: 16px;
  text-transform: uppercase;
}
.vh-slide-title {
  font-family: var(--f-display);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 18px;
}
.vh-slide-summary {
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 600px;
  margin-bottom: 36px;
}
.vh-slide-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.vh-slide-dots {
  display: flex;
  gap: 9px;
  align-items: center;
}
.vh-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-strong);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}
.vh-dot:hover { background: var(--gold-dim); }
.vh-dot--active {
  background: var(--gold);
  transform: scale(1.35);
}
/* Empty / loading state */
.vh-slide-empty {
  padding: 64px 56px;
  border: 1px solid var(--border);
  text-align: center;
  background: linear-gradient(180deg, #080706 0%, #050403 100%);
}
.vh-slide-empty p {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 20px;
  color: var(--ink-mute);
}

/* ============================================
   BROWSE THE ARCHIVE
   ============================================ */
.vh-browse {
  padding: 80px var(--gutter) 120px;
}
.vh-browse-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.vh-topics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
/* Skeleton placeholders while loading */
.vh-skeleton {
  min-height: 180px;
  opacity: 0.18;
  pointer-events: none;
  animation: pulse 1.4s ease-in-out infinite;
}
.vh-empty-state {
  font-size: 13px;
  color: var(--ink-mute);
  font-style: italic;
}

/* ============================================
   CLOSING SECTION — "Nothing forgotten."
   Full-bleed background image, used on vault homepage
   ============================================ */
.vm-closing-section {
  position: relative;
  padding: 140px var(--gutter);
  text-align: center;
  overflow: hidden;
}
.vm-closing-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.vm-closing-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* Dark overlay — radial vignette + top/bottom fade */
.vm-closing-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 70% at center, rgba(0,0,0,0.48) 0%, rgba(0,0,0,0.92) 100%),
    linear-gradient(0deg, rgba(0,0,0,0.7) 0%, transparent 40%, transparent 60%, rgba(0,0,0,0.6) 100%);
}
.vm-closing-inner {
  position: relative;
  z-index: 1;
}
.vm-closing-line {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(32px, 4.5vw, 64px);
  font-weight: 400;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 60%, var(--gold-dim) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 820px) {
  .vh-hero { min-height: auto; padding: 80px var(--gutter); }
  .vm-closing-section { padding: 100px var(--gutter); }
  .vh-slide { padding: 40px 32px; }
  .vh-slide-empty { padding: 48px 32px; }
  .vh-topics-grid { grid-template-columns: 1fr; }
  .va-card { padding: 40px 28px; }
  .va-actions { flex-direction: column; align-items: flex-start; gap: 20px; }
  .vh-slide-footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .vh-headline { font-size: 52px; }
  .vm-closing-section { padding: 80px var(--gutter); }
  .vh-slide { padding: 32px 24px; }
  .vh-slide-empty { padding: 40px 24px; }
  .va-card { padding: 36px 24px; }
  .va-card::before,
  .va-card::after { width: 20px; height: 20px; }
}
