/* LAYOUT M — Hub-and-Spoke connectivity for API Integration */

.layout-m-hero {
  padding: 8rem 0;
  background: linear-gradient(135deg, var(--surface-soft), #eef2f6);
  text-align: center;
}

.layout-m-hero h1 {
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--color-gray-900);
  margin-bottom: 1.5rem;
}

.layout-m-hero p {
  font-size: 1.25rem;
  color: var(--color-gray-600);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.m-hub-section {
  padding: 6rem 0;
  background: var(--surface);
}

.m-hub-visual {
  background: var(--color-white);
  border: 1px solid var(--color-gray-150);
  border-radius: 2rem;
  padding: 4rem 2rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 5rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

/* Spectacular Mesh Gateway Illustration */
.m-mesh-container {
  position: relative;
  width: 400px;
  height: 400px;
  margin: 3rem auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.m-mesh-connections {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.conn-line {
  stroke: var(--color-purple);
  stroke-width: 3px;
  stroke-dasharray: 8, 8;
  animation: dashmove 4s linear infinite;
}

@keyframes dashmove {
  to {
    stroke-dashoffset: -40;
  }
}

.m-hub-center {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-purple), var(--color-purple-deep));
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 0 30px rgba(79, 46, 222, 0.4);
  z-index: 3;
}

.m-hub-pulse {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  border: 2px solid var(--color-mint);
  animation: pulse-ring 2s cubic-bezier(0.215, 0.610, 0.355, 1) infinite;
  z-index: -1;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.9);
    opacity: 1;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.m-spoke-node {
  position: absolute;
  width: 75px;
  height: 75px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2px solid var(--color-purple);
  color: var(--color-purple);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  z-index: 2;
  transition: all 0.3s ease;
}

.m-spoke-node:hover {
  transform: scale(1.1);
  background: var(--surface-soft);
  box-shadow: 0 0 20px rgba(79, 46, 222, 0.2);
}

/* Spoke Node Positions around 200,200 central point */
.spoke-1 { top: 32px; left: 162px; } /* 200, 70 */
.spoke-2 { top: 112px; right: 28px; } /* 330, 150 */
.spoke-3 { bottom: 52px; right: 82px; } /* 280, 310 */
.spoke-4 { bottom: 52px; left: 82px; } /* 120, 310 */
.spoke-5 { top: 112px; left: 28px; } /* 70, 150 */

.m-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4rem;
  align-items: center;
}

.m-img-block {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.m-img-block img {
  width: 100%;
  height: auto;
  display: block;
}

.m-text-block h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.m-text-block p {
  color: var(--color-gray-600);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.m-illustration-break {
  background: var(--color-mint-light);
  border-radius: 1.5rem;
  padding: 4rem;
  text-align: center;
  margin: 6rem auto;
  max-width: 900px;
}

.m-illustration-break svg {
  width: 100px;
  height: 100px;
  color: var(--color-mint);
  margin-bottom: 1.5rem;
}

.m-conversion-strip {
  background: var(--color-gray-900);
  color: white;
  border-radius: 1.5rem;
  padding: 4rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.m-conversion-strip h2 {
  color: white;
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.m-conversion-strip .btn-surface {
  background: var(--color-mint);
  color: var(--color-gray-900);
  font-weight: 700;
  border-radius: 10px; /* rounded.lg */
  transition: all 0.3s ease;
}

.m-conversion-strip .btn-surface:hover {
  background: var(--color-white);
  color: var(--color-purple);
}

@media (max-width: 992px) {
  .m-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  .m-conversion-strip {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 576px) {
  .m-mesh-container {
    width: 280px;
    height: 280px;
  }
  .m-mesh-connections {
    display: none;
  }
  .m-spoke-node {
    width: 60px;
    height: 60px;
    font-size: 0.75rem;
  }
  .m-hub-center {
    width: 90px;
    height: 90px;
    font-size: 0.95rem;
  }
  .spoke-1 { top: 10px; left: 110px; }
  .spoke-2 { top: 60px; right: 10px; }
  .spoke-3 { bottom: 30px; right: 40px; }
  .spoke-4 { bottom: 30px; left: 40px; }
  .spoke-5 { top: 60px; left: 10px; }
}
