/* ============================================================
   FORGE ATLAS — WORLD-CLASS DESIGN SYSTEM
   Premium. Operator-grade. Automation flagship.
   ============================================================ */

/* GOOGLE FONTS */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Oswald:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  /* Backgrounds */
  --bg-base:       #080808;
  --bg-surface:    #111111;
  --bg-elevated:   #161616;
  --bg-card:       #1c1c1c;
  --bg-overlay:    #222222;
  --bg-hover:      rgba(255,255,255,0.04);

  /* Borders */
  --border-faint:  rgba(255,255,255,0.04);
  --border-subtle: rgba(255,255,255,0.07);
  --border-medium: rgba(255,255,255,0.12);
  --border-strong: rgba(255,255,255,0.22);

  /* Gold — primary accent */
  --gold-dim:      #8a6a1e;
  --gold:          #c9962a;
  --gold-primary:  #d4a843;
  --gold-bright:   #f0bc52;
  --gold-light:    #ffd166;
  --gold-glow:     rgba(212,168,67,0.22);
  --gold-glow-sm:  rgba(212,168,67,0.12);

  /* Cyan — secondary accent */
  --cyan-dim:      #0d5a66;
  --cyan:          #06b6d4;
  --cyan-bright:   #22d3ee;
  --cyan-glow:     rgba(6,182,212,0.2);

  /* Amber — warmth & warning */
  --amber:         #f59e0b;
  --amber-glow:    rgba(245,158,11,0.18);

  /* Semantic */
  --success:       #10b981;
  --success-glow:  rgba(16,185,129,0.15);
  --warning:       #f59e0b;
  --error:         #ef4444;
  --error-glow:    rgba(239,68,68,0.15);

  /* Text */
  --text-primary:  #f4f4f5;
  --text-secondary:#a1a1aa;
  --text-muted:    #71717a;
  --text-faint:    #52525b;

  /* Typography */
  --font-display:  'Oswald', system-ui, sans-serif;
  --font-body:     'Inter', system-ui, sans-serif;
  --font-mono:     'JetBrains Mono', monospace;

  /* Spacing (8px grid) */
  --s1: 0.25rem;   /* 4px  */
  --s2: 0.5rem;    /* 8px  */
  --s3: 0.75rem;   /* 12px */
  --s4: 1rem;      /* 16px */
  --s5: 1.25rem;   /* 20px */
  --s6: 1.5rem;    /* 24px */
  --s8: 2rem;      /* 32px */
  --s10: 2.5rem;   /* 40px */
  --s12: 3rem;     /* 48px */
  --s16: 4rem;     /* 64px */
  --s20: 5rem;     /* 80px */
  --s24: 6rem;     /* 96px */

  /* Radius */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:   0 6px 20px rgba(0,0,0,0.5);
  --shadow-lg:   0 14px 40px rgba(0,0,0,0.6);
  --shadow-xl:   0 24px 64px rgba(0,0,0,0.7);
  --shadow-gold: 0 0 30px var(--gold-glow), 0 0 60px rgba(212,168,67,0.06);
  --shadow-cyan: 0 0 24px var(--cyan-glow);

  /* Transitions */
  --ease-out:    cubic-bezier(0.22,1,0.36,1);
  --ease-spring: cubic-bezier(0.34,1.56,0.64,1);
  --ease-in-out: cubic-bezier(0.4,0,0.2,1);
  --dur-fast:    120ms;
  --dur-base:    220ms;
  --dur-slow:    360ms;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ============================================================
   AMBIENT BACKGROUND
   ============================================================ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 15% 20%, rgba(212,168,67,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 85% 75%, rgba(6,182,212,0.05) 0%, transparent 55%),
    radial-gradient(ellipse 40% 50% at 50% 50%, rgba(212,168,67,0.025) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: ambientPulse 25s ease-in-out infinite;
}

@keyframes ambientPulse {
  0%,100% { opacity:1; }
  50%      { opacity:0.7; }
}

@media (prefers-reduced-motion:reduce) {
  body::before { animation:none; }
}

/* ============================================================
   NOISE TEXTURE OVERLAY
   ============================================================ */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ============================================================
   SKIP TO CONTENT
   ============================================================ */
