/* ============================================
   SPEARFORGE - ENGINEERING ARM
   Style: Spear HUD / Fintech / Glassmorphism
   Canonical tokens: #050505 / #C5A059 / #3D3D3D
   ============================================ */

:root {
  /* Colors */
  --bg-deep: #050505;
  --bg-glass: rgba(10, 10, 10, 0.7);
  --gold: #C5A059;
  --gold-glow: rgba(197, 160, 89, 0.4);
  --slate: #3D3D3D;
  --white: #FFFFFF;
  --white-dim: rgba(255, 255, 255, 0.5);
  --green: #00FF94;

  /* Fonts */
  --font-brand: 'Inter', sans-serif;
  --font-data: 'JetBrains Mono', monospace;

  /* Layout */
  --max-width: 1400px;
  --bar-height: 50px;
}

/* Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-deep);
  color: var(--white);
  font-family: var(--font-brand);
  line-height: 1.4;
  overflow-x: hidden;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  min-height: 100vh;
  margin-bottom: var(--bar-height);
}

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

/* Grid overlay + scanline */
.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0, 0, 0, 0.15) 3px, rgba(0, 0, 0, 0.15) 4px);
}

.scan-line {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-glow), transparent);
  animation: scan 8s linear infinite;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

@keyframes scan {
  0% { top: -2px; }
  100% { top: 100%; }
}

/* ================= HEADER ================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 1000;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-img {
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-family: var(--font-data);
  font-size: 0.7rem;
  color: var(--white-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.3s;
}

.nav-link:hover {
  color: var(--white);
}

.nav-cta {
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 8px 16px;
  transition: all 0.3s;
}

.nav-cta:hover {
  background: var(--gold);
  color: var(--bg-deep);
}

.system-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-data);
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--green);
  animation: cursor-blink 2s infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.status-text {
  color: var(--white-dim);
  letter-spacing: 0.1em;
}

/* ================= SECTION CONTAINER ================= */
.section-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ================= HERO ================= */
.hero {
  padding-top: clamp(120px, 15vh, 170px);
  padding-bottom: 4rem;
}

.hero-row {
  text-align: center;
}

.meta-item {
  display: inline-block;
  font-family: var(--font-data);
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  border: 1px solid rgba(197, 160, 89, 0.3);
  padding: 4px 12px;
}

.hero-headline {
  font-family: var(--font-brand);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
  color: var(--white);
  text-transform: uppercase;
}

.text-gold {
  color: var(--gold);
}

.hero-sub {
  font-family: var(--font-data);
  font-size: 0.9rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--white-dim);
  max-width: 640px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-status {
  display: flex;
  justify-content: center;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-data);
  font-size: 0.75rem;
  color: var(--white-dim);
  letter-spacing: 0.1em;
}

/* ================= SECTION HEADER ================= */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 3rem;
  font-family: var(--font-data);
  color: var(--gold);
  font-size: 0.9rem;
}

.section-decor {
  color: var(--white-dim);
  opacity: 0.4;
  letter-spacing: -0.1em;
}

/* ================= BUILD LOG ================= */
.buildlog-section {
  padding: 4rem 0;
}

.buildlog {
  display: flex;
  flex-direction: column;
}

.log-entry {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.log-year {
  font-family: var(--font-data);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--gold);
}

.log-body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
}

.log-name {
  font-family: var(--font-brand);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.log-status {
  font-family: var(--font-data);
  font-size: 0.65rem;
  padding: 3px 8px;
  border: 1px solid;
  letter-spacing: 0.1em;
}

.status-live {
  color: var(--green);
  border-color: rgba(0, 255, 148, 0.3);
}

.status-beta {
  color: var(--gold);
  border-color: rgba(197, 160, 89, 0.3);
}

.log-desc {
  flex-basis: 100%;
  color: var(--white-dim);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 0.25rem;
}

/* ================= SYSTEMS ================= */
.systems-section {
  padding: 4rem 0;
}

.systems-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.system-card {
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.system-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.system-card:hover {
  border-color: rgba(197, 160, 89, 0.4);
  background: rgba(25, 25, 25, 0.9);
}

.system-card:hover::before {
  transform: scaleX(1);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1rem;
}

.card-id {
  font-family: var(--font-data);
  font-size: 0.75rem;
  color: var(--white-dim);
}

.card-name {
  font-family: var(--font-brand);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
  text-transform: uppercase;
  line-height: 1.2;
}

.card-desc {
  color: var(--white-dim);
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0;
}

.card-link {
  color: var(--gold);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.card-link:hover {
  border-bottom-color: var(--gold);
}

/* ================= PRINCIPLES ================= */
.principles-section {
  padding: 4rem 0;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.principle-item {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.principle-num {
  font-family: var(--font-data);
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 500;
}

.principle-text {
  font-size: 1rem;
  color: var(--white-dim);
  line-height: 1.5;
}

/* ================= CONTACT ================= */
.contact-section {
  padding: 2rem 0 5rem;
}

.log-cta {
  display: block;
  border-bottom: none;
  padding-bottom: 0;
}

.log-key {
  font-family: var(--font-data);
  font-size: 0.85rem;
  color: var(--gold);
  display: block;
  margin-bottom: 0.75rem;
}

.log-value {
  font-family: var(--font-brand);
  font-size: 1.1rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

.hero-cta {
  font-family: var(--font-data);
  font-size: 0.9rem;
  color: var(--bg-deep);
  background: var(--gold);
  padding: 1rem 2.5rem;
  font-weight: 600;
  display: inline-block;
  transition: all 0.3s;
  letter-spacing: 0.05em;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.hero-cta:hover {
  background: var(--white);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

/* ================= COMMAND BAR ================= */
.command-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bar-height);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
}

.cmd-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-data);
  font-size: 0.65rem;
  color: var(--white-dim);
  letter-spacing: 0.1em;
}

.cmd-left,
.cmd-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.cmd-secure {
  color: var(--gold);
}

.cmd-nav {
  display: flex;
  gap: 1.5rem;
}

.cmd-nav a {
  color: var(--white-dim);
  transition: color 0.3s;
}

.cmd-nav a:hover {
  color: var(--gold);
}

.cmd-deploy {
  color: var(--white-dim);
  opacity: 0.6;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .nav-links {
    gap: 1rem;
  }

  .system-status {
    display: none;
  }

  .systems-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .principles-grid {
    grid-template-columns: 1fr;
  }

  .log-entry {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .cmd-left,
  .cmd-right {
    display: none;
  }

  .cmd-container {
    justify-content: center;
  }
}
