/*
Theme Name:  Residual Cell
Theme URI:   https://residualcell.com
Description: A cinematic universe portal theme for characters, story arcs, comics and films.
Version:     2.1.0
Author:      Jeff Vargas
Author URI:  https://jeffvargas.com
License:     GPL-2.0-or-later
Text Domain: residual-cell
Tags:        dark, custom-colors, custom-menu, featured-images, full-width-template
*/

/* ── Reset & Tokens ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:    #0a0a0f;
  --ink2:   #16161f;
  --ink3:   #1e1e2a;
  --ink4:   #252534;
  --gold:   #c9a84c;
  --gold2:  #f0cc7a;
  --red:    #c0392b;
  --teal:   #1d8a7a;
  --text:   #f4f2ee;
  --text2:  #a09e98;
  --text3:  #6b6960;
  --nav-h:  90px;
  --max-w:  1280px;
  --radius: 12px;
}

html { scroll-behavior: smooth; }

body {
  padding-top: var(--nav-h);
  background: var(--ink);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul, ol { list-style: none; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--ink4); border-radius: 3px; }

/* ── Typography ─────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: .08em;
  line-height: 1;
  color: var(--text);
}
h1 { font-size: clamp(40px, 6vw, 68px); }
h2 { font-size: clamp(22px, 3vw, 28px); }
h3 { font-size: 20px; }
p  { color: var(--text2); line-height: 1.7; }

/* ── Layout ─────────────────────────────────────────────────────── */
.site-wrap    { max-width: var(--max-w); margin: 0 auto; padding: 0 28px; }
.full-width   { width: 100%; }

/* ── Navigation ─────────────────────────────────────────────────── */
#site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(10,10,15,.97);
  border-bottom: 0.5px solid rgba(201,168,76,.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 28px;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.site-branding { display: flex; flex-direction: column; line-height: 1; }
.site-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px; letter-spacing: .16em;
  color: var(--gold); line-height: 1;
}
.site-tagline {
  font-family: 'DM Mono', monospace;
  font-size: 9px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--text3); margin-top: 1px;
}
.site-branding a { color: inherit; }

/* Primary nav */
/* Primary nav — positioned back into header on desktop */
@media (min-width: 769px) {
#primary-navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: right;
    pointer-events: none;
    background: none;
    opacity: 1;
    visibility: visible;
    padding: 0;
    padding-right: 80px;
}
  #primary-navigation ul {
    display: flex;
    gap: 2px;
    pointer-events: auto;
  }
  #primary-navigation a {
    display: block;
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text3);
    padding: 8px 14px;
    border-radius: 5px;
    transition: color .2s, background .2s;
    font-family: 'DM Sans', sans-serif;
  }
  #primary-navigation a:hover,
  #primary-navigation .current-menu-item > a {
    color: var(--gold);
    background: rgba(201,168,76,.08);
  }
  .menu-logo,
  .menu-close {
    display: none;
  }
}

/* Nav search */
.nav-search-form {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.04);
  border: 0.5px solid rgba(255,255,255,.1);
  border-radius: 7px; padding: 7px 12px;
}
.nav-search-form svg { width: 14px; height: 14px; stroke: var(--text3); flex-shrink: 0; }
.nav-search-form input[type="search"] {
  background: none; border: none; outline: none;
  color: var(--text); font-size: 12px; font-family: 'DM Sans', sans-serif;
  width: 150px;
}
.nav-search-form input::placeholder { color: var(--text3); }

/* Mobile toggle */
.menu-toggle {
  display: none;
  background: none; border: 0.5px solid rgba(255,255,255,.15);
  color: var(--text2); padding: 7px 10px; border-radius: 5px;
  font-size: 18px; line-height: 1;
}