.skip-link {
  position: absolute;
  top: -60px;
  left: var(--s4);
  background: var(--gold-primary);
  color: var(--bg-base);
  font-weight: 700;
  padding: var(--s3) var(--s5);
  border-radius: var(--r-sm);
  z-index: 9999;
  transition: top var(--dur-fast);
}
.skip-link:focus { top: var(--s4); }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: 64px;
  background: rgba(8,8,8,0.88);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--s6);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s6);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-shrink: 0;
}

.nav-logo-mark {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 0 16px var(--gold-glow-sm);
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
}

.nav-logo-text .forge { color: var(--text-primary); }
.nav-logo-text .atlas { color: var(--gold-primary); }

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s1);
  list-style: none;
}

.nav-link {
  position: relative;
  padding: var(--s2) var(--s4);
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: all var(--dur-fast);
  display: flex;
  align-items: center;
  gap: var(--s2);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-link.active {
  color: var(--gold-primary);
  background: var(--gold-glow-sm);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--gold-primary);
  border-radius: var(--r-full);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-arrow {
  width: 12px;
  height: 12px;
  opacity: 0.5;
  transition: transform var(--dur-fast);
}

.nav-dropdown:hover .nav-dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + var(--s2));
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-lg);
  padding: var(--s2);
  list-style: none;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-8px);
  transition: all var(--dur-base) var(--ease-out);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-item {
  display: block;
  padding: var(--s3) var(--s4);
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--dur-fast);
}

.nav-dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--gold-primary);
  padding-left: calc(var(--s4) + 4px);
}

/* Nav right */
.nav-right {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

/* Command palette trigger */
.nav-cmd-btn {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) var(--s4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 0.78rem;
  transition: all var(--dur-fast);
}

.nav-cmd-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-secondary);
  background: var(--bg-overlay);
}

.nav-cmd-kbd {
  background: var(--bg-overlay);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-xs);
  padding: 1px 5px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border-medium);
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  padding: var(--s2) var(--s3);
  transition: all var(--dur-fast);
}

.nav-hamburger:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

/* Mobile nav drawer */
.nav-drawer {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--s4);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: all var(--dur-base) var(--ease-out);
  z-index: 190;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}

.nav-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}

.nav-drawer-link {
  display: block;
  padding: var(--s3) var(--s4);
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--dur-fast);
}

.nav-drawer-link:hover {
  color: var(--gold-primary);
  background: var(--gold-glow-sm);
  padding-left: calc(var(--s4) + 6px);
}

.nav-drawer-section {
  margin-bottom: var(--s4);
}

.nav-drawer-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: var(--s2) var(--s4);
  margin-bottom: var(--s2);
}

@media (max-width: 960px) {
  .nav-links     { display: none; }
  .nav-cmd-btn   { display: none; }
  .nav-hamburger { display: flex; }
}

/* ============================================================
   COMMAND PALETTE
   ============================================================ */
.cmd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  z-index: 9000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-fast);
}

.cmd-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cmd-box {
  width: 90%;
  max-width: 620px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl), 0 0 40px var(--gold-glow-sm);
  transform: translateY(-12px) scale(0.98);
  transition: transform var(--dur-base) var(--ease-out);
}

.cmd-overlay.open .cmd-box {
  transform: translateY(0) scale(1);
}

.cmd-search {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s4) var(--s6);
  border-bottom: 1px solid var(--border-subtle);
}

.cmd-search-icon { color: var(--text-muted); flex-shrink: 0; }

.cmd-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  padding: var(--s2) 0;
}

.cmd-input:focus { outline: none; }
.cmd-input::placeholder { color: var(--text-muted); }

.cmd-close {
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xs);
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 2px 6px;
  font-family: var(--font-mono);
}

.cmd-results {
  max-height: 360px;
  overflow-y: auto;
  padding: var(--s2);
}

.cmd-section-label {
  padding: var(--s2) var(--s4);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.cmd-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--dur-fast);
}

.cmd-item:hover, .cmd-item.selected {
  background: var(--gold-glow-sm);
}

