/* =========================================
   RETRO TERMINAL STYLE.CSS
   BuildRunFlow
========================================= */

:root {
  --bg: #020403;
  --bg-soft: #071008;
  --bg-card: #0b170d;

  --screen: #08150a;
  --screen-dark: #030803;

  --text: #b6ff9c;
  --text-bright: #d8ffbf;
  --text-muted: #6da85d;

  --primary: #39ff14;
  --secondary: #ffb000;
  --danger: #ff5f3d;

  --border: rgba(57, 255, 20, 0.42);
  --border-soft: rgba(57, 255, 20, 0.18);

  --shadow: 0 0 24px rgba(57, 255, 20, 0.18);
  --shadow-strong: 0 0 42px rgba(57, 255, 20, 0.32);

  --max-width: 1060px;
  --transition: 0.14s linear;
}

/* Reset */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at center, rgba(57, 255, 20, 0.08), transparent 38%),
    linear-gradient(180deg, #020403 0%, #050805 100%);
  color: var(--text);
  font-family: "Courier New", Courier, monospace;
  line-height: 1.55;
  overflow-x: hidden;
}

/* CRT overlays */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background:
    linear-gradient(
      rgba(255, 255, 255, 0.035) 50%,
      rgba(0, 0, 0, 0.08) 50%
    );
  background-size: 100% 4px;
  mix-blend-mode: overlay;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 998;
  background:
    radial-gradient(circle at center, transparent 45%, rgba(0, 0, 0, 0.45) 100%);
}

/* Basics */

.accent-orange {
  color: var(--secondary);
  text-shadow: 0 0 14px rgba(255, 176, 0, 0.45);
}

.accent-green {
  color: var(--primary);
  text-shadow: 0 0 14px rgba(57, 255, 20, 0.45);
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--secondary);
  text-shadow: 0 0 10px currentColor;
}

button,
input,
textarea,
select {
  font: inherit;
}

/* Layout */

.container {
  width: min(100% - 1.5rem, var(--max-width));
  margin-inline: auto;
}

section {
  padding: 4rem 0;
  border-bottom: 1px dashed var(--border-soft);
  position: relative;
}

.section-tight {
  padding: 3rem 0;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-2,
.grid-3 {
  grid-template-columns: 1fr;
}

/* Typography */

h1,
h2,
h3,
h4 {
  color: var(--text-bright);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(57, 255, 20, 0.42);
}

h1 {
  font-size: clamp(2.4rem, 11vw, 5.6rem);
}

h2 {
  font-size: clamp(1.9rem, 8vw, 3.5rem);
}

h3 {
  font-size: clamp(1.2rem, 5vw, 1.7rem);
}

p {
  color: var(--text-muted);
  font-size: 1rem;
}

.lead {
  color: var(--text);
  font-size: clamp(1rem, 4vw, 1.2rem);
  max-width: 760px;
}

.cmd-green {
  color: var(--primary);
}

/* Header / Nav */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 4, 3, 0.94);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.nav {
  min-height: 72px;
  display: grid;
  gap: 1rem;
  padding: 1rem 0;
}

.menu-toggle {
  width: fit-content;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
}

.menu-toggle:hover {
  color: var(--screen-dark);
  background: var(--primary);
}

.nav-menu {
  display: none;
  width: 100%;
}

.nav-menu.active {
  display: block;
}

.nav-links {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0.5rem;
  list-style: none;
}