/* ── Hero Banner ────────────────────────────────────────────────── */
.nexus-hero {
  position: relative;
  padding-top: 300px;
  height: clamp(360px, 50vw, 650px);
  overflow: hidden;
  background: var(--ink2);
}
.nexus-hero__img {
  padding-top: 0px;
  position: absolute;
  inset: 0;
  object-position: center top;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .65;
}
.nexus-hero__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(10,10,15,.30) 35%, rgba(10,10,15,.0) 0%);
}
.nexus-hero__content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(24px, 4vw, 48px);
  max-width: 580px;
}
.nexus-hero__eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 10px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 10px;
}
.nexus-hero__title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(48px, 7vw, 72px); letter-spacing: .04em; line-height: .95;
  color: var(--text); margin-bottom: 12px;
}
.nexus-hero__desc { font-size: 13px; color: var(--text2); line-height: 1.65; margin-bottom: 16px; }
.nexus-hero__badges { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 22px; }
.nexus-hero__actions { display: flex; gap: 10px; }
.nexus-hero__dots {
  position: absolute; right: 10px; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 7px; align-items: center;
}
.hero-dot {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  cursor: pointer;
  transition: all .25s;
  border: none;
}
.hero-dot.on {
  background: var(--gold);
  width: 25px;
  border-radius: 50px;
}

/* ── Buttons ────────────────────────────────────────────────────── */
.btn-gold {
  display: inline-block;
  background: var(--gold); color: var(--ink);
  border: none; border-radius: 5px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px; letter-spacing: .1em;
  padding: 10px 26px; transition: background .2s;
}
.btn-gold-2 {
  display: inline-block;
  background: var(--gold); color: var(--ink);
  border: none; border-radius: 5px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px; letter-spacing: .1em;
  padding: 10px 26px; transition: background .2s;
  position: absolute;
  top: 290px;
}
.btn-gold:hover { background: var(--gold2); color: var(--ink); }

.btn-outline {
  display: inline-block;
  background: rgba(255,255,255,.07); color: var(--text);
  border: 0.5px solid rgba(255,255,255,.2); border-radius: 5px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px; letter-spacing: .1em;
  padding: 10px 26px; transition: background .2s;
}
.btn-outline:hover { background: rgba(255,255,255,.13); }

/* ── Badges ─────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 9px; letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 3px; border: 0.5px solid;
}
.badge-hero     { color:#5dc8b6; border-color:rgba(29,138,122,.4);  background:rgba(29,138,122,.12); }
.badge-villain  { color:#e07070; border-color:rgba(192,57,43,.35); background:rgba(192,57,43,.12); }
.badge-antihero { color:#d4b077; border-color:rgba(201,168,76,.35); background:rgba(201,168,76,.1); }
.badge-omega    { color:#b09fe8; border-color:rgba(176,159,232,.35);background:rgba(176,159,232,.1); }
.badge-cosmic   { color:#5dcaa5; border-color:rgba(93,202,165,.3);  background:rgba(93,202,165,.1); }
.badge-superhuman{color:#6ba8e8; border-color:rgba(56,122,221,.3);  background:rgba(56,122,221,.1); }
.badge-enhanced { color:#a09e98; border-color:rgba(160,158,152,.25);background:rgba(160,158,152,.08);}
.badge-neutral  { color:var(--text3); border-color:rgba(255,255,255,.12); background:rgba(255,255,255,.05); }

/* ── Section Headers ────────────────────────────────────────────── */
.section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 32px 0 14px;
  border-bottom: 0.5px solid rgba(255,255,255,.07);
  margin-bottom: 16px;
}
.section-header h2 { font-size: 22px; letter-spacing: .14em; }
.section-header span { font-size: 11px; color: var(--text3); font-family: 'DM Mono', monospace; }

/* ── Filter Pills ───────────────────────────────────────────────── */
.filter-row { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 18px; }
.filter-pill {
  background: none; border: 0.5px solid rgba(255,255,255,.1);
  color: var(--text3); font-size: 11px; font-family: 'DM Sans', sans-serif;
  letter-spacing: .07em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 30px;
  transition: all .2s;
}
.filter-pill:hover  { border-color: var(--gold); color: var(--gold); }
.filter-pill.active { border-color: var(--gold); color: var(--gold); background: rgba(201,168,76,.1); }

/* ── Character Grid ─────────────────────────────────────────────── */
.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 20px;
  margin-bottom: 16px;
}

