html { font-family: 'Inter', sans-serif; }

::selection { background-color: #ddd6fe; color: #4c1d95; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f8fafc; }
::-webkit-scrollbar-thumb { background: #c4b5fd; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #a78bfa; }

/* Glassmorphism header: kaydırma miktarıyla orantılı sürekli dönüşüm (0 = düz bar, 1 = tam oval) */
.glass-nav {
  --scroll-p: 0;
  background: rgba(255, 255, 255, calc(0.7 + var(--scroll-p) * 0.05));
  backdrop-filter: blur(calc(16px + var(--scroll-p) * 4px)) saturate(180%);
  -webkit-backdrop-filter: blur(calc(16px + var(--scroll-p) * 4px)) saturate(180%);
  border-bottom: 1px solid rgba(124, 58, 237, calc(0.08 * (1 - var(--scroll-p))));
  margin: calc(var(--scroll-p) * 12px) calc(var(--scroll-p) * 16px) 0;
  border-radius: calc(var(--scroll-p) * 40px);
  box-shadow:
    0 calc(var(--scroll-p) * 15px) calc(var(--scroll-p) * 40px) calc(var(--scroll-p) * -10px) rgba(124, 58, 237, calc(var(--scroll-p) * 0.18)),
    0 calc(var(--scroll-p) * 1px) calc(var(--scroll-p) * 3px) 0 rgba(15, 23, 42, calc(var(--scroll-p) * 0.06));
  /* rAF adımları arasındaki küçük boşlukları köprüleyen kısa, doğrusal yumuşatma */
  transition: margin 0.12s linear, border-radius 0.12s linear, box-shadow 0.12s linear,
    background 0.12s linear, border-color 0.12s linear, backdrop-filter 0.12s linear;
}

@media (min-width: 1024px) {
  .glass-nav {
    margin: calc(var(--scroll-p) * 12px) calc(var(--scroll-p) * 180px) 0;
  }
}

/* Mesh gradient blobs */
.mesh-blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(70px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.brand-gradient-text {
  background: linear-gradient(90deg, #7c3aed, #a855f7, #7c3aed);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn-primary {
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  background-size: 150% auto;
  transition: all 0.35s ease;
}
.btn-primary:hover {
  background-position: right center;
  box-shadow: 0 12px 30px -8px rgba(124, 58, 237, 0.55);
  transform: translateY(-2px);
}

.card-glow {
  position: relative;
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: rgba(139, 92, 246, 0.12) !important;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease, background 0.4s ease;
}
.card-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(124,58,237,0), rgba(124,58,237,0));
  transition: background 0.4s ease;
  pointer-events: none;
}
.card-glow:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(139, 92, 246, 0.5) !important;
  box-shadow: 0 20px 40px -15px rgba(124, 58, 237, 0.2);
}

/* Floating hero badges: soft neon-purple ambient glow */
.floating-badge {
  box-shadow: 0 16px 34px -12px rgba(139, 92, 246, 0.35), 0 0 0 1px rgba(139, 92, 246, 0.06);
  will-change: transform;
}

.reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition: opacity 0.8s cubic-bezier(.16,1,.3,1), transform 0.8s cubic-bezier(.16,1,.3,1);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Tilt-on-hover for product/portfolio cards */
.tilt-card {
  transition: transform 0.35s cubic-bezier(.16,1,.3,1), box-shadow 0.4s ease, border-color 0.4s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Magnetic buttons */
.magnetic {
  transition: transform 0.25s cubic-bezier(.16,1,.3,1);
  display: inline-flex;
}

.badge-dot {
  box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.6);
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(124, 58, 237, 0); }
  100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0); }
}

.filter-btn.active {
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(124,58,237,0.6);
}

input:focus, textarea:focus { outline: none; }

/* Animated hamburger icon */
.hamburger-box { position: relative; width: 20px; height: 15px; display: block; }
.hamburger-line {
  position: absolute; left: 0; width: 100%; height: 2.5px;
  background: currentColor; border-radius: 2px;
  transition: transform 0.35s cubic-bezier(.4,0,.2,1), opacity 0.2s ease, top 0.35s cubic-bezier(.4,0,.2,1);
}
.hamburger-line:nth-child(1) { top: 0; }
.hamburger-line:nth-child(2) { top: 6.5px; }
.hamburger-line:nth-child(3) { top: 13px; }
#menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) { top: 6.5px; transform: rotate(45deg); }
#menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) { opacity: 0; transform: translateX(-6px); }
#menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) { top: 6.5px; transform: rotate(-45deg); }

/* Mobile menu overlay */
#mobile-menu { visibility: hidden; transition: visibility 0s linear 0.35s; }
#mobile-menu.menu-open { visibility: visible; transition-delay: 0s; }
#mobile-menu-backdrop { opacity: 0; transition: opacity 0.35s ease; }
#mobile-menu.menu-open #mobile-menu-backdrop { opacity: 1; }
#mobile-menu-panel {
  opacity: 0; transform: translateY(-16px) scale(0.98);
  transition: opacity 0.35s cubic-bezier(.16,1,.3,1), transform 0.35s cubic-bezier(.16,1,.3,1);
}
#mobile-menu.menu-open #mobile-menu-panel { opacity: 1; transform: translateY(0) scale(1); }
.mobile-menu-item {
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.4s cubic-bezier(.16,1,.3,1), transform 0.4s cubic-bezier(.16,1,.3,1);
}
#mobile-menu.menu-open .mobile-menu-item { opacity: 1; transform: translateY(0); }
#mobile-menu:not(.menu-open) .mobile-menu-item { transition-delay: 0s !important; }

/* Extra-soft atmospheric blur for the blobs behind the mobile menu panel */
#mobile-menu-panel .mesh-blob { filter: blur(95px); }

/* Mobile menu CTA: brighter gradient with an outer glow */
.mobile-cta {
  background: linear-gradient(90deg, #8b5cf6, #a855f7);
  background-size: 160% auto;
  background-position: 0% center;
  box-shadow: 0 18px 34px -14px rgba(139, 92, 246, 0.65), 0 0 0 1px rgba(139, 92, 246, 0.12);
  transition: background-position 0.4s ease, transform 0.25s ease, box-shadow 0.3s ease;
}
.mobile-cta:hover {
  background-position: 100% center;
  transform: translateY(-2px);
  box-shadow: 0 22px 40px -14px rgba(139, 92, 246, 0.8), 0 0 0 1px rgba(139, 92, 246, 0.18);
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
