/* ============================================================
   INDUSTRIAL FREELANCE PLATFORM — GLOBAL STYLES
   Design System: Glassmorphism + Deep Dark + Accent Orange
   ============================================================ */


/* ── CSS Variables ───────────────────────────────────────── */
:root {
  --bg: #0A0A0F;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-hover: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.12);
  --border-accent: #FF6B1A;
  --accent: #FF6B1A;
  --accent-glow: rgba(255, 107, 26, 0.35);
  --accent-dim: rgba(255, 107, 26, 0.15);
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.5);
  --text-tertiary: rgba(255, 255, 255, 0.3);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --blur-glass: blur(24px);
  --blur-orb: 80px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-mid: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  --font-body: 'Inter', sans-serif;
  --font-display: 'Bebas Neue', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ── Ambient Orbs ────────────────────────────────────────── */
.ambient-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(var(--blur-orb));
  opacity: 0.18;
  will-change: transform;
  animation: orbFloat 20s ease-in-out infinite alternate;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #FF6B1A 0%, transparent 70%);
  top: -150px;
  left: -150px;
  animation-duration: 22s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #FF8C42 0%, transparent 70%);
  bottom: -100px;
  right: -100px;
  animation-duration: 18s;
  animation-delay: -5s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #FF6B1A 0%, transparent 70%);
  top: 50%;
  left: 60%;
  opacity: 0.10;
  animation-duration: 25s;
  animation-delay: -10s;
}

@keyframes orbFloat {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(30px, -40px) scale(1.08);
  }

  100% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

/* ── Navbar ──────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding: 12px 28px;
  background: rgba(10, 10, 15, 0.65);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: 100px;
  min-width: 520px;
  max-width: 820px;
  width: calc(100% - 80px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 107, 26, 0.06) inset;
  transition: all var(--transition-mid);
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.85);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 20px var(--accent-glow);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  white-space: nowrap;
  position: relative;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 100px;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(255, 107, 26, 0.1);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 60%;
}

.nav-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.nav-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* ── Glass Card ──────────────────────────────────────────── */
.glass {
  background: var(--surface);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-mid);
}

.glass:hover {
  background: var(--surface-hover);
  border-color: rgba(255, 107, 26, 0.4);
  box-shadow: 0 0 28px var(--accent-glow), 0 8px 32px rgba(0, 0, 0, 0.3);
  transform: translateY(-4px);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 0 24px var(--accent-glow);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: rgba(255, 255, 255, 0.2);
  transform: skewX(-20deg);
  transition: left var(--transition-mid);
}

.btn-primary:hover {
  background: #FF7A2E;
  box-shadow: 0 0 40px rgba(255, 107, 26, 0.6), 0 4px 16px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.btn-primary:hover::before {
  left: 120%;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--transition-fast);
  backdrop-filter: var(--blur-glass);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 20px var(--accent-dim);
  transform: translateY(-2px);
}

/* ── Section layout ──────────────────────────────────────── */
.section {
  position: relative;
  z-index: 1;
  padding: 100px 40px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 560px;
}

/* ── Scroll Reveal ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(36px) scale(0.98);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

.reveal-delay-4 {
  transition-delay: 0.4s;
}

.reveal-delay-5 {
  transition-delay: 0.5s;
}

/* ── Page Transition ─────────────────────────────────────── */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.page-transition.active {
  opacity: 1;
  pointer-events: all;
}

.transition-gear {
  width: 80px;
  height: 80px;
  background-color: var(--accent);
  mask-image: url('./assets/gear.png');
  -webkit-mask-image: url('./assets/gear.png');
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
  animation: gearSpin 2s linear infinite;
  filter: drop-shadow(0 0 12px rgba(255, 107, 26, 0.6));
}

.transition-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: pulseText 1.5s ease-in-out infinite;
}

@keyframes pulseText {

  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }
}

@keyframes gearSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Floating Bubbles ────────────────────────────────────── */
.floating-bubbles {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.floating-ai {
  position: fixed;
  bottom: 28px;
  left: 24px;
  z-index: 900;
}

.float-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: visible;
}

.float-btn svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.float-btn:hover {
  transform: scale(1.12);
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
  background: rgba(255, 107, 26, 0.12);
}

.float-btn .float-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-primary);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.floating-ai .float-btn .float-tooltip {
  left: calc(100% + 12px);
  right: auto;
}

.float-btn:hover .float-tooltip {
  opacity: 1;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 40px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

footer span {
  color: var(--accent);
}

/* ── AI Chat Drawer ──────────────────────────────────────── */
.ai-chat-drawer {
  position: fixed;
  bottom: 96px;
  left: 24px;
  z-index: 950;
  width: 320px;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(28px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  transform: translateY(20px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-chat-drawer.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

.ai-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 107, 26, 0.08);
}

.ai-chat-header .ai-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #FF8C42);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.ai-chat-header h4 {
  font-size: 0.9rem;
  font-weight: 600;
}

.ai-chat-header p {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.ai-chat-body {
  padding: 16px;
  min-height: 120px;
}

.ai-chat-bubble {
  background: rgba(255, 107, 26, 0.12);
  border: 1px solid rgba(255, 107, 26, 0.2);
  border-radius: 14px 14px 14px 4px;
  padding: 12px 14px;
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.ai-chat-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.ai-chat-input input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 14px;
  font-size: 0.82rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  outline: none;
}

.ai-chat-input input:focus {
  border-color: var(--accent);
}

.ai-chat-input button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all var(--transition-fast);
}

.ai-chat-input button:hover {
  box-shadow: 0 0 16px var(--accent-glow);
  transform: scale(1.08);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar {
    min-width: unset;
    width: calc(100% - 32px);
    top: 12px;
    padding: 10px 18px;
    gap: 0;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(28px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
  }

  .nav-menu-btn {
    display: flex;
  }

  .section {
    padding: 70px 20px;
  }

  .float-btn .float-tooltip {
    display: none;
  }

  .ai-chat-drawer {
    left: 12px;
    right: 12px;
    width: auto;
  }
}