/* ============================================================
   WOD: SIX SHOOTER CAPITAL — SHARED STYLESHEET
   fonts: Playfair Display (headings) + Crimson Text (body)
   to enable uppercase headings: uncomment the line in 
   the heading selectors marked [UPPERCASE OPTION]
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Crimson+Text:ital,wght@0,400;0,600;1,400&display=swap');

/* ── CSS Variables ─────────────────────────────────────── */
:root {
  --purple-deep:    #1A0D2E;
  --purple-mid:     #2E1A4A;
  --purple-accent:  #4A2D5C;
  --lavender:       #9B8AAD;
  --rose:           #C4737A;
  --gold:           #D4956A;
  --cream:          #E8D5C0;
  --near-black:     #0D0814;

  --panel-bg:       rgba(13, 8, 20, 0.72);
  --panel-border:   rgba(196, 115, 122, 0.25);

  --font-heading:   'Playfair Display', Georgia, serif;
  --font-body:      'Crimson Text', Georgia, serif;

  --nav-height:     56px;
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
  background-color: var(--near-black);
}

body {
  font-family: var(--font-body);
  color: var(--cream);
  background-color: var(--near-black);
  min-height: 100vh;
  line-height: 1.7;
}

/* ── Background ────────────────────────────────────────── */
.site-bg {
  position: fixed;
  inset: 0;
  background-image: url('assets/images/SSCBackgroundLight.webp');
  background-size: cover;
  background-position: center 70%;
  background-repeat: no-repeat;
  z-index: 0;
}

/* subtle dark vignette over the bg */
.site-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(to right, #0D0814 0%, transparent 12%, transparent 88%, #0D0814 100%),
    linear-gradient(to bottom, rgba(13,8,20,0.35) 0%, rgba(13,8,20,0.20) 40%, rgba(13,8,20,0.50) 100%);
}

/* Progressive enhancement: native cross-document transitions (Chrome 126+, Safari 18.2+) */
@view-transition {
  navigation: auto;
}

/* all page content sits above the fixed bg */
.page-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* ── Navigation (lives inside panel) ───────────────────── */
.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--panel-border);
}

.site-nav a {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream);
  padding: 8px 18px;
  border: 1px solid rgba(196, 115, 122, 0.40);
  border-radius: 3px;
  transition: all 0.2s ease;
  background: transparent;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(196, 115, 122, 0.15);
  border-color: var(--rose);
  color: #fff;
}

/* ── Content Panel ─────────────────────────────────────── */
.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  padding: 40px 48px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
}

/* scrollable content area inside panel */
.panel-content {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  padding-right: 28px;
  margin-right: -28px;
}

/* custom scrollbar — webkit browsers */
.panel-content::-webkit-scrollbar {
  width: 15px;
}

.panel-content::-webkit-scrollbar-track {
  background: transparent;
}

.panel-content::-webkit-scrollbar-thumb {
  background: rgba(196, 115, 122, 0.35);
  border-radius: 3px;
}

.panel-content::-webkit-scrollbar-thumb:hover {
  background: rgba(196, 115, 122, 0.65);
}

/* firefox / modern chrome */
.panel-content {
  scrollbar-width: auto;
  scrollbar-color: rgba(196, 115, 122, 0.35) transparent;
}

/* ── Typography ────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  font-variant: small-caps;
}

h1 {
  font-size: 2rem;
  color: var(--cream);
  margin-bottom: 24px;
  text-align: center;
}

h2 {
  font-size: 1.4rem;
  color: var(--gold);
  margin: 32px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--panel-border);
}

h3 {
  font-size: 1.1rem;
  color: var(--rose);
  margin: 24px 0 8px;
  font-variant: normal;
}

h4 {
  font-size: 0.95rem;
  color: var(--lavender);
  margin: 16px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

p {
  margin-bottom: 1em;
  font-size: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--rose);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--gold);
}

strong {
  color: var(--cream);
  font-weight: 600;
}

em {
  font-style: italic;
  color: var(--cream);
}

hr {
  border: none;
  border-top: 1px solid var(--panel-border);
  margin: 32px 0;
}

/* ── Tables ────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.9rem;
}

th {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  padding: 8px 12px;
  border-bottom: 1px solid var(--rose);
  text-align: left;
}

td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(196, 115, 122, 0.12);
  vertical-align: top;
}

tr:last-child td {
  border-bottom: none;
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream);
  padding: 10px 20px;
  border: 1px solid rgba(196, 115, 122, 0.50);
  border-radius: 3px;
  background: rgba(74, 45, 92, 0.30);
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover,
.btn.active {
  background: rgba(196, 115, 122, 0.20);
  border-color: var(--rose);
  color: #fff;
}

/* button grid (guides landing, etc.) */
.btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 32px;
  margin-top: 16px;
}

