:root {
  --bg: #050914;
  --bg-2: #0b1324;
  --panel: rgba(10, 18, 33, 0.78);
  --panel-2: rgba(255,255,255,0.04);
  --stroke: rgba(255,255,255,0.09);
  --text: #eef4ff;
  --muted: #a9b7d2;
  --primary: #5fd6ff;
  --secondary: #8b5cf6;
  --shadow: 0 20px 60px rgba(0,0,0,0.38);
  --container: min(1280px, calc(100% - 28px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(139,92,246,.22), transparent 26%),
    radial-gradient(circle at top right, rgba(95,214,255,.18), transparent 32%),
    linear-gradient(180deg, #09101d 0%, #050914 100%);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 92%);
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: .32;
}
.glow-1 { width: 420px; height: 420px; left: -90px; top: -80px; background: rgba(139,92,246,.7); }
.glow-2 { width: 520px; height: 520px; right: -120px; top: 60px; background: rgba(95,214,255,.58); }

.page-shell,
.topbar-inner,
.section,
.footer-inner {
  width: var(--container);
  margin-inline: auto;
}

.topbar {
  position: relative;
  padding-top: 18px;
  z-index: 5;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 82px;
  padding: 16px 24px;
  border-radius: 24px;
  background: rgba(6, 15, 33, 0.72);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.logo {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: .04em;
}
.logo span {
  color: var(--primary);
  text-shadow: 0 0 22px rgba(95,214,255,.65);
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.menu-toggle span {
  width: 19px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.main-nav a {
  color: var(--muted);
  font-weight: 500;
  transition: .25s ease;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
}

.nav-cta {
  padding: 13px 20px;
  border-radius: 16px;
  border: 1px solid rgba(95,214,255,.2);
  background: rgba(255,255,255,0.04);
  color: var(--text);
}
.nav-cta.active,
.nav-cta:hover {
  border-color: rgba(95,214,255,.4);
  box-shadow: 0 0 0 1px rgba(95,214,255,.12) inset;
}

.hero {
  width: var(--container);
  margin: 22px auto 0;
  min-height: calc(100vh - 140px);
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 26px;
  align-items: center;
}

.hero-copy {
  max-width: 860px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(95,214,255,0.09);
  border: 1px solid rgba(95,214,255,0.22);
  color: #d6f5ff;
  font-weight: 500;
}

.hero h1 {
  margin: 22px 0 16px;
  font-size: clamp(3rem, 6vw, 5.7rem);
  line-height: .93;
  letter-spacing: -.06em;
}
.hero h1 .gradient {
  background: linear-gradient(135deg, #ffffff 0%, var(--primary) 55%, #caaaff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-lead {
  max-width: 760px;
  font-size: clamp(1rem, 1.45vw, 1.35rem);
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 26px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 26px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
  font-weight: 700;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #05111d;
  box-shadow: 0 18px 40px rgba(95,214,255,.24);
}
.btn-secondary {
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.info-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid var(--stroke);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.info-card {
  padding: 24px;
  min-height: 132px;
}
.info-card strong {
  display: block;
  font-size: clamp(1.55rem, 2.6vw, 2.1rem);
  margin-bottom: 8px;
}
.info-card span {
  color: var(--muted);
  line-height: 1.6;
}

.hero-visual {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
}

.terminal-shell {
  position: relative;
  width: 100%;
  min-height: 560px;
  border-radius: 34px;
  border: 1px solid rgba(95,214,255,.18);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.018));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.terminal-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: .34;
  pointer-events: none;
}

.terminal-topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 66px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(4, 10, 20, .56);
}

.terminal-dots {
  display: flex;
  gap: 8px;
}
.terminal-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,.42);
}
.terminal-title {
  color: #cfe9ff;
  font-size: .92rem;
  letter-spacing: .02em;
}

.terminal-body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr .92fr;
  gap: 18px;
  padding: 22px;
  min-height: 494px;
}

.terminal-pane {
  border-radius: 24px;
  border: 1px solid rgba(95,214,255,.14);
  background: rgba(5, 13, 24, .72);
  backdrop-filter: blur(12px);
}

.terminal-main {
  padding: 18px 18px 22px;
  font-family: Consolas, 'Courier New', monospace;
  box-shadow: inset 0 0 40px rgba(95,214,255,.04);
}

.terminal-line {
  font-size: .95rem;
  line-height: 1.75;
  color: #e8f4ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.terminal-line.dim { color: #91a7c4; }
.terminal-line.success { color: #65f3bf; }
.prompt { color: #63d7ff; margin-right: 8px; }
.typing {
  color: #63d7ff;
  min-height: 1.75em;
}
.typing::after {
  content: "_";
  display: inline-block;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

.terminal-preview {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  justify-content: center;
}
.preview-label {
  font-size: .78rem;
  letter-spacing: .14em;
  color: #9edcff;
}
.preview-window {
  min-height: 300px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.07);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
}
.preview-nav,
.preview-hero,
.preview-cta,
.preview-grid span {
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(95,214,255,.95), rgba(139,92,246,.58));
  box-shadow: 0 0 18px rgba(95,214,255,.16);
}
.preview-nav {
  width: 72%;
  height: 12px;
  margin-bottom: 22px;
}
.preview-hero {
  width: 100%;
  height: 88px;
  border-radius: 22px;
  margin-bottom: 18px;
}
.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.preview-grid span {
  height: 66px;
  border-radius: 18px;
}
.preview-cta {
  width: 54%;
  height: 14px;
}

.terminal-float {
  position: absolute;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(95,214,255,.14);
  background: rgba(5, 14, 26, .86);
  box-shadow: 0 12px 30px rgba(0,0,0,.24);
}
.terminal-float strong {
  display: block;
  font-size: .9rem;
  color: #ebf5ff;
}
.terminal-float span {
  display: block;
  margin-top: 4px;
  font-size: .78rem;
  color: #8fb0cf;
}
.float-api { left: 45%; top: 70px; }
.float-bot { left: 52%; bottom: 44px; }
.float-web { right: 24px; top: 146px; }

@keyframes spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.08); }
}

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { max-width: none; }
  .hero-visual { min-height: 500px; }
  .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .topbar-inner {
    position: relative;
    padding: 14px 16px;
    min-height: 74px;
  }
  .menu-toggle { display: inline-flex; }
  .main-nav {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(8, 16, 30, 0.96);
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: .28s ease;
  }
  .main-nav.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .main-nav a {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.05);
    color: var(--text);
  }
  .nav-cta { text-align: center; }
  .hero h1 { font-size: clamp(2.6rem, 11vw, 4.8rem); }
  .info-points { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --container: min(1280px, calc(100% - 20px)); }
  .topbar { padding-top: 12px; }
  .hero { margin-top: 18px; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; }
  .hero-visual { min-height: 400px; }
  .visual-ui { inset: 18px; }
  .orbital { width: 220px; height: 220px; }
  .footer-inner { flex-direction: column; }
}