.cmd-item-icon {
  width: 32px;
  height: 32px;
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.cmd-item-label {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.cmd-item-category {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.cmd-footer {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s3) var(--s6);
  border-top: 1px solid var(--border-subtle);
}

.cmd-hint {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cmd-hint kbd {
  background: var(--bg-overlay);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-xs);
  padding: 1px 5px;
  font-family: var(--font-mono);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.4rem,6vw,4.5rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem,4vw,3rem);   font-weight: 700; }
h3 { font-size: clamp(1.4rem,3vw,2rem);   font-weight: 600; }
h4 { font-size: clamp(1.1rem,2vw,1.5rem); font-weight: 600; }
h5 { font-size: 1.1rem; font-weight: 600; }
h6 { font-size: 0.95rem; font-weight: 600; }

p {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: var(--s4);
}
p:last-child { margin-bottom: 0; }

code,kbd {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xs);
  padding: 2px 6px;
  color: var(--gold-primary);
}

pre {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: var(--s5);
  overflow-x: auto;
  color: var(--cyan-bright);
  line-height: 1.6;
}

/* Gradient headings */
.text-gradient {
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold-primary) 50%, var(--cyan-bright) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gold    { color: var(--gold-primary); }
.text-cyan    { color: var(--cyan-bright); }
.text-muted   { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--s6);
}

@media (max-width: 640px) {
  .container { padding: 0 var(--s4); }
}

.section {
  padding: var(--s24) var(--s6);
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .section { padding: var(--s16) var(--s4); }
}

.section-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--s16);
}

.section-header p {
  font-size: 1.05rem;
  margin-top: var(--s4);
}

/* Grids */
.grid-2 { display:grid; grid-template-columns: repeat(auto-fit,minmax(320px,1fr)); gap:var(--s6); }
.grid-3 { display:grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap:var(--s6); }
.grid-4 { display:grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap:var(--s5); }

@media (max-width:640px) {
  .grid-2,.grid-3,.grid-4 { grid-template-columns:1fr; gap:var(--s4); }
}

/* Flex utils */
.flex { display: flex; }
.flex-center { display:flex; align-items:center; justify-content:center; }
.flex-between { display:flex; align-items:center; justify-content:space-between; }
.flex-col { flex-direction: column; }
.gap-2 { gap: var(--s2); }
.gap-3 { gap: var(--s3); }
.gap-4 { gap: var(--s4); }
.gap-6 { gap: var(--s6); }

/* Divider */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-medium), transparent);
  margin: var(--s12) 0;
}

.divider-v {
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--border-medium), transparent);
  align-self: stretch;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--s24) var(--s6);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(212,168,67,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 20%, rgba(6,182,212,0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-faint) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-faint) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 80%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) var(--s5);
  background: var(--gold-glow-sm);
  border: 1px solid rgba(212,168,67,0.25);
  border-radius: var(--r-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: var(--s8);
}

.hero-eyebrow-dot {
  width: 6px;
  height: 6px;
  background: var(--gold-primary);
  border-radius: 50%;
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.5; transform:scale(0.7); }
}

.hero h1 {
  margin-bottom: var(--s6);
  line-height: 1.08;
}

.hero-subtitle {
  font-size: clamp(1rem,2.2vw,1.25rem);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto var(--s10);
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: var(--s4);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-disclaimer {
  margin-top: var(--s8);
  font-size: 0.78rem;
  color: var(--text-faint);
  letter-spacing: 0.03em;
  font-style: italic;
}

/* Hero scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: var(--s8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  color: var(--text-faint);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: scrollBounce 2.5s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%,100% { transform:translateX(-50%) translateY(0); opacity:0.5; }
  50%      { transform:translateX(-50%) translateY(6px); opacity:1; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: var(--s3) var(--s6);
  border: none;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

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

/* Primary — gold */
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  color: #0a0a0a;
  box-shadow: 0 2px 12px var(--gold-glow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.btn-primary:active { transform: translateY(0); }

/* Secondary */
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  background: var(--gold-glow-sm);
}

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--gold-primary);
  border: 1px solid var(--gold-primary);
}

.btn-outline:hover {
  background: var(--gold-glow-sm);
  box-shadow: var(--shadow-gold);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--bg-hover);
}