.btn-grid .btn {
  text-align: center;
  width: 82%;
}

.btn-grid .btn:nth-child(odd)  { justify-self: end; }
.btn-grid .btn:nth-child(even) { justify-self: start; }

/* full-width single button */
.btn-full {
  display: block;
  text-align: center;
  width: 100%;
}

/* ── Faction Grid ──────────────────────────────────────── */
.faction-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.faction-card {
  position: relative;
  display: block;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
  aspect-ratio: 2 / 3;
}

.faction-card:hover {
  transform: translateY(-3px);
  border-color: var(--rose);
}

.faction-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.faction-card .faction-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 8px 8px;
  background: linear-gradient(transparent, rgba(13, 8, 20, 0.90));
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream);
  text-align: center;
}

.faction-card.restricted {
  opacity: 0.80;
}

.faction-card.restricted .faction-label::after {
  content: ' *';
  color: inherit;
}

.faction-note {
  font-size: 0.95rem;
  color: var(--lavender);
  font-style: italic;
  margin-top: 12px;
  text-align: center;
}

/* ── Tab Navigation (Auspex-style sub-sections) ───────── */
.tab-nav {
  display: flex;
  gap: 10px;
  margin: 20px 0 0;
}

.tab-nav .btn {
  flex: 1;
  text-align: center;
}

button.btn {
  -webkit-appearance: none;
  appearance: none;
  font-family: var(--font-heading);
}

/* ── Tab Content Panels ────────────────────────────────── */
.auspex-tab {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.25s ease;
}

.auspex-tab.open {
  max-height: 2000px;
  opacity: 1;
}

/* ── Multi-column Content Grids ────────────────────────── */
.col-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 16px 0 8px;
}

.col-2 > div {
  padding: 0 16px;
}

.col-2 > div:first-child {
  padding-left: 0;
}

.col-2 > div:last-child {
  padding-right: 0;
}

.col-2 > div:not(:last-child) {
  border-right: 1px solid rgba(196, 115, 122, 0.40);
}

.col-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  margin: 16px 0 8px;
}

.col-3 > div {
  padding: 0 16px;
}

.col-3 > div:first-child {
  padding-left: 0;
}

.col-3 > div:last-child {
  padding-right: 0;
}

.col-3 > div:not(:last-child) {
  border-right: 1px solid rgba(196, 115, 122, 0.40);
}

.col-header {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--rose);
  font-variant: normal;
  text-transform: none;
  letter-spacing: normal;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(196, 115, 122, 0.40);
  margin-bottom: 10px;
  text-align: center;
}

.col-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.col-list li {
  padding: 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ── Callout / Form Box ────────────────────────────────── */
.callout {
  background: rgba(13, 8, 20, 0.45);
  border: 1px solid rgba(196, 115, 122, 0.55);
  border-radius: 4px;
  padding: 20px 24px;
  margin: 20px 0;
}

.callout h3 {
  margin-top: 0;
}

.callout ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.callout ul li {
  margin-bottom: 0.15em;
}

.callout ul li:last-child {
  margin-bottom: 0;
}

/* ── Panel-pinned Back Link (sits below scroll area) ───── */
.panel-back-link {
  align-self: center;
  min-width: min(75%, 744px);
  margin-top: 16px;
}

/* ── Back Link ─────────────────────────────────────────── */
.back-link {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream);
  padding: 10px 20px;
  border: 1px solid rgba(196, 115, 122, 0.40);
  border-radius: 3px;
  background: transparent;
  transition: all 0.2s ease;
}