/* ── Flip Card ──────────────────────────────────────────────────── */
.card-scene { height: 330px; perspective: 1000px; cursor: pointer; }
.card-scene:hover .card-inner { transform: rotateY(180deg); }
.card-inner {
  position: relative; width: 100%; height: 100%; max-height: 330px;
  transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.4,0,.2,1);
}
.card-inner.flipped { transform: rotateY(180deg); }
.card-face {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: var(--radius); overflow: hidden;
  border: 0.5px solid rgba(255,255,255,.08);
  background: var(--ink2);
}
.card-back-face { transform: rotateY(180deg); }

/* Card front */
.card-front { display: flex; flex-direction: column; }
.cf-portrait { flex: 1; position: relative; overflow: hidden; background: var(--ink3); }
.cf-portrait img { width: 100%; height: 100%; object-fit: cover; }
.cf-portrait-ph {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.cf-portrait-ph .ph-em { font-size: 60px; opacity: .2; }
.cf-portrait-ph .ph-tx { font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: .14em; color: var(--text3); opacity: .55; }
.cf-gradient { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,10,15,.94) 0%, rgba(10,10,15,.05) 55%); }
.cf-bottom   { position: absolute; bottom: 0; left: 0; right: 0; padding: 11px 14px 14px; }
.cf-name  { font-family: 'Bebas Neue', sans-serif; font-size: 24px; letter-spacing: .07em; line-height: 1; }
.cf-alias { font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: .16em; color: var(--gold); margin: 3px 0 9px; }
.cf-icons { display: flex; align-items: center; gap: 9px; }
.cf-symbol { width: 30px; height: 30px; flex-shrink: 0; display: flex; align-items: center; }
.cf-symbol img, .cf-symbol svg { width: 100%; height: 100%; object-fit: contain; }
.cf-divider  { width: 0.5px; height: 18px; background: rgba(255,255,255,.15); }
.cf-team-icon {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  overflow: hidden; background: rgba(255,255,255,.06);
  border: 0.5px solid rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
}
.cf-team-icon img, .cf-team-icon svg { width: 100%; height: 100%; object-fit: cover; }
.cf-flip-hint {
  position: absolute; top: 9px; right: 9px;
  font-family: 'DM Mono', monospace; font-size: 8px; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(10,10,15,.65); color: var(--text3);
  padding: 3px 7px; border-radius: 3px;
}

/* Card back */
.card-back { display: flex; flex-direction: column; }
.cb-header { height: 88px; position: relative; overflow: hidden; background: var(--ink3); flex-shrink: 0; }
.cb-header img { width: 100%; height: 100%; object-fit: cover; opacity: .7; object-position: center top; }
.cb-header-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.cb-header-ph .ph-em { font-size: 30px; opacity: .18; }
.cb-header-ph .ph-tx { font-family: 'DM Mono', monospace; font-size: 8px; letter-spacing: .12em; color: var(--text3); opacity: .45; }
.cb-header-gradient { position: absolute; inset: 0; background: linear-gradient(0deg, var(--ink2) 0%, transparent 70%); }
.cb-header-foot {
  position: absolute; bottom: 7px; left: 12px; right: 12px;
  display: flex; align-items: flex-end; justify-content: space-between;
}
.cb-header-name { font-family: 'Bebas Neue', sans-serif; font-size: 17px; letter-spacing: .07em; line-height: 1; }
.cb-header-sym  { width: 20px; height: 20px; opacity: .8; flex-shrink: 0; display: flex; align-items: center; }
.cb-header-sym img, .cb-header-sym svg { width: 100%; height: 100%; object-fit: contain; }
.cb-body { flex: 1; overflow: hidden; padding: 9px 13px 12px; display: flex; flex-direction: column; gap: 7px; }
.cb-bio { font-size: 10px; color: var(--text2); line-height: 1.55; border-left: 1.5px solid var(--gold); padding-left: 8px; }
.cb-stats-label { font-family: 'DM Mono', monospace; font-size: 8px; letter-spacing: .18em; text-transform: uppercase; color: var(--text3); }
.cb-stats { display: flex; flex-direction: column; gap: 3.5px; }
.cb-stat-row { display: flex; align-items: center; gap: 7px; }
.cb-stat-lbl  { font-family: 'DM Mono', monospace; font-size: 9px; color: var(--text3); width: 72px; flex-shrink: 0; }
.cb-stat-track { flex: 1; height: 2.5px; background: rgba(255,255,255,.07); border-radius: 2px; overflow: hidden; }
.cb-stat-fill  { height: 100%; border-radius: 2px; }
.cb-stat-val   { font-family: 'DM Mono', monospace; font-size: 8px; color: var(--text3); min-width: 20px; text-align: right; }
.cb-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.ctag {
  font-family: 'DM Mono', monospace; font-size: 8px; letter-spacing: .09em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 2px;
}
.cb-flip-hint {
  position: absolute; top: 9px; right: 9px;
  font-family: 'DM Mono', monospace; font-size: 8px; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(10,10,15,.65); color: var(--text3);
  padding: 3px 7px; border-radius: 3px;
}