.nav-links a {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
  padding: 0.45rem 0.6rem;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.nav-links a:hover {
  color: var(--screen-dark);
  background: var(--primary);
  border-color: var(--primary);
  text-shadow: none;
}

/* Logo */

.logo,
.logo-sequence {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  color: var(--text-muted);
  font-weight: 900;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.logo::before,
.logo-sequence::before {
  content: "> ";
  color: var(--primary);
  margin-right: 0.25rem;
}

.logo span {
  color: var(--secondary);
}

.logo-sequence {
  gap: 0.35rem;
}

.logo-sequence .word,
.logo-sequence .sep {
  opacity: 0.35;
  color: var(--text-muted);
  text-shadow: none;
}

.logo-sequence .sep {
  color: var(--secondary);
  opacity: 0.55;
  animation: sepFlicker 6s infinite steps(1);
}

.logo-sequence .word-build {
  animation: wordBootBuild 6s infinite steps(1);
}

.logo-sequence .word-run {
  animation: wordBootRun 6s infinite steps(1);
}

.logo-sequence .word-flow {
  animation: wordBootFlow 6s infinite steps(1);
}

.logo-sequence::after {
  content: "_";
  color: var(--secondary);
  animation: cursorBlink 0.8s infinite steps(1);
  text-shadow: 0 0 8px rgba(255, 176, 0, 0.65);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--primary);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.btn::before {
  content: "[ ";
}

.btn::after {
  content: " ]";
}

.btn-primary {
  color: var(--screen-dark);
  background: var(--primary);
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: var(--secondary);
  border-color: var(--secondary);
  color: #120b00;
  box-shadow: 0 0 28px rgba(255, 176, 0, 0.38);
  transform: translateY(-1px);
}

.btn-secondary {
  color: var(--primary);
  background: transparent;
}

.btn-secondary:hover {
  color: var(--screen-dark);
  background: var(--primary);
  text-shadow: none;
}

.button-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: 1.8rem;
}

form .btn {
  min-width: 160px;
}

/* Hero */

.hero {
  padding: 5rem 0 4rem;
  background:
    linear-gradient(90deg, rgba(57, 255, 20, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(57, 255, 20, 0.05) 1px, transparent 1px),
    var(--screen-dark);
  background-size: 42px 42px;
}

.hero-content {
  max-width: 900px;
  border: 1px solid var(--border);
  background: rgba(8, 21, 10, 0.72);
  padding: 1.25rem;
  box-shadow: var(--shadow-strong);
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  color: var(--secondary);
  border: 1px solid rgba(255, 176, 0, 0.5);
  background: rgba(255, 176, 0, 0.08);
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.3rem;
}

.eyebrow::before {
  content: "SYS://";
  color: var(--primary);
  margin-right: 0.35rem;
}

.gradient-text {
  color: var(--secondary);
  text-shadow: 0 0 14px rgba(255, 176, 0, 0.45);
}

.hero p {
  margin-top: 1.3rem;
}

/* Cards */

.card {
  background:
    linear-gradient(180deg, rgba(57, 255, 20, 0.055), rgba(57, 255, 20, 0.015)),
    var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
}

.card::before {
  content: "MODULE";
  display: block;
  width: fit-content;
  margin-bottom: 0.85rem;
  color: var(--secondary);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
}

.card:hover {
  border-color: var(--secondary);
  box-shadow: 0 0 30px rgba(255, 176, 0, 0.2);
}

.card h3 {
  margin-bottom: 0.75rem;
}

.card p {
  margin-bottom: 1rem;
}

.card ul {
  padding-left: 1.1rem;
  color: var(--text-muted);
  list-style: square;
}

.card li::marker {
  color: var(--primary);
}

.card li + li {
  margin-top: 0.45rem;
}

/* Feature Blocks */

.feature {
  display: grid;
  gap: 0.75rem;
}

.icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--screen-dark);
  background: var(--primary);
  border: 1px solid var(--primary);
  font-weight: 900;
  box-shadow: var(--shadow);
}

/* Panels */

