:root {
  --bg: #05070a;
  --surface: #0c1118;
  --surface-light: #111924;
  --line: #1d2938;
  --text: #f4f7fb;
  --muted: #95a2b3;
  --blue: #4ea1ff;
  --green: #42d392;
  --red: #ff657a;
  --max: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  background:
    radial-gradient(
      circle at 70% -10%,
      #102c4a 0,
      transparent 28%
    ),
    var(--bg);

  color: var(--text);
  line-height: 1.6;
}

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(92%, var(--max));
  margin: auto;
}

header {
  position: sticky;
  top: 0;
  z-index: 100;

  background: rgba(5, 7, 10, .88);
  backdrop-filter: blur(18px);

  border-bottom: 1px solid rgba(255,255,255,.06);
}

nav {
  min-height: 72px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 30px;
}

.brand {
  font-size: 1.1rem;
  font-weight: 750;
  letter-spacing: -.03em;
}

.brand span {
  color: var(--blue);
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 25px;

  color: var(--muted);
  font-size: .92rem;
}

.nav-links a:hover,
.nav-links .active {
  color: white;
}

.breadcrumb {
  padding-top: 45px;

  color: var(--muted);
  font-size: .85rem;
}

.breadcrumb span {
  margin: 0 8px;
  color: #526174;
}

.breadcrumb a:hover {
  color: var(--blue);
}

.hero {
  min-height: 540px;

  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;

  gap: 70px;
  padding: 70px 0 100px;
}

.eyebrow,
.section-label {
  color: var(--blue);

  text-transform: uppercase;
  letter-spacing: .13em;

  font-size: .77rem;
  font-weight: 700;
}

.eyebrow {
  margin-bottom: 20px;
}

h1 {
  max-width: 920px;

  font-size: clamp(3.1rem, 8vw, 6.5rem);
  line-height: .94;
  letter-spacing: -.06em;
}

h2 {
  max-width: 900px;

  margin: 12px 0 22px;

  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -.045em;
}

.hero p,
.lead {
  color: var(--muted);
}

.hero p {
  max-width: 720px;
  margin: 30px 0;

  font-size: 1.12rem;
}

.lead {
  max-width: 780px;
  margin-bottom: 40px;

  font-size: 1.05rem;
}

section {
  padding: 90px 0;
}

.panel {
  padding: 32px;

  background:
    linear-gradient(
      145deg,
      rgba(78,161,255,.08),
      transparent
    ),
    var(--surface);

  border: 1px solid var(--line);
  border-radius: 18px;
}

.status {
  margin-bottom: 24px;

  color: var(--green);
  font-family: monospace;
  font-size: .8rem;
}

.status.error {
  color: var(--red);
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;

  padding: 14px 0;

  border-top: 1px solid var(--line);

  font-family: monospace;
  font-size: .82rem;
}

.status-row span:last-child {
  color: var(--green);
  text-align: right;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  min-height: 260px;

  display: flex;
  flex-direction: column;

  padding: 28px;

  background: var(--surface);

  border: 1px solid var(--line);
  border-radius: 14px;

  transition: .22s ease;
}

.card:hover {
  transform: translateY(-4px);

  background: var(--surface-light);
  border-color: #3a5878;
}

.card-number {
  color: var(--blue);
  font-family: monospace;
  font-size: .75rem;
}

.card h3 {
  margin: 25px 0 10px;
  font-size: 1.22rem;
}

.card p {
  color: var(--muted);
  font-size: .93rem;
}

.card-link {
  margin-top: auto;
  padding-top: 24px;

  color: var(--blue);
  font-size: .9rem;
}

.workspace {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}

.visualizer {
  min-height: 340px;

  padding: 20px;

  background: #030508;

  border: 1px solid var(--line);
  border-radius: 14px;
}

canvas {
  display: block;

  width: 100%;
  height: 300px;

  background:
    linear-gradient(
      rgba(78,161,255,.04) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(78,161,255,.04) 1px,
      transparent 1px
    );

  background-size: 30px 30px;

  border: 1px solid #172333;
  border-radius: 8px;
}

.controls {
  display: grid;
  align-content: start;
  gap: 12px;

  padding: 24px;

  background: var(--surface);

  border: 1px solid var(--line);
  border-radius: 14px;
}

.control-group {
  display: grid;
  gap: 8px;

  padding-bottom: 18px;
  margin-bottom: 6px;

  border-bottom: 1px solid var(--line);
}

.control-group label {
  color: var(--muted);
  font-size: .85rem;
}

.control-value {
  color: var(--blue);
  font-family: monospace;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 44px;
  padding: 11px 18px;

  background: transparent;
  color: var(--text);

  border: 1px solid var(--line);
  border-radius: 8px;

  cursor: pointer;

  font-weight: 650;

  transition: .2s ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: #45617e;
}

.button-primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #001326;
}

.button-danger {
  color: #ff9baa;
  border-color: #6d2632;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--blue);
}

select,
input[type="number"] {
  width: 100%;

  padding: 10px 12px;

  background: #080d13;
  color: var(--text);

  border: 1px solid var(--line);
  border-radius: 7px;
}

.flow {
  display: grid;
  gap: 12px;
}

.flow-node {
  padding: 18px 20px;

  background: var(--surface);

  border: 1px solid var(--line);
  border-radius: 10px;
}

.flow-node.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px rgba(78,161,255,.25);
}

.flow-arrow {
  color: var(--blue);
  text-align: center;
  font-family: monospace;
}

footer {
  padding: 45px 0;

  color: var(--muted);

  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

footer h4 {
  margin-bottom: 14px;
  color: white;
}

footer a {
  display: block;
  margin: 7px 0;
  font-size: .9rem;
}

footer a:hover {
  color: white;
}

.copyright {
  margin-top: 40px;
  padding-top: 25px;

  border-top: 1px solid var(--line);

  font-size: .82rem;
}

@media (max-width: 900px) {
  .hero,
  .workspace {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 600px) {
  .nav-links {
    display: none;
  }

  .grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 45px;
  }

  .status-row {
    flex-direction: column;
    gap: 4px;
  }

  .status-row span:last-child {
    text-align: left;
  }
}
