/* ============================================
   Abu Bakkar — Global Styles & Design System
   ============================================ */

:root {
  --bg-primary: #060612;
  --bg-secondary: #0d0d1f;
  --bg-card: #111128;
  --accent-primary: #7c3aed;
  --accent-secondary: #06b6d4;
  --accent-gradient: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
  --accent-glow: linear-gradient(135deg, #a855f7 0%, #38bdf8 100%);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-accent: #c4b5fd;
  --border-color: rgba(124, 58, 237, 0.25);
  --glow-purple: 0 0 40px rgba(124, 58, 237, 0.4);
  --glow-cyan: 0 0 40px rgba(6, 182, 212, 0.3);

  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  --text-hero: clamp(48px, 7vw, 88px);
  --text-h2: clamp(32px, 5vw, 56px);
  --text-h3: clamp(20px, 3vw, 32px);
  --text-body: 16px;
  --text-sm: 14px;

  --section-padding: clamp(80px, 12vw, 120px);
  --container-max: 1200px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

@media (max-width: 768px) {
  html {
    scroll-behavior: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .mesh-bg {
    animation: none !important;
  }
}

body.menu-open {
  overflow: hidden;
  touch-action: none;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-padding) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-secondary);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: clamp(16px, 2vw, 18px);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  will-change: transform;
}

.btn-primary {
  background: var(--accent-gradient);
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-purple);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.btn-outline::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: -1;
}

.btn-outline:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--glow-cyan);
}

.btn-outline:hover::before {
  opacity: 0.1;
}

.btn-gradient-border {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid transparent;
  background-image: linear-gradient(var(--bg-secondary), var(--bg-secondary)), var(--accent-gradient);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.btn-gradient-border:hover {
  box-shadow: var(--glow-purple);
  transform: translateY(-1px);
}

/* Badge / Pill */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 500;
  border-radius: 100px;
  border: 1px solid var(--border-color);
  background: rgba(124, 58, 237, 0.08);
  color: var(--text-accent);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.15);
}

/* Gradient orbs (global) */
.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.gradient-orb--purple {
  width: 500px;
  height: 500px;
  background: rgba(124, 58, 237, 0.38);
  top: -10%;
  left: -5%;
}

.gradient-orb--cyan {
  width: 450px;
  height: 450px;
  background: rgba(6, 182, 212, 0.32);
  bottom: 10%;
  right: -5%;
}

/* Mesh gradient background */
.mesh-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(124, 58, 237, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(6, 182, 212, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 50% 35% at 50% 90%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  animation: meshPulse 12s ease-in-out infinite;
}

@keyframes meshPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.75;
  }
}

#particles-js {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: auto;
  opacity: 1;
}

#particles-js canvas {
  opacity: 1 !important;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  padding: 16px 24px;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  max-width: 360px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast--success {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: #67e8f9;
}

.toast--error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

/* Form errors */
.form-error {
  font-size: 12px;
  color: #f87171;
  margin-top: 4px;
  display: none;
}

.form-error.visible {
  display: block;
}

.input-error {
  border-color: rgba(239, 68, 68, 0.6) !important;
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 768px) {
  :root {
    --section-padding: 72px;
    --text-hero: clamp(34px, 9vw, 48px);
    --text-h2: clamp(28px, 7vw, 38px);
    --text-h3: clamp(18px, 5vw, 24px);
  }

  .container {
    padding: 0 20px;
  }

  .section-header {
    margin-bottom: 42px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 14px;
  }

  .badge {
    font-size: 12px;
    padding: 7px 12px;
  }

  .gradient-orb--purple,
  .gradient-orb--cyan {
    width: 280px;
    height: 280px;
    filter: blur(56px);
  }

  .toast {
    right: 12px;
    left: 12px;
    bottom: 16px;
    max-width: none;
    width: auto;
    padding: 14px 16px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 14px;
  }

  .section-header {
    margin-bottom: 34px;
  }

  .section-subtitle {
    font-size: 15px;
  }

  .btn {
    width: 100%;
  }
}
