/* ═══════════════════════════════════════════════════════════════════
   RUNE GUARD — rg-theme.css
   Brutalist Cinematic  ·  Shared across all portal pages
   Token-for-token match with the locked index.html
   ───────────────────────────────────────────────────────────────────
   LOAD ORDER:
     1. assets/css/main.css        (HTML5 UP base)
     2. assets/css/rg-theme.css    ← this file
     3. page-specific <style>      (overrides only when needed)
   ═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@300;400;700;900&family=Inter:wght@300;400&display=swap');

/* ─────────────────────────────────────────────
   DESIGN TOKENS  (exact match to index.html)
───────────────────────────────────────────── */
:root {
  --red:    #e44c65;
  --blood:  #a8223a;
  --ash:    #0a0b11;
  --smoke:  rgba(10,11,17,0.92);
  --glass:  rgba(255,255,255,0.04);
  --line:   rgba(255,255,255,0.1);
  --muted:  rgba(255,255,255,0.5);
  --f-disp: 'Unbounded', sans-serif;
  --f-body: 'Inter', sans-serif;
}

/* ─────────────────────────────────────────────
   BASE
───────────────────────────────────────────── */
html, body {
  background: var(--ash);
}
body, p, li, td, th {
  font-family: var(--f-body);
  font-weight: 300;
  color: rgba(255,255,255,0.72);
  font-size: 1.05rem;
  line-height: 1.85;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-disp);
  color: #fff;
}
a            { color: var(--red); text-decoration: none; }
a:hover      { color: #fff; }
strong       { color: rgba(255,255,255,0.9); font-weight: 400; }
hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

/* ─────────────────────────────────────────────
   HEADER  (exact match to index)
───────────────────────────────────────────── */
#header {
  background: rgba(8,9,14,0.9) !important;
  border-bottom: 1px solid var(--line) !important;
  backdrop-filter: blur(12px);
}
#logo a {
  font-family: var(--f-disp) !important;
  font-size: 0.75rem !important;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: #fff !important;
  border: none;
}
#nav > ul > li > a {
  font-family: var(--f-disp);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
#nav > ul > li > a.button.primary {
  font-family: var(--f-disp) !important;
  font-size: 0.6rem !important;
  font-weight: 400;
  letter-spacing: 0.15em;
  background: var(--red) !important;
  border-color: var(--red) !important;
  box-shadow: 0 0 24px rgba(228,76,101,0.3);
}

/* ─────────────────────────────────────────────
   FOOTER  (exact match to index)
───────────────────────────────────────────── */
#footer {
  background: #060710 !important;
  border-top: 1px solid var(--line);
}
#footer .icons a {
  transition: color 0.2s, text-shadow 0.2s;
}
#footer .icons a:hover {
  color: var(--red) !important;
  text-shadow: 0 0 16px rgba(228,76,101,0.6);
}
#footer .copyright li {
  font-family: var(--f-disp);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.2);
}

/* ─────────────────────────────────────────────
   RUNE SECTION DIVIDER  (exact match to index)
───────────────────────────────────────────── */
.rg-rune-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: 2.2rem 0;
  background: var(--ash);
  position: relative;
  z-index: 10;
  overflow: hidden;
}
.rg-rune-divider::before,
.rg-rune-divider::after {
  content: '';
  flex: 1;
  max-width: 260px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(228,76,101,0.35));
}
.rg-rune-divider::after {
  background: linear-gradient(to left, transparent, rgba(228,76,101,0.35));
}
.rg-rune-divider span {
  font-size: 1.05rem;
  letter-spacing: 0.55em;
  color: rgba(228,76,101,0.55);
  user-select: none;
  text-shadow: 0 0 12px rgba(228,76,101,0.3);
}

/* ─────────────────────────────────────────────
   GLOBAL BUTTON OVERRIDES
───────────────────────────────────────────── */
.button {
  font-family: var(--f-disp) !important;
  letter-spacing: 0.12em;
}
.button.primary {
  background: var(--red) !important;
  border-color: var(--red) !important;
  box-shadow: 0 0 28px rgba(228,76,101,0.3);
  transition: box-shadow 0.3s, transform 0.2s;
}
.button.primary:hover {
  box-shadow: 0 0 44px rgba(228,76,101,0.55);
  transform: translateY(-2px);
}

/* ─────────────────────────────────────────────
   PORTAL SUB-PAGE HERO BANNER
   Shorter than the full landing banner (~55vh).
   Uses the same cinematic vignette, heat shimmer,
   star field, and red neon top-rule from index.
───────────────────────────────────────────── */
.rg-portal-hero {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--ash);
  background-size: cover;
  background-position: center 35%;
}

