/* ========== RESET & BASE ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0A0A0A;
  --bg-light: #111111;
  --bg-card: #141414;
  --border: #1E1E1E;
  --border-light: #2A2A2A;
  --amber: #C4A35A;
  --amber-dim: #8B7340;
  --amber-glow: rgba(196,163,90,0.15);
  --green: #4AE68A;
  --green-dim: #2B8B52;
  --red: #E64A4A;
  --text: #E8E8E8;
  --text-sec: #888888;
  --text-dim: #555555;
  --mono: 'IBM Plex Mono', 'Courier New', Courier, monospace;
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--mono); line-height: 1.6; }
a { color: inherit; }

/* ========== SCANLINES ========== */
.scanlines {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px);
}

/* ========== NAV ========== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(10,10,10,0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 56px;
}
.nav__logo {
  font-size: 11px; letter-spacing: 3px; font-weight: 700;
  color: var(--amber); text-decoration: none;
}
.nav__links { display: flex; gap: 24px; }
.nav__link {
  font-size: 11px; letter-spacing: 2px; text-decoration: none;
  color: var(--text-sec); padding: 4px 0;
  border-bottom: 1px solid transparent; transition: color 0.2s;
}
.nav__link:hover { color: var(--text); }
.nav__link--active { color: var(--amber); border-bottom-color: var(--amber); }

/* ========== FOOTER ========== */
.footer {
  padding: 40px 24px; border-top: 1px solid var(--border); text-align: center;
}
.footer__text { font-size: 10px; color: var(--text-dim); letter-spacing: 2px; }
.footer__sub { font-size: 10px; color: var(--text-dim); letter-spacing: 1px; margin-top: 8px; }

/* ========== UTILITIES ========== */
.container { max-width: 700px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 24px; }
.section--border { border-top: 1px solid var(--border); }
.amber { color: var(--amber); }
.green { color: var(--green); }
.red { color: var(--red); }
.label {
  font-size: 10px; letter-spacing: 3px; color: var(--amber-dim); margin-bottom: 24px;
}

/* ========== FADE-IN ========== */
[data-reveal], [data-reveal-late] { opacity: 0; transition: opacity 1.5s ease; }
.revealed { opacity: 1; }

/* ========== GLITCH ========== */
[data-glitch] { position: relative; display: inline-block; }
.glitch--active::before, .glitch--active::after {
  content: attr(data-glitch); position: absolute; left: 0; top: 0;
  width: 100%; overflow: hidden;
}
.glitch--active::before {
  color: var(--red); opacity: 0.7;
  clip-path: inset(10% 0 60% 0); transform: translateX(2px);
}
.glitch--active::after {
  color: var(--green); opacity: 0.5;
  clip-path: inset(50% 0 10% 0); transform: translateX(-2px);
}

/* ========== CURSOR BLINK ========== */
.cursor { color: var(--amber); animation: blink 1.06s step-end infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ========== HERO ========== */
.hero {
  min-height: calc(100vh - 56px); display: flex; flex-direction: column;
  justify-content: center; align-items: center; padding: 40px 24px;
  position: relative; overflow: hidden; text-align: center;
}
.hero__grid {
  position: absolute; inset: 0; opacity: 0.04;
  background-image:
    linear-gradient(var(--amber) 1px, transparent 1px),
    linear-gradient(90deg, var(--amber) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero__vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center,
    transparent 30%, rgba(10,10,10,0.8) 70%, rgba(10,10,10,1) 100%);
}
.hero__content { position: relative; z-index: 1; max-width: 700px; }
.hero__signal { font-size: 11px; color: var(--text-dim); letter-spacing: 3px; margin-bottom: 32px; }
.hero__title {
  font-size: clamp(28px, 5vw, 48px); font-weight: 300;
  line-height: 1.2; margin-bottom: 24px; letter-spacing: 2px;
}
.hero__title-accent { color: var(--amber); font-weight: 700; }
.hero__tagline {
  font-size: clamp(13px, 2vw, 16px); color: var(--text-sec);
  min-height: 48px; margin-bottom: 40px; line-height: 1.6;
}
.hero__tags {
  display: flex; gap: 12px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 48px;
}
.hero__tag {
  font-size: 10px; letter-spacing: 2px; padding: 6px 14px;
  border: 1px solid var(--border-light); color: var(--text-sec); border-radius: 2px;
}
.hero__ctas {
  display: flex; gap: 16px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 64px;
}

/* ========== BUTTONS ========== */
.btn {
  font-family: var(--mono); font-size: 12px; letter-spacing: 2px;
  padding: 14px 32px; border: none; cursor: pointer; border-radius: 2px;
  text-decoration: none; display: inline-block;
}
.btn--primary { background: var(--amber); color: var(--bg); font-weight: 700; }
.btn--primary:hover { opacity: 0.9; }
.btn--outline { background: transparent; color: var(--amber); border: 1px solid var(--amber); }
.btn--outline:hover { background: var(--amber-glow); }
.btn--green {
  background: transparent; color: var(--green); border: 1px solid var(--green);
  font-size: 11px; padding: 10px 24px;
}
.btn--green:hover { background: rgba(74,230,138,0.08); }
.btn--disabled {
  background: transparent; color: var(--text-dim); border: 1px solid var(--border);
  cursor: not-allowed; opacity: 0.5;
}

/* ========== CARD ========== */
.card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: 4px; padding: 32px; position: relative; overflow: hidden;
}
.card__scanlines {
  position: absolute; inset: 0; opacity: 0.05; pointer-events: none;
  background: repeating-linear-gradient(0deg,
    transparent, transparent 1px,
    rgba(74,230,138,0.1) 1px, rgba(74,230,138,0.1) 2px);
}
.card--dashed { border-style: dashed; }

