* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --secondary: #06b6d4;
  --dark: #0f172a;
  --dark-light: #1e293b;
  --gray: #64748b;
  --light: #f8fafc;
  --white: #ffffff;
  --gradient: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--light);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navbar */
.navbar {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  text-decoration: none;
  font-size: 1.5rem;
  transition: transform 0.3s;
}

.navbar-brand .logo:hover {
  transform: translateY(-2px);
}

.logo-symbol {
  font-size: 1.8rem;
}

.logo-text strong {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s;
  font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.btn-nav {
  padding: 0.6rem 1.5rem !important;
  font-size: 0.9rem;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--white);
  transition: 0.3s;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  text-align: center;
}

.btn-primary {
  background: var(--gradient);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: rgba(14, 165, 233, 0.1);
}

.btn-large {
  padding: 1rem 3rem;
  font-size: 1.1rem;
}

.btn-footer {
  background: var(--primary);
  color: var(--white) !important;
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
  margin-top: 10px;
}

/* Hero Section */
.hero {
  min-height: 95vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
  padding: 4rem 2rem;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(14, 165, 233, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
}

.hero-content {
  flex: 1;
  z-index: 1;
  max-width: 600px;
  margin-left: 200px;
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background: rgba(14, 165, 233, 0.2);
  border: 1px solid var(--primary);
  border-radius: 50px;
  font-size: 0.9rem;
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease-out;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  animation: fadeInUp 0.6s ease-out 0.6s both;
}

.protocol-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: fadeInUp 0.6s ease-out 0.8s both;
}

.protocol-badge {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* 3D Cube Animation */
.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

.cube-container {
  width: 300px;
  height: 300px;
  perspective: 1000px;
}

.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: rotateCube 20s infinite linear;
}

.cube-face {
  position: absolute;
  width: 300px;
  height: 300px;
  background: rgba(14, 165, 233, 0.1);
  border: 2px solid var(--primary);
  backdrop-filter: blur(10px);
}