/* Heavy vignette — matches index banner math */
.rg-portal-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 75% at 50% 50%,
      rgba(10,11,17,0.25) 0%,
      rgba(10,11,17,0.68) 55%,
      rgba(10,11,17,0.97) 100%
    );
  z-index: 0;
}

/* Red heat shimmer — same keyframe name as index */
.rg-portal-hero .rg-heat {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 32%;
  background: linear-gradient(to top, rgba(164,34,58,0.26) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
  animation: rg-heat 4s ease-in-out infinite alternate;
}

/* Star field — same multi-radial approach as index */
.rg-portal-hero .rg-stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.3;
  background-image:
    radial-gradient(1px 1px at 12% 20%, white, transparent),
    radial-gradient(1px 1px at 68% 11%, white, transparent),
    radial-gradient(1px 1px at 38% 58%, white, transparent),
    radial-gradient(1px 1px at 82% 42%, white, transparent),
    radial-gradient(1px 1px at 52% 77%, white, transparent),
    radial-gradient(1.5px 1.5px at 28% 65%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 74% 28%, white, transparent),
    radial-gradient(1px 1px at 6% 50%, white, transparent);
  animation: rg-twinkle 6s ease-in-out infinite alternate;
}

/* Red neon top rule */
.rg-portal-hero .rg-hero-topline {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right,
    transparent,
    rgba(228,76,101,0.6) 25%,
    rgba(228,76,101,0.6) 75%,
    transparent
  );
  z-index: 3;
  box-shadow: 0 0 12px rgba(228,76,101,0.25);
}

/* Content stack */
.rg-portal-hero .rg-hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 5rem 3rem 4.5rem;
  max-width: 860px;
  width: 100%;
}
.rg-portal-hero .rg-eyebrow {
  font-family: var(--f-disp);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 1.2rem;
}
.rg-portal-hero .rg-hero-runes {
  font-size: 1rem;
  letter-spacing: 0.55em;
  color: rgba(228,76,101,0.45);
  user-select: none;
  display: block;
  margin-bottom: 1.6rem;
  text-shadow: 0 0 12px rgba(228,76,101,0.25);
}
.rg-portal-hero h1 {
  font-family: var(--f-disp);
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 0.95;
  color: #fff;
  margin: 0;
  text-shadow: 0 8px 60px rgba(0,0,0,0.7);
}
.rg-portal-hero h1 .rg-red { color: var(--red); }
/* thin vertical rule — identical to .rg-rule in index */
.rg-portal-hero .rg-rule {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, transparent, rgba(228,76,101,0.7), transparent);
  margin: 1.8rem auto;
}
.rg-portal-hero .rg-sub {
  font-family: var(--f-disp);
  font-size: 0.68rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

/* ─────────────────────────────────────────────
   IMAGE PLACEHOLDER
   Drop an .rg-img-placeholder wherever you want
   a real image later. A scan-line pulse + tactical
   corner brackets make it feel intentional, not empty.
───────────────────────────────────────────── */
.rg-img-placeholder {
  position: relative;
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(228,76,101,0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem;
  gap: 0.9rem;
  overflow: hidden;
}
/* size variants */
.rg-img-placeholder.img--banner  { min-height: 300px; }
.rg-img-placeholder.img--wide    { min-height: 220px; }
.rg-img-placeholder.img--square  { min-height: 300px; aspect-ratio: 4/3; }
.rg-img-placeholder.img--tall    { min-height: 420px; }
.rg-img-placeholder.img--thumb   { min-height: 160px; }

/* Subtle grid texture — same as index #four */
.rg-img-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.15;
  pointer-events: none;
}
/* Tactical corner brackets */
.rg-img-placeholder .rg-corner {
  position: absolute;
  width: 20px; height: 20px;
  border-color: rgba(228,76,101,0.5);
  border-style: solid;
  opacity: 0.7;
}
.rg-img-placeholder .rg-corner.tl { top: 10px; left: 10px;  border-width: 1px 0 0 1px; }
.rg-img-placeholder .rg-corner.tr { top: 10px; right: 10px; border-width: 1px 1px 0 0; }
.rg-img-placeholder .rg-corner.bl { bottom: 10px; left: 10px;  border-width: 0 0 1px 1px; }
.rg-img-placeholder .rg-corner.br { bottom: 10px; right: 10px; border-width: 0 1px 1px 0; }

/* Animated scan-line */
.rg-img-placeholder .rg-scanline {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(228,76,101,0.35), transparent);
  animation: rg-scan 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes rg-scan {
  0%   { top: 8%;  opacity: 0; }
  15%  {           opacity: 1; }
  85%  {           opacity: 1; }
  100% { top: 92%; opacity: 0; }
}

/* Label + prompt text */
.rg-img-placeholder .rg-img-label {
  position: relative;
  font-family: var(--f-disp);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--red);
  opacity: 0.75;
  z-index: 1;
}
.rg-img-placeholder .rg-img-icon {
  position: relative;
  font-size: 2rem;
  color: rgba(228,76,101,0.3);
  z-index: 1;
}
.rg-img-placeholder .rg-img-prompt {
  position: relative;
  font-size: 0.8rem;
  font-style: italic;
  color: rgba(255,255,255,0.38);
  max-width: 380px;
  line-height: 1.7;
  z-index: 1;
}

