.hero {
    position: relative;
    width: 100%;
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 110px 0 160px;
    overflow: hidden;
    font-family: "DM Sans", sans-serif;
}

.hero h1 {
    font-size: 64px;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
}

.hero-desc {
    margin: 24px auto 0;
    max-width: 650px;
    color: #cfcfcf;
    font-size: 16px;
}

.hero-buttons {
    margin-top: 48px;
    display: flex;
    gap: 24px;
    justify-content: center;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-primary {
    padding: 14px 32px;
    border-radius: 15px;
    background: rgba(144, 0, 255, 1);
    color: #fff;
    font-weight: 500;
    text-decoration: none;
    font-size: 16px;
    box-shadow:
        0 0 22px rgba(171, 70, 255, 0.9),
        0 0 45px rgba(171, 70, 255, 0.75);
    transition: .18s;
    position: relative;
}

.btn-primary::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.1px; /* grubość bordera */

  background: conic-gradient(
    from 0deg,
    rgba(64,64,64,0.5),
    rgba(64,64,64,0.35),
    rgba(255,255,255,0.5),
    rgba(255,255,255,0.5),
    rgba(64,64,64,0.35),
    rgba(249,249,249,1),
    rgba(255,255,255,0.5),
    rgba(249,249,249,0.5),
    rgba(64,64,64,0.35)
  );

  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;

  pointer-events: none;
  z-index: 2;
}

.btn-primary:hover {
    box-shadow:
        0 0 32px rgba(190, 90, 255, 0.95),
        0 0 60px rgba(190, 90, 255, 0.8);
    transform: translateY(-1px);
}

.btn-secondary {
    color: #9ca3af;
    font-size: 16px;
    text-decoration: none;
    transition: .18s;
    font-weight: 500;
    margin: 14px 32px;
}

.btn-secondary:hover {
    color: #fff;
}

.floating-box{
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(144, 0, 255, 1);
  opacity: 0.98;
  animation: float 4s ease-in-out infinite;
  isolation: isolate;

  box-shadow:
    0 0 24px rgba(144, 0, 255, 0.9),
    0 0 55px rgba(144, 0, 255, 0.75),
    0 0 95px rgba(144, 0, 255, 0.55);
}

.floating-box::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px; /* grubość bordera */

  background: conic-gradient(
    from 0deg,
    rgba(64,64,64,0.5),
    rgba(64,64,64,0.35),
    rgba(255,255,255,0.5),
    rgba(255,255,255,0.5),
    rgba(64,64,64,0.35),
    rgba(249,249,249,1),
    rgba(255,255,255,0.5),
    rgba(249,249,249,0.5),
    rgba(64,64,64,0.35)
  );

  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;

  pointer-events: none;
  z-index: 2;
}

/* 🔹 TWÓJ GLOW (zostaje, ale lepiej pod spodem) */
.floating-box::before{
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: inherit;
  background: linear-gradient(90deg, #7b3df0, #b54dff);
  filter: blur(6px);
  z-index: -1;
}

.floating-box img{
  width: 40%;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.9));
}

@keyframes float{
  0%   { transform: translateY(0) rotate(var(--rot)); }
  50%  { transform: translateY(-10px) rotate(var(--rot)); }
  100% { transform: translateY(0) rotate(var(--rot)); }
}


.box-1 {
    width: 95px;
    height: 95px;
    top: 13%;
    left: 14%;
    --rot: -18deg;
}

.box-2 {
    width: 95px;
    height: 95px;
    top: 15%;
    right: 14%;
    --rot: 16deg;
}

.box-3 {
    width: 50px;
    height: 50px;
    bottom: 19%;
    left: 20%;
    --rot: 8deg;
}

.box-4 {
    width: 55px;
    height: 55px;
    bottom: 21%;
    right: 20%;
    --rot: -10deg;
}

@media (max-width: 1024px) and (min-width: 768px) {
    .hero {
        padding: 100px 0 130px;
    }

    .hero h1 {
        font-size: 44px;
    }

    .hero-desc {
        font-size: 14px;
        max-width: 580px;
    }

    .hero-buttons {
        gap: 32px;
        margin-top: 26px;
    }

    .btn-primary {
        padding: 11px 26px;
        font-size: 14px;
    }

    .btn-secondary {
        font-size: 14px;
    }

    .floating-box {
        box-shadow:
            0 0 18px rgba(144, 0, 255, 1),
            0 0 40px rgba(144, 0, 255, 1),
            0 0 70px rgba(144, 0, 255, 1);
    }

    .floating-box img {
        width: 38%;
    }

    .box-1 {
        width: 90px;
        height: 90px;
        top: 10%;
        left: 10%;
    }

    .box-2 {
        width: 95px;
        height: 95px;
        top: 12%;
        right: 10%;
    }

    .box-3 {
        width: 55px;
        height: 55px;
        bottom: 17%;
        left: 16%;
    }

    .box-4 {
        width: 58px;
        height: 58px;
        bottom: 19%;
        right: 16%;
    }
}

@media (max-width: 767px) {
    .hero {
        min-height: auto;
        padding: 110px 20px 80px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero-desc {
        font-size: 14px;
        margin-top: 18px;
    }

    .hero-buttons {
        margin-top: 24px;
        flex-direction: column;
        gap: 20px;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .btn-secondary {
        width: 100%;
        justify-content: center;
        margin: 14px 0px;
    }

    .floating-box {
        display: none;
    }
}