/* Cyan */
.btn-cyan {
  background: linear-gradient(135deg, var(--cyan-dim), var(--cyan));
  color: #fff;
}

.btn-cyan:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-cyan);
}

/* Sizes */
.btn-sm  { padding: var(--s2) var(--s4); font-size:0.78rem; }
.btn-lg  { padding: var(--s4) var(--s8); font-size:1rem; }
.btn-xl  { padding: var(--s5) var(--s10); font-size:1.05rem; }
.btn-icon { width:36px; height:36px; padding:0; border-radius:var(--r-sm); }
.btn-icon-round { width:40px; height:40px; padding:0; border-radius:50%; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: var(--s6);
  position: relative;
  overflow: hidden;
  transition: all var(--dur-base) var(--ease-out);
}

.card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* Glow variant */
.card-glow:hover {
  border-color: var(--gold-dim);
  box-shadow: var(--shadow-gold);
}

/* Top accent bar */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
  opacity: 0;
  transition: opacity var(--dur-base);
}

.card:hover::before { opacity: 1; }

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s4);
  margin-bottom: var(--s5);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.card-body {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  margin-top: var(--s5);
  padding-top: var(--s5);
  border-top: 1px solid var(--border-faint);
}

/* Stat cards */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: var(--s6);
  position: relative;
  overflow: hidden;
  transition: all var(--dur-base);
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(to top, var(--gold-glow-sm), transparent);
  opacity: 0;
  transition: opacity var(--dur-base);
}

.stat-card:hover { border-color: var(--gold-dim); }
.stat-card:hover::after { opacity: 1; }

.stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--s3);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: var(--s3);
}

.stat-meta {
  font-size: 0.82rem;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.stat-meta.negative { color: var(--error); }
.stat-meta.neutral  { color: var(--text-muted); }

/* ============================================================
   BADGES & TAGS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  padding: var(--s1) var(--s3);
  border-radius: var(--r-full);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-gold    { background:var(--gold-glow-sm);    color:var(--gold-light);    border:1px solid rgba(212,168,67,0.25); }
.badge-cyan    { background:rgba(6,182,212,0.1);    color:var(--cyan-bright);   border:1px solid rgba(6,182,212,0.25); }
.badge-success { background:var(--success-glow);    color:var(--success);       border:1px solid rgba(16,185,129,0.25); }
.badge-warning { background:var(--amber-glow);      color:var(--amber);         border:1px solid rgba(245,158,11,0.25); }
.badge-error   { background:var(--error-glow);      color:var(--error);         border:1px solid rgba(239,68,68,0.25); }
.badge-neutral { background:rgba(255,255,255,0.06); color:var(--text-secondary);border:1px solid var(--border-subtle); }

.badge-live {
  background: var(--success-glow);
  color: var(--success);
  border: 1px solid rgba(16,185,129,0.3);
}

.badge-live .badge-dot {
  width:6px; height:6px;
  background: var(--success);
  border-radius:50%;
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%,100% { opacity:1; }
  50%      { opacity:0.4; }
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: var(--s5); }

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--s2);
  letter-spacing: 0.02em;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  padding: var(--s3) var(--s4);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all var(--dur-fast);
  outline: none;
}

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
  border-color: var(--border-medium);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px var(--gold-glow-sm);
}

.form-textarea { resize: vertical; min-height: 120px; }

.form-note {
  margin-top: var(--s2);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.form-hint {
  margin-top: var(--s2);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================================
   ATLAS ID
   ============================================================ */
.atlas-id-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: var(--s8);
  align-items: start;
}

@media (max-width: 900px) {
  .atlas-id-layout { grid-template-columns: 1fr; }
  .atlas-id-preview-col { order: -1; }
}

.atlas-id-card {
  background: linear-gradient(145deg, var(--bg-card) 0%, rgba(212,168,67,0.04) 100%);
  border: 1px solid var(--gold-dim);
  border-radius: var(--r-xl);
  padding: var(--s6);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-gold);
}

.atlas-id-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright), var(--gold-dim));
}

.atlas-id-card-header {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s5);
  padding-bottom: var(--s4);
  border-bottom: 1px solid var(--border-faint);
}

