/* =========================================
   THE FREEPORT CHRONICLES — SHARED CSS
   Dark Gothic · All Section Pages
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Cinzel:wght@400;500;600;700&family=IM+Fell+English:ital@0;1&display=swap');

:root {
  --bg:           #0b0a07;
  --surface:      #141209;
  --surface-2:    #1c1a10;
  --surface-3:    #252115;
  --border:       #302b18;
  --border-light: #4a4422;
  --gold:         #c9a84c;
  --gold-light:   #e8c96a;
  --gold-dim:     #6e5a28;
  --gold-glow:    rgba(201,168,76,0.12);
  --ember:        #b85c2a;
  --ember-dim:    #7a3a18;
  --crystal:      #4a7a9b;
  --text-primary: #e8e0cc;
  --text-secondary:#a89870;
  --text-muted:   #635840;
  --font-display: 'Cinzel Decorative', serif;
  --font-heading: 'Cinzel', serif;
  --font-body:    'IM Fell English', serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.6) 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: cover, 180px 180px;
  opacity: 0.035;
}

/* ── NAV ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,10,7,0.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.05em;
}

.nav-links { display: flex; align-items: center; }

.nav-link {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0 1.25rem;
  height: 60px;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--border);
  transition: color 0.2s, background 0.2s;
}
.nav-link:first-child { border-left: 1px solid var(--border); }
.nav-link:hover,
.nav-link.active { color: var(--gold); background: rgba(201,168,76,0.04); }

/* ── PAGE LAYOUT ── */
.page-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
}

/* ── PAGE HEADER ── */
.page-header {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3.5rem;
  position: relative;
}

.page-header::after {
  content: '✦';
  position: absolute;
  bottom: -0.65rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  padding: 0 1rem;
  color: var(--gold-dim);
  font-size: 0.75rem;
}

.page-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 0.75rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1.1;
  margin-bottom: 0.75rem;
  text-shadow: 0 0 60px rgba(201,168,76,0.15);
}

.page-desc {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.8;
}

/* ── CONTENT GRID (Guild sub-pages) ── */
.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2rem 2rem 2.5rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
}

.content-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(to right, transparent, var(--gold-dim), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.content-card:hover { border-color: var(--border-light); background: var(--surface-2); }
.content-card:hover::before { opacity: 1; }

.content-card-icon { font-size: 2rem; margin-bottom: 0.75rem; display: block; }

.content-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 0.6rem;
  line-height: 1.2;
}

.content-card-desc {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
  flex: 1;
  margin-bottom: 1.25rem;
}

.content-card-link {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

/* ── JOURNAL ENTRY LIST ── */
.entry-list { display: flex; flex-direction: column; gap: 1.5rem; }

.entry-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--ember-dim);
  padding: 2rem 2.5rem;
  transition: border-color 0.2s;
}

.entry-item:hover { border-color: var(--border-light); }

.entry-item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.entry-tag {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ember);
}

.entry-dot { color: var(--text-muted); font-size: 0.7rem; }

.entry-date {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.entry-item-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 0.75rem;
}

.entry-item-excerpt {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.entry-item-link {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ember-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.entry-item-link:hover { color: var(--ember); }

/* ── ROSTER ── */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.roster-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.75rem 2rem;
  transition: border-color 0.2s;
}

.roster-card:hover { border-color: var(--border-light); }

.roster-card--provisional {
  border-left: 3px solid var(--ember-dim);
}

.roster-card-standing {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 0.3rem;
}

.roster-card-standing.provisional { color: var(--ember); }

.roster-card-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 0.2rem;
}

.roster-card-class {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.roster-card-body {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ── LORE GRID ── */
.lore-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.lore-item {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.lore-item:hover { border-color: var(--border-light); }

.lore-item-type {
  font-family: var(--font-heading);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 0.4rem;
}

.lore-item-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.lore-item-body {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── STUB BLOCK ── */
.stub-block {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4rem 3rem;
  text-align: center;
  max-width: 540px;
  margin: 0 auto;
}

.stub-icon { font-size: 2.5rem; margin-bottom: 1rem; display: block; }

.stub-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 0.75rem;
}

.stub-body {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* ── FOOTER ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
}

.footer-emblem { color: var(--gold-dim); font-size: 1rem; margin-bottom: 0.75rem; }

.footer-guild {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 0.35rem;
}

.footer-tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.footer-note {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.4;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .content-grid,
  .lore-grid { grid-template-columns: 1fr; }
  .roster-grid { grid-template-columns: 1fr; }
  .nav-brand { display: none; }
  .nav-link { font-size: 0.7rem; padding: 0 0.75rem; }
  .page-title { font-size: 1.8rem; }
}
