/**
 * Justice Denied — Centralised Master Stylesheet
 * Single Source of Truth for Global Design Tokens, Typography, Navigation, Logo & Layout
 */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Newsreader:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Oswald:wght@500;600;700&family=Source+Sans+3:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* ==========================================================================
   1. GLOBAL DESIGN TOKENS & CSS VARIABLES
   ========================================================================== */
:root {
  --ink: #14161b;
  --ink-2: #1c1f26;
  --ink-3: #232731;
  --paper: #f1ecdf;
  --paper-dim: #d9d2bd;
  --crimson: #a8241c;
  --crimson-bright: #c22e24;
  --steel: #8991a0;
  --gold: #b08d3e;
  --gold-bright: #c9a24f;
  --line: rgba(241, 236, 223, 0.14);
  --line-strong: rgba(241, 236, 223, 0.28);
  
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Source Sans 3', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --font-logo: 'Oswald', 'Bebas Neue', 'JetBrains Mono', sans-serif;
}

/* ==========================================================================
   2. GLOBAL BASE & RESET
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

::selection {
  background: var(--crimson);
  color: var(--paper);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   3. CENTRALISED HEADER NAVIGATION & LOGO SYSTEM
   ========================================================================== */

/* Maintenance Warning Banner for Admin */
.maint-admin-banner {
  background: var(--crimson-bright);
  color: #ffffff;
  padding: 10px 24px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.maint-admin-banner a {
  color: #ffffff;
  text-decoration: underline;
}

/* Centralised Navbar Bar */
nav.site-navbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(20, 22, 27, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Wordmark & Logo Branding Wrapper */
.wordmark {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  font-weight: 600;
  flex-shrink: 0;
  line-height: 1;
}

.wordmark .brand-text {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
  white-space: nowrap;
}

.wordmark .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--crimson-bright);
  display: inline-block;
  flex-shrink: 0;
}

/* Distinct Site Stamp Badge (Circular / Rounded Text Badge) */
.site-stamp-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  user-select: none;
  vertical-align: middle;
}

/* Inline Text Wordmark Logo */
.logo-wordmark-inline {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  white-space: nowrap !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  line-height: 1 !important;
}

/* Navigation Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
}

.nav-links a {
  text-decoration: none;
  color: var(--steel);
  transition: color 0.15s, border-color 0.15s;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--paper);
}

.nav-links a.active {
  color: var(--gold);
  font-weight: 600;
}

/* Header Action / CTA Button */
.nav-cta {
  font-family: var(--mono) !important;
  font-size: 12px !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 14px;
  border: 1px solid var(--gold) !important;
  color: var(--gold) !important;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s !important;
  border-radius: 2px;
}

.nav-cta:hover {
  background: var(--gold) !important;
  color: var(--ink) !important;
}

/* Responsive Mobile Navigation Drawer */
.nav-mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--paper);
  font-size: 1.25rem;
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.nav-mobile-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
}

@media (max-width: 960px) {
  .nav-mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(20, 22, 27, 0.98);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 4px;
    align-items: stretch;
    max-height: calc(100vh - 65px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.85);
    z-index: 9999;
  }
  
  .nav-links.mobile-open {
    display: flex !important;
  }
  
  .nav-links.mobile-open a {
    display: block !important;
  }
  
  .nav-links a {
    width: 100%;
    padding: 10px 0;
    font-size: 0.96rem;
    border-bottom: 1px solid rgba(241, 236, 223, 0.06);
    display: block;
  }
  
  .nav-links a.active {
    border-left: 3px solid var(--gold);
    padding-left: 10px;
  }
  
  .nav-links .nav-cta {
    text-align: center;
    margin-top: 10px;
    padding: 12px 16px;
    width: 100%;
    border-bottom: none;
  }
}

/* ==========================================================================
   4. CENTRALISED FOOTER & UTILITIES
   ========================================================================== */
.back-to-top-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: rgba(20, 22, 27, 0.9);
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s, transform 0.2s, background-color 0.2s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top-btn:hover {
  background: var(--gold);
  color: var(--ink);
  transform: translateY(-3px);
}
