@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700&family=Source+Sans+3:wght@400;600;700&display=swap');

:root {
  --bg-deep: #070708;
  --bg-panel: #111114;
  --bg-elevated: #18181d;
  --border: #2a2620;
  --border-light: #3d3830;
  --text: #e8e4dc;
  --text-muted: #9a958a;
  --gold: #c9a227;
  --gold-bright: #e4c04a;
  --crimson: #8b1a2b;
  --crimson-bright: #b8243a;
  --albion: #c0392b;
  --hibernia: #3d9e5f;
  --midgard: #4a7fc1;
  --ok: #5cb87a;
  --warn: #d4a843;
  --nav-h: 4rem;
  --max: 72rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
  background: var(--bg-deep);
  color: var(--text);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.15s;
}

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

h1, h2, h3, .brand, .section-label {
  font-family: Cinzel, Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ── Nav ── */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.5rem;
  background: rgba(7, 7, 8, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-nav .brand {
  font-size: 1.35rem;
  color: var(--gold);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav .brand span {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.75rem;
  display: block;
  letter-spacing: 0.12em;
  margin-top: -0.15rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
}

.nav-cta {
  margin-left: 0.5rem;
}

/* ── Buttons ── */

.btn {
  display: inline-block;
  padding: 0.65rem 1.35rem;
  border-radius: 2px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-primary {
  background: linear-gradient(180deg, var(--crimson-bright), var(--crimson));
  color: #fff;
  box-shadow: 0 2px 12px rgba(139, 26, 43, 0.45);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #d42e48, var(--crimson-bright));
  color: #fff;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-light);
}

/* ── Hero ── */

.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100dvh - var(--nav-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 3rem 1.5rem 4rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(139, 26, 43, 0.22), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(201, 162, 39, 0.08), transparent),
    linear-gradient(180deg, #0e0c0a 0%, var(--bg-deep) 100%);
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a227' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.6;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 52rem;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  margin-bottom: 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: rgba(201, 162, 39, 0.08);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 6vw, 3.75rem);
  line-height: 1.1;
  color: var(--text);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}

.hero .lead {
  margin: 0 auto 2rem;
  max-width: 38rem;
  font-size: 1.15rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.realms {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  font-family: Cinzel, serif;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.realms .albion { color: var(--albion); }
.realms .hibernia { color: var(--hibernia); }
.realms .midgard { color: var(--midgard); }
.realms .sep { color: var(--border-light); }

/* ── Status bar (Uthgard-style) ── */

.status-bar {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 2px;
}

.status-bar .stat {
  padding: 0.85rem 1rem;
  text-align: center;
  border-right: 1px solid var(--border);
}

.status-bar .stat:last-child {
  border-right: none;
}

.status-bar .stat-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.status-bar .stat-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.status-bar .stat-value.ok { color: var(--ok); }
.status-bar .stat-value.warn { color: var(--warn); }

/* ── Sections ── */

.section {
  padding: 4.5rem 1.5rem;
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-label {
  display: block;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.section h2 {
  text-align: center;
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  color: var(--text);
}

.section .section-desc {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 2.5rem;
  color: var(--text-muted);
}

.section-alt {
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-news {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
}

.news-list {
  display: grid;
  gap: 1rem;
}

.news-list.compact {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.news-card,
.change-entry {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 1.35rem 1.5rem;
}

.news-card.feature-card {
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(139, 26, 43, 0.18), transparent),
    var(--bg-elevated);
}

.news-meta {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.news-card h2,
.news-card h3,
.change-entry h2 {
  margin: 0 0 0.6rem;
  text-align: left;
  color: var(--text);
}

.news-card h2,
.change-entry h2 {
  font-size: 1.35rem;
}

.news-card h3 {
  font-size: 1.05rem;
}

.news-card p,
.change-entry p {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
}

.news-card p:last-child,
.change-entry p:last-child {
  margin-bottom: 0;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.hero-actions.left {
  justify-content: flex-start;
  margin: 1rem 0 0;
}

.news-page {
  max-width: 68rem;
}

.news-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.news-page .news-card {
  position: relative;
  overflow: hidden;
  min-height: 13rem;
  padding: 1.5rem;
  background:
    linear-gradient(135deg, rgba(139, 26, 43, 0.12), transparent 52%),
    var(--bg-elevated);
  border: 1px solid var(--border-light);
  box-shadow: 0 1rem 2.25rem rgba(0, 0, 0, 0.22);
}

.news-page .news-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(201, 162, 39, 0.08), transparent 28%),
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(201, 162, 39, 0.06), transparent 55%);
}

.news-page .lead-news {
  grid-column: 1 / -1;
  min-height: 19rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background:
    linear-gradient(90deg, rgba(7, 7, 8, 0.86), rgba(7, 7, 8, 0.58)),
    radial-gradient(ellipse 90% 80% at 12% 20%, rgba(139, 26, 43, 0.28), transparent 58%),
    var(--bg-elevated);
}

.news-page .news-card > * {
  position: relative;
  z-index: 1;
}

.news-page .news-card h2 {
  margin: 0 0 0.75rem;
  padding: 0;
  border: 0;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.15;
  color: var(--text);
}

.news-page .side-news h2 {
  font-size: 1.25rem;
}

.news-page .news-card p {
  max-width: 54rem;
  font-size: 1rem;
  color: var(--text-muted);
}

.news-page .news-card a:not(.btn) {
  display: inline-block;
  margin-top: 0.45rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Pillars (Blackthorn-style) ── */

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.pillar {
  padding: 1.75rem 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 2px;
  text-align: center;
}

.pillar h3 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  color: var(--gold);
}

.pillar p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ── Feature grid ── */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.feature {
  padding: 1.5rem;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 2px;
  transition: border-color 0.15s;
}

.section-alt .feature {
  background: var(--bg-elevated);
}

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

.feature h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--text);
}

.feature p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* ── CTA band ── */

.cta-band {
  text-align: center;
  padding: 5rem 1.5rem;
  background:
    radial-gradient(ellipse 70% 80% at 50% 100%, rgba(139, 26, 43, 0.25), transparent),
    var(--bg-deep);
  border-top: 1px solid var(--border);
}

.cta-band h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.cta-band p {
  margin: 0 auto 1.75rem;
  max-width: 32rem;
  color: var(--text-muted);
}

/* ── Page content (inner pages) ── */

.page-header {
  padding: 3rem 1.5rem 2rem;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(139, 26, 43, 0.15), transparent),
    var(--bg-panel);
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.page-header p {
  margin: 0;
  color: var(--text-muted);
  max-width: 36rem;
  margin-inline: auto;
}

.page-content {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.page-content.wide {
  max-width: var(--max);
}

/* ── Rules document ── */

.rules-doc {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.rules-intro {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.rules-toc {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}

.rules-toc h2 {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: left;
  border: none;
  padding: 0;
}

.rules-toc ol {
  margin: 0;
  padding-left: 1.25rem;
  columns: 2;
  column-gap: 2rem;
}

.rules-toc li {
  margin-bottom: 0.35rem;
  break-inside: avoid;
}

.rules-toc a {
  color: var(--text-muted);
  font-size: 0.92rem;
}

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

.rule-section {
  margin-bottom: 2.75rem;
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}

.rule-section > h2 {
  font-size: 1.35rem;
  color: var(--text);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--crimson);
  text-align: left;
}

.rule-section h3 {
  font-family: Cinzel, Georgia, serif;
  font-size: 1rem;
  color: var(--gold);
  margin: 1.5rem 0 0.5rem;
  letter-spacing: 0.03em;
}

.rule-section p {
  color: var(--text-muted);
  margin: 0 0 0.85rem;
}

.rule-section ul,
.rule-section ol {
  color: var(--text-muted);
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.rule-section li {
  margin-bottom: 0.45rem;
}

.rule-section li strong {
  color: var(--text);
}

.rule-callout {
  background: rgba(139, 26, 43, 0.12);
  border-left: 3px solid var(--crimson);
  padding: 0.85rem 1rem;
  margin: 1rem 0 1.25rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.rule-callout strong {
  color: var(--text);
}

.rules-table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
}

@media (max-width: 600px) {
  .rules-toc ol {
    columns: 1;
  }
}

/* ── Connect / download ── */

.download-hero {
  text-align: center;
  padding: 2.25rem 1.5rem;
  margin-bottom: 2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 2px;
}

.btn-download {
  font-size: 1rem;
  padding: 0.9rem 2rem;
}

.download-hero .download-note {
  margin: 0.85rem 0 0;
  font-size: 0.9rem;
}

.download-trust {
  margin-top: 1rem;
  max-width: 42rem;
  text-align: left;
  font-size: 0.9rem;
  color: var(--muted, #9aa3b2);
}

.download-trust summary {
  cursor: pointer;
  color: var(--parchment, #e8dcc8);
}

.download-trust p {
  margin: 0.65rem 0 0;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}


.page-content > h2 {
  font-size: 1.15rem;
  color: var(--gold);
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.page-content > h2:first-child {
  margin-top: 0;
}

.page-content ul,
.page-content ol {
  padding-left: 1.25rem;
  color: var(--text-muted);
}

.page-content li {
  margin-bottom: 0.35rem;
}

.page-content li strong {
  color: var(--text);
}

code {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 0.12rem 0.4rem;
  border-radius: 2px;
  font-size: 0.88em;
  color: var(--gold-bright);
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.ok { color: var(--ok); }
.warn { color: var(--warn); }
.muted { color: var(--text-muted); }

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td {
  color: var(--text);
}

/* ── Footer ── */

.site-footer {
  padding: 3rem 1.5rem 2rem;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
}

.footer-brand .brand {
  font-family: Cinzel, serif;
  font-size: 1.2rem;
  color: var(--gold);
  display: block;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 28rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.footer-links a {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

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

.footer-legal {
  max-width: var(--max);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Mobile nav ── */

@media (max-width: 720px) {
  .site-nav {
    flex-wrap: wrap;
    height: auto;
    padding: 0.75rem 1rem;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    gap: 0.85rem;
  }

  .nav-cta {
    margin-left: 0;
  }

  .status-bar .stat {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .status-bar .stat:last-child {
    border-bottom: none;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}
