:root {
  --bg: #050816;
  --bg-2: #0a1020;
  --panel: rgba(10, 16, 32, 0.62);
  --panel-strong: rgba(10, 16, 32, 0.88);
  --border: rgba(255, 255, 255, 0.10);
  --border-2: rgba(255, 255, 255, 0.18);
  --text: #eef2ff;
  --muted: rgba(238, 242, 255, 0.68);
  --muted-2: rgba(238, 242, 255, 0.52);
  --success: #34d399;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --radius: 24px;
  --radius-lg: 30px;
  --max: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(circle at top, rgba(139, 92, 246, 0.22), transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.12), transparent 26%),
    linear-gradient(180deg, #050816 0%, #070b16 45%, #050816 100%);
  color: var(--text);
  overflow-x: hidden;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(96, 165, 250, 0.08), transparent 24%),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.08), transparent 22%);
  pointer-events: none;
  z-index: -4;
}

.bg-grid {
  position: fixed;
  inset: 0;
  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: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.65), transparent 92%);
  pointer-events: none;
  z-index: -3;
  animation: gridMove 24s linear infinite;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(90px);
  pointer-events: none;
  z-index: -2;
  opacity: 0.58;
  animation: drift 14s ease-in-out infinite;
}

.orb-1 {
  width: 380px;
  height: 380px;
  top: 100px;
  left: -120px;
  background: rgba(139, 92, 246, 0.35);
}

.orb-2 {
  width: 420px;
  height: 420px;
  right: -160px;
  top: 420px;
  background: rgba(34, 211, 238, 0.18);
  animation-delay: -4s;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.8'/%3E%3C/svg%3E");
}

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  background: rgba(5, 8, 22, 0.72);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-inner,
.hero,
.system-section,
.usecases,
.waitlist,
.footer-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(139,92,246,1), rgba(34,211,238,1));
  color: white;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.35);
  animation: pulseGlow 3.5s ease-in-out infinite;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.logo-sub {
  font-size: 0.78rem;
  color: var(--muted-2);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.nav-button,
.primary,
.submit-btn,
.secondary {
  border: 0;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease, opacity 0.22s ease;
}

.nav-button {
  padding: 13px 18px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #8b5cf6, #22d3ee);
  box-shadow: 0 14px 34px rgba(139, 92, 246, 0.28);
  font-weight: 700;
}

.nav-button:hover,
.primary:hover,
.submit-btn:hover,
.secondary:hover {
  transform: translateY(-3px) scale(1.01);
  filter: brightness(1.06);
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 42px;
  padding: 92px 0 56px;
  align-items: center;
}

.hero-badge,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 22px;
  animation: fadeUp 0.8s ease both;
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 8px rgba(52, 211, 153, 0.12);
  animation: pulse 2s ease-in-out infinite;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.1rem, 7vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
  max-width: 10ch;
  animation: fadeUp 0.9s ease both;
}

.hero h1 span {
  background: linear-gradient(135deg, #ffffff 0%, #8b5cf6 55%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 200%;
  animation: gradientShift 7s ease infinite;
}

.hero p,
.section-header p,
.waitlist-header p {
  max-width: 65ch;
  margin: 24px 0 0;
  font-size: 1.06rem;
  line-height: 1.75;
  color: var(--muted);
  animation: fadeUp 1s ease both;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  margin-top: 30px;
  flex-wrap: wrap;
  animation: fadeUp 1.05s ease both;
}

.primary,
.secondary,
.submit-btn {
  padding: 15px 22px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.98rem;
}

.primary,
.submit-btn {
  color: white;
  background: linear-gradient(135deg, #8b5cf6, #22d3ee);
  box-shadow: 0 18px 40px rgba(34, 211, 238, 0.16);
  position: relative;
  overflow: hidden;
}

.primary::before,
.submit-btn::before,
.nav-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.32) 25%, transparent 50%);
  transform: translateX(-120%);
  transition: transform 0.7s ease;
}

.primary:hover::before,
.submit-btn:hover::before,
.nav-button:hover::before {
  transform: translateX(120%);
}

.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.stat {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  animation: fadeUp 1.1s ease both;
}

.stat:nth-child(2) { animation-delay: 0.08s; }
.stat:nth-child(3) { animation-delay: 0.16s; }

.stat strong,
.section-header h2,
.card h3,
.core-card h3,
.node strong {
  display: block;
  font-size: 1rem;
}