.panel {
  border: 1px solid var(--border);
  background:
    linear-gradient(90deg, rgba(57, 255, 20, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(57, 255, 20, 0.035) 1px, transparent 1px),
    var(--screen);
  background-size: 28px 28px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.panel h2 {
  margin-bottom: 1rem;
}

/* Tags */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.4rem;
}

.tag {
  color: var(--text);
  border: 1px solid var(--border-soft);
  background: rgba(57, 255, 20, 0.045);
  padding: 0.4rem 0.6rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tag:hover {
  color: var(--screen-dark);
  background: var(--primary);
  border-color: var(--primary);
}

/* Forms */

form {
  display: grid;
  gap: 0.9rem;
}

input,
textarea,
select {
  width: 100%;
  color: var(--primary);
  background: #020403;
  border: 1px solid var(--border);
  padding: 0.9rem;
  outline: none;
  box-shadow: inset 0 0 18px rgba(57, 255, 20, 0.08);
}

input::placeholder,
textarea::placeholder {
  color: rgba(182, 255, 156, 0.48);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--secondary);
  color: var(--secondary);
  box-shadow:
    inset 0 0 18px rgba(255, 176, 0, 0.08),
    0 0 18px rgba(255, 176, 0, 0.18);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

/* Footer */

.site-footer {
  padding: 2rem 0;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: #020403;
}

.site-footer p::before {
  content: "END_OF_LINE // ";
  color: var(--secondary);
}

/* Logo Animations */

@keyframes wordBootBuild {
  0%, 5% {
    opacity: 0.35;
    color: var(--text-muted);
    text-shadow: none;
  }

  6%, 30% {
    opacity: 1;
    color: var(--primary);
    text-shadow:
      0 0 5px rgba(57, 255, 20, 0.8),
      0 0 14px rgba(57, 255, 20, 0.38);
  }

  31%, 100% {
    opacity: 0.35;
    color: var(--text-muted);
    text-shadow: none;
  }
}

@keyframes wordBootRun {
  0%, 34% {
    opacity: 0.35;
    color: var(--text-muted);
    text-shadow: none;
  }

  35%, 58% {
    opacity: 1;
    color: var(--primary);
    text-shadow:
      0 0 5px rgba(57, 255, 20, 0.8),
      0 0 14px rgba(57, 255, 20, 0.38);
  }

  59%, 100% {
    opacity: 0.35;
    color: var(--text-muted);
    text-shadow: none;
  }
}

@keyframes wordBootFlow {
  0%, 62% {
    opacity: 0.35;
    color: var(--text-muted);
    text-shadow: none;
  }

  63%, 90% {
    opacity: 1;
    color: var(--primary);
    text-shadow:
      0 0 5px rgba(57, 255, 20, 0.8),
      0 0 14px rgba(57, 255, 20, 0.38);
  }

  91%, 100% {
    opacity: 0.35;
    color: var(--text-muted);
    text-shadow: none;
  }
}

@keyframes sepFlicker {
  0%, 18%, 36%, 52%, 70%, 100% {
    color: var(--secondary);
    opacity: 0.45;
    text-shadow: none;
  }

  19%, 35%, 53%, 69% {
    color: var(--secondary);
    opacity: 1;
    text-shadow: 0 0 10px rgba(255, 176, 0, 0.7);
  }
}

@keyframes cursorBlink {
  0%, 48% {
    opacity: 1;
  }

  49%, 100% {
    opacity: 0;
  }
}

/* Tablet */

@media (min-width: 760px) {
  .container {
    width: min(100% - 3rem, var(--max-width));
  }

  .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .menu-toggle {
    display: none;
  }

  .nav-menu {
    display: block !important;
    width: auto;
  }

  .nav-links {
    flex-direction: row;
    width: auto;
  }

  .button-group {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  .btn {
    padding: 0.95rem 1.2rem;
  }

  form .btn {
    min-width: 180px;
  }

  .hero-content,
  .panel {
    padding: 2rem;
  }

  .feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
  }
}

/* Desktop */

@media (min-width: 980px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  section {
    padding: 5.5rem 0;
  }

  .hero {
    padding: 6.5rem 0 5rem;
  }
}

.insight-title {
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
  color: var(--text-muted);
}
.system-map-layout {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.log-preview {
  width: 100%;
  border: 1px solid var(--border);
  background:
    linear-gradient(
      180deg,
      rgba(57, 255, 20, 0.055) 1px,
      transparent 1px
    ),
    rgba(2, 4, 3, 0.72);
  background-size: 100% 22px, auto;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.log-preview::before {
  content: "PREVIEW BUFFER";
  display: block;
  color: var(--secondary);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  margin-bottom: 0.8rem;
}

.log-preview h3 {
  margin-bottom: 0.65rem;
}

.log-preview p {
  max-width: 760px;
  margin-bottom: 1rem;
}

.log-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.8rem 0 1rem;
}

.log-stat {
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  padding: 0.3rem 0.45rem;
  font-size: 0.72rem;
}

.radar-map {
  position: relative;
  min-height: 360px;
  border: 1px solid var(--border);
  overflow: hidden;
  margin: 0;
  background:
    linear-gradient(
      180deg,
      rgba(57, 255, 20, 0.075) 1px,
      transparent 1px
    ),
    radial-gradient(circle at center, rgba(57, 255, 20, 0.1), transparent 48%),
    var(--screen);
  background-size: 100% 22px, auto, auto;
}

.radar-map::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      transparent 0%,
      rgba(57, 255, 20, 0.08) 50%,
      transparent 100%
    );
  opacity: 0.35;
  pointer-events: none;
}

.radar-node {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 1px solid var(--border-soft);
  background: #020403;
  color: var(--text-muted);
  padding: 0.5rem;
  cursor: pointer;
  z-index: 2;
  min-width: 82px;
  text-align: left;
  transition:
    left 0.45s ease,
    top 0.45s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease;
}

.radar-node span {
  color: var(--secondary);
  font-size: 0.68rem;
}

.radar-node strong {
  display: block;
  font-size: 0.7rem;
  margin-top: 0.25rem;
}

.radar-node:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.radar-node.active {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 18px rgba(57, 255, 20, 0.45);
  z-index: 5;
}

.radar-node.active::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid var(--primary);
  animation: radarPulse 1.4s infinite;
  pointer-events: none;
}