/* ========== FORMS ========== */
.form-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.form-input {
  font-family: var(--mono); font-size: 13px; padding: 12px 16px;
  background: var(--bg-card); border: 1px solid var(--border-light);
  color: var(--text); outline: none; border-radius: 2px; transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--amber); }
.form-input--wide { width: 280px; }
.form-input--med { width: 260px; }
.form-btn {
  font-family: var(--mono); font-size: 11px; letter-spacing: 2px;
  padding: 12px 24px; background: var(--amber); color: var(--bg);
  border: none; cursor: pointer; font-weight: 700; border-radius: 2px;
}
.form-confirm {
  font-size: 13px; color: var(--green); padding: 16px;
  border: 1px solid var(--green-dim);
  background: rgba(74,230,138,0.05); border-radius: 2px; display: none;
}

/* ========== ROLE SELECTOR ========== */
.roles { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.role-btn {
  font-family: var(--mono); font-size: 10px; letter-spacing: 1px;
  padding: 8px 14px; border: 1px solid var(--border-light);
  background: transparent; color: var(--text-sec); cursor: pointer;
  border-radius: 2px; transition: all 0.2s;
}
.role--active {
  border-color: var(--amber); background: var(--amber-glow); color: var(--amber);
}
.node-toggle {
  font-family: var(--mono); font-size: 10px; letter-spacing: 1px;
  padding: 6px 12px; border: 1px solid var(--border-light);
  background: transparent; color: var(--text-dim); cursor: pointer;
  border-radius: 2px; transition: all 0.2s;
}
.node--active {
  border-color: var(--green); background: rgba(74,230,138,0.08); color: var(--green);
}
.btn--ready { background: var(--amber) !important; color: var(--bg) !important; cursor: pointer !important; }

/* ========== BOOK MOCK ========== */
.book-mock {
  width: 200px; height: 300px; margin: 0 auto 40px;
  background: linear-gradient(135deg, var(--bg-card) 0%, #1a1a1a 50%, var(--bg-card) 100%);
  border: 1px solid var(--border-light);
  display: flex; flex-direction: column; justify-content: center;
  align-items: center; padding: 24px; position: relative;
  box-shadow: 8px 8px 24px rgba(0,0,0,0.5), inset 0 0 60px rgba(196,163,90,0.03);
}
.book-mock__line {
  position: absolute; left: 12px; right: 12px; height: 1px;
  background: var(--amber-dim); opacity: 0.3;
}
.book-mock__line--top { top: 12px; }
.book-mock__line--bottom { bottom: 12px; }

/* ========== ARGUS TERMINAL ========== */
.argus-page {
  min-height: 100vh; padding-top: 56px;
  display: flex; flex-direction: column;
}
.argus {
  flex: 1; max-width: 800px; width: 100%; margin: 0 auto;
  padding: 24px 16px; display: flex; flex-direction: column;
}
.argus-header {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-bottom: none; border-radius: 4px 4px 0 0; padding: 12px 16px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px;
}
.argus-header__label { font-size: 12px; letter-spacing: 2px; }
.argus-header__status { font-size: 10px; color: var(--text-dim); letter-spacing: 2px; margin-top: 2px; }
.argus-modes { display: flex; border: 1px solid var(--border-light); border-radius: 2px; }
.argus-mode-btn {
  font-family: var(--mono); font-size: 10px; letter-spacing: 1px;
  padding: 6px 12px; border: none; cursor: pointer;
  background: transparent; color: var(--text-dim);
}
.argus-mode-btn--active-green { background: var(--green); color: var(--bg); font-weight: 700; }
.argus-mode-btn--active-amber { background: var(--amber); color: var(--bg); font-weight: 700; }
.argus-chat {
  flex: 1; min-height: 400px; max-height: calc(100vh - 280px);
  background: var(--bg-card);
  border-left: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  padding: 16px; overflow-y: auto; font-size: 13px;
}
.argus-input-bar {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-top: none; border-radius: 0 0 4px 4px;
  padding: 12px; display: flex; gap: 8px;
}
.argus-input-bar__prompt { font-size: 13px; color: var(--text-dim); padding: 10px 0; }
.argus-input-bar input {
  flex: 1; font-family: var(--mono); font-size: 13px; padding: 10px 12px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  color: var(--text); outline: none; border-radius: 2px;
}
.argus-input-bar input:focus { border-color: var(--green); }
.argus-input-bar button {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1px;
  padding: 10px 20px; background: var(--green); color: var(--bg);
  border: none; cursor: pointer; font-weight: 700; border-radius: 2px;
}
.argus-input-bar button:disabled { background: var(--bg-light); opacity: 0.5; cursor: not-allowed; }
.argus-footer {
  font-size: 10px; color: var(--text-dim); padding: 8px 4px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 4px; letter-spacing: 1px;
}
.argus-footer a { text-decoration: none; color: var(--text-dim); transition: color 0.2s; }
.argus-footer a:hover { color: var(--amber); }
.argus-footer a span { border-bottom: 1px dotted currentColor; }

/* ARGUS Chat Elements */
.argus-boot-line { color: var(--text-dim); font-size: 11px; line-height: 2; }
.argus-boot--green { color: var(--green); }
.argus-boot--red { color: var(--red); }
.argus-boot--amber { color: var(--amber); }
.argus-sys { color: var(--text-dim); font-size: 11px; line-height: 1.8; }
.argus-suggestions { margin-top: 20px; display: flex; flex-direction: column; gap: 6px; }
.argus-suggestions__label { font-size: 10px; color: var(--text-dim); letter-spacing: 2px; margin-bottom: 4px; }
.argus-suggestion {
  font-family: var(--mono); font-size: 12px; text-align: left;
  padding: 8px 12px; background: rgba(255,255,255,0.02);
  border: 1px solid var(--border); color: var(--text-sec);
  cursor: pointer; border-radius: 2px; transition: all 0.2s;
}
.argus-suggestion:hover { border-color: var(--green); color: var(--text); }
.argus-msg { margin-bottom: 20px; }
.argus-msg--user { color: var(--text); }
.argus-msg__label { color: var(--text-dim); font-size: 10px; }
.argus-msg--assistant { font-size: 13px; line-height: 1.7; padding-left: 12px; }
.argus-msg--argus { color: var(--green); border-left: 2px solid var(--green-dim); }
.argus-msg--author { color: var(--amber); border-left: 2px solid var(--amber-dim); }
.argus-processing { color: var(--text-dim); font-size: 11px; line-height: 2; }

/* ========== RESPONSIVE ========== */
@media (max-width: 600px) {
  .nav { padding: 0 16px; }
  .nav__logo { font-size: 9px; letter-spacing: 2px; }
  .nav__link { font-size: 10px; letter-spacing: 1px; }
  .nav__links { gap: 16px; }
  .hero__title { letter-spacing: 1px; }
  .hero__ctas { flex-direction: column; align-items: center; }
  .argus-header { flex-direction: column; align-items: flex-start; }
  .argus-footer { font-size: 9px; }
  .form-input--wide, .form-input--med { width: 100%; }
  .roles { gap: 6px; }
  .role-btn { font-size: 9px; padding: 6px 10px; }
}