.stat span,
.card p,
.core-card p,
.waitlist p,
.footer-inner,
.node p,
.stage p,
.mini-widget span {
  color: var(--muted-2);
}

.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.dashboard-card,
.system-shell,
.form-shell {
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.dashboard-card::after,
.system-shell::after,
.form-shell::after {
  content: "";
  position: absolute;
  inset: -2px;
  pointer-events: none;
  background: radial-gradient(circle at top right, rgba(34,211,238,0.14), transparent 24%),
              radial-gradient(circle at left bottom, rgba(139,92,246,0.10), transparent 26%);
  animation: glowPulse 8s ease-in-out infinite;
}

.dashboard-top {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.chip,
.switch,
.badge {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  font-size: 0.82rem;
}

.live,
.on,
.approved {
  color: white;
  border-color: rgba(52, 211, 153, 0.25);
  background: rgba(52, 211, 153, 0.12);
}

.orchestrator {
  display: grid;
  gap: 14px;
}

.stage,
.node,
.agent-card,
.usecase-card {
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(5, 8, 22, 0.45);
  border-radius: 20px;
}

.stage {
  padding: 16px;
  animation: fadeUp 0.8s ease both;
}

.stage:nth-child(3) { animation-delay: 0.08s; }
.stage:nth-child(5) { animation-delay: 0.16s; }

.stage-head,
.node-head,
.usecase-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stage-dot,
.node-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  font-size: 0.85rem;
  font-weight: 800;
}

.planner .stage-dot,
.planner .node-icon {
  background: linear-gradient(135deg, #8b5cf6, #22d3ee);
}

.executor .stage-dot,
.executor .node-icon {
  background: linear-gradient(135deg, #2563eb, #22d3ee);
}

.verifier .stage-dot,
.verifier .node-icon {
  background: linear-gradient(135deg, #10b981, #22d3ee);
}

.stage p {
  margin: 10px 0 0;
  line-height: 1.6;
}

.stage-tag {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 0.84rem;
}

.arrow-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.arrow-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.22), rgba(255,255,255,0.05));
  animation: lineShimmer 2.8s linear infinite;
  background-size: 200% 100%;
}

.arrow {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(139,92,246,0.14);
  border: 1px solid rgba(139,92,246,0.28);
  color: white;
  animation: floatArrow 2.4s ease-in-out infinite;
  box-shadow: 0 0 24px rgba(139,92,246,0.16);
}

.hero-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.mini-widget {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  animation: fadeUp 0.9s ease both;
}

.mini-widget:nth-child(2) { animation-delay: 0.08s; }
.mini-widget:nth-child(3) { animation-delay: 0.16s; }
.mini-widget:nth-child(4) { animation-delay: 0.24s; }

.mini-widget strong {
  font-size: 1.05rem;
  color: var(--text);
}

.system-section,
.usecases {
  padding: 18px 0 70px;
}

.section-header {
  margin-bottom: 22px;
}

.section-header h2,
.waitlist h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.05em;
}

.system-shell {
  padding: 18px;
}

.system-topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.system-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 8px rgba(52,211,153,0.12);
  animation: pulse 2s ease-in-out infinite;
}