/* ─────────────────────────────────────────────
   SECTION NUMBER / EYEBROW TAG
   (matches .rg-section-num in index)
───────────────────────────────────────────── */
.rg-section-num {
  font-family: var(--f-disp);
  font-size: 0.65rem;
  letter-spacing: 0.32em;
  color: var(--red);
  opacity: 0.85;
  display: block;
  margin-bottom: 0.7rem;
}

/* ─────────────────────────────────────────────
   PORTAL CARD GRID
   Used on dashboard / section landing pages.
   Replaces the old box.alt / row.gtr-uniform.
───────────────────────────────────────────── */
.rg-card-grid {
  display: grid;
  gap: 1.4rem;
}
.rg-card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.rg-card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.rg-card-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Individual card — same reveal / hover logic as index #four pillars */
.rg-card {
  padding: 1.8rem 1.5rem;
  background: var(--glass);
  border: 1px solid var(--line);
  position: relative;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease,
              border-color 0.3s, background 0.3s;
}
.rg-card.vis {
  opacity: 1;
  transform: translateY(0);
}
.rg-card:hover {
  border-color: rgba(228,76,101,0.5);
  background: rgba(228,76,101,0.06);
}
/* Red top-sweep on hover — exact match to index #four */
.rg-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 2px;
  background: var(--red);
  transition: width 0.35s ease;
}
.rg-card:hover::before { width: 100%; }

.rg-card .rg-card-icon {
  font-size: 1.5rem;
  color: var(--red);
  display: block;
  margin-bottom: 1rem;
}
.rg-card h3 {
  font-family: var(--f-disp);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}
.rg-card p {
  font-size: 0.92rem;
  line-height: 1.85;
  color: rgba(255,255,255,0.65);
  margin: 0 0 1.4rem;
}
.rg-card .button {
  font-family: var(--f-disp) !important;
  font-size: 0.65rem !important;
  letter-spacing: 0.14em;
}

/* ─────────────────────────────────────────────
   SIDEBAR LAYOUT SYSTEM
   .rg-layout wraps the two-column grid.
   Use --right or --left for sidebar position.
   Use --none for single-column content pages.
───────────────────────────────────────────── */
.rg-layout-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 3rem 5rem;
}
.rg-layout {
  display: grid;
  align-items: start;
  gap: 3.5rem;
}
.rg-layout--right { grid-template-columns: 1fr 300px; }
.rg-layout--left  { grid-template-columns: 300px 1fr; }
.rg-layout--none  { grid-template-columns: 1fr; max-width: 840px; margin: 0 auto; }

/* ── Main content column ───────────────── */
.rg-main {}

/* Page-level heading block (inside .rg-main) */
.rg-page-header {
  margin-bottom: 2.8rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}
.rg-page-header h2 {
  font-family: var(--f-disp);
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 0.5rem;
  color: #fff;
}
.rg-page-header .rg-lead {
  font-family: var(--f-body);
  font-size: 1rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.8;
}

/* Body headings inside .rg-main */
.rg-main h2 {
  font-family: var(--f-disp);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 2.8rem 0 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
}
.rg-main h3 {
  font-family: var(--f-disp);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin: 2rem 0 0.65rem;
}
.rg-main p  { font-size: 1rem; line-height: 1.9; margin-bottom: 1.1rem; }
.rg-main ul,
.rg-main ol { padding-left: 1.5rem; margin-bottom: 1.5rem; }
.rg-main li { font-size: 0.98rem; margin-bottom: 0.4rem; }
.rg-main strong { color: rgba(255,255,255,0.92); }
.rg-main hr { margin: 2.5rem 0; }

