/* PARTICLE CANVAS */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: #0b0b0e;
  color: #fff;
  overflow-x: hidden;
}

/* ANIMATED GRADIENT GLOW */
.gradient-glow {
  position: fixed;
  inset: -50%;
  background: radial-gradient(circle at 30% 30%, #5b5bff55, transparent 40%),
              radial-gradient(circle at 70% 40%, #00ffff44, transparent 45%),
              radial-gradient(circle at 50% 70%, #ff00ff33, transparent 40%);
  animation: glowMove 20s linear infinite;
  z-index: -3;
}

@keyframes glowMove {
  0% { transform: translate(0,0); }
  50% { transform: translate(10%, -10%); }
  100% { transform: translate(0,0); }
}

/* GRID GLOW */
.grid-bg {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(#1a1a1f 1px, transparent 1px),
    linear-gradient(90deg, #1a1a1f 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at top, black 25%, transparent 70%);
  opacity: 0.3;
  z-index: -2;
}

/* =========================
   GLASS LOGIN NAVBAR
========================= */
.login-glass {
  position: relative;
  padding: 8px 18px;
  border-radius: 14px;
  color: #e8faff;
  font-weight: 500;
  text-decoration: none;

  /* Glass effect */
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 
    inset 0 0 10px rgba(255,255,255,0.08),
    0 0 20px rgba(0, 200, 255, 0.15);

  transition: all 0.35s ease;
}

/* Glow saat hover */
.login-glass:hover {
  color: #ffffff;
  background: rgba(10, 207, 254, 0.18);

  box-shadow:
    0 0 12px rgba(10, 207, 254, 0.6),
    0 0 30px rgba(10, 207, 254, 0.8),
    inset 0 0 14px rgba(255,255,255,0.25);

  border-color: rgba(10, 207, 254, 0.8);
  transform: translateY(-2px) scale(1.03);
}

/* Neon line animation */
.login-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(0, 255, 255, 0.8),
    transparent
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}

.login-glass:hover::before {
  opacity: 1;
}

:root {
  --navbar-height: 50px;
  --cube-size: 116px;   /* 80% dari 144px */
  --cube-radius: 58px;  /* Setengah dari size */
}

/* GLASS NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 30px;
  background: rgba(10,10,14,0.6);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  min-height: var(--navbar-height);
}

.navbar nav {
  display: flex;
  align-items: center;   /* 🔑 sejajar logo */
}


/* SHINE KHUSUS LOGO NAVBAR */
.navbar .logo::after {
  content: "";
  position: absolute;
  inset: 0;
  left: -70%;
  width: 26%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255,255,255,0.22) 50%,
    transparent 100%
  );
  transform: skewX(-18deg);
  animation: logoShineNavbar 6s ease-in-out infinite;
  pointer-events: none;
}



/* Logo */
.logo img {
 height: 40px;
  width: auto;
  display: block;        /* 🔑 hilangkan baseline */
}

.logo {
  position: relative;
  display: flex;
  align-items: center;   /* 🔑 kunci utama */
  height: 40px;          /* samakan dengan logo */
flex-shrink: 0;        /* 🔑 cegah membesar */
  overflow: hidden;
}

.navbar nav a {
  display: flex;
  align-items: center;
  line-height: 1;
  color: #cfcfd4;
  text-decoration: none;
  margin-left: 24px;
  font-size: 14px;
  transition: color 0.3s;
}

.navbar nav a:hover {
  color: #fff;
}

/* HERO */
.hero {
 position: relative;
  z-index: 2;
  text-align: center;
  padding-top: calc(var(--navbar-height) + 20px); /* Sedikit padding agar tidak nempel banget */
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Pastikan mulai dari atas */
  align-items: center;
}

/* BADGE */
.badge {
  position: relative;
  z-index: 3;
  display: inline-block;
  margin-bottom: 40px; /* Jarak ke elemen bawahnya (Rubik) */
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 999px;
  border: 1px solid #2a2a32;
  background: rgba(255,255,255,0.04);
}

/* HERO TEXT */
.hero h1 {
  font-size: 54px;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 10px;
  margin-top: 10px; /* ⬅️ JARAK DARI RUBIK */
}

.hero p {
  max-width: 600px;
  margin: 0 auto 40px;
  font-size: 18px;
  color: #b3b3bd;
}

/* BUTTONS */
.hero-buttons a {
  margin: 0 10px;
}

.btn-primary {
  background: #fff;
  color: #000;
  padding: 14px 26px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.35s ease;
  will-change: transform, box-shadow;
}

.btn-primary:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(10, 207, 254, 0.6),
    0 10px 30px rgba(10, 207, 254, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow:
    0 4px 12px rgba(10, 207, 254, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ffffff, #f5fbff);
  color: #000;
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    /* neon core */
    0 0 0 1.5px rgba(10, 207, 254, 0.9),

    /* inner glow */
    inset 0 0 12px rgba(10, 207, 254, 0.35),

    /* soft bloom */
    0 0 18px rgba(10, 207, 254, 0.55),
    0 0 42px rgba(10, 207, 254, 0.35),

    /* depth */
    0 18px 48px rgba(0, 0, 0, 0.45);
}


.btn-secondary {
  border: 1px solid #2a2a32;
  color: #fff;
  padding: 14px 26px;
  border-radius: 12px;
  text-decoration: none;
}

/* 3D CUBE */
.scene {
  width: 144px;
  height: 144px;
  margin: 15px auto 40px; /* JARAK ATAS & BAWAH RUBIK DITAMBAH */
  perspective: 900px;
}

.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: rotateCube 12s infinite linear;
}

.face {
  position: absolute;
  width: 144px;
  height: 144px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
  padding: 2px;
  background: #050507;
  border-radius: 10px;
  box-shadow:
    inset 0 0 20px rgba(0,0,0,0.9),
    0 0 20px rgba(108,242,194,0.12);

backface-visibility: hidden;
transform-style: preserve-3d;
overflow: hidden; /* 🔑 WAJIB */
}

.face span {
  animation: none;
  background: linear-gradient(145deg, #1a1a20, #0b0b0e);
  border-radius: 4px;
  box-shadow:
    inset 0 0 6px rgba(0,0,0,0.8),
    0 0 0 rgba(108,242,194,0);
  transition: 
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.face span:hover {
  animation: none;
  background: linear-gradient(145deg, #6cf2c2, #2bd9a6);
  box-shadow:
    0 0 12px rgba(108,242,194,1),
    0 0 26px rgba(108,242,194,0.7),
    inset 0 0 10px rgba(255,255,255,0.35);
  transform: scale(1.05);
}

.front  { transform: translateZ(72px); }
.back   { transform: rotateY(180deg) translateZ(72px); }
.right  { transform: rotateY(90deg) translateZ(72px); }
.left   { transform: rotateY(-90deg) translateZ(72px); }
.top    { transform: rotateX(90deg) translateZ(72px); }
.bottom { transform: rotateX(-90deg) translateZ(72px); }

@keyframes rotateCube {
  from {
    transform: rotateX(0deg) rotateY(0deg);
  }
  to {
    transform: rotateX(360deg) rotateY(360deg);
  }
}

.face span.active {
  background: linear-gradient(145deg, #6cf2c2, #2bd9a6);
  box-shadow:
    0 0 14px rgba(108,242,194,0.9),
    0 0 26px rgba(108,242,194,0.6),
    inset 0 0 8px rgba(255,255,255,0.3);
}

/* FEATURES */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  padding: 80px 60px;
}

.card {
  background: linear-gradient(180deg, #141418, #0f0f12);
  border: 1px solid #1f1f25;
  padding: 34px;
  border-radius: 18px;
  transition: all 0.4s ease;
}

.card:hover {
  transform: translateY(-8px);
  border-color: #2f2f36;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7);
}

/* FOOTER */
.footer {
  text-align: center;
  padding: 30px;
  border-top: 1px solid #1f1f25;
  font-size: 13px;
  color: #777;
}

@keyframes logoShineNavbar {
  0%   { left: -80%; opacity: 0; }
  15%  { opacity: 1; }
  40%  { left: 120%; opacity: 0; }
  100% { left: 120%; opacity: 0; }
}

 /* BLOK SETTING DI MOBILE/SMARTPHONE */

@media (max-width: 768px) {
  :root {
    --navbar-height: 60px; /* Better touch target for mobile */
  }

  /* NAVBAR MOBILE*/
  .navbar {
    height: var(--navbar-height);
    min-height: unset;
    padding: 8px 16px; /* Add vertical padding to match desktop style */
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .navbar nav {
    display: flex;
    align-items: center;
    height: 100%;
  }
 
/* SIGN IN BUTTON MOBILE - FIX FINAL */
 .login-glass {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 12px;
  line-height: 1;
  white-space: nowrap;   /* ⬅️ PENTING: cegah Sign / In turun */
  flex-shrink: 0;        /* ⬅️ jangan diperas flex */
  transform: translateY(0);
  }


  /* LOGO CONTAINER */
    .logo img {
    height: 32px;           /* kunci ukuran logo */
  }

  /* SHINE LOGO */
  .navbar .logo::after {
    width: 24%;             /* shine lebih tipis */
    left: -70%;
    transform: skewX(-16deg);
  }

  /* MENU */
  .navbar nav a {
    font-size: 13px;
    margin-left: 18px;
   
  }


  /* HERO MOBILE */
  .hero {
    min-height: auto; /* Allow scrolling naturally if needed, or stick to calc if tight */
    padding-top: 70px; /* Reduced further to pull content up */
    padding-bottom: 60px;
  }

 /* TITLE */
  .hero h1 {
    font-size: 36px;
    margin-top: 10px;   /* ⬅️ TAMBAH JARAK DARI CUBE */
    margin-bottom: 16px;
  }

/* CUBE (RUBIK MOBILE) */
  .scene {
    width: 96px;          /* ⬅️ ukuran diperkecil */
    height: 96px;
    margin: 0 auto 36px;  /* jarak aman ke teks */
    perspective: 700px;   /* sedikit dikurangi agar proporsional */
  }

  .face {
    width: 96px;
    height: 96px;
  }

  .front  { transform: translateZ(48px); }
  .back   { transform: rotateY(180deg) translateZ(48px); }
  .right  { transform: rotateY(90deg) translateZ(48px); }
  .left   { transform: rotateY(-90deg) translateZ(48px); }
  .top    { transform: rotateX(90deg) translateZ(48px); }
  .bottom { transform: rotateX(-90deg) translateZ(48px); }
 
  .badge {
    margin-bottom: 24px;
  }

  /* Make buttons stack or smaller on very small screens */
  .hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .hero-buttons a {
    margin: 0;
    display: block;
    width: 100%;
  }

  .features {
    padding: 60px 20px;
  }
}

/* SCROLL REVEAL */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fix hover conflict for cards */
.card[data-animate].visible:hover {
  transform: translateY(-8px);
}