.atlas-id-card-mark {
  flex-shrink: 0;
}

.atlas-id-callsign {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold-primary);
  text-shadow: 0 0 20px var(--gold-glow);
  margin-bottom: var(--s1);
}

.atlas-id-name {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: var(--s5);
}

.atlas-id-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
  margin-bottom: var(--s5);
  padding: var(--s4);
  background: var(--bg-overlay);
  border-radius: var(--r-md);
}

.atlas-id-stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--s1);
}

.atlas-id-stat-val {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.atlas-id-bio {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.65;
  min-height: 60px;
  margin-bottom: var(--s5);
  font-style: italic;
}

.atlas-id-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--s4);
  border-top: 1px solid var(--border-faint);
}

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--border-subtle); }

table { width:100%; border-collapse:collapse; }

thead {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--gold-dim);
}

th {
  padding: var(--s4) var(--s5);
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-primary);
  white-space: nowrap;
}

td {
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--border-faint);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

tbody tr:last-child td { border-bottom: none; }

tbody tr:hover { background: var(--bg-hover); }

/* ============================================================
   PROGRESS / METERS
   ============================================================ */
.meter {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.meter-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 72px;
  letter-spacing: 0.03em;
}

.meter-bar {
  flex: 1;
  height: 5px;
  background: var(--bg-overlay);
  border-radius: var(--r-full);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  border-radius: var(--r-full);
  transition: width 0.8s var(--ease-out);
  box-shadow: 0 0 8px var(--gold-glow-sm);
}

.meter-fill.cyan {
  background: linear-gradient(90deg, var(--cyan), var(--cyan-bright));
  box-shadow: 0 0 8px var(--cyan-glow);
}

.meter-value {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-primary);
  min-width: 36px;
  text-align: right;
}

/* ============================================================
   ACCORDION / FAQ
   ============================================================ */
.accordion { display: flex; flex-direction: column; gap: var(--s3); }

.accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color var(--dur-fast);
}

.accordion-item:hover { border-color: var(--border-medium); }

.accordion-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: var(--s5) var(--s6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  text-align: left;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--dur-fast);
}

.accordion-trigger:hover { color: var(--gold-primary); }

.accordion-trigger[aria-expanded="true"] {
  color: var(--gold-primary);
  border-bottom: 1px solid var(--border-faint);
}

.accordion-chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform var(--dur-base) var(--ease-out);
}

.accordion-trigger[aria-expanded="true"] .accordion-chevron {
  transform: rotate(180deg);
  color: var(--gold-primary);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-slow) var(--ease-out);
}

.accordion-body.open { max-height: 1200px; }

.accordion-body-inner {
  padding: var(--s5) var(--s6);
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.75;
}

/* ============================================================
   ATLAS AI WIDGET
   ============================================================ */
.atlas-ai {
  position: fixed;
  bottom: var(--s6);
  right: var(--s6);
  z-index: 500;
}

.atlas-ai-orb {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  border: 2px solid rgba(212,168,67,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 24px var(--gold-glow), var(--shadow-lg);
  transition: all var(--dur-base) var(--ease-spring);
  font-size: 1.3rem;
  position: relative;
}

.atlas-ai-orb:hover {
  transform: scale(1.12);
  box-shadow: var(--shadow-gold), var(--shadow-xl);
}

.atlas-ai-ring {
  position: absolute;
  inset: -4px;
  border: 2px solid var(--gold-primary);
  border-radius: 50%;
  opacity: 0.4;
  animation: ringPulse 3s ease-out infinite;
}

@keyframes ringPulse {
  0% { transform:scale(1); opacity:0.4; }
  100% { transform:scale(1.6); opacity:0; }
}

@media (prefers-reduced-motion:reduce) {
  .atlas-ai-ring { animation:none; display:none; }
  .atlas-ai-orb { animation:none; }
}

.atlas-ai-panel {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 340px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl), 0 0 40px var(--gold-glow-sm);
  overflow: hidden;
  display: none;
  flex-direction: column;
  max-height: 480px;
}

.atlas-ai-panel.open { display: flex; }

.atlas-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(135deg, rgba(212,168,67,0.08), rgba(6,182,212,0.05));
}