.cube-face.front  { transform: rotateY(0deg) translateZ(150px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(150px); }
.cube-face.right  { transform: rotateY(90deg) translateZ(150px); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(150px); }
.cube-face.top    { transform: rotateX(90deg) translateZ(150px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(150px); }

@keyframes rotateCube {
  from { transform: rotateX(0deg) rotateY(0deg); }
  to { transform: rotateX(360deg) rotateY(360deg); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.2rem;
  color: var(--gray);
}

/* Problem/Solution */
.problem-solution {
  background: var(--white);
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 2rem;
}

.comparison-card {
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.comparison-card:hover {
  /*transform: translateY(-5px);*/
}

.comparison-card.problem {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border: 2px solid #fca5a5;
}

.comparison-card.solution {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border: 2px solid #6ee7b7;
}

.comparison-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.diagram-placeholder {
  background: rgba(255, 255, 255, 0.7);
  border: 2px dashed rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 3rem 2rem;
  margin: 1.5rem 0;
  text-align: center;
}

.placeholder-text {
  color: var(--gray);
  font-style: italic;
}

.comparison-list {
  list-style: none;
}

.comparison-list li {
  padding: 0.75rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.comparison-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  font-weight: bold;
  font-size: 1.5rem;
}

/* Benefits Grid */
.benefits {
  background: var(--light);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.benefit-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.benefit-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.benefit-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--dark);
  display: inline-block;
}

.benefit-card p {
  color: var(--gray);
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
  color: var(--white);
  text-align: center;
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-section p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Page Hero */
.page-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.page-hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.page-hero p {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Content Section */
.content-section {
  background: var(--white);
  padding: 3rem;
  border-radius: 16px;
  box-shadow: var(--shadow);
  max-width: 900px;
  margin: 0 auto;
}

.content-section h2 {
  font-size: 2rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--dark);
}

.content-section p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: var(--gray);
}

.styled-list {
  list-style: none;
  margin: 1.5rem 0;
}

.styled-list li {
  padding: 0.75rem 0;
  padding-left: 2rem;
  position: relative;
  line-height: 1.6;
}

.styled-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

.cta-box {
  background: var(--gradient);
  color: var(--white);
  padding: 3rem;
  border-radius: 16px;
  text-align: center;
  margin-top: 4rem;
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.3);
}

.cta-box h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.cta-box p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* Features Detailed */
.features-detailed {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.feature-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.feature-detail.reverse {
  direction: rtl;
}

.feature-detail.reverse > * {
  direction: ltr;
}

.feature-detail-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--dark);
}

.feature-detail-visual {
  background: var(--white);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.protocol-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.protocol-card {
  background: var(--gradient);
  color: var(--white);
  padding: 2rem 1rem;
  border-radius: 12px;
  text-align: center;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.performance-showcase {
  display: flex;
  justify-content: space-around;
  gap: 2rem;
}

.metric {
  text-align: center;
}

.metric-value {
  font-size: 3rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.metric-label {
  font-size: 1rem;
  color: var(--gray);
  margin-top: 0.5rem;
}

.config-preview pre {
  background: var(--dark);
  color: #10b981;
  padding: 2rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

.architecture-box {
  background: var(--gradient);
  color: var(--white);
  padding: 4rem 2rem;
  border-radius: 16px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.pubsub-diagram {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.pubsub-element {
  flex: 1;
  padding: 2rem 1rem;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
}

.pubsub-element.publisher {
  background: #dbeafe;
  color: var(--primary-dark);
}

.pubsub-element.spine-center {
  background: var(--gradient);
  color: var(--white);
  font-size: 1.2rem;
}

.pubsub-element.subscriber {
  background: #d1fae5;
  color: #047857;
}

.microservices-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.micro-node {
  background: var(--light);
  border: 2px solid var(--primary);
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
}

/* Use Cases Grid */
.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.use-case-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.use-case-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.use-case-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.use-case-icon {
  font-size: 2.5rem;
}

.use-case-header h3 {
  font-size: 1.3rem;
  color: var(--dark);
}

.use-case-card p {
  margin-bottom: 1rem;
  color: var(--gray);
}

.use-case-card strong {
  color: var(--dark);
}

/* Documentation */
.docs-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 3rem;
  background: var(--white);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.docs-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.docs-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.docs-nav-link {
  padding: 0.75rem 1rem;
  color: var(--gray);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s;
}

.docs-nav-link:hover,
.docs-nav-link.active {
  background: var(--light);
  color: var(--primary);
}

.docs-content article {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--light);
}

.docs-content article:last-child {
  border-bottom: none;
}

.docs-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--dark);
  scroll-margin-top: 100px;
}

.docs-content h3 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--dark);
}

.docs-content p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: var(--gray);
}

.docs-content pre {
  background: var(--dark);
  color: #10b981;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

.docs-content code {
  background: var(--light);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: var(--primary-dark);
}

.docs-content pre code {
  background: none;
  padding: 0;
  color: #10b981;
}

.info-box,
.success-box {
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.info-box {
  background: #dbeafe;
  border-left: 4px solid var(--primary);
}

.success-box {
  background: #d1fae5;
  border-left: 4px solid #10b981;
}

.docs-footer {
  background: var(--light);
  padding: 3rem;
  border-radius: 16px;
  text-align: center;
  margin-top: 3rem;
}

.docs-footer h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

/* Contact/Demo Form */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
}

.contact-info {
  background: var(--white);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow);
  height: fit-content;
}

.contact-info h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--dark);
}

.contact-details {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--light);
}

.contact-details h3 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--dark);
}

.contact-details p {
  margin-bottom: 0.5rem;
  color: var(--gray);
}

.contact-form-container {
  background: var(--white);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.btn-contact {
    border: 1px solid var(--primary);
    border-radius: 50px;
    color: white;
    background: rgba(14, 165, 233, 0.2);
}

.demo-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.5rem;
  color: var(--dark);
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  padding: 0.75rem;
  border: 2px solid var(--light);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.checkbox-group label {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.form-note {
  font-size: 0.9rem;
  color: var(--gray);
  text-align: center;
  margin-top: 1rem;
}

.response {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 8px;
  display: none;
}

.response.success {
  background: #d1fae5;
  color: #047857;
  border: 2px solid #6ee7b7;
  display: block;
}

.response.error {
  background: #fee2e2;
  color: #991b1b;
  border: 2px solid #fca5a5;
  display: block;
}

/* Footer */
.footer {
  background: var(--dark);
  color: var(--white);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.footer-col p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-cta {
    justify-content: center;
  }

  .protocol-badges {
    justify-content: center;
  }

  .feature-detail,
  .feature-detail.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .contact-layout,
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .navbar-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .cube-container {
    width: 200px;
    height: 200px;
  }

  .cube-face {
    width: 200px;
    height: 200px;
  }

  .cube-face.front  { transform: rotateY(0deg) translateZ(100px); }
  .cube-face.back   { transform: rotateY(180deg) translateZ(100px); }
  .cube-face.right  { transform: rotateY(90deg) translateZ(100px); }
  .cube-face.left   { transform: rotateY(-90deg) translateZ(100px); }
  .cube-face.top    { transform: rotateX(90deg) translateZ(100px); }
  .cube-face.bottom { transform: rotateX(-90deg) translateZ(100px); }

  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .benefits-grid,
  .use-cases-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .page-hero h1 {
    font-size: 2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}