/* ── SWIFT SALES VAULT — SHARED STYLESHEET ─────────────────────────────────
   All pages link to this one file. Edit here to change the whole site.
   ────────────────────────────────────────────────────────────────────────── */

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

:root {
  --bg:        #141414;
  --surface:   #1c1c1c;
  --border:    #2a2a2a;
  --gold:      #c9a155;
  --gold-dim:  #7a5e2a;
  --text:      #e8e2d8;
  --muted:     #666;
  --hover-row: #1e1e1e;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  { background: var(--bg); color: var(--text); font-family: 'Barlow', sans-serif; font-weight: 300; min-height: 100vh; }
a     { color: inherit; }

/* ── NAV ──────────────────────────────────────────────────────────────────── */
.nav-wrapper {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border);
}
.nav-wrapper::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(8,8,8,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: -1;
}
.nav-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 56px;
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif; font-size: 1.25rem;
  font-weight: 600; letter-spacing: 0.08em; color: var(--gold);
  text-decoration: none; white-space: nowrap;
}
.nav-links { display: flex; list-style: none; height: 100%; }
.nav-links > li { position: relative; height: 100%; display: flex; align-items: center; }
.nav-links > li > a {
  display: flex; align-items: center; height: 100%; padding: 0 14px;
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.8rem;
  font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  border-bottom: 2px solid transparent; transition: color .2s;
}
.nav-links > li > a:hover,
.nav-links > li > a.active { color: var(--text); border-bottom-color: var(--gold); }
.nav-links > li:hover .dropdown { display: block; }
.dropdown {
  display: none; position: absolute; top: 100%; left: 0;
  background: #0e0e0e; border: 1px solid var(--border); border-top: none;
  min-width: 210px; padding: 6px 0; z-index: 200;
}
.dropdown a {
  display: block; padding: 8px 18px;
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.88rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; transition: color .2s, background .2s;
}
.dropdown a:hover { color: var(--text); background: var(--hover-row); }

/* Third-level flyout */
.has-flyout { position: relative; }
.has-flyout > a {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
}
.has-flyout > a::after {
  content: '›';
  font-size: 1rem;
  margin-left: 12px;
  color: var(--muted);
}
.flyout {
  display: none;
  position: absolute;
  left: 100%; top: -6px;
  background: #0e0e0e;
  border: 1px solid var(--border);
  min-width: 210px;
  padding: 6px 0;
  z-index: 300;
}
.has-flyout:hover .flyout { display: block; }
.flyout a {
  display: block;
  padding: 7px 18px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s, background .2s;
}
.flyout a:hover { color: var(--text); background: var(--hover-row); }

/* Hamburger (mobile) */
.nav-hamburger {
  display: none; background: none; border: none;
  color: var(--muted); cursor: pointer; padding: 8px; font-size: 1.4rem;
}
.nav-mobile {
  display: none; flex-direction: column;
  background: #0e0e0e; border-bottom: 1px solid var(--border); padding: 8px 0;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: 10px 24px; font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
}
.nav-mobile a.sub { padding-left: 40px; font-size: 0.72rem; color: #444; }
.nav-mobile a:hover { color: var(--text); }

/* ── HERO ─────────────────────────────────────────────────────────────────── */
.hero {
  border-bottom: 1px solid var(--border);
  padding: 52px 24px 40px; max-width: 1400px; margin: 0 auto;
}
.hero-label {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.7rem;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 10px;
}
.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.8rem, 6vw, 5rem); font-weight: 300;
  line-height: 1; letter-spacing: -0.02em; margin-bottom: 36px;
}
.stats-row { display: flex; flex-wrap: wrap; border: 1px solid var(--border); }
.stat { flex: 1; min-width: 160px; padding: 20px 24px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: none; }
.stat-number {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(1.3rem, 2vw, 1.8rem); font-weight: 600;
  color: var(--gold); letter-spacing: -0.02em; line-height: 1; margin-bottom: 5px;
}
.stat-label {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.68rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
}