/* ── Character Single Page ──────────────────────────────────────── */
.character-single { max-width: var(--max-w); margin: 0 auto; }
.character-single__hero { position: relative; height: 420px; overflow: hidden; background: var(--ink2); }
.character-single__hero img { width: 100%; height: 100%; object-fit: cover; opacity: .7; object-position: center top; }
.character-single__hero-grad { position: absolute; inset: 0; background: linear-gradient(0deg, var(--ink) 0%, transparent 60%); }
.character-single__body { padding: 0 28px 60px; }
.character-single__header { display: flex; align-items: flex-end; gap: 20px; margin-top: -60px; position: relative; z-index: 2; margin-bottom: 28px; }
.character-single__portrait { width: 120px; height: 150px; border-radius: 10px; overflow: hidden; border: 2px solid rgba(201,168,76,.3); flex-shrink: 0; background: var(--ink3); }
.character-single__portrait img { width: 100%; height: 100%; object-fit: cover; }
.character-single__info { flex: 1; }
.character-single__name  { font-family: 'Bebas Neue', sans-serif; font-size: 52px; letter-spacing: .05em; line-height: 1; }
.character-single__alias { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--gold); letter-spacing: .18em; margin: 4px 0 10px; }
.character-single__badges { display: flex; gap: 7px; flex-wrap: wrap; }
.character-single__cols { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; margin-top: 28px; }
.character-single__bio { font-size: 14px; color: var(--text2); line-height: 1.75; border-left: 2px solid var(--gold); padding-left: 16px; margin-bottom: 24px; }
.char-section-label { font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: .22em; text-transform: uppercase; color: var(--text3); margin-bottom: 10px; padding-bottom: 5px; border-bottom: 0.5px solid rgba(255,255,255,.07); }
.ability-item  { font-size: 13px; color: var(--text2); padding: 7px 12px; background: rgba(255,255,255,.04); border-left: 2px solid var(--gold); border-radius: 0 5px 5px 0; margin-bottom: 6px; }
.weakness-item { font-size: 13px; color: var(--text2); padding: 7px 12px; background: rgba(192,57,43,.07);  border-left: 2px solid var(--red);  border-radius: 0 5px 5px 0; margin-bottom: 6px; }
.stat-bar-row  { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.stat-bar-lbl  { font-size: 12px; color: var(--text3); width: 90px; flex-shrink: 0; }
.stat-bar-track{ flex: 1; height: 3px; background: rgba(255,255,255,.08); border-radius: 2px; overflow: hidden; }
.stat-bar-fill { height: 100%; border-radius: 2px; }
.stat-bar-val  { font-family: 'DM Mono', monospace; font-size: 10px; color: var(--text3); min-width: 24px; text-align: right; }
.appearance-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.app-chip { font-size: 11px; font-family: 'DM Mono', monospace; background: rgba(255,255,255,.04); border: 0.5px solid rgba(255,255,255,.09); padding: 4px 10px; border-radius: 5px; color: var(--text2); }

/* ── Arc Cards ──────────────────────────────────────────────────── */
.arc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 48px; }
.arc-card { background: var(--ink2); border: 0.5px solid rgba(255,255,255,.07); border-radius: 10px; padding: 18px 20px; transition: border-color .2s; }
.arc-card:hover { border-color: rgba(201,168,76,.3); }
.arc-phase { font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 5px; }
.arc-title { font-family: 'Bebas Neue', sans-serif; font-size: 19px; letter-spacing: .07em; margin-bottom: 5px; }
.arc-desc  { font-size: 12px; color: var(--text2); line-height: 1.55; }
.arc-status { display: inline-block; margin-top: 11px; font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; }
.s-active   { background: rgba(29,138,122,.15); color: #5dc8b6; border: 0.5px solid rgba(29,138,122,.3); }
.s-planned  { background: rgba(176,159,232,.1);  color: #b09fe8; border: 0.5px solid rgba(176,159,232,.2); }
.s-complete { background: rgba(160,158,152,.1);  color: #a09e98; border: 0.5px solid rgba(160,158,152,.2); }

/* ── WordPress Content Area ─────────────────────────────────────── */
.entry-content { color: var(--text2); line-height: 1.75; }
.entry-content h2, .entry-content h3 { color: var(--text); margin: 1.5em 0 .5em; }
.entry-content p { margin-bottom: 1em; }
.entry-content a { color: var(--gold); }
.entry-content a:hover { color: var(--gold2); }

/* ── Footer ─────────────────────────────────────────────────────── */
#site-footer {
  border-top: 0.5px solid rgba(255,255,255,.06);
  padding: 36px 28px;
  text-align: center;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-logo  { font-family: 'Bebas Neue', sans-serif; font-size: 22px; letter-spacing: .18em; color: var(--gold); margin-bottom: 6px; }
.footer-copy  { font-size: 11px; color: var(--text3); }
.footer-copy a { color: var(--text3); }
.footer-copy a:hover { color: var(--gold); }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .character-single__cols { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .nav-inner { padding: 0 16px; }
  .menu-toggle { display: block; }
  .site-wrap { padding: 0 14px; }
  .character-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .card-scene { height: 290px; }
  .character-single__body { padding: 0 16px 40px; }
  .character-single__header { flex-direction: column; align-items: flex-start; }
}

/* ── Mobile Menu Overlay ────────────────────────────────────────── */
@media (max-width: 768px) {
  #primary-navigation {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(13,13,15,.97);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
    padding: 80px 32px 40px;
  }
@media (min-width: 769px) {
  #primary-navigation {
    position: static;
    display: flex;
    background: none;
    opacity: 1;
    visibility: visible;
    padding: 0;
    width: auto;
    height: auto;
    inset: auto;
  }
}
#primary-navigation.open {
    opacity: 1;
    visibility: visible;
    background: rgba(13,13,15,.99) !important;
    padding-top: 100px !important;
    padding-bottom: 60px !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
#primary-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 300px;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}
  #primary-navigation li {
    width: 100%;
    text-align: center;
    border-bottom: 0.5px solid rgba(255,255,255,.06);
  }
  #primary-navigation li:last-child {
    border-bottom: none;
  }
  #primary-navigation a {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 32px;
    letter-spacing: .08em;
    color: var(--text2, #a09e98);
    text-decoration: none;
    padding: 14px 0;
    transition: color .2s;
  }
  #primary-navigation a:hover,
  #primary-navigation .current-menu-item a {
    color: var(--gold, #c9a84c);
  }

  /* Close button */
  .menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: 0.5px solid rgba(255,255,255,.15);
    color: var(--text2, #a09e98);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s;
    z-index: 301;
  }
  .menu-close:hover {
    color: var(--gold, #c9a84c);
    border-color: rgba(201,168,76,.3);
  }

  /* Logo in menu */
  .menu-logo {
    position: absolute;
    top: 24px;
    left: 24px;
  }
  .menu-logo img {
    height: 30px;
    width: auto;
  }
}
@media (min-width: 769px) {
  .menu-close,
  .menu-logo { display: none; }
}
@media (max-width: 768px) {
  .menu-logo {
    position: absolute;
    top: 16px;
    left: 16px;
  }
  .menu-logo img {
    height: 44px;
    width: auto;
  }
  .menu-logo .custom-logo-link img {
    height: 22px;
    width: auto;
  }
  .menu-close {
    position: absolute;
    top: 16px;
    right: 16px;
  }
  #primary-navigation ul {
    align-items: center;
    justify-content: center;
    text-align: center;
  }
}