.system-switches {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.system-grid {
  display: grid;
  gap: 14px;
}

.node {
  padding: 18px;
  animation: fadeUp 0.8s ease both;
}

.node ul {
  margin: 14px 0 0;
  padding-left: 18px;
  color: rgba(238,242,255,0.82);
}

.flow-arrow {
  justify-self: center;
  color: rgba(238,242,255,0.75);
  font-size: 1.2rem;
  animation: floatArrow 2.4s ease-in-out infinite;
}

.agent-line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.agent-card {
  padding: 16px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.agent-card:hover,
.usecase-card:hover {
  transform: translateY(-6px);
  border-color: rgba(139,92,246,0.28);
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.tiny-label {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.78rem;
  color: rgba(238,242,255,0.56);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.agent-card strong,
.usecase-card h3 {
  font-size: 1.02rem;
  margin: 0;
}

.agent-card p {
  margin: 10px 0 0;
  line-height: 1.6;
}

.tool-row,
.verify-row,
.usecase-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.tool-row span,
.verify-pill,
.usecase-flow span {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  font-size: 0.85rem;
}

.pending {
  border-color: rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.10);
  color: #fde68a;
}

.logged {
  border-color: rgba(96, 165, 250, 0.25);
  background: rgba(96, 165, 250, 0.10);
  color: #bfdbfe;
}

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

.usecase-card {
  padding: 20px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  animation: fadeUp 0.85s ease both;
}

.usecase-card:nth-child(2) { animation-delay: 0.04s; }
.usecase-card:nth-child(3) { animation-delay: 0.08s; }
.usecase-card:nth-child(4) { animation-delay: 0.12s; }
.usecase-card:nth-child(5) { animation-delay: 0.16s; }
.usecase-card:nth-child(6) { animation-delay: 0.20s; }
.usecase-card:nth-child(7) { animation-delay: 0.24s; }
.usecase-card:nth-child(8) { animation-delay: 0.28s; }
.usecase-card:nth-child(9) { animation-delay: 0.32s; }

.usecase-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(139,92,246,1), rgba(34,211,238,1));
  font-weight: 800;
  color: white;
  box-shadow: 0 12px 30px rgba(139,92,246,0.25);
  animation: pulseGlow 4s ease-in-out infinite;
}

.usecase-head p {
  margin: 4px 0 0;
  color: var(--muted-2);
}

.usecase-flow {
  margin-top: 16px;
}

.flow {
  color: rgba(34, 211, 238, 0.95);
  border: 0;
  background: transparent;
  padding: 0;
  animation: floatArrow 2.4s ease-in-out infinite;
}

.waitlist {
  padding: 40px 0 90px;
}

.waitlist-header {
  max-width: 760px;
  margin-bottom: 24px;
}

.form-shell {
  padding: 28px;
  width: min(720px, 100%);
  margin: 0 auto;
  animation: fadeUp 0.9s ease both;
}

#waitlistForm {
  display: grid;
  gap: 16px;
}

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

.field {
  display: grid;
  gap: 8px;
}

label {
  font-size: 0.9rem;
  color: rgba(238, 242, 255, 0.82);
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(5, 8, 22, 0.55);
  color: var(--text);
  padding: 15px 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: rgba(238, 242, 255, 0.36);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.10);
  transform: translateY(-1px);
  background: rgba(8, 12, 26, 0.68);
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(238,242,255,0.75) 50%),
    linear-gradient(135deg, rgba(238,242,255,0.75) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 16px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 42px;
}

.submit-btn {
  margin-top: 4px;
  width: 100%;
}

#msg {
  min-height: 24px;
  margin: 0;
  color: var(--success);
  font-weight: 600;
}

footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(5, 8, 22, 0.55);
  backdrop-filter: blur(18px);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
  font-size: 0.92rem;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(52, 211, 153, 0.12);
  }
  50% {
    transform: scale(1.12);
    box-shadow: 0 0 0 14px rgba(52, 211, 153, 0.06);
  }
}

@keyframes floatArrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

@keyframes drift {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(18px,-12px,0) scale(1.04); }
}

@keyframes gridMove {
  0% { transform: translateY(0); }
  100% { transform: translateY(72px); }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 10px 30px rgba(139, 92, 246, 0.35); }
  50% { box-shadow: 0 14px 40px rgba(34, 211, 238, 0.22); }
}

@keyframes lineShimmer {
  0% { background-position: 0% 50%; opacity: 0.7; }
  100% { background-position: 100% 50%; opacity: 1; }
}

@media (max-width: 980px) {
  .hero,
  .usecase-grid,
  .agent-line {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 64px;
  }

  .hero h1 {
    max-width: 12ch;
  }
}

@media (max-width: 720px) {
  .nav-actions {
    gap: 10px;
  }

  .nav-link {
    display: none;
  }

  .hero-stats,
  .row,
  .hero-mini-grid {
    grid-template-columns: 1fr;
  }

  .system-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-shell {
    padding: 20px;
    width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .nav-inner,
  .hero,
  .system-section,
  .usecases,
  .waitlist,
  .footer-inner {
    width: min(var(--max), calc(100% - 24px));
  }

  .nav-inner {
    padding: 14px 0;
  }

  .logo-sub {
    display: none;
  }

  .hero {
    padding: 54px 0 42px;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .primary,
  .secondary {
    width: 100%;
  }

  .dashboard-card,
  .system-shell {
    padding: 18px;
  }

  .system-section,
  .usecases {
    padding-bottom: 54px;
  }

  .usecase-flow {
    gap: 8px;
  }
}