/* =========================================================
   Custom Typography Setup
   ========================================================= */

/* -------------------------
   Montserrat – Body & H1
   ------------------------- */

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-Thin.woff2') format('woff2');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

/* -------------------------
   Merriweather – Italics
   ------------------------- */

@font-face {
  font-family: 'Merriweather';
  src: url('../fonts/Merriweather-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Merriweather';
  src: url('../fonts/Merriweather-BoldItalic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* -------------------------
   Eveleth Clean – Headings
   ------------------------- */

@font-face {
  font-family: 'Eveleth Clean';
  src: url('../fonts/Eveleth-Clean-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   Base Typography Rules
   ========================================================= */

body {
  font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: #1a1a1a;
}

/* Italic body text */
em,
i {
  font-family: 'Merriweather', serif;
  font-style: italic;
  font-weight: 400;
}

/* Bold body text */
strong,
b {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 600;
}

/* Bold + Italic body text */
strong em,
em strong,
b i,
i b {
  font-family: 'Merriweather', serif;
  font-style: italic;
  font-weight: 700;
}

/* =========================================================
   Headings
   ========================================================= */

/* H1 – Montserrat Thin */
h1 {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

/* H2–H5 – Eveleth Clean */
h2,
h3,
h4,
h5 {
  font-family: 'Eveleth Clean', serif;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.3;
}

/* Optional: normalize heading margins */
h1,
h2,
h3,
h4,
h5 {
  margin-top: 0;
  margin-bottom: 0.5em;
}

:root{
  --bg:#0b0f14;
  --panel: rgba(10. 20, 20,0.78);
  --panel2: rgba(10. 20, 20,0.88);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.72);
  --line: rgba(255,255,255,0.12);
  --accent: rgba(157,220,255,0.95);
  --radius: 16px;
  --gap: 12px;
}

*{ box-sizing:border-box; }

html, body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

a{ color: var(--accent); text-decoration:none; }
a:hover{ text-decoration: underline; }

.wrap{ width:min(92vw,1300px); margin:0 auto; padding:16px 0 40px; }

.card{
  background: var(--panel);
  backdrop-filter: blur(6px) saturate(110%);
  -webkit-backdrop-filter: blur(6px) saturate(110%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.cardHeader{
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.18);
}

.cardBody{ padding: 12px; }

.pill, .badgeLink{
  display:inline-block;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.88);
}

.prose{
  color: var(--muted);
  line-height: 1.65;
  font-size: 15px;
}
.prose h2, .prose h3{
  color: var(--text);
  margin: 18px 0 10px;
}
.prose p{ margin: 0 0 12px; }
.prose ul{ margin: 0 0 12px 18px; }
.prose code{ background: rgba(255,255,255,0.06); padding: 2px 6px; border-radius: 8px; }
/* Small inset map blocks */
.leafletMiniMap {
  height: 220px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

/* Dynamic background */
@keyframes move-background {
  from {
		-webkit-transform: translate3d(0px, 0px, 0px);
	}
	to {
		-webkit-transform: translate3d(1000px, 0px, 0px);
	}
}
@-webkit-keyframes move-background {
  from {
		-webkit-transform: translate3d(0px, 0px, 0px);
	}
	to {
		-webkit-transform: translate3d(1000px, 0px, 0px);
	}
}

@-moz-keyframes move-background {
	from {
		-webkit-transform: translate3d(0px, 0px, 0px);
	}
	to {
		-webkit-transform: translate3d(1000px, 0px, 0px);
	}
}

@-webkit-keyframes move-background {
	from {
		-webkit-transform: translate3d(0px, 0px, 0px);
	}
	to {
		-webkit-transform: translate3d(1000px, 0px, 0px);
	}
}

.background-container{
	position: fixed;
	top: 0;
	left:0;
	bottom: 0;
	right: 0;
	z-index: 0;
	pointer-events:none;
	inset: 0;
}

.stars {
 background: black url("../images/stars.png") repeat;
 position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	display: block;
  	z-index: 0;
}

.twinkling{
	width:10000px;
	height: 100%;
	background: transparent url("../images/twinkling.png") repeat;
	background-size: 1000px 1000px;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 2;

    -moz-animation:move-background 70s linear infinite;
  -ms-animation:move-background 70s linear infinite;
  -o-animation:move-background 70s linear infinite;
  -webkit-animation:move-background 70s linear infinite;
  animation:move-background 70s linear infinite;

}

.clouds{
	width:10000px;
	height: 100%;
	background: transparent url("../images/clouds_repeat.png") repeat;
	background-size: 1000px 1000px;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 3;

   -moz-animation:move-background 150s linear infinite;
  -ms-animation:move-background 150s linear infinite;
  -o-animation:move-background 150s linear infinite;
  -webkit-animation:move-background 150s linear infinite;
  animation:move-background 150s linear infinite;
}
.site-main {
  position: relative;
  z-index: 10;
}

.site-footer {
  position: relative;
  z-index: 10;
}

.bg-moons {
  height: 70vh;
  width:70vh;
  position: absolute;
  z-index: 3;
  right: 20px;
}

/* Styles for Faction pills */
/* Relationship pill base */
.relationship-pill {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

/* Relationship types */
.relationship-ally {
  background-color: rgba(90, 170, 255, 0.85);
  color: #0b1a2a;
}

.relationship-neutral {
  background-color: rgba(180, 180, 180, 0.75);
  color: #222;
}

.relationship-tense {
  background-color: rgba(255, 180, 80, 0.85);
  color: #2a1a00;
}

.relationship-hostile {
  background-color: rgba(220, 80, 80, 0.85);
  color: #2a0000;
}

.relationship-secret {
  background-color: rgba(150, 100, 220, 0.85);
  color: #1a002a;
}

.relBadge{
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  font-size: 12px;
  color: rgba(255,255,255,0.90);
  text-transform: capitalize;
  display:inline-block;
  white-space:nowrap;
}
.relBadge.ally{border-color: rgba(100,220,160,0.35); background: rgba(100,220,160,0.10);}
.relBadge.tense{border-color: rgba(255,210,120,0.35); background: rgba(255,210,120,0.10);}
.relBadge.rival{border-color: rgba(255,140,120,0.35); background: rgba(255,140,120,0.10);}
.relBadge.enemy{border-color: rgba(255,80,80,0.35); background: rgba(255,80,80,0.10);}
.relBadge.neutral{border-color: rgba(200,200,200,0.25); background: rgba(255,255,255,0.05);}

/* Faction type styling */
.factionType {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
/* Religious / Faith-based */
.factionType.religious {
  background: rgba(160, 120, 220, 0.85);
  color: #160b2a;
}

/* Political / State-aligned */
.factionType.political {
  background: rgba(90, 150, 200, 0.85);
  color: #081a2a;
}

/* Military / Martial */
.factionType.mercenary {
  background: rgba(200, 90, 90, 0.85);
  color: #2a0808;
}

/* Scholarly / Arcane / Academic */
.factionType.academic {
  background: rgba(90, 200, 170, 0.85);
  color: #06221a;
}

/* Mercantile / Trade / Guild */
.factionType.trade {
  background: rgba(220, 190, 90, 0.85);
  color: #2a2408;
}

/* Criminal / Shadow / Illicit */
.factionType.criminal {
  background: rgba(120, 120, 120, 0.85);
  color: #111;
}

/* Cultural / Civic / Ancestral */
.factionType.social {
  background: rgba(180, 140, 100, 0.85);
  color: #241a10;
}