/* ── Footer modded ─────────────────────────────────────────────────────── */

/* Social Bar */
#site-footer {
  margin-left: -32px;
  margin-right: -32px;
  margin-bottom: 0;
  padding-bottom: 0;
}
.footer-social-bar {
  border-top: 0.5px solid rgba(255,255,255,.07);
  padding: 20px 32px;
  background: var(--ink2, #13131a);
}
.footer-social-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  border: 0.5px solid rgba(255,255,255,.08);
  color: var(--text3, #6b6860);
  transition: all .2s;
  text-decoration: none;
}
.footer-social-link svg {
  width: 16px;
  height: 16px;
}
.footer-social-link:hover {
  background: rgba(201,168,76,.1);
  border-color: rgba(201,168,76,.3);
  color: var(--gold, #c9a84c);
}

/* 4 Column Section */
.footer-columns {
  background: var(--ink2, #13131a);
  border-top: 0.5px solid rgba(255,255,255,.07);
  padding: 40px 32px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px;
}
.footer-col__title {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold, #c9a84c);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 0.5px solid rgba(201,168,76,.2);
}
.footer-col__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-col__links a {
  font-size: 12px;
  color: var(--text3, #6b6860);
  text-decoration: none;
  transition: color .2s;
  font-family: 'DM Sans', sans-serif;
}
.footer-col__links a:hover {
  color: var(--text1, #f0ece4);
}

/* Copyright Bar */
.footer-copy-bar {
  background: var(--ink2, #13131a);
  border-top: 0.5px solid rgba(255,255,255,.05);
  padding: 16px 32px;
  margin-bottom: 0;
  padding-bottom: 16px;
}
.footer-copy-bar .footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-template-columns: none;
}
.footer-copy {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text3, #6b6860);
  letter-spacing: .08em;
  margin: 0;
  text-align: center;
  margin-bottom: 0;
  padding-bottom: 0;
}
.footer-copy a {
  color: var(--text3, #6b6860);
  text-decoration: none;
}
.footer-copy a:hover { color: var(--gold, #c9a84c); }

/* Footer responsive */
@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .footer-social-bar,
  .footer-columns,
  .footer-copy-bar { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ── Stat Rings ─────────────────────────────────────────────────── */
.stat-ring-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
}
.stat-ring-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
.stat-ring {
  width: 56px;
  height: 56px;
}
.stat-ring-label {
  font-family: 'DM Mono', monospace;
  font-size: 8px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text3, #6b6860);
  text-align: center;
}

/* Modal rings — slightly larger */
.stat-ring-modal .stat-ring {
  width: 68px;
  height: 68px;
}
.stat-ring-modal .stat-ring-label {
  font-size: 9px;
}

.stat-ring-page .stat-ring {
  width: 80px;
  height: 80px;
}
.stat-ring-page .stat-ring-label {
  font-size: 10px;
}

/* ── Character Pagination ───────────────────────────────────────── */
.char-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  margin: 20px 0;
  border-top: 0.5px solid rgba(255,255,255,.07);
  border-bottom: 0.5px solid rgba(255,255,255,.07);
}
.char-pagination__link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(255,255,255,.03);
  border: 0.5px solid rgba(255,255,255,.08);
  transition: all .2s;
  flex: 1;
  max-width: 48%;
}
.char-pagination__link:hover {
  background: rgba(201,168,76,.08);
  border-color: rgba(201,168,76,.3);
}
.char-pagination__prev { justify-content: flex-start; }
.char-pagination__next { justify-content: flex-end; text-align: right; margin-left: auto; }
.char-pagination__disabled { visibility: hidden; }
.char-pagination__arrow {
  font-size: 16px;
  color: var(--gold, #c9a84c);
  flex-shrink: 0;
}
.char-pagination__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.char-pagination__label {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text3, #6b6860);
}
.char-pagination__name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: .04em;
  color: var(--text1, #f0ece4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.char-pagination__link:hover .char-pagination__name {
  color: var(--gold, #c9a84c);
}

@media (max-width: 768px) {
  #site-header {
    z-index: 200 !important;
  }
}

@media (max-width: 600px) {
  .char-pagination { gap: 8px; }
  .char-pagination__link { padding: 8px 10px; max-width: 50%; }
  .char-pagination__name { font-size: 14px; }
}

html, body {
  overflow-x: hidden;
}

#site-footer {
  overflow-x: hidden;
}

/* ── reCAPTCHA Badge Hide ───────────────────────────────────────── */
.grecaptcha-badge { 
  visibility: hidden; 
}

/* ── Card Back Scroll ───────────────────────────────────────────── */
.cb-body {
  height: 330px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-backface-visibility: hidden; 
  backface-visibility: hidden;
}
.cb-body::-webkit-scrollbar { width: 6px; }
.cb-body::-webkit-scrollbar-track { background: #f1f1f1; }
.cb-body::-webkit-scrollbar-thumb { background: #888; border-radius: 10px; }
.cb-body::-webkit-scrollbar-thumb:hover { background: #555; }

.card-backs-scrollable {
  top: 290px;
  position: absolute;
}

/* ── Simply Gallery Override ────────────────────────────────────── */
.pgcsimplygalleryblock-grid-item .pgcsimplygalleryblock-grid-item-menu-holder {
  visibility: hidden;
  position: absolute;
  bottom: 0;
  right: 0;
  padding: 0 .4em 0 0;
  min-height: 45px;
  transform: translateY(100%);
  transition: transform .5s;
}

#h-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  #h-desc {
    padding-right: 50px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Static dots — no size change, only color */
  .nexus-hero__dots {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-items: center;
  }
  .hero-dot,
  .hero-dot.on {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
  }
  .hero-dot {
    background: rgba(255,255,255,.22) !important;
  }
  .hero-dot.on {
    background: var(--gold) !important;
  }
}

/* ── Shared Story Map UI ─────────────────────────────────────────── */

/* Header */
.sm-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 40px 32px 20px;
  gap: 20px;
  flex-wrap: wrap;
}
.sm-header__eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--gold, #c9a84c);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.sm-header__title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  letter-spacing: .06em;
  line-height: 1;
  margin: 0 0 6px;
  color: var(--text1, #f0ece4);
}
.sm-header__desc {
  font-size: 13px;
  color: var(--text3, #6b6860);
  margin: 0;
}
.sm-header__controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* Toolbar */
.sm-toolbar {
  display: flex;
  gap: 6px;
}
.sm-btn {
  background: rgba(255,255,255,.04);
  border: 0.5px solid rgba(255,255,255,.1);
  color: var(--text2, #a09e98);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.sm-btn:hover {
  background: rgba(201,168,76,.1);
  color: var(--gold, #c9a84c);
  border-color: rgba(201,168,76,.3);
}

/* Zone pills */
.sm-zone-pills {
  display: flex;
  gap: 8px;
  padding: 0 32px 16px;
  flex-wrap: wrap;
}
.sm-pill {
  background: rgba(255,255,255,.03);
  border: 0.5px solid rgba(255,255,255,.1);
  color: var(--text3, #6b6860);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: .1em;
  padding: 5px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all .2s;
}
.sm-pill:hover,
.sm-pill.active {
  background: rgba(201,168,76,.08);
  color: var(--gold, #c9a84c);
  border-color: rgba(201,168,76,.35);
}

/* Canvas wrap */
.sm-canvas-wrap {
  flex: 1;
  position: relative;
  min-height: calc(100vh - 280px);
  margin: 0 32px 32px;
  border: 0.5px solid rgba(255,255,255,.07);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,.01);
}

/* Loading */
.sm-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--text3, #6b6860);
  letter-spacing: .1em;
  z-index: 10;
}
.sm-loading__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold, #c9a84c);
  animation: smDotPulse 1.2s ease-in-out infinite;
}
.sm-loading__dot:nth-child(2) { animation-delay: .2s; }
.sm-loading__dot:nth-child(3) { animation-delay: .4s; }
@keyframes smDotPulse {
  0%,80%,100% { opacity:.2; transform:scale(.8); }
  40%         { opacity:1;  transform:scale(1); }
}

/* Detail Panel */
.sm-panel {
  position: fixed;
  top: 50%;
  right: -360px;
  transform: translateY(-50%);
  width: 320px;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--ink2, #13131a);
  border: 0.5px solid rgba(201,168,76,.2);
  border-radius: 14px;
  z-index: 100;
  transition: right .3s cubic-bezier(.16,1,.3,1);
  box-shadow: -8px 0 40px rgba(0,0,0,.4);
}
.sm-panel.open { right: 24px; }
.sm-panel__close {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 10;
  background: none;
  border: 0.5px solid rgba(255,255,255,.1);
  color: var(--text3, #6b6860);
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.sm-panel__inner { padding: 24px 20px 20px; }

/* Panel content */
.smp-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: .2em;
  margin-bottom: 6px;
}
.smp-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  letter-spacing: .06em;
  line-height: 1;
  margin-bottom: 4px;
}
.smp-type {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text3, #6b6860);
  letter-spacing: .1em;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.smp-excerpt {
  font-size: 12px;
  color: var(--text2, #a09e98);
  line-height: 1.7;
  border-left: 2px solid var(--gold, #c9a84c);
  padding-left: 12px;
  margin: 0 0 14px;
}
.smp-script-wrap {
  background: rgba(255,255,255,.03);
  border: 0.5px solid rgba(255,255,255,.07);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.smp-script-label {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: .18em;
  color: var(--gold, #c9a84c);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.smp-script {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text2, #a09e98);
  line-height: 1.8;
  white-space: pre-wrap;
}
.smp-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
}
.smp-locked {
  text-align: center;
  padding: 20px 0;
}
.smp-lock-icon { font-size: 32px; margin-bottom: 10px; }
.smp-lock-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  letter-spacing: .2em;
  color: var(--text3, #6b6860);
  margin-bottom: 8px;
}
.smp-lock-sub {
  font-size: 12px;
  color: var(--text3, #6b6860);
  font-family: 'DM Mono', monospace;
}
.smp-conn-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.smp-conn-node {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  letter-spacing: .06em;
}
.smp-conn-arrow { font-size: 18px; }
.smp-conn-type {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.smp-conn-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text2, #a09e98);
  font-style: italic;
  margin-bottom: 10px;
}
.smp-teaser-note {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text3, #6b6860);
  letter-spacing: .1em;
  margin-top: 10px;
}

/* Node panel images */
.smp-node-img {
  width: 100%;
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--ink3, #1a1a24);
  border-radius: 10px;
}
.smp-node-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.smp-node-portrait { height: 220px; }
.smp-node-portrait img { object-position: top center; opacity: .8; }
.smp-node-landscape { aspect-ratio: 16 / 9; height: auto; }
.smp-node-landscape img { opacity: .7; }

/* Cast list */
.smp-cast { margin-bottom: 14px; }
.smp-cast-label {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text3, #6b6860);
  margin-bottom: 8px;
}
.smp-cast-list { display: flex; flex-wrap: wrap; gap: 6px; }
.smp-cast-primary {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--gold, #c9a84c);
  border: 0.5px solid rgba(201,168,76,.3);
  background: rgba(201,168,76,.06);
  padding: 3px 10px;
  border-radius: 4px;
  text-decoration: none;
}
.smp-cast-item {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text2, #a09e98);
  border: 0.5px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.03);
  padding: 3px 10px;
  border-radius: 4px;
  text-decoration: none;
}
.smp-cast-primary:hover, .smp-cast-item:hover {
  color: var(--gold, #c9a84c);
  border-color: rgba(201,168,76,.3);
}

/* Legend */
.sm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: flex-end;
}
.sm-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text3, #6b6860);
  letter-spacing: .06em;
}

/* Responsive */
@media (max-width: 600px) {
  .sm-header { padding: 24px 16px 16px; }
  .sm-zone-pills { padding: 0 16px 12px; }
  .sm-canvas-wrap { margin: 0 16px 24px; }
  .sm-panel { width: calc(100vw - 32px); right: -100vw; }
  .sm-panel.open { right: 16px; }
}

@media (max-width: 600px) {
  .sm-panel {
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    max-height: 50vh;
    transform: none;
    border-radius: 14px 14px 0 0;
    transition: transform .3s cubic-bezier(.16,1,.3,1);
    transform: translateY(100%);
  }
  .sm-panel.open {
    right: 0;
    transform: translateY(0);
  }
}

.ar-exit-btn {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  background: rgba(13,13,15,.85);
  border: 0.5px solid rgba(201,168,76,.4);
  color: var(--gold, #c9a84c);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: .2em;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.ar-exit-btn:hover {
  background: rgba(201,168,76,.15);
}

.age-gate__logo a {
  display: flex;
  justify-content: center;
}