/* HERESY.CSS — shared design system */
:root {
  --bg:        #050508;
  --bg-card:   #0a0a0f;
  --bg-dark:   #080808;
  --teal:      #00FFD1;
  --teal-dim:  rgba(0,255,209,0.15);
  --teal-glow: rgba(0,255,209,0.35);
  --gold:      #C9A84C;
  --gold-dim:  rgba(201,168,76,0.15);
  --danger:    #FF2D55;
  --magenta:   #FF2D8F;
  --orange:    #FF6A00;
  --silver:    #A0A8B0;
  --amber:     #D4873A;
  --grey:      #5a5a6a;
  --text:      #c8c8d8;
  --mono:      'Courier New', 'Courier', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  opacity: 1;
  transition: opacity 0.2s ease;
}
body.page-fade-out { opacity: 0; }
@keyframes pageFadeIn { from { opacity: 0; } to { opacity: 1; } }
body { animation: pageFadeIn 0.25s ease-in; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--grey); }
::-webkit-scrollbar-thumb:hover { background: var(--teal); }

/* ── NAVIGATION ── */
#h-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  height: 56px;
  background: transparent;
  transition: background 0.3s, border-bottom 0.3s;
}
#h-nav.scrolled {
  background: var(--bg);
  border-bottom: 1px solid var(--teal);
}
.nav-logo {
  font-size: 1.4rem; font-weight: 700; letter-spacing: 4px;
  color: var(--teal); text-decoration: none;
  text-shadow: 0 0 12px var(--teal-glow);
}
.nav-links {
  display: flex; gap: 1.5rem; list-style: none;
}
.nav-links a {
  color: var(--text); text-decoration: none;
  font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--teal); }
.nav-mobile-toggle {
  display: none; background: none; border: 1px solid var(--teal);
  color: var(--teal); padding: 6px 10px; cursor: pointer; font-family: var(--mono);
}

/* ── LINKS ── */
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── HEADINGS ── */
h1, h2, h3, h4 { font-family: var(--mono); font-weight: 700; letter-spacing: 2px; }

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--teal);
  color: var(--teal);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 10px 24px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.btn:hover {
  background: var(--teal);
  color: var(--bg);
  box-shadow: 0 0 16px var(--teal-glow);
  text-decoration: none;
}
.btn-gold {
  border-color: var(--gold); color: var(--gold);
}
.btn-gold:hover {
  background: var(--gold); color: var(--bg);
  box-shadow: 0 0 16px var(--gold-dim);
}
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-sm { padding: 6px 14px; font-size: 0.65rem; }

/* ── CARDS ── */
.card {
  background: var(--bg-card);
  border: 1px solid #1a1a2e;
  padding: 1.5rem;
}
.card-teal-top { border-top: 2px solid var(--teal); }
.card-gold-top  { border-top: 2px solid var(--gold); }

/* ── BADGES ── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.6rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: 1px solid currentColor;
  vertical-align: middle;
}
.badge-teal   { color: var(--teal); border-color: var(--teal); }
.badge-magenta{ color: var(--magenta); border-color: var(--magenta); }
.badge-orange { color: var(--orange); border-color: var(--orange); }
.badge-gold   { color: var(--gold); border-color: var(--gold); }
.badge-null   {
  color: var(--gold); border-color: var(--gold);
  background: var(--gold-dim);
  font-size: 0.55rem;
}

/* ── FORMS ── */
input[type="text"], input[type="email"], textarea {
  background: var(--bg-dark);
  border: 1px solid var(--grey);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s;
}
input[type="text"]:focus, input[type="email"]:focus {
  border-color: var(--teal);
}