/* ── MAIN CONTENT ─────────────────────────────────────────────────────────── */
.content { max-width: 1400px; margin: 0 auto; padding: 40px 24px 80px; }

/* ── TABS ─────────────────────────────────────────────────────────────────── */
.tab-bar { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.tab-btn {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.78rem;
  font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); background: none; border: none;
  border-bottom: 2px solid transparent; padding: 12px 28px;
  margin-bottom: -1px; cursor: pointer; transition: color .2s, border-color .2s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ── SEARCH / CONTROLS ────────────────────────────────────────────────────── */
.controls { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.search-wrap { position: relative; flex: 1; min-width: 220px; max-width: 380px; }
.search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none; width: 14px; height: 14px;
}
.search-input {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-family: 'Barlow', sans-serif;
  font-size: 0.82rem; font-weight: 300; padding: 9px 12px 9px 36px; outline: none;
  transition: border-color .2s;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus { border-color: var(--gold-dim); }
.row-count {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.72rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--muted); margin-left: auto;
}

/* ── TABLE ────────────────────────────────────────────────────────────────── */
#tableContainer {
  display: inline-block;
  border: 1px solid var(--border);
  vertical-align: top;
}
.table-scroll {
  overflow-x: auto;
  text-align: center;
  width: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.table-scroll::-webkit-scrollbar { display: none; }
.table-scroll-center { width: 100%; }
table { border-collapse: collapse; font-size: 0.855rem; }
thead th {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 13px 20px; font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted); text-align: center;
  white-space: nowrap; cursor: pointer; user-select: none; transition: color .2s;
}
thead th:hover { color: var(--text); }
thead th.sort-asc::after  { content: ' ↑'; color: var(--gold); }
thead th.sort-desc::after { content: ' ↓'; color: var(--gold); }
thead th.active-sort { color: var(--text); }
tbody tr { border-bottom: 1px solid #222; transition: background .15s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--hover-row); }
tbody td { padding: 10px 20px; font-weight: 300; white-space: nowrap; text-align: center; }
.td-pos { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 0.78rem; color: var(--muted); }
.td-cover { width: 50px; padding: 5px 8px 5px 16px !important; }
.cover-thumb { width: 34px; height: 34px; object-fit: cover; display: block; border: 1px solid var(--border); margin: 0 auto; }
.td-name { font-weight: 400; color: var(--text); text-align: center; }
.td-num { font-family: 'Barlow Condensed', sans-serif; font-size: 0.88rem; letter-spacing: 0.04em; color: #b0aa9e; text-align: center; }
.td-num.highlight {
  color: var(--gold); font-weight: 600;
  background: rgba(201, 161, 85, 0.07);
  border-left: 2px solid rgba(201, 161, 85, 0.25);
  border-right: 2px solid rgba(201, 161, 85, 0.25);
}
.td-date { font-family: 'Barlow Condensed', sans-serif; font-size: 0.78rem; color: var(--muted); text-align: center; white-space: nowrap; max-width: 160px; }
.era-badge {
  display: inline-block; font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 2px 7px; border-radius: 2px;
}

/* ── LOADING / EMPTY STATES ───────────────────────────────────────────────── */
.state-msg {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 80px 20px;
  color: var(--muted); font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 0.15em; text-transform: uppercase;
  font-size: 0.8rem; gap: 16px; text-align: center;
}
.spinner {
  width: 28px; height: 28px; border: 2px solid var(--border);
  border-top-color: var(--gold); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── FOOTER ───────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border); padding: 32px 24px;
  max-width: 1400px; margin: 0 auto;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; }
.footer-links a {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.72rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; transition: color .2s;
}
.footer-links a:hover { color: var(--text); }
.footer-note { font-size: 0.75rem; color: var(--muted); font-weight: 300; }

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links   { display: none; }
  .nav-hamburger { display: block; }
  .stats-row   { flex-direction: column; }
  .stat        { border-right: none; border-bottom: 1px solid var(--border); }
  .stat:last-child { border-bottom: none; }
  .hero-title  { margin-bottom: 24px; }
}
