@import url("https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700&display=swap");

/* ================= RESET ================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

/* ================= BODY ================= */

body {
  min-height: 100vh;
  background: radial-gradient(circle at top, #1a102b, #05010d);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px;

  /* GLOBAL NEON COLOR */
  --clr: #8b5cf6;
}

/* ================= LAYOUT ================= */

body {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 60px;
}

/* ================= CARDS ================= */

.cards-wrapper {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 1400px;
  padding: 0 20px;
}

.card {
  position: relative;
  width: 300px;
  height: 350px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.6s ease;
}

.card:hover {
  width: 600px;
}

/* ================= CIRCLE ================= */

.card .circle {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card .circle::before {
  content: "";
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, #120b22, #070311);
  border: 8px solid var(--clr);
  transition: 0.6s ease;

  filter:
    drop-shadow(0 0 20px rgba(139,92,246,0.7))
    drop-shadow(0 0 80px rgba(79,172,254,0.5));
}

.card:hover .circle::before {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(
    135deg,
    #4facfe,
    #8b5cf6,
    #3b0764
  );
}

/* ================= LOGO ================= */

.card .circle .logo {
  width: 230px;
  transition: 0.5s ease;
  z-index: 2;
}

.card:hover .circle .logo {
  transform: scale(0);
  opacity: 0;
}

/* ================= PRODUCT IMAGE ================= */

.card .product_img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0) rotate(315deg);
  height: 280px;
  transition: 0.6s ease;
}

.card:hover .product_img {
  top: 25%;
  left: 75%;
  height: 500px;
  transform: translate(-50%, -50%) scale(1) rotate(15deg);
}

/* ================= CONTENT ================= */

.card .content {
  position: absolute;
  width: 50%;
  left: 30px;
  opacity: 0;
  visibility: hidden;
  transition: 0.6s ease;
}

.card:hover .content {
  opacity: 1;
  visibility: visible;
}

/* ================= TEXT ================= */

.card .content h2 {
  color: #fff;
  font-size: 2.2em;
  margin-bottom: 10px;
  text-shadow: 0 0 12px rgba(139,92,246,0.8);
}

.card .content p {
  color: #dcd7ff;
  line-height: 1.6;
}

/* ================= BUTTON ================= */

.card .content a {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 22px;
  background: linear-gradient(135deg, #4facfe, #8b5cf6);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s ease;

  box-shadow:
    0 0 15px rgba(139,92,246,0.6);
}

.card .content a:hover {
  transform: translateY(-3px);
  box-shadow:
    0 0 30px rgba(79,172,254,0.9);
}

/* ================= HEADER TITLE ================= */

header h1 {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 900;
  text-align: center;
  margin-bottom: 70px;
  letter-spacing: 0.18em;
  text-transform: uppercase;

  background: linear-gradient(
    120deg,
    #471eec,
    #8b5cf6,
    #c084fc
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  text-shadow:
    0 0 15px rgba(79,172,254,0.6),
    0 0 40px rgba(139,92,246,0.6),
    0 0 80px rgba(192,132,252,0.4);

  animation:
    gradient-flow 6s ease infinite,
    glow-soft 4s ease-in-out infinite;
}

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

@keyframes glow-soft {
  0%,100% {
    filter: drop-shadow(0 0 20px rgba(139,92,246,0.6));
  }
  50% {
    filter: drop-shadow(0 0 40px rgba(79,172,254,0.9));
  }
}

/* ================= MATRIX BACKGROUND ================= */

.matrix-bg {
  position: fixed;
  inset: 0;
  background: #020007;
  z-index: -2;
}

/* ================= MATRIX ================= */

.jp-matrix {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  grid-auto-rows: 40px;

  font-size: 32px;
  font-family: "Courier New", monospace;

  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.jp-matrix > span {
  color: rgba(139,92,246,0.35);
  text-shadow: 0 0 8px rgba(139,92,246,0.6);
  animation: smooth-pulse 4s ease-in-out infinite;
}

/* ================= MATRIX ANIMATION ================= */

@keyframes smooth-pulse {
  0%,100% {
    color: rgba(139,92,246,0.35);
    text-shadow: 0 0 8px rgba(139,92,246,0.5);
  }
  50% {
    color: ad5fff(79,172,254,1);
    text-shadow:
      0 0 12px rgba(79,172,254,1),
      0 0 30px rgba(139,92,246,0.9);
  }
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {
  .card {
    width: 100%;
    max-width: 360px;
  }

  .card:hover {
    width: 100%;
  }

  .card .content {
    width: 100%;
    text-align: center;
    left: 0;
    padding: 20px;
  }

  .card:hover .product_img {
    top: 60%;
    left: 50%;
    height: 260px;
    transform: translate(-50%, -50%) rotate(0);
  }
}
/* ================= PAGE LOADER ================= */

#page-loader {
  position: fixed;
  inset: 0;
  background: #000; /* crna pozadina */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#page-loader.fade-out {
  opacity: 0;
  visibility: hidden;
}

/* sakrij stranicu dok se ne ucita */
body.loading {
  overflow: hidden;
}
.loader-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 180px;
  font-family: "Inter", sans-serif;
  font-size: 1.2em;
  font-weight: 300;
  color: white;
  border-radius: 50%;
  background-color: transparent;
  user-select: none;
}

.loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background-color: transparent;
  animation: loader-rotate 2s linear infinite;
  z-index: 0;
}

@keyframes loader-rotate {
  0% {
    transform: rotate(90deg);
    box-shadow:
      0 10px 20px 0 #fff inset,
      0 20px 30px 0 #ad5fff inset,
      0 60px 60px 0 #471eec inset;
  }
  50% {
    transform: rotate(270deg);
    box-shadow:
      0 10px 20px 0 #fff inset,
      0 20px 10px 0 #d60a47 inset,
      0 40px 60px 0 #311e80 inset;
  }
  100% {
    transform: rotate(450deg);
    box-shadow:
      0 10px 20px 0 #fff inset,
      0 20px 30px 0 #ad5fff inset,
      0 60px 60px 0 #471eec inset;
  }
}

.loader-letter {
  display: inline-block;
  opacity: 0.4;
  transform: translateY(0);
  animation: loader-letter-anim 2s infinite;
  z-index: 1;
  border-radius: 50ch;
  border: none;
}

.loader-letter:nth-child(1) {
  animation-delay: 0s;
}
.loader-letter:nth-child(2) {
  animation-delay: 0.1s;
}
.loader-letter:nth-child(3) {
  animation-delay: 0.2s;
}
.loader-letter:nth-child(4) {
  animation-delay: 0.3s;
}
.loader-letter:nth-child(5) {
  animation-delay: 0.4s;
}
.loader-letter:nth-child(6) {
  animation-delay: 0.5s;
}
.loader-letter:nth-child(7) {
  animation-delay: 0.6s;
}
.loader-letter:nth-child(8) {
  animation-delay: 0.7s;
}
.loader-letter:nth-child(9) {
  animation-delay: 0.8s;
}
.loader-letter:nth-child(10) {
  animation-delay: 0.9s;
}

@keyframes loader-letter-anim {
  0%,
  100% {
    opacity: 0.4;
    transform: translateY(0);
  }
  20% {
    opacity: 1;
    transform: scale(1.15);
  }
  40% {
    opacity: 0.7;
    transform: translateY(0);
  }
}