:root {
  --bg-color: #050508;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-primary: #00338b;
  --accent-secondary: #3b82f6;
  --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  --border-color: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(15, 15, 20, 0.4);
  
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

ul {
  list-style: none;
}

/* Layout Utilities */
.w-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Ambient Background */
.ambient-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
}

.orb-1 {
  top: -20%;
  left: -10%;
  width: 50%;
  height: 50%;
  background: var(--accent-secondary);
  animation: float 20s ease-in-out infinite alternate;
}

.orb-2 {
  bottom: -20%;
  right: -10%;
  width: 50%;
  height: 50%;
  background: var(--accent-primary);
  animation: float 25s ease-in-out infinite alternate-reverse;
}

.orb-3 {
  top: 40%;
  left: 60%;
  width: 30%;
  height: 30%;
  background: #3b82f6;
  animation: float 18s ease-in-out infinite alternate;
}

@keyframes float {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 0H0v40h40V0zM0 1h39v39H0V1z' fill='%23ffffff' fill-opacity='0.02' fill-rule='evenodd'/%3E%3C/svg%3E");
  mask-image: radial-gradient(circle at center, black, transparent 80%);
  -webkit-mask-image: -webkit-radial-gradient(circle at center, black, transparent 80%);
}

/* Typography elements */
.text-gradient {
  background: var(--accent-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  background-size: 200% auto;
  animation: gradientX 5s linear infinite;
}

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

/* Glassmorphism */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn i {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.3s ease;
}

.btn--primary {
  background: var(--accent-primary);
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn--primary:hover {
  background: #4f46e5;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
}

.btn--primary:hover i {
  transform: translateX(4px);
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid var(--border-color);
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn--large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 0;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  padding: 1rem 0;
  background: rgba(5, 5, 8, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-icon {
  width: 2.25rem;
  height: 2.25rem;
  background: var(--accent-gradient);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

.logo-icon i {
  color: #fff;
  width: 1.25rem;
  height: 1.25rem;
}

.nav-links {
  display: none;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
    gap: 2rem;
  }
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #fff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-signin {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
  display: none;
}

@media (min-width: 640px) {
  .nav-signin {
    display: block;
  }
}

.nav-signin:hover {
  color: #fff;
}

/* Hero Section */
.hero {
  padding-top: 12rem;
  padding-bottom: 8rem;
  text-align: center;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(15, 15, 20, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #818cf8;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.pulsing-dot {
  width: 8px;
  height: 8px;
  background: #6366f1;
  border-radius: 50%;
  box-shadow: 0 0 10px #6366f1, 0 0 20px #6366f1;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.5; }
}

.hero__title {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero__subtitle {
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 3rem;
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 5rem;
}

.hero__terminal {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  border-radius: 1rem;
  text-align: left;
}

.hero__terminal::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, rgba(99,102,241,0.5), rgba(139,92,246,0.2));
  border-radius: 1rem;
  z-index: -1;
  filter: blur(10px);
  opacity: 0.5;
  transition: opacity 0.5s;
}

.hero__terminal:hover::before {
  opacity: 0.8;
}

.terminal-header {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(10, 10, 15, 0.8);
  border-bottom: 1px solid var(--border-color);
  border-radius: 1rem 1rem 0 0;
}

.window-controls {
  display: flex;
  gap: 0.5rem;
  margin-right: 1.5rem;
}

.window-controls .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.close { background: #ef4444; }
.dot.min { background: #eab308; }
.dot.max { background: #22c55e; }

.terminal-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.terminal-title i {
  width: 0.8rem;
  height: 0.8rem;
}

.terminal-body {
  padding: 2rem;
  overflow-x: auto;
  background: rgba(10, 10, 15, 0.95);
  border-radius: 0 0 1rem 1rem;
  font-size: clamp(0.8rem, 2vw, 0.95rem);
}

pre {
  margin: 0;
  font-family: var(--font-mono);
  line-height: 1.6;
}

.token-kw { color: #f472b6; }
.token-prop { color: #93c5fd; }
.token-str { color: #86efac; }
.token-num { color: #fdba74; }
.token-comment { color: #64748b; font-style: italic; }

/* Logo Cloud */
.logo-cloud {
  padding: 4rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: rgba(10, 10, 15, 0.5);
}

.logo-cloud-header {
  text-align: center;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 2rem;
}

.logo-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  opacity: 0.4;
  filter: grayscale(100%);
  transition: all 0.4s ease;
}

.logo-item:hover {
  opacity: 1;
  filter: grayscale(0%);
}

/* About Section */
.about-section {
  padding: 8rem 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (min-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
  }
}

.section-icon {
  width: 3rem;
  height: 3rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: #818cf8;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.section-desc {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.feature-check {
  width: 1.5rem;
  height: 1.5rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4ade80;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.feature-info h4 {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.feature-info p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.diagram-panel {
  position: relative;
  padding: 2rem;
}

.diagram-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.1));
  filter: blur(40px);
  border-radius: 50%;
}

.diagram-card {
  position: relative;
  background: rgba(15, 15, 20, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 1.5rem;
  padding: 2rem;
  backdrop-filter: blur(12px);
  z-index: 10;
}

.diagram-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.tag {
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 600;
}

.tag--source {
  background: rgba(30, 30, 35, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.tag--engine {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
  letter-spacing: 0.05em;
}

.arrow-icon {
  color: #818cf8;
  animation: pulse 2s infinite;
}

.log-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  background: rgba(20, 20, 25, 0.5);
  border: 1px solid var(--border-color);
  margin-bottom: 0.75rem;
  position: relative;
}

.log-item.success {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
  overflow: hidden;
}

.log-item.success::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(129, 140, 248, 0.1);
  animation: pulse 2s infinite;
}

.log-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.log-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.log-status {
  margin-left: auto;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 700;
}

.text-red { color: #f87171; }
.text-orange { color: #fb923c; }
.text-green { color: #4ade80; }

/* Bento Grid */
.bento-section {
  padding: 8rem 0;
  background: rgba(10, 10, 15, 0.3);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 4rem;
}

.bento-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 0 2rem;
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 280px;
  }
}

.bento-box {
  background: rgba(20, 20, 25, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 1.5rem;
  padding: 2rem;
  backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bento-box:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5), 0 0 20px rgba(99,102,241,0.1);
}

.bento-box.large {
  grid-column: span 1;
  grid-row: span 1;
}

@media (min-width: 768px) {
  .bento-box.large {
    grid-column: span 2;
    grid-row: span 2;
  }
}

.bento-box.wide {
  grid-column: span 1;
}

@media (min-width: 768px) {
  .bento-box.wide {
    grid-column: span 3;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
  }
}

.bento-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.bento-box h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.bento-box p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.bento-bg-pattern {
  position: absolute;
  right: -10%;
  bottom: -10%;
  width: 60%;
  height: 60%;
  opacity: 0.3;
  transition: transform 0.8s ease;
  z-index: 1;
}

.bento-box:hover .bento-bg-pattern {
  transform: scale(1.1) rotate(-5deg);
}

.visual-mockup {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.mock-rule {
  background: rgba(30, 30, 35, 0.8);
  padding: 0.5rem;
  border-radius: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
}

.mock-result {
  grid-column: span 2;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.75rem;
  border-radius: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #a5b4fc;
  text-align: center;
  transform: rotate(-2deg);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Audit Stream */
.audit-section {
  padding: 8rem 0;
  position: relative;
}

.audit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (min-width: 1024px) {
  .audit-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.terminal-mock {
  background: #09090b;
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 0.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.terminal-mock-header {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.live-indicator {
  color: #4ade80;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stream-container {
  height: 300px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stream-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, #09090b, transparent);
  z-index: 10;
}

.stream-row {
  display: flex;
  gap: 1rem;
  padding: 0.5rem;
  background: rgba(20, 20, 25, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideDown {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.stream-time { width: 80px; color: var(--text-muted); flex-shrink: 0; }
.stream-type { width: 120px; flex-shrink: 0; }
.stream-desc { flex-grow: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-muted); }
.stream-result { font-weight: bold; margin-left: auto; }

/* Use Cases Sections */
.use-cases-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (min-width: 768px) {
  .use-cases-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.use-case-card {
  padding: 2.5rem;
  background: #09090b;
  border: 1px solid var(--border-color);
  border-radius: 1.5rem;
  transition: border-color 0.3s;
}

.use-case-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
}

.use-case-card i {
  width: 2.5rem;
  height: 2.5rem;
  color: #818cf8;
  margin-bottom: 1.5rem;
}

.use-case-card h4 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.use-case-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.8;
  font-style: italic;
}

/* CTA Section */
.cta-section {
  padding: 10rem 0;
  text-align: center;
  position: relative;
}

.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  max-width: 800px;
  height: 300px;
  background: rgba(99, 102, 241, 0.15);
  filter: blur(150px);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

.cta-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.cta-desc {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 3rem;
}

/* Footer */
.footer {
  background: #050508;
  border-top: 1px solid var(--border-color);
  padding: 5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto 4rem;
  padding: 0 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.875rem;
  max-width: 300px;
  margin: 1.5rem 0;
}

.footer-cert {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.footer-cert i {
  color: #4ade80;
  width: 1rem;
  height: 1rem;
}

.footer h4 {
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.footer ul {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer ul a {
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer ul a:hover {
  color: #818cf8;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #64748b;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.footer-links a:hover {
  color: #fff;
}

/* Animations */
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.active {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 100ms; }
.delay-2 { transition-delay: 200ms; }
.delay-3 { transition-delay: 300ms; }
.delay-4 { transition-delay: 400ms; }