/* ── SKELETON LOADER ── */
.skeleton {
  background: linear-gradient(90deg, #0a0a14 25%, #12121f 50%, #0a0a14 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  height: 1em;
  border-radius: 0;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── PAGE WRAPPER ── */
.page-content {
  padding-top: 56px;
  min-height: 100vh;
}

/* ── SECTION DIVIDERS ── */
.section { padding: 4rem 2rem; max-width: 1200px; margin: 0 auto; }
.section-full { padding: 4rem 2rem; }
.section-title {
  font-size: 0.7rem; letter-spacing: 4px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 2rem;
}
.section-title::before { content: '// '; opacity: 0.5; }

/* ── HORIZONTAL RULE ── */
hr.teal { border: none; border-top: 1px solid var(--teal); opacity: 0.3; margin: 2rem 0; }
hr.dark { border: none; border-top: 1px solid #1a1a2e; margin: 2rem 0; }

/* ── SIGNAL LOST / ERROR ── */
.signal-lost {
  color: var(--teal); font-size: 0.75rem; letter-spacing: 2px;
  text-align: center; padding: 2rem;
  border: 1px solid var(--grey);
}

/* ── FOOTER ── */
#h-footer {
  background: var(--bg-dark);
  border-top: 1px solid #1a1a2e;
  padding: 2rem;
  text-align: center;
}
.footer-logo {
  font-size: 1rem; letter-spacing: 4px; color: var(--teal);
  text-shadow: 0 0 8px var(--teal-glow); margin-bottom: 1rem;
  display: block;
}
.footer-links {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 1rem 2rem; list-style: none; margin-bottom: 1rem;
}
.footer-links a {
  color: var(--grey); font-size: 0.65rem; letter-spacing: 2px;
  text-transform: uppercase; text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--teal); }
.footer-copy {
  font-size: 0.65rem; color: var(--grey); letter-spacing: 1px;
  margin-bottom: 0.5rem;
}
.footer-sub {
  font-size: 0.6rem; color: #3a3a4a;
}

/* ── GRID ANIMATED BG ── */
.grid-bg {
  position: relative;
  overflow: hidden;
}
.grid-bg::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,255,209,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,209,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridDrift 25s linear infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes gridDrift {
  0%   { background-position: 0 0; }
  100% { background-position: 60px 60px; }
}
.grid-bg > * { position: relative; z-index: 1; }

/* ── CLASS COLORS ── */
.class-dissident { color: var(--teal); }
.class-splice    { color: var(--magenta); }
.class-ironclad  { color: var(--orange); }
.class-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; vertical-align: middle; margin-right: 6px;
}
.class-dot.dissident { background: var(--teal); }
.class-dot.splice    { background: var(--magenta); }
.class-dot.ironclad  { background: var(--orange); }

/* ── RANK COLORS ── */
.rank-1 { border-left: 3px solid var(--gold); }
.rank-2 { border-left: 3px solid var(--silver); }
.rank-3 { border-left: 3px solid var(--amber); }

/* ── TIER COLORS ── */
.tier-sanctioned { color: #888888; }
.tier-flagged    { color: #4488ff; }
.tier-blacklisted{ color: #ffdd00; }
.tier-exiled     { color: #ff6600; }
.tier-artifact   { color: #ffffff; text-shadow: 0 0 8px var(--gold); }

/* ── LOCKED SECTION ── */
.locked-card {
  background: var(--bg-card);
  border: 1px solid #1a1a2e;
  padding: 2rem; text-align: center;
  opacity: 0.5;
}
.locked-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.locked-text {
  font-size: 0.65rem; letter-spacing: 3px; color: var(--grey);
  text-transform: uppercase;
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; gap: 1rem; }
  .nav-links.open { display: flex; }
  .nav-mobile-toggle { display: block; }
  #h-nav {
    flex-wrap: wrap; height: auto; padding: 0.75rem 1rem;
  }
  .nav-links-wrap {
    width: 100%;
    background: var(--bg);
    border-top: 1px solid #1a1a2e;
    padding: 1rem 0;
  }
  .nav-links a { padding: 0.5rem 0; }
  .section { padding: 3rem 1rem; }
  .section-full { padding: 3rem 1rem; }
}
@media (max-width: 480px) {
  .section { padding: 2rem 0.75rem; }
}