.atlas-ai-header-left {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.atlas-ai-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--gold-primary);
}

.atlas-ai-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.atlas-ai-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  transition: color var(--dur-fast);
  line-height: 1;
}

.atlas-ai-close:hover { color: var(--text-primary); }

.atlas-ai-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.atlas-ai-msg {
  background: var(--bg-overlay);
  border-left: 3px solid var(--gold-primary);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: var(--s3) var(--s4);
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text-secondary);
  animation: msgSlide var(--dur-base) var(--ease-out);
}

@keyframes msgSlide {
  from { opacity:0; transform:translateY(6px); }
  to   { opacity:1; transform:translateY(0); }
}

.atlas-ai-typing {
  display: flex;
  gap: 5px;
  padding: var(--s3) var(--s4);
}

.atlas-ai-dot {
  width: 6px; height: 6px;
  background: var(--gold-primary);
  border-radius: 50%;
  animation: typeBounce 1.4s infinite;
}

.atlas-ai-dot:nth-child(2) { animation-delay:0.2s; }
.atlas-ai-dot:nth-child(3) { animation-delay:0.4s; }

@keyframes typeBounce {
  0%,60%,100% { transform:translateY(0); opacity:0.4; }
  30%          { transform:translateY(-6px); opacity:1; }
}

@media (prefers-reduced-motion:reduce) {
  .atlas-ai-dot { animation:none; opacity:0.6; }
}

.atlas-ai-prompts {
  padding: var(--s3) var(--s4);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.atlas-prompt-btn {
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  padding: var(--s2) var(--s4);
  text-align: left;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all var(--dur-fast);
}

.atlas-prompt-btn:hover {
  background: var(--gold-glow-sm);
  border-color: rgba(212,168,67,0.2);
  color: var(--gold-primary);
  padding-left: calc(var(--s4) + 4px);
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-rack {
  position: fixed;
  bottom: var(--s6);
  left: var(--s6);
  z-index: 8000;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-md);
  padding: var(--s4) var(--s5);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastIn var(--dur-base) var(--ease-out);
  max-width: 340px;
}

@keyframes toastIn {
  from { opacity:0; transform:translateX(-24px); }
  to   { opacity:1; transform:translateX(0); }
}

.toast-icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-body { flex: 1; }

.toast-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.toast-msg {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: color var(--dur-fast);
}

.toast-close:hover { color: var(--text-primary); }

.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--error); }
.toast.gold    { border-left: 3px solid var(--gold-primary); }
.toast.cyan    { border-left: 3px solid var(--cyan); }

/* ============================================================
   ARENA
   ============================================================ */
.match-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: all var(--dur-base);
}

.match-card:hover {
  border-color: var(--gold-dim);
  box-shadow: var(--shadow-gold);
}

.match-header {
  background: linear-gradient(135deg, rgba(212,168,67,0.06), rgba(6,182,212,0.04));
  border-bottom: 1px solid var(--border-faint);
  padding: var(--s4) var(--s6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.match-body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--s6);
  padding: var(--s8) var(--s6);
  align-items: center;
}

@media (max-width:640px) {
  .match-body { grid-template-columns:1fr; text-align:center; }
}

.match-fighter { }

.match-fighter-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: var(--s2);
}

.match-fighter-role {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--s5);
}

.match-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--border-faint);
  font-size: 0.82rem;
}

.match-stat:last-child { border-bottom: none; }
.match-stat-label { color: var(--text-muted); }
.match-stat-value { font-weight: 700; color: var(--gold-primary); }

.match-vs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s3);
}

.match-vs-text {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold-primary);
  letter-spacing: 0.15em;
  text-shadow: 0 0 20px var(--gold-glow);
}

/* ============================================================
   SWARM MISSION THEATER
   ============================================================ */
.mission-theater {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  overflow: hidden;
}

.mission-theater-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s5) var(--s6);
  background: linear-gradient(135deg, rgba(6,182,212,0.07), rgba(212,168,67,0.05));
  border-bottom: 1px solid var(--border-subtle);
}