.terminal-danger {
  min-height: 590px;
  background:
    radial-gradient(circle at top right, rgba(255,72,72,.14), transparent 28%),
    radial-gradient(circle at bottom left, rgba(95,214,255,.08), transparent 24%),
    linear-gradient(180deg, rgba(18, 6, 10, .94), rgba(7, 9, 20, .98));
  border-color: rgba(255,92,92,.24);
  box-shadow: 0 30px 80px rgba(0,0,0,.44), 0 0 60px rgba(255,70,70,.08);
}

.matrix-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .32;
  mix-blend-mode: screen;
  pointer-events: none;
}

.terminal-status {
  margin-left: auto;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,82,82,.24);
  background: rgba(255,82,82,.08);
  color: #ff9b9b;
  font-size: .72rem;
  letter-spacing: .16em;
}

.terminal-danger-body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr .42fr;
  gap: 18px;
  padding: 22px;
  min-height: 520px;
}

.danger-panel,
.danger-widget {
  position: relative;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, rgba(8, 13, 24, .76), rgba(7, 10, 20, .56));
  backdrop-filter: blur(16px);
  box-shadow: inset 0 0 34px rgba(255,72,72,.04), 0 14px 40px rgba(0,0,0,.28);
}

.danger-stream {
  overflow: hidden;
  padding: 18px 18px 12px;
}

.danger-heading {
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
  color: #ffbaba;
  font-size: .78rem;
  letter-spacing: .18em;
}

.danger-code-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  min-height: 420px;
}

.code-column {
  position: relative;
  overflow: hidden;
  padding: 10px 8px 8px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.04);
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
}

.code-row {
  font-family: Consolas, 'Courier New', monospace;
  font-size: .70rem;
  line-height: 1.3;
  letter-spacing: .03em;
  white-space: nowrap;
  opacity: .85;
  margin-bottom: 6px;
  color: #ff6f6f;
  text-shadow: 0 0 8px rgba(255,82,82,.08);
  transform: translateX(var(--drift, 0px));
}

.code-row.alt { color: #ff9f6b; opacity: .7; }
.code-row.dim { color: rgba(255,120,120,.42); opacity: .55; }

.danger-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 18px;
}

.danger-widget {
  padding: 18px;
}

.widget-label {
  display: block;
  margin-bottom: 8px;
  color: #ffb7b7;
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.danger-widget strong {
  display: block;
  margin-bottom: 14px;
  font-size: 1.15rem;
  color: #fff1f1;
}

.scan-bars {
  display: grid;
  gap: 10px;
}

.scan-bars span {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,85,85,.92), rgba(255,140,92,.58));
  box-shadow: 0 0 18px rgba(255,82,82,.16);
  animation: scanPulse 1.4s ease-in-out infinite;
}

.scan-bars span:nth-child(2) { width: 82%; animation-delay: .15s; }
.scan-bars span:nth-child(3) { width: 64%; animation-delay: .3s; }
.scan-bars span:nth-child(4) { width: 90%; animation-delay: .45s; }

.metric-stack {
  display: grid;
  gap: 12px;
}

.metric-stack div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.05);
  background: rgba(255,255,255,.02);
}

.metric-stack b {
  color: #fff4f4;
  letter-spacing: .08em;
}

.metric-stack span {
  color: #ff8f8f;
  font-size: .86rem;
}

.danger-overlay-tag {
  position: absolute;
  z-index: 2;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,88,88,.18);
  background: rgba(8, 10, 18, .9);
  color: #ffd0d0;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .12em;
}

.tag-api { left: 54%; top: 108px; }
.tag-core { right: 34px; top: 232px; }
.tag-live { right: 56px; bottom: 34px; }

@keyframes scanPulse {
  0%, 100% { transform: scaleX(.96); opacity: .72; }
  50% { transform: scaleX(1); opacity: 1; }
}

@media (max-width: 1080px) {
  .terminal-danger-body {
    grid-template-columns: 1fr;
  }

  .danger-side {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }

  .tag-api,
  .tag-core,
  .tag-live {
    display: none;
  }
}

@media (max-width: 640px) {
  .terminal-danger {
    min-height: 520px;
  }

  .terminal-danger-body {
    padding: 14px;
    gap: 14px;
  }

  .danger-code-grid {
    grid-template-columns: 1fr;
    min-height: 320px;
  }

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

  .code-column:nth-child(2),
  .code-column:nth-child(3) {
    display: none;
  }
}
