/* =========================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ========================================= */
:root {
  --brand-orange: #f97316;
  --brand-blue: #38bdf8;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
}

/* =========================================
   GLOBAL RESET & BASE
   ========================================= */
body {
  background-color: var(--slate-50);
  color: var(--slate-900);
  cursor: none;
  overflow-x: hidden;
  font-family: "Space Grotesk", sans-serif;
}

/* =========================================
   CUSTOM CURSOR
   ========================================= */
.cursor-dot,
.cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 9999;
  pointer-events: none;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: #f97316;
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 1px solid #38bdf8;
  transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* =========================================
   LOADING SCREEN (UPDATED FIX MOBILE)
   ========================================= */
#loader {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  transition: opacity 0.8s ease-out, visibility 0.8s;
  overflow: hidden; /* Mencegah scroll saat loading */
}

@keyframes bounceLoader {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.loader-char {
  display: inline-block;
  font-family: "Outfit", sans-serif;
  /* PERBAIKAN: Ukuran font dikecilkan untuk mobile agar tidak overflow */
  font-size: 2.5rem;
  font-weight: 900;
  color: #0f172a;
  animation: bounceLoader 1s infinite ease-in-out;
}

/* Ukuran besar hanya untuk Tablet/Desktop */
@media (min-width: 768px) {
  .loader-char {
    font-size: 6rem;
  }
}

.loader-bar {
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, #f97316, #38bdf8);
  margin-top: 10px;
  border-radius: 2px;
  animation: loadBar 2s ease-in-out forwards;
}

@keyframes loadBar {
  0% {
    width: 0%;
  }
  100% {
    width: 150px;
  }
}

/* =========================================
   HERO SECTION & ANIMATIONS
   ========================================= */
.hero-text-3d {
  text-shadow: 1px 1px 0 #cbd5e1, 2px 2px 0 #cbd5e1, 3px 3px 0 #94a3b8, 4px 4px 0 #94a3b8, 15px 15px 20px rgba(0, 0, 0, 0.1);
}

.char-animate {
  display: inline-block;
  transition: transform 0.2s ease, color 0.3s ease;
  animation: breathingScale 3s infinite ease-in-out;
}

.char-animate:hover {
  color: #f97316;
  transform: scale(1.3) !important;
  text-shadow: 0 0 10px rgba(249, 115, 22, 0.5);
  cursor: none;
}

@keyframes breathingScale {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* =========================================
   NAVBAR & LOGO
   ========================================= */
.nav-logo {
  font-family: "Outfit", sans-serif;
  position: relative;
  color: #0f172a;
}

.nav-logo:hover {
  color: transparent;
  -webkit-text-stroke: 1px #0f172a;
}

/* =========================================
   SCROLL ANIMATIONS (REVEAL)
   ========================================= */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   DECORATIVE ELEMENTS
   ========================================= */
.code-bg {
  position: absolute;
  font-family: "Courier New", monospace;
  font-weight: bold;
  z-index: 1;
  user-select: none;
  pointer-events: none;
}

/* =========================================
   HEADER HOVER EFFECT
   ========================================= */
.section-header {
  transition: all 0.3s ease;
  cursor: default;
}

.section-header:hover {
  color: transparent;
  -webkit-text-stroke: 1px #0f172a;
}

.section-header:hover span {
  color: transparent;
  -webkit-text-stroke: 1px #38bdf8;
}

/* =========================================
   CARDS (MOTION & WEBDEV)
   ========================================= */
.video-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  overflow: hidden;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.play-icon {
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.video-card:hover .play-icon {
  opacity: 1;
  transform: scale(1);
}

.web-card {
  background: white;
  border: 1px solid #e2e8f0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.web-card:hover {
  border-color: #38bdf8;
  box-shadow: 0 10px 30px -10px rgba(56, 189, 248, 0.4);
  transform: translateY(-8px);
}

/* Link Button Styles */
.card-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f1f5f9;
  color: #94a3b8;
  transition: all 0.3s ease;
}

.card-link-btn:hover {
  background-color: #38bdf8;
  color: white;
}

.card-link-btn.oval {
  border-radius: 9999px;
  padding: 0.5rem 1.5rem;
  width: auto;
  height: auto;
  font-weight: 600;
  font-size: 0.875rem;
}

.card-link-btn.circle {
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
}

.filter-btn {
  transition: all 0.3s ease;
}

.filter-btn.active {
  background-color: #0f172a;
  color: white;
  border-color: #0f172a;
}