.mission-timer {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--cyan-bright);
  background: var(--bg-overlay);
  border: 1px solid var(--cyan-dim);
  border-radius: var(--r-sm);
  padding: var(--s2) var(--s5);
  letter-spacing: 0.05em;
  box-shadow: 0 0 16px var(--cyan-glow);
}

.mission-body {
  padding: var(--s6);
}

.command-log {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: var(--s4) var(--s5);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--cyan);
  max-height: 180px;
  overflow-y: auto;
}

.command-line { opacity: 0.7; }
.command-line:last-child { opacity: 1; color: var(--gold-primary); }

/* ============================================================
   PRODUCT CARDS (MARKET)
   ============================================================ */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: var(--s6);
  display: flex;
  flex-direction: column;
  transition: all var(--dur-base) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.product-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(212,168,67,0.04), transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-base);
}

.product-card:hover {
  border-color: var(--gold-dim);
  box-shadow: var(--shadow-gold);
  transform: translateY(-4px);
}

.product-card:hover::after { opacity: 1; }

.product-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: var(--s3) 0;
  color: var(--text-primary);
}

.product-desc {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--s5);
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-faint);
  padding-top: var(--s4);
}

.product-price {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold-primary);
}

/* ============================================================
   FORUM / FEED POSTS
   ============================================================ */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: var(--s5) var(--s6);
  transition: all var(--dur-fast);
}

.post-card:hover {
  border-color: var(--border-medium);
  background: var(--bg-overlay);
}

.post-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s4);
  margin-bottom: var(--s4);
}

.post-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.post-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--s2);
}

.post-excerpt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: var(--s4);
}

.post-actions {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.post-action-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) var(--s3);
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--dur-fast);
}

.post-action-btn:hover {
  border-color: var(--gold-dim);
  color: var(--gold-primary);
  background: var(--gold-glow-sm);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  position: relative;
  z-index: 1;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: var(--s20) var(--s6) var(--s10);
  margin-top: var(--s24);
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--s16);
  margin-bottom: var(--s16);
}

@media (max-width:900px) {
  .footer-top { grid-template-columns: repeat(2,1fr); gap:var(--s10); }
}

@media (max-width:560px) {
  .footer-top { grid-template-columns: 1fr; gap:var(--s8); }
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 280px;
  margin-top: var(--s4);
}

.footer-col-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--s5);
}

.footer-links { list-style: none; }

.footer-links li { margin-bottom: var(--s3); }

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: all var(--dur-fast);
}

.footer-links a:hover {
  color: var(--gold-primary);
  padding-left: 4px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s6);
  padding-top: var(--s8);
  border-top: 1px solid var(--border-faint);
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-faint);
}

.footer-tagline {
  font-size: 0.78rem;
  color: var(--gold-dim);
  font-style: italic;
  letter-spacing: 0.04em;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb {
  background: var(--bg-overlay);
  border-radius: var(--r-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--border-medium); }

/* ============================================================
   SELECTION
   ============================================================ */
::selection {
  background: rgba(212,168,67,0.25);
  color: var(--text-primary);
}

/* ============================================================
   UTILITY ALIASES & EXTRAS
   ============================================================ */
.grid { display: grid; }
.grid.grid-2 { grid-template-columns: repeat(auto-fit,minmax(320px,1fr)); gap:var(--s6); }
.grid.grid-3 { grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap:var(--s6); }
.grid.grid-4 { grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap:var(--s5); }

.section-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: var(--s2);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  margin: 0;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s8);
  flex-wrap: wrap;
  margin-bottom: 0;
  max-width: none;
  text-align: left;
}

.section-header .section-desc {
  max-width: 400px;
  text-align: right;
}

@media (max-width: 640px) {
  .section-header { flex-direction: column; align-items: flex-start; }
  .section-header .section-desc { text-align: left; max-width: 100%; }
}

/* card helpers */
.card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-overlay);
  border-radius: var(--r-md);
  margin-bottom: var(--s4);
  flex-shrink: 0;
}

/* match-card inner variants */
.match-header-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.match-side { }

.match-side-right { text-align: right; }

.match-side-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--s4);
  letter-spacing: 0.03em;
}

.match-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--border-faint);
  font-size: 0.82rem;
  gap: var(--s4);
}