/* ── Sidebar column ────────────────────── */
.rg-sidebar {
  position: sticky;
  top: 5.5rem;
}
/* Each box inside the sidebar */
.rg-sidebar-block {
  background: var(--glass);
  border: 1px solid var(--line);
  padding: 1.8rem 1.6rem;
  margin-bottom: 1.5rem;
  position: relative;
}
/* Red top-accent stripe — visual link to pillar card hover */
.rg-sidebar-block::before {
  content: '';
  position: absolute;
  top: -1px; left: 0;
  width: 40%;
  height: 1px;
  background: var(--red);
  box-shadow: 0 0 8px rgba(228,76,101,0.35);
}
.rg-sidebar-block h3 {
  font-family: var(--f-disp);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 1.1rem;
}
.rg-sidebar-block p  { font-size: 0.92rem; line-height: 1.8; margin-bottom: 0.8rem; }
.rg-sidebar-block ul { padding-left: 1.2rem; margin-bottom: 0.8rem; }
.rg-sidebar-block li { font-size: 0.9rem; margin-bottom: 0.4rem; }
.rg-sidebar-block hr { margin: 1.1rem 0; }
.rg-sidebar-block .button {
  font-family: var(--f-disp) !important;
  font-size: 0.62rem !important;
  letter-spacing: 0.14em;
  width: 100%;
  text-align: center;
  display: block;
  margin-top: 0.9rem;
}

/* ─────────────────────────────────────────────
   BREADCRUMB
───────────────────────────────────────────── */
.rg-breadcrumb {
  font-family: var(--f-disp);
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.rg-breadcrumb a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.rg-breadcrumb a:hover { color: var(--red); }
.rg-breadcrumb .sep     { color: rgba(228,76,101,0.4); }
.rg-breadcrumb .current { color: var(--red); opacity: 0.9; }

/* ─────────────────────────────────────────────
   CERT / TIER ROW  (for division & cert pages)
───────────────────────────────────────────── */
.rg-cert-row {
  border: 1px solid var(--line);
  border-left: 2px solid var(--red);
  background: var(--glass);
  padding: 1.5rem 1.8rem;
  margin-bottom: 1.1rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.4rem;
  transition: border-color 0.3s, background 0.3s;
}
.rg-cert-row:hover {
  border-color: rgba(228,76,101,0.5);
  background: rgba(228,76,101,0.04);
}
.rg-cert-row h4 {
  font-family: var(--f-disp);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.3rem;
}
.rg-cert-row .rg-cert-meta {
  font-family: var(--f-disp);
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--red);
  opacity: 0.75;
  display: block;
  margin-bottom: 0.4rem;
}
.rg-cert-row p  { font-size: 0.9rem; margin: 0; color: rgba(255,255,255,0.62); }
.rg-cert-row .button {
  font-family: var(--f-disp) !important;
  font-size: 0.6rem !important;
  letter-spacing: 0.12em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Tier section heading */
.rg-tier-head {
  font-family: var(--f-disp);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--red);
  opacity: 0.75;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.5rem 0 1rem;
}
.rg-tier-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(228,76,101,0.35), transparent);
}

/* ─────────────────────────────────────────────
   ACTION BAR  (page-bottom nav strip)
───────────────────────────────────────────── */
.rg-action-bar {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.rg-action-bar .button {
  font-family: var(--f-disp) !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.14em;
}

/* ─────────────────────────────────────────────
   KEYFRAMES  (same names as index to share them)
───────────────────────────────────────────── */
@keyframes rg-heat {
  from { opacity: 0.6; }
  to   { opacity: 1;   }
}
@keyframes rg-twinkle {
  from { opacity: 0.2; }
  to   { opacity: 0.45; }
}
@keyframes rg-spin {
  to { transform: rotate(360deg); }
}
@keyframes rg-pulse {
  0%,100% { transform: scale(1);    opacity: 0.6; }
  50%      { transform: scale(1.12); opacity: 1;   }
}

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media screen and (max-width: 980px) {
  .rg-layout--right,
  .rg-layout--left { grid-template-columns: 1fr; }
  .rg-sidebar       { position: static; }
  .rg-cert-row      { grid-template-columns: 1fr; }
  .rg-cert-row .button { width: auto; }
}
@media screen and (max-width: 736px) {
  .rg-layout-wrap { padding: 2.5rem 1.4rem 3.5rem; }
  .rg-portal-hero h1 { font-size: 2rem; }
  .rg-card-grid--3,
  .rg-card-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .rg-rune-divider::before,
  .rg-rune-divider::after { max-width: 60px; }
}
@media screen and (max-width: 480px) {
  .rg-card-grid--2,
  .rg-card-grid--3,
  .rg-card-grid--4 { grid-template-columns: 1fr; }
}