.back-link::before {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(196, 115, 122, 0.40);
  transition: background 0.2s ease;
  margin: 0 20px 0 15px;
}

.back-link::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(196, 115, 122, 0.40);
  transition: background 0.2s ease;
  margin: 0 15px 0 20px;
}

.back-link:hover {
  background: rgba(196, 115, 122, 0.15);
  border-color: var(--rose);
  color: #fff;
}

.back-link:hover::before,
.back-link:hover::after {
  background: rgba(196, 115, 122, 0.65);
}

/* ── Inline Lists ──────────────────────────────────────── */
ul, ol {
  padding-left: 1.4em;
  margin-bottom: 1em;
}

li {
  margin-bottom: 0.15em;
}

/* ── Utility ───────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted   { color: var(--lavender); font-style: italic; }
.divider      { border: none; border-top: 1px solid var(--panel-border); margin: 28px 0; }

/* ── Homepage Layout ───────────────────────────────────── */
.home-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
}

.home-panel {
  width: 100%;
  max-width: 980px;
  max-height: 90vh;
}

.home-panel h1 {
  font-size: 1.8rem;
  margin-bottom: 28px;
  letter-spacing: 0.02em;
  text-align: center;
}

/* ── Inner Page Layout ─────────────────────────────────── */
.inner-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
}

.inner-panel {
  width: 100%;
  max-width: 980px;
  max-height: 90vh;
  padding-bottom: 32px;
}

/* ── Faction Pages ─────────────────────────────────────── */
.faction-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
  margin-bottom: 1.5rem;
}

.faction-header h2 {
  color: var(--gold);
  font-variant: small-caps;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.faction-guides {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.faction-guides .btn {
  width: 85%;
  text-align: center;
}

.faction-refs {
  color: var(--lavender);
  font-size: 0.92em;
  line-height: 1.8;
}

.splat-divider {
  border: none;
  border-top: 1px solid var(--panel-border);
  margin: 2rem 0;
}

.occult-header {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-variant: normal;
  color: var(--rose);
  margin: 24px 0 8px;
}

.occult-intro {
  color: var(--lavender);
  font-size: 0.92em;
  margin-bottom: 0.75rem;
}

.tab-divider {
  border: none;
  border-top: 1px solid var(--panel-border);
  margin: 1.25rem 0;
  opacity: 0.5;
}

/* ── Lost Records Page ─────────────────────────────────── */
.doc-page {
  background: rgba(18, 10, 4, 0.55);
  border: 1px solid rgba(212, 149, 106, 0.18);
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
}

.doc-page h3 {
  color: var(--gold);
  font-variant: small-caps;
  letter-spacing: 0.05em;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.doc-title {
  text-align: center;
  border-bottom: 1px solid rgba(212, 149, 106, 0.2);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.doc-title p {
  margin: 0.15rem 0;
  color: var(--cream);
  font-style: italic;
}

.doc-title .doc-author {
  color: var(--lavender);
  font-size: 0.9em;
  margin-top: 0.5rem;
}

.burned {
  color: var(--cream);
  opacity: 0.38;
  font-style: italic;
}

.rx {
  display: inline-block;
  background: rgba(35, 20, 8, 0.9);
  height: 0.95em;
  vertical-align: middle;
  border-radius: 1px;
  max-width: 100%;
}

.rx-block {
  display: block;
  background: rgba(35, 20, 8, 0.9);
  height: 1em;
  margin: 0.4em 0;
  border-radius: 1px;
  max-width: 100%;
}

.archivist-note {
  border-top: 1px solid var(--panel-border);
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  color: var(--lavender);
  font-style: italic;
  font-size: 0.9em;
}

.staff-wink {
  text-align: center;
  color: var(--rose);
  font-style: italic;
  margin-top: 2.5rem;
  font-size: 0.88em;
  opacity: 0.65;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 700px) {
  .panel {
    padding: 28px 24px;
  }

  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.2rem; }

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

  .btn-grid {
    grid-template-columns: 1fr;
  }

  .home-nav {
    flex-direction: column;
  }

  .home-nav .btn {
    text-align: center;
  }
}