@keyframes radarPulse {
  from {
    opacity: 0.8;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(1.5);
  }
}

@media (min-width: 860px) {
  .radar-map {
    min-height: 460px;
  }
}

.subtle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
  max-width: 600px;
}

.card-btn {
  margin-top: 1.1rem;
}

.btn-accent {
  color: var(--secondary);
  background: transparent;
  border: 1px solid var(--secondary);
  box-shadow: none;
}

.btn-accent:hover {
  color: var(--screen-dark);
  background: var(--secondary);
  border-color: var(--secondary);
  box-shadow: 0 0 18px rgba(255, 176, 0, 0.25);
}
/* Base input styles */
input,
textarea,
select {
  font-size: 1.05rem; /* slightly larger */
  font-weight: 500;   /* medium weight (bold but not heavy) */
  line-height: 1.5;

  color: #e6ffe6; /* softer near-white green */
  background: rgba(57, 255, 20, 0.03);

  border: 1px solid rgba(57, 255, 20, 0.25);

  caret-color: var(--secondary);

  padding: 10px 12px; /* improves readability feel */

  transition: all 0.2s ease;
}

/* Placeholder */
input::placeholder,
textarea::placeholder {
  color: rgba(200, 250, 204, 0.5);
  font-weight: 400;
}

/* Autofill fix */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: #e6ffe6;
  -webkit-box-shadow: 0 0 0px 1000px #020403 inset;
  box-shadow: 0 0 0px 1000px #020403 inset;
  border: 1px solid var(--secondary);
}

/* Focus state */
input:focus,
textarea:focus,
select:focus {
  outline: none;

  color: #ffffff; /* fully readable when typing */
  background: rgba(57, 255, 20, 0.05);

  border-color: var(--secondary);

  box-shadow:
    inset 0 0 8px rgba(255, 176, 0, 0.06),
    0 0 8px rgba(255, 176, 0, 0.1);
}

/* Textarea usability */
textarea {
  min-height: 120px;
}


select:focus {
  outline: none;

  border-color: var(--secondary);

  background: rgba(57, 255, 20, 0.08);

  box-shadow:
    inset 0 0 8px rgba(255, 176, 0, 0.06),
    0 0 8px rgba(255, 176, 0, 0.1);
}

select option {
  background: #020403;
  color: #e6ffe6;
}

select {
  background: rgba(57, 255, 20, 0.05);
  color: #e6ffe6;

  border: 1px solid rgba(57, 255, 20, 0.25);

  font-size: 1.05rem;
  font-weight: 500;

  padding: 10px 12px;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-image: url("data:image/svg+xml;utf8,<svg fill='%23ffb000' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M5 7l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;

  cursor: pointer;
}