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

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

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

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-SemiBold.woff2') format('woff2');
  font-weight: 800;
  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: 600;
  font-style: normal;
  font-display: swap;
}

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

body {
  font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  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: 600;
  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;
  padding: 10px;
}

.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;
}

a.factionType {
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
}

a.factionType:hover {
  filter: brightness(1.08);
  text-decoration: none;
}

/* Header styling */
/* =========================================================
   Site Header
   ========================================================= */

header {
  position: relative;
  z-index: 20;
  margin-bottom: 24px;
}

header .brand {
  max-width: 720px;
}

header h1 {
  font-family: 'Eveleth Clean', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  color: var(--text);
}

header p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

header .cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;

  padding: 10px 14px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: var(--radius);

  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
}

header .cta a {
  font-size: 0.9rem;
  color: var(--text);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

header .cta a:hover {
  border-color: var(--line);
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}

header .cta a.active {
  border-color: var(--accent);
  background: rgba(157,220,255,0.12);
  color: var(--accent);
}

header .cta form { display: inline }

header .cta button.btn {
  cursor: pointer;
  font: inherit;
  background: rgba(255,255,255,0.04);
}

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;

  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);

  transition: all 0.15s ease;
}

.btn:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.25);
  text-decoration: none;
}

.btn.primary {
  background: var(--accent);
  color: #081a2a;
  border-color: rgba(0,0,0,0.2);
}

.btn.primary:hover {
  background: rgba(180,230,255,1);
}

@media (max-width: 640px) {
  header .cta {
    flex-direction: column;
    align-items: stretch;
  }

  header .cta a,
  header .cta .btn {
    justify-content: center;
  }
}

section { scroll-margin-top: 16px; }

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-right {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.biome-pill {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  margin: 1px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.biome-glacier { background:#B7DCEB; color:#0E2A36; }
.biome-tropical-seasonal-forest { background:#4E8F5A; color:#F4FFF6; }
.biome-temperate-deciduous-forest { background:#6F8F4E; color:#F4FFF6; }
.biome-taiga { background:#3F5F5A; color:#EAF5F2; }
.biome-grassland { background:#A8B84A; color:#2F3A12; }
.biome-temperate-rainforest { background:#2E6F5E; color:#EAF7F4; }
.biome-savanna { background:#C9A44A; color:#3A2A0A; }
.biome-tundra { background:#AFC3C8; color:#243238; }
.biome-wetland { background:#4F7F7A; color:#F1FFFD; }
.biome-tropical-rainforest { background:#1F7A3E; color:#E8FFF1; }
.biome-hot-desert { background:#D9B27C; color:#4A2E00; }
.biome-cold-desert { background:#B9B4A8; color:#2E2C26; }

.biome-pill {
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}

.biome-pill:hover {
  filter: brightness(1.05);
}

/* =========================================================
   Velthuryn State Tag CSS (Dark-background optimized)
   Usage:
   <span class="tag tag--bastion-of-aurex">Bastion of Aurex</span>
   ========================================================= */

/* State color variables */
:root {
  --state-aeterron:         #4A6FA5; /* Aether Blue */
  --state-bastion-of-aurex: #E6C35C; /* Prism Gold */
  --state-fleaspark-union:  #1F6F6B; /* Ember Teal */
  --state-lexharrow:        #1A1A1A; /* Ink Black */
  --state-gravenreach:      #4B4F54; /* Basalt Iron */
  --state-thirasil:         #3F6B4F; /* Driftwood Green */
  --state-myrrun-hollow:    #6A4C7C; /* Biolume Violet */
  --state-sunlash-coast:    #D88C3A; /* Saltflare Amber */
  --state-tarkhos:          #8C2F23; /* Cinder Red */
  --state-velkar-spires:    #6E7C8A; /* Highwind Slate */
  --state-torral:           #7A5C3D; /* March Brown */
  --state-nokhul-vale:      #4F7A8A; /* River Silt Blue */
  --state-ohlai-steppe:     #B8A46A; /* Windgrass Tan */
  --state-scorval-blight:   #556B5A; /* Blight Ash Green */
}

/* Base pill styling */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;

  /* Tinted surface for dark UIs */
  background-color: color-mix(
    in srgb,
    var(--tag-color, #888) 32%,
    #0b0d10
  );

  /* Strong border for separation */
  border: 1px solid color-mix(
    in srgb,
    var(--tag-color, #888) 55%,
    #000
  );

  /* Readable text on dark backgrounds */
  color: #F2F4F8;
  font-size: 0.875rem;
  line-height: 1.25;
  font-weight: 600;
  white-space: nowrap;

  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.6);
}

/* Dot indicator */
.tag::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  background-color: var(--tag-color, #888);

  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.55),
    0 0 6px color-mix(
      in srgb,
      var(--tag-color, #888) 65%,
      transparent
    );
}

/* Interaction states */
.tag:hover {
  background-color: color-mix(
    in srgb,
    var(--tag-color, #888) 40%,
    #0b0d10
  );
}

.tag:focus-visible {
  outline: 2px solid var(--tag-color, #888);
  outline-offset: 2px;
}

/* Optional clickable tag support */
.tag[role="button"] {
  cursor: pointer;
}

/* Optional ultra-high contrast modifier for image-heavy backdrops */
.tag--high-contrast {
  background-color: color-mix(
    in srgb,
    var(--tag-color, #888) 55%,
    #000
  );
  border-color: var(--tag-color, #888);
}

/* =========================================================
   State tag classes by slug (assigns --tag-color)
   ========================================================= */

.tag--aeterron         { --tag-color: var(--state-aeterron); }
.tag--bastion-of-aurex { --tag-color: var(--state-bastion-of-aurex); }
.tag--fleaspark-union  { --tag-color: var(--state-fleaspark-union); }
.tag--lexharrow        { --tag-color: var(--state-lexharrow); }
.tag--gravenreach      { --tag-color: var(--state-gravenreach); }
.tag--thirasil         { --tag-color: var(--state-thirasil); }
.tag--myrrun-hollow    { --tag-color: var(--state-myrrun-hollow); }
.tag--sunlash-coast    { --tag-color: var(--state-sunlash-coast); }
.tag--tarkhos          { --tag-color: var(--state-tarkhos); }
.tag--velkar-spires    { --tag-color: var(--state-velkar-spires); }
.tag--torral           { --tag-color: var(--state-torral); }
.tag--nokhul-vale      { --tag-color: var(--state-nokhul-vale); }
.tag--ohlai-steppe     { --tag-color: var(--state-ohlai-steppe); }
.tag--scorval-blight   { --tag-color: var(--state-scorval-blight); }