.match-stat-row:last-of-type { border-bottom: none; }

.match-stat-label { color: var(--text-muted); white-space: nowrap; }

.match-stat-val {
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.match-vs-label {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-primary);
  letter-spacing: 0.15em;
  text-shadow: 0 0 24px var(--gold-glow);
  text-align: center;
}

.match-meter {
  width: 80px;
  height: 5px;
  background: var(--bg-overlay);
  border-radius: var(--r-full);
  overflow: hidden;
  margin: var(--s2) 0;
}

.match-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  border-radius: var(--r-full);
  box-shadow: 0 0 8px var(--gold-glow-sm);
}

.match-meter-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}

/* table extras */
.data-table { width:100%; border-collapse:collapse; }

.table-row-highlight td { background: rgba(212,168,67,0.04); }

.rank-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 28px;
}

.rank-badge.rank-1 { color: var(--gold-bright); }
.rank-badge.rank-2 { color: var(--gold-primary); }
.rank-badge.rank-3 { color: var(--gold); }

.streak-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--r-xs);
}

.streak-badge.streak-pos {
  color: #22c55e;
  background: rgba(34,197,94,0.1);
}

.streak-badge.streak-neg {
  color: #ef4444;
  background: rgba(239,68,68,0.1);
}

/* text helpers */
.text-cyan { color: var(--cyan); }

/* footer extras */
.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--s3);
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--s4);
}

.footer-logo .atlas { color: var(--gold-primary); }

.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 280px;
  margin-bottom: var(--s4);
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

.footer-brand {
  display: flex;
  flex-direction: column;
}

/* atlas-ai extras */
.atlas-ai-body {
  padding: var(--s4) var(--s5);
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.atlas-ai-msg {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: var(--s3) var(--s4);
  background: var(--bg-overlay);
  border-radius: var(--r-md);
  border-left: 2px solid var(--gold-dim);
}

.atlas-ai-prompt {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--s3) var(--s4);
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-faint);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--dur-fast);
}

.atlas-ai-prompt:hover {
  border-color: var(--gold-dim);
  color: var(--gold-primary);
  background: rgba(212,168,67,0.05);
}

/* swarm command log extras */
.command-log-line {
  opacity: 0.7;
  line-height: 1.7;
}

.command-log-line.log-active {
  opacity: 1;
  color: var(--gold-primary);
}

.log-role {
  font-weight: 700;
  margin-right: var(--s2);
}

.log-role.strategist { color: var(--gold-primary); }
.log-role.builder    { color: var(--cyan); }
.log-role.critic     { color: #f59e0b; }
.log-role.closer     { color: #22c55e; }

.swarm-progress-bar {
  width: 120px;
  height: 4px;
  background: var(--bg-overlay);
  border-radius: var(--r-full);
  overflow: hidden;
}

.swarm-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--cyan-bright));
  border-radius: var(--r-full);
  box-shadow: 0 0 6px var(--cyan-glow);
  transition: width 1s var(--ease-out);
}

/* ============================================================
   FOCUS
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--gold-primary);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* ============================================================
   ANIMATIONS (UTILITY)
   ============================================================ */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(16px); }
  to   { opacity:1; transform:translateY(0); }
}

@keyframes fadeIn {
  from { opacity:0; }
  to   { opacity:1; }
}

@keyframes shimmer {
  from { background-position: -200% center; }
  to   { background-position: 200% center; }
}

.animate-fade-up { animation: fadeUp 0.5s var(--ease-out) both; }
.animate-fade-in { animation: fadeIn 0.4s var(--ease-out) both; }

/* Stagger delays */
.delay-1 { animation-delay:0.1s; }
.delay-2 { animation-delay:0.2s; }
.delay-3 { animation-delay:0.3s; }
.delay-4 { animation-delay:0.4s; }
.delay-5 { animation-delay:0.5s; }
.delay-6 { animation-delay:0.6s; }

/* Intersection observer reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion:reduce) {
  .reveal { opacity:1; transform:none; transition:none; }
  * { animation-duration:0.01ms !important; animation-iteration-count:1 !important; transition-duration:0.01ms !important; }
}
